--- title: priceListCreate - GraphQL Admin description: Creates a price list. You can use the `priceListCreate` mutation to create a new price list and associate it with a catalog. This enables you to sell your products with contextual pricing. api_version: unstable api_name: admin source_url: html: https://shopify.dev/docs/api/admin-graphql/unstable/mutations/priceListCreate md: https://shopify.dev/docs/api/admin-graphql/unstable/mutations/priceListCreate.md --- # price​List​Create mutation Requires `write_products` access scope. Also: The user must have permission to create and edit catalogs. Creates a price list. You can use the `priceListCreate` mutation to create a new price list and associate it with a catalog. This enables you to sell your products with contextual pricing. ## Arguments * input [Price​List​Create​Input!](https://shopify.dev/docs/api/admin-graphql/unstable/input-objects/PriceListCreateInput) required The properties of the new price list. *** ## Price​List​Create​Payload returns * price​List [Price​List](https://shopify.dev/docs/api/admin-graphql/unstable/objects/PriceList) The newly created price list. * user​Errors [\[Price​List​User​Error!\]!](https://shopify.dev/docs/api/admin-graphql/unstable/objects/PriceListUserError) non-null The list of errors that occurred from executing the mutation. *** ## Examples * ### Create a price list with a percentage adjustment. #### Description Create a price list that applies a 10% price increase. #### Query ```graphql mutation PriceListCreate($input: PriceListCreateInput!) { priceListCreate(input: $input) { userErrors { field message } priceList { id name currency parent { adjustment { type value } } } } } ``` #### Variables ```json { "input": { "name": "Price List", "currency": "USD", "parent": { "adjustment": { "type": "PERCENTAGE_INCREASE", "value": 10 } } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation PriceListCreate($input: PriceListCreateInput!) { priceListCreate(input: $input) { userErrors { field message } priceList { id name currency parent { adjustment { type value } } } } }", "variables": { "input": { "name": "Price List", "currency": "USD", "parent": { "adjustment": { "type": "PERCENTAGE_INCREASE", "value": 10 } } } } }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation PriceListCreate($input: PriceListCreateInput!) { priceListCreate(input: $input) { userErrors { field message } priceList { id name currency parent { adjustment { type value } } } } }`, { variables: { "input": { "name": "Price List", "currency": "USD", "parent": { "adjustment": { "type": "PERCENTAGE_INCREASE", "value": 10 } } } }, }, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby 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 mutation PriceListCreate($input: PriceListCreateInput!) { priceListCreate(input: $input) { userErrors { field message } priceList { id name currency parent { adjustment { type value } } } } } QUERY variables = { "input": { "name": "Price List", "currency": "USD", "parent": { "adjustment": { "type": "PERCENTAGE_INCREASE", "value": 10 } } } } response = client.query(query: query, variables: variables) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation PriceListCreate($input: PriceListCreateInput!) { priceListCreate(input: $input) { userErrors { field message } priceList { id name currency parent { adjustment { type value } } } } }`, "variables": { "input": { "name": "Price List", "currency": "USD", "parent": { "adjustment": { "type": "PERCENTAGE_INCREASE", "value": 10 } } } }, }, }); ``` #### Response ```json { "priceListCreate": { "userErrors": [], "priceList": { "id": "gid://shopify/PriceList/1014716633", "name": "Price List", "currency": "USD", "parent": { "adjustment": { "type": "PERCENTAGE_INCREASE", "value": 10 } } } } } ``` * ### priceListCreate reference [Open in GraphiQL](http://localhost:3457/graphiql?query=mutation%20PriceListCreate\(%24input%3A%20PriceListCreateInput!\)%20%7B%0A%20%20priceListCreate\(input%3A%20%24input\)%20%7B%0A%20%20%20%20userErrors%20%7B%0A%20%20%20%20%20%20field%0A%20%20%20%20%20%20message%0A%20%20%20%20%7D%0A%20%20%20%20priceList%20%7B%0A%20%20%20%20%20%20id%0A%20%20%20%20%20%20name%0A%20%20%20%20%20%20currency%0A%20%20%20%20%20%20parent%20%7B%0A%20%20%20%20%20%20%20%20adjustment%20%7B%0A%20%20%20%20%20%20%20%20%20%20type%0A%20%20%20%20%20%20%20%20%20%20value%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D\&variables=%7B%0A%20%20%22input%22%3A%20%7B%0A%20%20%20%20%22name%22%3A%20%22Price%20List%22%2C%0A%20%20%20%20%22currency%22%3A%20%22USD%22%2C%0A%20%20%20%20%22parent%22%3A%20%7B%0A%20%20%20%20%20%20%22adjustment%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22PERCENTAGE_INCREASE%22%2C%0A%20%20%20%20%20%20%20%20%22value%22%3A%2010%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D) ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation PriceListCreate($input: PriceListCreateInput!) { priceListCreate(input: $input) { userErrors { field message } priceList { id name currency parent { adjustment { type value } } } } }`, { variables: { "input": { "name": "Price List", "currency": "USD", "parent": { "adjustment": { "type": "PERCENTAGE_INCREASE", "value": 10 } } } }, }, ); const json = await response.json(); return json.data; } ``` ##### GQL ``` mutation PriceListCreate($input: PriceListCreateInput!) { priceListCreate(input: $input) { userErrors { field message } priceList { id name currency parent { adjustment { type value } } } } } ``` ##### cURL ``` curl -X POST \ https://your-development-store.myshopify.com/admin/api/unstable/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "mutation PriceListCreate($input: PriceListCreateInput!) { priceListCreate(input: $input) { userErrors { field message } priceList { id name currency parent { adjustment { type value } } } } }", "variables": { "input": { "name": "Price List", "currency": "USD", "parent": { "adjustment": { "type": "PERCENTAGE_INCREASE", "value": 10 } } } } }' ``` ##### React Router ``` import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql mutation PriceListCreate($input: PriceListCreateInput!) { priceListCreate(input: $input) { userErrors { field message } priceList { id name currency parent { adjustment { type value } } } } }`, { variables: { "input": { "name": "Price List", "currency": "USD", "parent": { "adjustment": { "type": "PERCENTAGE_INCREASE", "value": 10 } } } }, }, ); const json = await response.json(); return json.data; } ``` ##### Node.js ``` const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: { "query": `mutation PriceListCreate($input: PriceListCreateInput!) { priceListCreate(input: $input) { userErrors { field message } priceList { id name currency parent { adjustment { type value } } } } }`, "variables": { "input": { "name": "Price List", "currency": "USD", "parent": { "adjustment": { "type": "PERCENTAGE_INCREASE", "value": 10 } } } }, }, }); ``` ##### Ruby ``` 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 mutation PriceListCreate($input: PriceListCreateInput!) { priceListCreate(input: $input) { userErrors { field message } priceList { id name currency parent { adjustment { type value } } } } } QUERY variables = { "input": { "name": "Price List", "currency": "USD", "parent": { "adjustment": { "type": "PERCENTAGE_INCREASE", "value": 10 } } } } response = client.query(query: query, variables: variables) ``` ## Input variables JSON ```json { "input": { "name": "Price List", "currency": "USD", "parent": { "adjustment": { "type": "PERCENTAGE_INCREASE", "value": 10 } } } } ``` ## Response JSON ```json { "priceListCreate": { "userErrors": [], "priceList": { "id": "gid://shopify/PriceList/1014716633", "name": "Price List", "currency": "USD", "parent": { "adjustment": { "type": "PERCENTAGE_INCREASE", "value": 10 } } } } } ```