Anchor to priceListFixedPricesUpdateprice
priceListFixedPricesUpdate
mutation
Requires access scope. Also: The user must have permission to create and edit catalogs.
Updates fixed prices on a price list. You can use the mutation to set a fixed price for specific product variants or to delete prices for variants associated with the price list.
Anchor to Arguments
Arguments
- Anchor to priceListIdprice•
List Id ID!required The price list that the prices will be updated against.
- Anchor to pricesToAddprices•
To Add [PriceList requiredPrice Input!]! The fixed prices to add.
- Anchor to variantIdsToDeletevariant•
Ids To Delete [ID!]!required A list of product variant IDs to remove from the price list.
Was this section helpful?
Anchor to PriceListFixedPricesUpdatePayload returnsPriceListFixedPricesUpdatePayload returns
- Anchor to deletedFixedPriceVariantIdsdeleted•
Fixed Price Variant Ids A list of deleted variant IDs for prices.
- Anchor to priceListprice•
List The price list for which the fixed prices were modified.
- Anchor to pricesAddedprices•
Added The prices that were added to the price list.
- Anchor to userErrorsuser•
Errors [PriceList non-nullPrice User Error!]! The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
1mutation priceListFixedPricesUpdate($priceListId: ID!, $pricesToAdd: [PriceListPriceInput!]!, $variantIdsToDelete: [ID!]!) {2 priceListFixedPricesUpdate(priceListId: $priceListId, pricesToAdd: $pricesToAdd, variantIdsToDelete: $variantIdsToDelete) {3 deletedFixedPriceVariantIds4 priceList {5 # PriceList fields6 }7 pricesAdded {8 # PriceListPrice fields9 }10 userErrors {11 field12 message13 }14 }15}
Input
1{2 "priceListId": "gid://shopify/<objectName>/10079785100",3 "pricesToAdd": [4 {5 "compareAtPrice": {6 "amount": "29.99",7 "currencyCode": ""8 },9 "price": {10 "amount": "29.99",11 "currencyCode": ""12 },13 "variantId": "gid://shopify/<objectName>/10079785100"14 }15 ],16 "variantIdsToDelete": [17 "gid://shopify/<objectName>/10079785100"18 ]19}
{
"priceListId": "gid://shopify/<objectName>/10079785100",
"pricesToAdd": [
{
"compareAtPrice": {
"amount": "29.99",
"currencyCode": ""
},
"price": {
"amount": "29.99",
"currencyCode": ""
},
"variantId": "gid://shopify/<objectName>/10079785100"
}
],
"variantIdsToDelete": [
"gid://shopify/<objectName>/10079785100"
]
}
input PriceListPriceInput {
compareAtPrice: MoneyInput
price: MoneyInput!
variantId: ID!
}
input MoneyInput {
amount: Decimal!
currencyCode: CurrencyCode!
}