Update Coupon Code

PATCH {{baseUrl}}/api/coupon-codes/:id/

Updates a coupon code specified by the given identifier synchronously. We allow updating the 'status' and 'expires_at' of coupon codes.

Rate limits:
Burst: 350/s
Steady: 3500/m

Scopes: coupon-codes:write

Request Body

{"data"=>{"type"=>"coupon-code", "id"=>"<string>", "attributes"=>{"status"=>"ASSIGNED_TO_PROFILE", "expires_at"=>"<dateTime>"}}}

HEADERS

KeyDatatypeRequiredDescription
revisionstring(Required) API endpoint revision (format: YYYY-MM-DD[.suffix])
Content-Typestring
Acceptstring

RESPONSES

status: OK

{&quot;data&quot;:{&quot;type&quot;:&quot;coupon-code&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;attributes&quot;:{&quot;unique_code&quot;:&quot;\u003cstring\u003e&quot;,&quot;expires_at&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;status&quot;:&quot;VERSION_NOT_ACTIVE&quot;},&quot;links&quot;:{&quot;self&quot;:&quot;\u003curi\u003e&quot;},&quot;relationships&quot;:{&quot;coupon&quot;:{&quot;data&quot;:{&quot;type&quot;:&quot;coupon&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;},&quot;links&quot;:{&quot;self&quot;:&quot;\u003curi\u003e&quot;,&quot;related&quot;:&quot;\u003curi\u003e&quot;}},&quot;profile&quot;:{&quot;data&quot;:{&quot;type&quot;:&quot;profile&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;},&quot;links&quot;:{&quot;self&quot;:&quot;\u003curi\u003e&quot;,&quot;related&quot;:&quot;\u003curi\u003e&quot;}}}}}