Version: 2024-10
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query DeliveryZoneList { deliveryProfiles(first: 10) { edges { node { id profileLocationGroups { locationGroup { id } locationGroupZones(first: 10) { edges { node { zone { id name countries { code { countryCode restOfWorld } provinces { name code } } } methodDefinitions(first: 10) { edges { node { id active description methodConditions { field operator conditionCriteria { __typename ... on MoneyV2 { amount currencyCode } ... on Weight { unit value } } } } } } } } } } } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query DeliveryZoneList {\n deliveryProfiles(first: 10) {\n edges {\n node {\n id\n profileLocationGroups {\n locationGroup {\n id\n }\n locationGroupZones(first: 10) {\n edges {\n node {\n zone {\n id\n name\n countries {\n code {\n countryCode\n restOfWorld\n }\n provinces {\n name\n code\n }\n }\n }\n methodDefinitions(first: 10) {\n edges {\n node {\n id\n active\n description\n methodConditions {\n field\n operator\n conditionCriteria {\n __typename\n ... on MoneyV2 {\n amount\n currencyCode\n }\n ... on Weight {\n unit\n value\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }`,\n});\n" Ruby example: "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n query DeliveryZoneList {\n deliveryProfiles(first: 10) {\n edges {\n node {\n id\n profileLocationGroups {\n locationGroup {\n id\n }\n locationGroupZones(first: 10) {\n edges {\n node {\n zone {\n id\n name\n countries {\n code {\n countryCode\n restOfWorld\n }\n provinces {\n name\n code\n }\n }\n }\n methodDefinitions(first: 10) {\n edges {\n node {\n id\n active\n description\n methodConditions {\n field\n operator\n conditionCriteria {\n __typename\n ... on MoneyV2 {\n amount\n currencyCode\n }\n ... on Weight {\n unit\n value\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\nQUERY\n\nresponse = client.query(query: query)\n" PHP example: "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<query([\"query\" => $query]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query DeliveryZoneList {\n deliveryProfiles(first: 10) {\n edges {\n node {\n id\n profileLocationGroups {\n locationGroup {\n id\n }\n locationGroupZones(first: 10) {\n edges {\n node {\n zone {\n id\n name\n countries {\n code {\n countryCode\n restOfWorld\n }\n provinces {\n name\n code\n }\n }\n }\n methodDefinitions(first: 10) {\n edges {\n node {\n id\n active\n description\n methodConditions {\n field\n operator\n conditionCriteria {\n __typename\n ... on MoneyV2 {\n amount\n currencyCode\n }\n ... on Weight {\n unit\n value\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query DeliveryZoneList {\n deliveryProfiles(first: 10) {\n edges {\n node {\n id\n profileLocationGroups {\n locationGroup {\n id\n }\n locationGroupZones(first: 10) {\n edges {\n node {\n zone {\n id\n name\n countries {\n code {\n countryCode\n restOfWorld\n }\n provinces {\n name\n code\n }\n }\n }\n methodDefinitions(first: 10) {\n edges {\n node {\n id\n active\n description\n methodConditions {\n field\n operator\n conditionCriteria {\n __typename\n ... on MoneyV2 {\n amount\n currencyCode\n }\n ... on Weight {\n unit\n value\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n }\n}"
input: null
response: { "data": { "deliveryProfiles": { "edges": [ { "node": { "id": "gid://shopify/DeliveryProfile/28404419", "profileLocationGroups": [ { "locationGroup": { "id": "gid://shopify/DeliveryLocationGroup/42565096" }, "locationGroupZones": { "edges": [ { "node": { "zone": { "id": "gid://shopify/DeliveryZone/600655460", "name": "Ottawa South", "countries": [ { "code": { "countryCode": "CA", "restOfWorld": false }, "provinces": [ { "name": "Ontario", "code": "ON" } ] } ] }, "methodDefinitions": { "edges": [] } } }, { "node": { "zone": { "id": "gid://shopify/DeliveryZone/765028017", "name": "Rest of World", "countries": [ { "code": { "countryCode": null, "restOfWorld": true }, "provinces": [] } ] }, "methodDefinitions": { "edges": [ { "node": { "id": "gid://shopify/DeliveryMethodDefinition/341096212", "active": true, "description": "Use this when shipping a footwear", "methodConditions": [] } } ] } } } ] } }, { "locationGroup": { "id": "gid://shopify/DeliveryLocationGroup/311517628" }, "locationGroupZones": { "edges": [] } } ] } }, { "node": { "id": "gid://shopify/DeliveryProfile/142458073", "profileLocationGroups": [ { "locationGroup": { "id": "gid://shopify/DeliveryLocationGroup/955592432" }, "locationGroupZones": { "edges": [ { "node": { "zone": { "id": "gid://shopify/DeliveryZone/472354800", "name": "Downtown Montreal", "countries": [ { "code": { "countryCode": "CA", "restOfWorld": false }, "provinces": [ { "name": "Quebec", "code": "QC" } ] } ] }, "methodDefinitions": { "edges": [] } } }, { "node": { "zone": { "id": "gid://shopify/DeliveryZone/132414656", "name": "Downtown Ottawa", "countries": [ { "code": { "countryCode": "CA", "restOfWorld": false }, "provinces": [ { "name": "Ontario", "code": "ON" } ] } ] }, "methodDefinitions": { "edges": [ { "node": { "id": "gid://shopify/DeliveryMethodDefinition/2482324", "active": true, "description": "Use this when shipping a snowboard", "methodConditions": [ { "field": "TOTAL_WEIGHT", "operator": "LESS_THAN_OR_EQUAL_TO", "conditionCriteria": { "__typename": "Weight", "unit": "POUNDS", "value": 19.9 } } ] } }, { "node": { "id": "gid://shopify/DeliveryMethodDefinition/7712587", "active": false, "description": "Use this when shipping a snowboard", "methodConditions": [] } }, { "node": { "id": "gid://shopify/DeliveryMethodDefinition/164614040", "active": true, "description": "Use this when shipping a snowboard", "methodConditions": [ { "field": "TOTAL_WEIGHT", "operator": "LESS_THAN_OR_EQUAL_TO", "conditionCriteria": { "__typename": "Weight", "unit": "POUNDS", "value": 10.0 } } ] } }, { "node": { "id": "gid://shopify/DeliveryMethodDefinition/183895045", "active": true, "description": "Use this when shipping a snowboard", "methodConditions": [ { "field": "TOTAL_WEIGHT", "operator": "GREATER_THAN_OR_EQUAL_TO", "conditionCriteria": { "__typename": "Weight", "unit": "POUNDS", "value": 20.0 } }, { "field": "TOTAL_WEIGHT", "operator": "LESS_THAN_OR_EQUAL_TO", "conditionCriteria": { "__typename": "Weight", "unit": "POUNDS", "value": 40.0 } } ] } }, { "node": { "id": "gid://shopify/DeliveryMethodDefinition/213030275", "active": false, "description": "Use this when shipping a snowboard", "methodConditions": [ { "field": "TOTAL_WEIGHT", "operator": "GREATER_THAN_OR_EQUAL_TO", "conditionCriteria": { "__typename": "Weight", "unit": "POUNDS", "value": 40.01 } }, { "field": "TOTAL_WEIGHT", "operator": "LESS_THAN_OR_EQUAL_TO", "conditionCriteria": { "__typename": "Weight", "unit": "POUNDS", "value": 60.0 } } ] } }, { "node": { "id": "gid://shopify/DeliveryMethodDefinition/573089753", "active": false, "description": "Carrier service api rates", "methodConditions": [] } } ] } } }, { "node": { "zone": { "id": "gid://shopify/DeliveryZone/881877111", "name": "Germany", "countries": [ { "code": { "countryCode": "DE", "restOfWorld": false }, "provinces": [] } ] }, "methodDefinitions": { "edges": [] } } }, { "node": { "zone": { "id": "gid://shopify/DeliveryZone/813997144", "name": "Rest of World", "countries": [ { "code": { "countryCode": null, "restOfWorld": true }, "provinces": [] } ] }, "methodDefinitions": { "edges": [] } } } ] } }, { "locationGroup": { "id": "gid://shopify/DeliveryLocationGroup/397370199" }, "locationGroupZones": { "edges": [ { "node": { "zone": { "id": "gid://shopify/DeliveryZone/283164273", "name": "Argentina", "countries": [ { "code": { "countryCode": "AR", "restOfWorld": false }, "provinces": [ { "name": "Buenos Aires", "code": "B" } ] } ] }, "methodDefinitions": { "edges": [] } } }, { "node": { "zone": { "id": "gid://shopify/DeliveryZone/599563131", "name": "US zone 1", "countries": [ { "code": { "countryCode": "US", "restOfWorld": false }, "provinces": [] } ] }, "methodDefinitions": { "edges": [ { "node": { "id": "gid://shopify/DeliveryMethodDefinition/159353577", "active": true, "description": "Use this when shipping a snowboard", "methodConditions": [ { "field": "TOTAL_PRICE", "operator": "GREATER_THAN_OR_EQUAL_TO", "conditionCriteria": { "__typename": "MoneyV2", "amount": "50.0", "currencyCode": "USD" } } ] } }, { "node": { "id": "gid://shopify/DeliveryMethodDefinition/206705707", "active": false, "description": "Use this when shipping a snowboard", "methodConditions": [ { "field": "TOTAL_PRICE", "operator": "GREATER_THAN_OR_EQUAL_TO", "conditionCriteria": { "__typename": "MoneyV2", "amount": "100.0", "currencyCode": "USD" } } ] } } ] } } } ] } }, { "locationGroup": { "id": "gid://shopify/DeliveryLocationGroup/311517628" }, "locationGroupZones": { "edges": [] } } ] } }, { "node": { "id": "gid://shopify/DeliveryProfile/426406120", "profileLocationGroups": [ { "locationGroup": { "id": "gid://shopify/DeliveryLocationGroup/865330255" }, "locationGroupZones": { "edges": [ { "node": { "zone": { "id": "gid://shopify/DeliveryZone/846446649", "name": "Rest of World", "countries": [] }, "methodDefinitions": { "edges": [] } } } ] } } ] } }, { "node": { "id": "gid://shopify/DeliveryProfile/593363170", "profileLocationGroups": [ { "locationGroup": { "id": "gid://shopify/DeliveryLocationGroup/311517628" }, "locationGroupZones": { "edges": [] } }, { "locationGroup": { "id": "gid://shopify/DeliveryLocationGroup/955592432" }, "locationGroupZones": { "edges": [ { "node": { "zone": { "id": "gid://shopify/DeliveryZone/161697132", "name": "Canada", "countries": [ { "code": { "countryCode": "CA", "restOfWorld": false }, "provinces": [ { "name": "Ontario", "code": "ON" } ] } ] }, "methodDefinitions": { "edges": [ { "node": { "id": "gid://shopify/DeliveryMethodDefinition/718143985", "active": true, "description": "Standard method for shipping a snowboard", "methodConditions": [] } } ] } } } ] } } ] } }, { "node": { "id": "gid://shopify/DeliveryProfile/933922677", "profileLocationGroups": [ { "locationGroup": { "id": "gid://shopify/DeliveryLocationGroup/562374560" }, "locationGroupZones": { "edges": [ { "node": { "zone": { "id": "gid://shopify/DeliveryZone/1066475769", "name": "Rest of World", "countries": [] }, "methodDefinitions": { "edges": [] } } } ] } } ] } } ] } } }