updateProductUOMSalePrice
Requires permission products:pricing:update.
Set the sale price of one unit (pack) of a product. It applies to every row of that unit on the product, including variant-level rows. Needs the pricing update permission.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation UpdateProductUOMSalePrice($productId: String!, $salePrice: Float!, $uomId: String!) {
updateProductUOMSalePrice(
productId: $productId
salePrice: $salePrice
uomId: $uomId
) {
success
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation UpdateProductUOMSalePrice($productId: String!, $salePrice: Float!, $uomId: String!) {\n updateProductUOMSalePrice(\n productId: $productId\n salePrice: $salePrice\n uomId: $uomId\n ) {\n success\n }\n}",
"variables": {
"productId": "string",
"salePrice": 0,
"uomId": "string"
}
}
EOF
Variables:
{
"productId": "string",
"salePrice": 0,
"uomId": "string"
}
Response:
{
"data": {
"updateProductUOMSalePrice": {
"success": true
}
}
}
updateProductUOMSalePrice(
productId: String!
salePrice: Float!
uomId: String!
): BooleanResponse!
Arguments
updateProductUOMSalePrice.productId ● String! non-null scalar
The ID of the product.
updateProductUOMSalePrice.salePrice ● Float! non-null scalar
The new sale price of one of this unit.
updateProductUOMSalePrice.uomId ● String! non-null scalar
The ID of the unit of measure.
Type
BooleanResponse object
A yes or no outcome.