New Shopify Certification now available: Liquid Storefronts for Theme Developers

Admin API: retrieve list of available shipping methods.

mtrxn
Shopify Partner
1 0 0

Is there a way I can get a list of currently available shipping methods so I can display them to the customer inside a 3rd party app? Very similar to what checkout does.
image.png
I was only able to get a names and prices so far. I'm using

GET /admin/api/2022-04/shipping_zones.json

endpoint.
image.png

I'd love to know is there a way I can also get a shipping time information using Admin API?  And what's the purpose of id property? Can I use it during Order creation (also using Admin API)?

Replies 2 (2)
dotamir
Shopify Partner
4 0 0

Hi. How did it go? Could you find a way?
I'm facing same issue

 

samirNonDormire
Visitor
1 0 0

QUERY;

query {
  deliveryProfiles(first10) {
    edges {
        node {
            profileLocationGroups {
                locationGroupZones(first5) {
                    edges {
                        node {
                            methodDefinitions(first5) {
                                edges {
                                    node {
                                        id
                                        name
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
  }
}
RESPONSE:
{
    "data": {
        "deliveryProfiles": {
            "edges": [
                {
                    "node": {
                        "profileLocationGroups": [
                            {
                                "locationGroupZones": {
                                    "edges": [
                                        {
                                            "node": {
                                                "methodDefinitions": {
                                                    "edges": [
                                                        {
                                                            "node": {
                                                                "id""gid://shopify/DeliveryMethodDefinition/778642817312",
                                                                "name""Standard"
                                                            }
                                                        },
                                                        {
                                                            "node": {
                                                                "id""gid://shopify/DeliveryMethodDefinition/778642850080",
                                                                "name""Express"
                                                            }
                                                        }
                                                    ]
                                                }
                                            }
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                }
            ]
        }
    },
    "extensions": {
        "cost": {
            "requestedQueryCost"442,
            "actualQueryCost"11,
            "throttleStatus": {
                "maximumAvailable"1000.0,
                "currentlyAvailable"989,
                "restoreRate"50.0
            }
        }
    }
}