Skip to content

Update coupon​

PUT
/coupons/{id}

Updates coupon attributes such as discount type, value, and schedule.

Authorizations​

bearerToken|siteContext
bearerToken

Personal access token tied to a user account. Requires the X-Nimbu-Site header to scope requests.

TypeHTTP (bearer)
+
siteContext

Identifier of the site context when authenticating with a personal access token.

TypeAPI Key (header: X-Nimbu-Site)
or
siteToken

Site-scoped API token that already encodes the site context.

TypeHTTP (bearer)

Parameters​

Path Parameters

id*

Coupon identifier

Typestring
Required

Request Body​

application/json
JSON
{
"name": "string",
"description": "string",
"reason": "string",
"code": "string",
"coupon_type": "string",
"coupon_percentage": 0,
"coupon_amount": 0,
"lifespan": "string",
"lifespan_amount": 0,
"lifespan_time": "string",
"customer_specific": true,
"start": "string",
"start_type": "string",
"constraints": "string",
"requirements": "string",
"required_value": 0,
"required_amount": 0,
"collection_ids": [
"string"
],
"product_type_ids": [
"string"
],
"reusable": true,
"include_free_shipping": true
}

Responses​

coupon updated

application/json
JSON
{
"id": "string",
"name": "string",
"description": "string",
"reason": "string",
"state": "string",
"coupon_type": "string",
"coupon_percentage": 0,
"coupon_amount": 0,
"customer_specific": true,
"code": "string",
"lifespan": "string",
"lifespan_amount": 0,
"lifespan_time": "string",
"start": "string",
"start_type": "string",
"constraints": "string",
"requirements": "string",
"required_value": 0,
"required_amount": 0,
"collection_ids": [
"string"
],
"product_type_ids": [
"string"
],
"customers": [
{
}
],
"redemptions": [
{
"created_at": "string",
"customer": {
},
"order": {
}
}
],
"referral": {
},
"referrer": {
},
"created_at": "string"
}

Playground​

Authorization
Variables
Key
Value
Body

Samples​