Version: 2024-04
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-04/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { priceList(id: \\\"gid://shopify/PriceList/524058083\\\") { catalog { id title } prices(first: 5, query: \\\"product_id:20995642\\\") { nodes { price { amount currencyCode } variant { id } } } currency parent { adjustment { type value } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n priceList(id: \"gid://shopify/PriceList/524058083\") {\n catalog {\n id\n title\n }\n prices(first: 5, query: \"product_id:20995642\") {\n nodes {\n price {\n amount\n currencyCode\n }\n variant {\n id\n }\n }\n }\n currency\n parent {\n adjustment {\n type\n value\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 priceList(id: \"gid://shopify/PriceList/524058083\") {\n catalog {\n id\n title\n }\n prices(first: 5, query: \"product_id:20995642\") {\n nodes {\n price {\n amount\n currencyCode\n }\n variant {\n id\n }\n }\n }\n currency\n parent {\n adjustment {\n type\n value\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 {\n priceList(id: \"gid://shopify/PriceList/524058083\") {\n catalog {\n id\n title\n }\n prices(first: 5, query: \"product_id:20995642\") {\n nodes {\n price {\n amount\n currencyCode\n }\n variant {\n id\n }\n }\n }\n currency\n parent {\n adjustment {\n type\n value\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n priceList(id: \"gid://shopify/PriceList/524058083\") {\n catalog {\n id\n title\n }\n prices(first: 5, query: \"product_id:20995642\") {\n nodes {\n price {\n amount\n currencyCode\n }\n variant {\n id\n }\n }\n }\n currency\n parent {\n adjustment {\n type\n value\n }\n }\n }\n}"
input: null
response: { "data": { "priceList": { "catalog": { "id": "gid://shopify/MarketCatalog/307400570", "title": "Just a simple catalog for a US Price List" }, "prices": { "nodes": [ { "price": { "amount": "9.0", "currencyCode": "USD" }, "variant": { "id": "gid://shopify/ProductVariant/30322695" } }, { "price": { "amount": "13.5", "currencyCode": "USD" }, "variant": { "id": "gid://shopify/ProductVariant/113711323" } }, { "price": { "amount": "13.5", "currencyCode": "USD" }, "variant": { "id": "gid://shopify/ProductVariant/236948360" } } ] }, "currency": "USD", "parent": { "adjustment": { "type": "PERCENTAGE_DECREASE", "value": 10.0 } } } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-04/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { priceList(id: \\\"gid://shopify/PriceList/225060712\\\") { quantityRules(first: 3, originType: FIXED) { nodes { increment maximum minimum productVariant { id title } } } currency } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n priceList(id: \"gid://shopify/PriceList/225060712\") {\n quantityRules(first: 3, originType: FIXED) {\n nodes {\n increment\n maximum\n minimum\n productVariant {\n id\n title\n }\n }\n }\n currency\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 priceList(id: \"gid://shopify/PriceList/225060712\") {\n quantityRules(first: 3, originType: FIXED) {\n nodes {\n increment\n maximum\n minimum\n productVariant {\n id\n title\n }\n }\n }\n currency\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 {\n priceList(id: \"gid://shopify/PriceList/225060712\") {\n quantityRules(first: 3, originType: FIXED) {\n nodes {\n increment\n maximum\n minimum\n productVariant {\n id\n title\n }\n }\n }\n currency\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n priceList(id: \"gid://shopify/PriceList/225060712\") {\n quantityRules(first: 3, originType: FIXED) {\n nodes {\n increment\n maximum\n minimum\n productVariant {\n id\n title\n }\n }\n }\n currency\n }\n}"
input: null
response: { "data": { "priceList": { "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" } } ] }, "currency": "USD" } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-04/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { priceList(id: \\\"gid://shopify/PriceList/294167858\\\") { id name prices(first: 10, originType: FIXED) { nodes { price { amount currencyCode } compareAtPrice { amount currencyCode } originType variant { id } } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n priceList(id: \"gid://shopify/PriceList/294167858\") {\n id\n name\n prices(first: 10, originType: FIXED) {\n nodes {\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n originType\n variant {\n id\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 priceList(id: \"gid://shopify/PriceList/294167858\") {\n id\n name\n prices(first: 10, originType: FIXED) {\n nodes {\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n originType\n variant {\n id\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 {\n priceList(id: \"gid://shopify/PriceList/294167858\") {\n id\n name\n prices(first: 10, originType: FIXED) {\n nodes {\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n originType\n variant {\n id\n }\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n priceList(id: \"gid://shopify/PriceList/294167858\") {\n id\n name\n prices(first: 10, originType: FIXED) {\n nodes {\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n originType\n variant {\n id\n }\n }\n }\n }\n}"
input: null
response: { "data": { "priceList": { "id": "gid://shopify/PriceList/294167858", "name": "simple_pricelist", "prices": { "nodes": [ { "price": { "amount": "19.96", "currencyCode": "USD" }, "compareAtPrice": { "amount": "24.99", "currencyCode": "USD" }, "originType": "FIXED", "variant": { "id": "gid://shopify/ProductVariant/113711323" } }, { "price": { "amount": "9.99", "currencyCode": "USD" }, "compareAtPrice": { "amount": "14.99", "currencyCode": "USD" }, "originType": "FIXED", "variant": { "id": "gid://shopify/ProductVariant/498744621" } } ] } } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-04/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { priceList(id: \\\"gid://shopify/PriceList/294167858\\\") { id name prices(first: 10, query: \\\"product_id:20995642\\\") { nodes { price { amount currencyCode } compareAtPrice { amount currencyCode } variant { id product { id } } } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n priceList(id: \"gid://shopify/PriceList/294167858\") {\n id\n name\n prices(first: 10, query: \"product_id:20995642\") {\n nodes {\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n variant {\n id\n product {\n id\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 priceList(id: \"gid://shopify/PriceList/294167858\") {\n id\n name\n prices(first: 10, query: \"product_id:20995642\") {\n nodes {\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n variant {\n id\n product {\n id\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 {\n priceList(id: \"gid://shopify/PriceList/294167858\") {\n id\n name\n prices(first: 10, query: \"product_id:20995642\") {\n nodes {\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n variant {\n id\n product {\n id\n }\n }\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n priceList(id: \"gid://shopify/PriceList/294167858\") {\n id\n name\n prices(first: 10, query: \"product_id:20995642\") {\n nodes {\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n variant {\n id\n product {\n id\n }\n }\n }\n }\n }\n}"
input: null
response: { "data": { "priceList": { "id": "gid://shopify/PriceList/294167858", "name": "simple_pricelist", "prices": { "nodes": [ { "price": { "amount": "10.0", "currencyCode": "USD" }, "compareAtPrice": { "amount": "14.0", "currencyCode": "USD" }, "variant": { "id": "gid://shopify/ProductVariant/30322695", "product": { "id": "gid://shopify/Product/20995642" } } }, { "price": { "amount": "19.96", "currencyCode": "USD" }, "compareAtPrice": { "amount": "24.99", "currencyCode": "USD" }, "variant": { "id": "gid://shopify/ProductVariant/113711323", "product": { "id": "gid://shopify/Product/20995642" } } }, { "price": { "amount": "15.0", "currencyCode": "USD" }, "compareAtPrice": { "amount": "17.0", "currencyCode": "USD" }, "variant": { "id": "gid://shopify/ProductVariant/236948360", "product": { "id": "gid://shopify/Product/20995642" } } } ] } } } }
Curl example: "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-04/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"query { priceList(id: \\\"gid://shopify/PriceList/294167858\\\") { id name prices(first: 10, query: \\\"variant_id:498744621\\\") { nodes { price { amount currencyCode } compareAtPrice { amount currencyCode } variant { id } } } } }\"\n}'\n" Node example: "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: `query {\n priceList(id: \"gid://shopify/PriceList/294167858\") {\n id\n name\n prices(first: 10, query: \"variant_id:498744621\") {\n nodes {\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n variant {\n id\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 priceList(id: \"gid://shopify/PriceList/294167858\") {\n id\n name\n prices(first: 10, query: \"variant_id:498744621\") {\n nodes {\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n variant {\n id\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 {\n priceList(id: \"gid://shopify/PriceList/294167858\") {\n id\n name\n prices(first: 10, query: \"variant_id:498744621\") {\n nodes {\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n variant {\n id\n }\n }\n }\n }\n }`,\n);\n\nconst data = await response.json();\n" Graphql query: "query {\n priceList(id: \"gid://shopify/PriceList/294167858\") {\n id\n name\n prices(first: 10, query: \"variant_id:498744621\") {\n nodes {\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n variant {\n id\n }\n }\n }\n }\n}"
input: null
response: { "data": { "priceList": { "id": "gid://shopify/PriceList/294167858", "name": "simple_pricelist", "prices": { "nodes": [ { "price": { "amount": "9.99", "currencyCode": "USD" }, "compareAtPrice": { "amount": "14.99", "currencyCode": "USD" }, "variant": { "id": "gid://shopify/ProductVariant/498744621" } } ] } } } }