Can't get inventory counts

I’m trying to solve a seemingly simple problem: given a single product (which for us is comprised of up to 30 unique SKUs), how many units are in stock of each unique SKU?

Note I have multiple such products, so there might be 200 SKUs total, comprising of 8 products, each with several variants.

I’m running into the following issues:

  • There’s no way to pull groupings of products in graphQL. I can’t filter by tag, I can’t filter by text search, I can’t pass multiple SKUs at once. ShipHero’s internal GQL (one used on this page) allows for ALL of these methods of filtering.
  • There’s egregious API rate limits, both at the individual query level and at the rate per token level, so I can’t just pull all the products in my account and filter from there in memory. (I think the max number of products I can pull is like 50 or so per query, and then maybe 100 total using paginated calls before having to wait a minute for my credits to renew.
  • I tried to get around these issues by just deleting all the products that we currently do not stock in ShipHero since we’re only actively storing < 50 SKUs with ShipHero at this time, however, although the deleted products no longer show up in the ShipHero UI, they are still getting returned by ShipHero’s GraphQL API.

I appreciate it if someone could help me out here. Unless we can programmatically pull inventory counts, ShipHero just won’t work for us as a 3PL going forward.

  • Austin

Hello @austin!
Welcome to the SHipHero Public API community!

There are two ways you can pull your stock without spending credits:

  1. Use the inventory update webhook: Webhooks – Developer Resources | ShipHero. You can then run the products query every now and then to perform a conciliation if you want, but if you update as the webhooks come in, you should be good.
  2. Using the inventory snapshot: Inventory-Snapshot – Developer Resources | ShipHero. As the name says, it’s a snapshot of your inventory at a given time.

Kind regards,
TomasFD

Thanks @tomasfd — the inventory snapshot approach worked well for me. Appreciate the help!

1 Like

Hello Austin!

Great news!

Care to send over the query you were using before anyway? Although your issue is solved, I’d like to see if I could think of something to optimize it further.

Best regards,
TomasFD