Anchor to priceListFixedPricesByProductUpdateprice
priceListFixedPricesByProductUpdate
mutation
Requires access scope. Also: The user must have permission to create and edit catalogs.
Updates the fixed prices for all variants for a product on a price list. You can use the mutation to set or remove a fixed price for all variants of a product associated with the price list.
Anchor to Arguments
Arguments
- Anchor to priceListIdprice•
List Id ID!required The price list to update the prices for.
- Anchor to pricesToAddprices•
To Add A list of
that identifies which products to update the fixed prices for.
- Anchor to pricesToDeleteByProductIdsprices•
To Delete By Product Ids A list of product IDs that identifies which products to remove the fixed prices for.
Was this section helpful?
Anchor to PriceListFixedPricesByProductUpdatePayload returnsPriceListFixedPricesByProductUpdatePayload returns
- Anchor to priceListprice•
List The price list for which the fixed prices were modified.
- Anchor to pricesToAddProductsprices•
To Add Products The product for which the fixed prices were added.
- Anchor to pricesToDeleteProductsprices•
To Delete Products The product for which the fixed prices were deleted.
- Anchor to userErrorsuser•
Errors The list of errors that occurred from executing the mutation.
Was this section helpful?
Mutation Reference
1mutation priceListFixedPricesByProductUpdate($priceListId: ID!, $pricesToAdd: [PriceListProductPriceInput!], $pricesToDeleteByProductIds: [ID!]) {2 priceListFixedPricesByProductUpdate(priceListId: $priceListId, pricesToAdd: $pricesToAdd, pricesToDeleteByProductIds: $pricesToDeleteByProductIds) {3 priceList {4 # PriceList fields5 }6 pricesToAddProducts {7 # Product fields8 }9 pricesToDeleteProducts {10 # Product fields11 }12 userErrors {13 field14 message15 }16 }17}
Input
1{2 "priceListId": "gid://shopify/<objectName>/10079785100",3 "pricesToAdd": [4 {5 "price": {6 "amount": "29.99",7 "currencyCode": ""8 },9 "productId": "gid://shopify/<objectName>/10079785100"10 }11 ],12 "pricesToDeleteByProductIds": [13 "gid://shopify/<objectName>/10079785100"14 ]15}
{
"priceListId": "gid://shopify/<objectName>/10079785100",
"pricesToAdd": [
{
"price": {
"amount": "29.99",
"currencyCode": ""
},
"productId": "gid://shopify/<objectName>/10079785100"
}
],
"pricesToDeleteByProductIds": [
"gid://shopify/<objectName>/10079785100"
]
}
input PriceListProductPriceInput {
price: MoneyInput!
productId: ID!
}
input MoneyInput {
amount: Decimal!
currencyCode: CurrencyCode!
}