Skip to main content
PATCH
/
api
/
v1
/
coupons
/
{coupon_id}
Update a coupon
curl --request PATCH \
  --url https://api.example.com/api/v1/coupons/{coupon_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "description": "<string>",
  "discount": {
    "discount_type": "PERCENTAGE",
    "percentage": "<string>"
  },
  "plan_ids": [
    "<string>"
  ]
}
'
{
  "code": "<string>",
  "description": "<string>",
  "disabled": true,
  "discount": {
    "percentage": "<string>"
  },
  "id": "<string>",
  "reusable": true,
  "expires_at": "2023-11-07T05:31:56Z",
  "recurring_value": 123,
  "redemption_limit": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

coupon_id
string<MeteroidId>
required

Coupon ID

Example:

"cou_7n42DGM5Tflk9n8mt7Fhc7"

Body

application/json
description
string | null
discount
object
plan_ids
string<MeteroidId>[] | null

Response

Coupon updated

code
string
required
description
string
required
disabled
boolean
required
discount
object
required
id
string<MeteroidId>
required
Example:

"cou_7n42DGM5Tflk9n8mt7Fhc7"

reusable
boolean
required
expires_at
string<date-time> | null
recurring_value
integer<int32> | null
redemption_limit
integer<int32> | null