Get Orders of Shipping Line

Get Orders of Shipping Line

StefanosDev
Shopify Partner
5 0 1

I want to find a direct way to get the orders of a shop that were made through a particular shipping line source (or carrier service). What query parameter can I use from the orders query in the GraphQL API, or should I make it through another query connection?

Replies 3 (3)

ShopifyDevSup
Shopify Staff
1451 238 497

Hey @StefanosDev - appreciate you reaching out. There isn't a carrier service query filter parameter available on the orders object in GraphQL. You could potentially use the "fulfillment_location_id" on the orders object if you have a carrier service assigned to a specific fulfillment location. 

I would actually recommend using our guide here on managing order fulfillments directly - especially if you looked at using the Fulfillment object, which does have a specific field you can use to query a carrier service for a specific order. 

Hope this helps! 

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

StefanosDev
Shopify Partner
5 0 1

Thank you for your reply. The logic of the app is that it creates a shipping carrier service for the Shopify store. When a customer reaches the Shipping section of the Checkout, the carrier service callback URL is hit and returns some dynamic shipping points that the customer can choose. The name of these shipping points are always different, but the source of the shipping service remains always the same (the one that was registered initially).

We can draw that sort of information from the shippingLine field. I am afraid fulfillment has nothing to do with it, unless you can direct me to a way to connect the registering of the carrier services to fulfillments.

ShopifyDevSup
Shopify Staff
1451 238 497

Hi @StefanosDev 👋


The `Order.ShippingLine` object has a `carrierIdentifier` and `source` field  for the shipping rate provider.

 

Hope that helps!

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