Issue with ShipHero API

Hello, the following query had been working fine for the past month or so, but for whatever reason, it only returns an error message now and upon retrying, tells me that I have fewer credits remaining than before. This is odd because there is no other function using the same API key. Is there something wrong with the API, or my query?

Below, I use the latest cursor to query where the last query left off if the number of items in the query time period is > 2000, otherwise I just query the first 2000 entries in that time period

Request ID: 6564d5f1f3b8cbe5a216e517 said that I had about 115 credits remaining. Just a few seconds later, Request ID: 6564d60010c43bb5c455f9cf said I had about 74 credits remaining despite no successful query attempts? Shouldn’t it replenish credits faster than the query rate (which should cost 1 credit according to the error message).

I have a GCS cloud function running with the same API key that looks at the query for this error message, and then re-tries the query only after those many seconds + 1, so I’m not making a large number of calls slowing the API (unless I am)

  if use_cursor:
    query = """query {{
    picks_per_day(date_from:"{start_date}" date_to:"{end_date}") {{
      data (first:2000  after:"{latest_cursor}") {{
        pageInfo {{
            hasNextPage
            startCursor
            endCursor
          }}
        edges {{
          cursor
          node {{
            id
            order_number
            created_at
            order_id
            warehouse_id
            sku 
            picked_quantity
            pick_type
            user_id
            user_first_name
            user_last_name
            order {{
              shop_name
              account_id
              shipments {{
                  warehouse_id
              }}
            }}
            }}

          }}
        }}
      }}
      }}
      """.format(latest_cursor=latest_cursor, start_date=start_date, end_date=end_date)
  else:
    query = """query {{
    picks_per_day(date_from:"{start_date}" date_to:"{end_date}") {{
      data (first:2000) {{
        pageInfo {{
            hasNextPage
            startCursor
            endCursor
          }}
        edges {{
          cursor
          node {{
            id
            order_number
            warehouse_id
            created_at
            order_id
            sku 
            picked_quantity
            pick_type
            user_id
            user_first_name
            user_last_name
            order {{
              shop_name
              account_id
              shipments {{
                  warehouse_id
              }}
            }}
            }}

          }}
        }}
      }}
      }}
      """.format(latest_cursor=latest_cursor, start_date=start_date, end_date=end_date)

Hey @saladass4254,

Thanks for bringing this to our attention.
I’ll look into this and get back to you as soon as possible.

Please let me know if you have any questions or concerns.

Best,
RayanP

Hello, any updates here? this is blocking some very important dashboards for us

Hey @saladass4254,

Thanks for hanging in there!
We’re escalating this one for our Engineering Team to review and shed some light on.

I’ll keep you updated as we learn more.

Best,
RayanP