--- title: priceListDelete - GraphQL Admin description: >- Deletes a price list. For example, you can delete a price list so that it no longer applies for products in the associated market. api_version: unstable api_name: admin source_url: html: >- https://shopify.dev/docs/api/admin-graphql/unstable/mutations/priceListDelete md: >- https://shopify.dev/docs/api/admin-graphql/unstable/mutations/priceListDelete.md --- # price​List​Delete mutation Requires `write_products` access scope. Also: The user must have permission to delete catalogs. Deletes a price list. For example, you can delete a price list so that it no longer applies for products in the associated market. ## Arguments * id [ID!](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) required The ID of the price list to be deleted. *** ## Price​List​Delete​Payload returns * deleted​Id [ID](https://shopify.dev/docs/api/admin-graphql/unstable/scalars/ID) The ID of the deleted 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 * ### Delete a price list #### Description Deleting a price list returns the ID of the deleted price list #### Query ```graphql mutation priceListDelete($id: ID!) { priceListDelete(id: $id) { deletedId userErrors { field code message } } } ``` #### Variables ```json { "id": "gid://shopify/PriceList/294167858" } ``` #### 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 priceListDelete($id: ID!) { priceListDelete(id: $id) { deletedId userErrors { field code message } } }", "variables": { "id": "gid://shopify/PriceList/294167858" } }' ``` #### 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 priceListDelete($id: ID!) { priceListDelete(id: $id) { deletedId userErrors { field code message } } }`, { variables: { "id": "gid://shopify/PriceList/294167858" }, }, ); 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 priceListDelete($id: ID!) { priceListDelete(id: $id) { deletedId userErrors { field code message } } } QUERY variables = { "id": "gid://shopify/PriceList/294167858" } 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 priceListDelete($id: ID!) { priceListDelete(id: $id) { deletedId userErrors { field code message } } }`, "variables": { "id": "gid://shopify/PriceList/294167858" }, }, }); ``` #### Response ```json { "priceListDelete": { "deletedId": "gid://shopify/PriceList/294167858", "userErrors": [] } } ``` * ### priceListDelete reference [Open in GraphiQL](http://localhost:3457/graphiql?query=mutation%20priceListDelete\(%24id%3A%20ID!\)%20%7B%0A%20%20priceListDelete\(id%3A%20%24id\)%20%7B%0A%20%20%20%20deletedId%0A%20%20%20%20userErrors%20%7B%0A%20%20%20%20%20%20field%0A%20%20%20%20%20%20code%0A%20%20%20%20%20%20message%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D\&variables=%7B%0A%20%20%22id%22%3A%20%22gid%3A%2F%2Fshopify%2FPriceList%2F294167858%22%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 priceListDelete($id: ID!) { priceListDelete(id: $id) { deletedId userErrors { field code message } } }`, { variables: { "id": "gid://shopify/PriceList/294167858" }, }, ); const json = await response.json(); return json.data; } ``` ##### GQL ``` mutation priceListDelete($id: ID!) { priceListDelete(id: $id) { deletedId userErrors { field code message } } } ``` ##### 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 priceListDelete($id: ID!) { priceListDelete(id: $id) { deletedId userErrors { field code message } } }", "variables": { "id": "gid://shopify/PriceList/294167858" } }' ``` ##### 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 priceListDelete($id: ID!) { priceListDelete(id: $id) { deletedId userErrors { field code message } } }`, { variables: { "id": "gid://shopify/PriceList/294167858" }, }, ); 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 priceListDelete($id: ID!) { priceListDelete(id: $id) { deletedId userErrors { field code message } } }`, "variables": { "id": "gid://shopify/PriceList/294167858" }, }, }); ``` ##### 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 priceListDelete($id: ID!) { priceListDelete(id: $id) { deletedId userErrors { field code message } } } QUERY variables = { "id": "gid://shopify/PriceList/294167858" } response = client.query(query: query, variables: variables) ``` ## Input variables JSON ```json { "id": "gid://shopify/PriceList/294167858" } ``` ## Response JSON ```json { "priceListDelete": { "deletedId": "gid://shopify/PriceList/294167858", "userErrors": [] } } ```