Skip to content
Linra Omni Developer Docs

Delete discount code

Delete a discount code that has never been redeemed.

Discount Codes

DELETE/api/v1/scent/discount-codes/{id}

A code with at least one redemption cannot be deleted — deactivate it instead (PATCH .../{id}/active with isActive: false).

Path parameters

idstring (uuid)Required

Response

deletedboolean

Other responses

401No bearer token (UNAUTHORIZED_MISSING_TOKEN), an invalid token (UNAUTHORIZED_INVALID_TOKEN) or an expired one (UNAUTHORIZED_TOKEN_EXPIRED — mint a new token). UPSTREAM_AUTH_FAILED is different: a dependent service refused the Gateway itself. That is a server-side fault — retry later and do NOT re-mint your token. See the Errors guide.
403The route is not available to your credential (FORBIDDEN).
404Unknown code (or it belongs to another account).
422The code has at least one redemption and cannot be deleted.
429Too many requests — see the Rate limits guide. Retry after the Retry-After header (seconds).
502A dependent service returned an invalid response (BAD_GATEWAY). Retry with backoff.
503The service is temporarily unavailable (SERVICE_UNAVAILABLE). Retry with backoff.
504A dependent service did not respond in time (GATEWAY_TIMEOUT). Retry with backoff.
curl --request DELETE \
--url https://api-omni.linra.net/api/v1/scent/discount-codes/5b1e3a1c-9d2e-4f3a-8b1c-9f0a2e3d4c5b \
--header 'Authorization: Bearer $TOKEN'

Response

{
"state": "SUCCESS",
"payload": {
"deleted": true
},
"details": null
}