Solved

How to search for an order by tracking number?

TJ_Biddle
Excursionist
38 1 17

When I'm using the Shopify via the Admin backend, I'm easily able to pop in a tracking number into the main search bar and it will easily return the associated order that had a fulfillment with that tracking number.

 

I've searched and searched and searched - yet I could find no means of doing this myself via the API.

Accepted Solution (1)
ShopifyDevSup
Shopify Staff
1326 218 460

This is an accepted solution.

Hi TJ_Biddle,

 

Currently there is not a way to directly search orders by tracking number via API so we're submitting a suggestion for it on your behalf.

 

If you wanted to build something on your own, for historical data on a particular shop using a [GraphQL Bulk Query] is a good option where a minimal query to get the order ID and any related tracking numbers for all orders looks like this:

 

{
 orders {
   edges {
     node {
       id
       fulfillments {
         trackingInfo {
           number
         }
       }
     }
   }
 }
}

 

For ongoing updates for a particular shop subscribing to the [fulfillments/create] and [fulfillments/update] webhooks would provide all the tracking info and related order ID's as they get updated.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

View solution in original post

Replies 5 (5)

TJ_Biddle
Excursionist
38 1 17

Bump ☝🏼

 

This should be possible somehow if the Shopify Admin can do it, no?

TJ_Biddle
Excursionist
38 1 17

Bump

ShopifyDevSup
Shopify Staff
1326 218 460

This is an accepted solution.

Hi TJ_Biddle,

 

Currently there is not a way to directly search orders by tracking number via API so we're submitting a suggestion for it on your behalf.

 

If you wanted to build something on your own, for historical data on a particular shop using a [GraphQL Bulk Query] is a good option where a minimal query to get the order ID and any related tracking numbers for all orders looks like this:

 

{
 orders {
   edges {
     node {
       id
       fulfillments {
         trackingInfo {
           number
         }
       }
     }
   }
 }
}

 

For ongoing updates for a particular shop subscribing to the [fulfillments/create] and [fulfillments/update] webhooks would provide all the tracking info and related order ID's as they get updated.

Developer Support @ Shopify
- Was this reply helpful? Click Like to let us know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

TJ_Biddle
Excursionist
38 1 17

Great! Thank you for submitting the suggestion & the work-around!

ParcelPanel
Explorer
73 2 6

ParcelPanel_2-1683281909794.png

You may use an order tracking app like ParcelPanel to find orders by tracking number. Plus, by doing so, you can access the real-time tracking updates, so do your customers. They can use the branded tracking page and receive shipping notifications via email.

 

You may also export information including order number, tracking number, courier, transit time, order date, order status into a CSV file if you want. You can access detailed analytics within a certain period through the dashboard.

 

An order tracking app can streamline your workflow and greatly improve your post-purchase experience.

 

Currently, ParcelPanel is the top-rated order tracking app in Shopify App Store. If you want to get a 30-day free trial instead of the standard 7-day free trial, use this link to install our app.

Make Post-Purchase the Best Part of the Customer Experience.
Delight your customers with automated shipment tracking, increase brand loyalty and drive more sales.
Official Website | ParcelPanel Shopify App