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
Key | Datatype | Required | Description |
---|---|---|---|
revision | string | (Required) API endpoint revision (format: YYYY-MM-DD[.suffix]) | |
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"data":{"type":"coupon-code","id":"\u003cstring\u003e","attributes":{"unique_code":"\u003cstring\u003e","expires_at":"\u003cdateTime\u003e","status":"VERSION_NOT_ACTIVE"},"links":{"self":"\u003curi\u003e"},"relationships":{"coupon":{"data":{"type":"coupon","id":"\u003cstring\u003e"},"links":{"self":"\u003curi\u003e","related":"\u003curi\u003e"}},"profile":{"data":{"type":"profile","id":"\u003cstring\u003e"},"links":{"self":"\u003curi\u003e","related":"\u003curi\u003e"}}}}}