Getting Shipping Carrier Method names using GraphQL query

How can I get the Shipping Carrier method names by using the Shopify GraphQL query (GET API) instead of GraphQL mutation?

Let me explain what I’m trying to do:

I am using the availableCarrierServices GraphQL query to fetch the available Shipping Carrier names that are present in my Shopify Store. See the screenshot below.

In the above screenshot, the response from the availableCarrierServices returns only Shipping Carrier names, but I also want to get the method names of the Carriers. for example: “UPS Ground”, “UPS Next Day Air”, etc.

Also, there aren’t any objects that let me fetch the Shipping Carrier method names in this API query.

In the above Screenshot, I can get the Shipping Carrier methods names using the draftOrderCalculate GraphQL mutation, But I want to fetch the Shipping Carrier methods names using GraphQL query (GET API) instead of a mutation.

Can anyone help me with figuring this out? Thank You.

Hey @zainabraja

Checking on this one.

Hey @zainabraja

From some API support folks:


I’ve confirmed this on my own test store with the following query. Please note that the origins and restOfWorld arguments are required. If you want to see the rates for a specific country you can add the countryCodes argument and set restOfWorld to false.

query{
    availableCarrierServices{
      carrierService{
        formattedName
        availableServicesForCountries(origins: "gid://shopify/Location/52415234070", countryCodes:CA, restOfWorld:false){
          name
        }
      }
    }
}

https://screenshot.click/03-45-foij6-t7xwi.png

Here are the related resources in our Shopify.dev documentation as well:

1 Like

Thank you so much!