Anchor to priceListprice
priceList
query
Returns a price list resource by ID.
Anchor to Possible returnsPossible returns
- Anchor to PriceListPrice•
List Represents a price list, including information about related prices and eligibility rules. You can use price lists to specify either fixed prices or adjusted relative prices that override initial product variant prices. Price lists are applied to customers using context rules, which determine price list eligibility.
For more information on price lists, refer to Support different pricing models.
Was this section helpful?
- Retrieve Price List Details and Associated Catalog Information
- Retrieve Quantity Rules on Price List
- Retrieve the FIXED prices on a price list
- Retrieve the prices on a price list filtered by product_id
- Retrieve the prices on a price list filtered by variant_id
Examples
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
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
}
}
}
}`,
);
const data = await response.json();
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
}
}
}
}
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2024-04/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"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 } } } }"
}'
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
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
}
}
}
}`,
);
const data = await response.json();
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: `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
}
}
}
}`,
});
session = ShopifyAPI::Auth::Session.new(
shop: "your-development-store.myshopify.com",
access_token: access_token
)
client = ShopifyAPI::Clients::Graphql::Admin.new(
session: session
)
query = <<~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
}
}
}
}
QUERY
response = client.query(query: query)
Response
JSON{
"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": {