Coupons

Update one or more fields of a coupon. Requires the coupons:write scope. The change applies from the next time the coupon is applied; a payment that already holds the coupon keeps it.

patch/v1/coupons/{couponId}

Request

Path parameters

couponIdstring uuid required

The coupon ID.

Request body

codestring

3 to 32 characters from A-Z, 0-9, _ and -, after trimming. Stored uppercase, so black10 is saved as BLACK10. Unique among the coupons of your account in this environment that are not deleted (409 COUPON_CODE_TAKEN).

type'PERCENT' | 'FIXED'
percentBpinteger nullable
amountnumber nullable
validFromstring date-time nullable
validUntilstring date-time nullable
maxRedemptionsinteger nullable
maxRedemptionsPerBuyerinteger nullable
productIdsstring[]

Replaces the whole list.

activeboolean

Response

Coupon updated.

Example response

{
  "coupon": {
    "code": "BLACK10"
  }
}

Changes