Skip to main content

discountUpdate

Update an existing discount record with new values and settings.

Allows modification of discount percentages, category associations, effective dates, and other discount attributes. Used for maintaining accurate promotional pricing and discount strategies.

Possible errors:

  • DISCOUNT_NOT_FOUND_ERROR: Discount with the specified ID does not exist
  • DISCOUNT_UPDATE_ERROR: Failed to update discount record
  • DISCOUNT_VALIDATION_ERROR: Invalid discount data provided
  • UNAUTHENTICATED: Invalid or missing authentication
  • FORBIDDEN: Insufficient permissions to update discounts

AUTH: Role=[pricing.OWNER,pricing.EDITOR]

discountUpdate(
id: String!
input: DiscountUpdateInput!
): Discount!

Arguments

discountUpdate.id ● String! non-null scalar

Unique identifier of the discount record to update.

Must be a valid UUID format representing an existing discount in the system.

discountUpdate.input ● DiscountUpdateInput! non-null input

Updated discount data including percentage values, category associations, and effective dates.

Only provided fields will be updated, others remain unchanged. All validation rules apply to the updated values.

Type

Discount object

Represents a discount that can be applied to a product or category.