priceList
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.
- catalog•Catalog
The catalog that the price list is associated with.
- currency•Currencynon-null
Code! The currency for fixed prices associated with this price list.
- fixed
Prices •Count Int!non-null The number of fixed prices on the price list.
- id•ID!non-null
A globally-unique ID.
- name•String!non-null
The unique name of the price list, used as a human-readable identifier.
- parent•Price
List Parent Relative adjustments to other prices.
- prices
• Pricenon-nullList Price Connection! A list of prices associated with the price list.
- quantity
Rules • Quantitynon-nullRule Connection! A list of quantity rules associated with the price list, ordered by product variants.
- catalog•
- 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
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-07/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)