Find order by tracking number

The search function in Admin can bring up orders when entering a tracking number, but on the graphql side the fulfillment query only has id as argument.

Is there a way to find which order a tracking number is attached to, without downloading all orders (with their fulfillments and trackings) and looping through them?

Thanks

Hi Daniel,

Currently, the Shopify GraphQL Admin API doesn’t provide a direct query to find an order by its tracking number. The fulfillment query requires an ID as an argument, which means you can’t directly search for fulfillments using a tracking number.

To achieve your goal without downloading all orders, you could consider these workarounds:

  1. Store Tracking Numbers as Metafields: If you store tracking numbers as metafields on orders, you can use the order query with a metafield filter to find orders by tracking number. This requires setting up metafields for tracking numbers in advance.
  2. Use a Custom App: Develop a custom app that listens to fulfillment events and maintains a mapping of tracking numbers to order IDs. This app can then provide a service to query orders by tracking number.
  3. Batch Processing: If neither of the above options is feasible, you may need to periodically download order data and process it in batches to maintain a local mapping of tracking numbers to order IDs.

Hope this helps!

Hi Liam
Thanks for your help.

Regarding option 1, can you confirm that the orders query can have a query filter by metafield? I can’t find it in orders - GraphQL Admin .

I am interested in using option 1 as well, but I can’t find anything about it that works in the docs.

From digging into this - it does seem that it isn’t currently possible to query orders by metafield - my apologies for indicating this is possible. I’ve connected with the custom data team to see if there is a plan for this ability to be available in the future.

+1 - still a gap as of the 2026-07 API version.

There’s no way to resolve a tracking number back to an order via GraphQL: the orders query search has no tracking field, and fulfillment only takes an id. fulfillment.trackingInfo.number is readable, but only once you already hold the order, so there’s no reverse lookup.

The only workaround is enumerating orders and matching client-side, which doesn’t scale and eats rate limit.

Concrete use case: we build a warehouse/fulfilment app, and lots of flows start from a tracking number (scanning a returned parcel, reconciling a carrier exception, answering a “where’s my order” ticket).

Every one of them needs tracking-number → order, and right now we can’t do this flow without matching client-side.

Ask is simple: either a supported search field on orders (e.g. query: \"tracking_number:1Z999...\") or a dedicated query that returns the order/fulfillment for a given tracking number.

Cheers,
Charlie