Admin

Update a coupon

Update a coupon with Stripe sync. Note: discount_type and discount_value cannot be changed after creation.

put/admin/coupons/{coupon_id}

Request

  • Base URL: https://api.presscart.com (the document declares no server; this is the origin it was published from)
  • URL: https://api.presscart.com/admin/coupons/{coupon_id}
  • Auth: HTTP bearer

Path parameters

coupon_idstring uuid required
Example:83b7bf2f-7c75-428a-8645-882e1866a691

Request body

namestring
descriptionstring nullable
max_redemptionsinteger nullable
max_redemptions_per_teaminteger nullable
minimum_order_amountnumber nullable
activeboolean

Example request

{
  "name": "20% Off Summer Sale",
  "description": "Summer promotional discount",
  "max_redemptions": 100,
  "max_redemptions_per_team": 1,
  "minimum_order_amount": 50,
  "active": true
}

Response

Coupon updated successfully

idstring uuid required
codestring required
namestring required
descriptionstring nullable required
discount_type'percent_off' | 'amount_off' required
discount_valuenumber nullable required
max_redemptionsinteger nullable required
max_redemptions_per_teaminteger nullable required
redemption_countinteger nullable required
minimum_order_amountnumber nullable required
activeboolean required
stripe_coupon_idstring nullable required
stripe_promotion_code_idstring nullable required
created_bystring uuid nullable required

Example response

{
  "code": "SAVE20",
  "name": "20% Off Summer Sale",
  "description": "Summer promotional discount",
  "discount_type": "percent_off",
  "discount_value": 20,
  "max_redemptions": 100,
  "max_redemptions_per_team": 1,
  "minimum_order_amount": 50,
  "active": true,
  "stripe_coupon_id": "coupon_1234567890",
  "stripe_promotion_code_id": "promo_1234567890",
  "created_by": "123e4567-e89b-12d3-a456-426614174000"
}

Changes

No recorded changes to this operation across all 3 revisions of this API.