Version: 2025-01
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { priceLists(first: 1, reverse: true) { nodes { id currency fixedPricesCount catalog { id title } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n priceLists(first: 1, reverse: true) {\n nodes {\n id\n currency\n fixedPricesCount\n catalog {\n id\n title\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 {\n priceLists(first: 1, reverse: true) {\n nodes {\n id\n currency\n fixedPricesCount\n catalog {\n id\n title\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\n query {\n priceLists(first: 1, reverse: true) {\n nodes {\n id\n currency\n fixedPricesCount\n catalog {\n id\n title\n }\n }\n }\n }\nQUERY;\n\n$response = $client->query([\"query\" => $query]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n priceLists(first: 1, reverse: true) {\n nodes {\n id\n currency\n fixedPricesCount\n catalog {\n id\n title\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n priceLists(first: 1, reverse: true) {\n nodes {\n id\n currency\n fixedPricesCount\n catalog {\n id\n title\n }\n }\n }\n}"
input: null
response: { "data": { "priceLists": { "nodes": [ { "id": "gid://shopify/PriceList/1014716632", "currency": "USD", "fixedPricesCount": 0, "catalog": null } ] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { priceLists(first: 1) { nodes { id name currency quantityRules(first: 3, originType: FIXED) { nodes { increment maximum minimum productVariant { id title } } } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n priceLists(first: 1) {\n nodes {\n id\n name\n currency\n quantityRules(first: 3, originType: FIXED) {\n nodes {\n increment\n maximum\n minimum\n productVariant {\n id\n title\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 {\n priceLists(first: 1) {\n nodes {\n id\n name\n currency\n quantityRules(first: 3, originType: FIXED) {\n nodes {\n increment\n maximum\n minimum\n productVariant {\n id\n title\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\n query {\n priceLists(first: 1) {\n nodes {\n id\n name\n currency\n quantityRules(first: 3, originType: FIXED) {\n nodes {\n increment\n maximum\n minimum\n productVariant {\n id\n title\n }\n }\n }\n }\n }\n }\nQUERY;\n\n$response = $client->query([\"query\" => $query]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n priceLists(first: 1) {\n nodes {\n id\n name\n currency\n quantityRules(first: 3, originType: FIXED) {\n nodes {\n increment\n maximum\n minimum\n productVariant {\n id\n title\n }\n }\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n priceLists(first: 1) {\n nodes {\n id\n name\n currency\n quantityRules(first: 3, originType: FIXED) {\n nodes {\n increment\n maximum\n minimum\n productVariant {\n id\n title\n }\n }\n }\n }\n }\n}"
input: null
response: { "data": { "priceLists": { "nodes": [ { "id": "gid://shopify/PriceList/225060712", "name": "price_list_with_quantity_rules", "currency": "USD", "quantityRules": { "nodes": [ { "increment": 100, "maximum": 5000, "minimum": 500, "productVariant": { "id": "gid://shopify/ProductVariant/43729076", "title": "151cm" } }, { "increment": 10, "maximum": 1000, "minimum": 100, "productVariant": { "id": "gid://shopify/ProductVariant/138327650", "title": "Default" } }, { "increment": 5, "maximum": null, "minimum": 10, "productVariant": { "id": "gid://shopify/ProductVariant/389013007", "title": "Small" } } ] } } ] } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { priceLists(first: 2) { edges { node { id name currency fixedPricesCount parent { adjustment { type value } } } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n priceLists(first: 2) {\n edges {\n node {\n id\n name\n currency\n fixedPricesCount\n parent {\n adjustment {\n type\n value\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 {\n priceLists(first: 2) {\n edges {\n node {\n id\n name\n currency\n fixedPricesCount\n parent {\n adjustment {\n type\n value\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\n query {\n priceLists(first: 2) {\n edges {\n node {\n id\n name\n currency\n fixedPricesCount\n parent {\n adjustment {\n type\n value\n }\n }\n }\n }\n }\n }\nQUERY;\n\n$response = $client->query([\"query\" => $query]);\n" Remix example: "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n query {\n priceLists(first: 2) {\n edges {\n node {\n id\n name\n currency\n fixedPricesCount\n parent {\n adjustment {\n type\n value\n }\n }\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n priceLists(first: 2) {\n edges {\n node {\n id\n name\n currency\n fixedPricesCount\n parent {\n adjustment {\n type\n value\n }\n }\n }\n }\n }\n}"
input: null
response: { "data": { "priceLists": { "edges": [ { "node": { "id": "gid://shopify/PriceList/11668351", "name": "location_price_list", "currency": "USD", "fixedPricesCount": 0, "parent": { "adjustment": { "type": "PERCENTAGE_DECREASE", "value": 50.0 } } } }, { "node": { "id": "gid://shopify/PriceList/36142538", "name": "relative_pricelist_nullify", "currency": "CAD", "fixedPricesCount": 0, "parent": { "adjustment": { "type": "PERCENTAGE_DECREASE", "value": 5.0 } } } } ] } } }