Archive a coupon
Turns the discount off in the platform: no code of it works anymore and none is handed out. Its codes stay, as history.
POST
Turns the discount off in the platform: no code of it works anymore and none is handed out. Its codes stay, as history.
apiKey writeheader
AuthorizationBearer <token>A workspace API key (pf_…), created under Developers → API keys.
Scope: write
id*stringFormat
uuididempotency-key?stringRun this write once: a retry with the same key gets the first answer (24 hours).
Length
1 <= length <= 255OK
application/json- response
id*stringFormat
uuidstore*name*stringsource*stringValue in
"platform""import"kind*stringValue in
"personal""bulk"quantity*integer|nullprefix*string|nullvalueType*|Value in
"percentage""amount"nullvalue*integer|nullminimumSubtotal*validity*||combinesWith*|nullreissue*stringValue in
"after_use_or_expiry""every_email"status*stringValue in
"active""ended""archived"externalId*string|nulladminUrl*|Format
uriimportSkipped*integer|nullcodes*createdAt*stringFormat
date-timearchivedAt*|Format
date-timecurl -X POST 'https://api.postforge.dev/v1/coupons/497f6eca-6276-4993-bfeb-53cbbbba6f08/archive'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "store": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "platform": "string", "currency": "string" }, "name": "string", "source": "platform", "kind": "personal", "quantity": 0, "prefix": "string", "valueType": "percentage", "value": 0, "minimumSubtotal": { "amount": 0, "currency": "str" }, "validity": { "type": "days", "days": 1 }, "combinesWith": { "orderDiscounts": true, "productDiscounts": true, "shippingDiscounts": true }, "reissue": "after_use_or_expiry", "status": "active", "externalId": "string", "adminUrl": "http://example.com", "importSkipped": 0, "codes": { "available": 0, "assigned": 0, "used": 0, "expired": 0, "pending": 0, "failed": 0 }, "createdAt": "2019-08-24T14:15:22Z", "archivedAt": "2019-08-24T14:15:22Z"}