Next link does not receive from Inventory Level API

Topic summary

Issue: Using the Admin REST inventory_levels API (v2023-04, limit=250), the requester intermittently does not receive the pagination “next” link, leading to incomplete inventory retrieval (sometimes only 10–15 pages).

Guidance: The endpoint uses cursor-based pagination; keep following the “next” link in the HTTP Link header until it’s absent. Absence can mean all data has been retrieved, but given missing items, investigate further. Recommended checks:

  • Respect API rate limits (2 calls/sec, 40 calls/20 sec).
  • Confirm you’re reading the HTTP Link header correctly.
  • Validate request parameters/headers/body and share details for deeper troubleshooting.

Update/workaround: Another user observed the Link header’s key casing varies (“Link” vs “link”). Treat header names case-insensitively (e.g., normalize to lowercase) to reliably detect the “next” link; they suspect this is a sporadic Shopify issue.

Status: No confirmed fix from Shopify yet; likely pagination header handling/casing issue. Action items: implement case-insensitive Link header lookup, verify rate limiting and request correctness, and provide request/response details if problems persist.

Summarized with AI on January 15. AI used: gpt-5.

Hello Support,

I am using “inventory_levels” Admin API (v 2023-04) with a limit of 250 to pull inventory from the store. But it seems, I am not receiving inventory for all items. When I looked deeply, I was not receiving “next” link after the response. Sometimes I could receive 10 calls, sometimes 15 calls etc.

Could you guide us to fix this issue? Thanks.

Hi Parasmk,

It sounds like you might be encountering pagination issues with the API. The inventory_levels API endpoint uses cursor-based pagination and you should be able to retrieve all inventory items by following the next link in the HTTP header until no such link is returned.

If you’re not receiving the next link in the HTTP header, it be because you’ve retrieved all the available data. However, based on your message, it seems like’s more data to retrieve which you’re not getting.

Here are a few things you could try:

  1. Check your API call limit: Please make sure you aren’t hitting the API call limit. Shopify allows up to 2 calls per second, and up to 40 calls in 20 seconds.

  2. Check the response headers: The next link should be in the HTTP Link header of the response. Please ensure you’re checking the correct place for it.

  3. Check for errors in your request: Make sure there are no errors in your request parameters, headers, or body that might be causing an incomplete response.

If you’ve tried these steps and you’re still encountering issues, please provide us with more details about your API calls (including request parameters and headers) so we can help you troubleshoot further.

Hope this helps!

Hi Parasmk,

We were having the same issue and found that Shopify is sending the next link parameter sometimes as “Link” and other times as “link” (lowercase) but our code was always checking for “Link” param in Headers.

Looks like a Shopify bug as it is very random. But for now, we are not converting it to lowercase always before comparing the parameters.

Hope this helps you too.

Hope it helps.