priceListFixedPricesDelete
Requires access scope. Also: The user must have permission to delete catalogs.
Deletes specific fixed prices from a price list using a product variant ID. You can use the mutation to delete a set of fixed prices from a price list. After deleting the set of fixed prices from the price list, the price of each product variant reverts to the original price that was determined by the price list adjustment.
Arguments
- Anchor to priceListIdprice•
List Id ID!required The ID of the price list from which the fixed prices will be removed.
- Anchor to variantIdsvariant•
Ids [ID!]!required A list of product variant IDs whose fixed prices will be removed from the price list.
Anchor to PriceListFixedPricesDeletePayload returnsPriceListFixedPricesDeletePayload returns
- Anchor to deletedFixedPriceVariantIdsdeleted•
Fixed Price Variant Ids A list of product variant IDs whose fixed prices were removed from the price list.
- Anchor to userErrorsuser•
Errors [PriceList non-nullPrice User Error!]! The list of errors that occurred from executing the mutation.
- Delete multiple fixed prices from a price list
- priceListFixedPricesDelete reference
Examples
mutation priceListFixedPricesDelete($priceListId: ID!, $variantIds: [ID!]!) {
priceListFixedPricesDelete(priceListId: $priceListId, variantIds: $variantIds) {
deletedFixedPriceVariantIds
userErrors {
field
code
message
}
}
}
curl -X POST \
https://your-development-store.myshopify.com/admin/api/2025-01/graphql.json \
-H 'Content-Type: application/json' \
-H 'X-Shopify-Access-Token: {access_token}' \
-d '{
"query": "mutation priceListFixedPricesDelete($priceListId: ID!, $variantIds: [ID!]!) { priceListFixedPricesDelete(priceListId: $priceListId, variantIds: $variantIds) { deletedFixedPriceVariantIds userErrors { field code message } } }",
"variables": {
"priceListId": "gid://shopify/PriceList/294167858",
"variantIds": [
"gid://shopify/ProductVariant/498744621",
"gid://shopify/ProductVariant/113711323"
]
}
}'
const { admin } = await authenticate.admin(request);
const response = await admin.graphql(
`#graphql
mutation priceListFixedPricesDelete($priceListId: ID!, $variantIds: [ID!]!) {
priceListFixedPricesDelete(priceListId: $priceListId, variantIds: $variantIds) {
deletedFixedPriceVariantIds
userErrors {
field
code
message
}
}
}`,
{
variables: {
"priceListId": "gid://shopify/PriceList/294167858",
"variantIds": [
"gid://shopify/ProductVariant/498744621",
"gid://shopify/ProductVariant/113711323"
]
},
},
);
const data = await response.json();
const client = new shopify.clients.Graphql({session});
const data = await client.query({
data: {
"query": `mutation priceListFixedPricesDelete($priceListId: ID!, $variantIds: [ID!]!) {
priceListFixedPricesDelete(priceListId: $priceListId, variantIds: $variantIds) {
deletedFixedPriceVariantIds
userErrors {
field
code
message
}
}
}`,
"variables": {
"priceListId": "gid://shopify/PriceList/294167858",
"variantIds": [
"gid://shopify/ProductVariant/498744621",
"gid://shopify/ProductVariant/113711323"
]
},
},
});
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 priceListFixedPricesDelete($priceListId: ID!, $variantIds: [ID!]!) {
priceListFixedPricesDelete(priceListId: $priceListId, variantIds: $variantIds) {
deletedFixedPriceVariantIds
userErrors {
field
code
message
}
}
}
QUERY
variables = {
"priceListId": "gid://shopify/PriceList/294167858",
"variantIds": ["gid://shopify/ProductVariant/498744621", "gid://shopify/ProductVariant/113711323"]
}
response = client.query(query: query, variables: variables)