Skip to content

Delete a discount code that has never been redeemed

DELETE
/api/v1/scent/discount-codes/{id}
curl --request DELETE \
--url https://api-omni.linra.net/api/v1/scent/discount-codes/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

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

id
required
string format: uuid

Deleted.

Media typeapplication/json
object
state
required
string
payload
required
details
object
payload
required
object
deleted
boolean
Example
{
"state": "SUCCESS"
}

Unknown code (or it belongs to another account).

Media typeapplication/json

The envelope every /api/v1 ERROR response uses. state carries the machine-readable error code (see the Errors guide).

object
state
required
string
payload
required

Always null on an error response.

object
details
object
Example
{
"state": "NOT_FOUND_ORDER",
"payload": null
}

The code has at least one redemption and cannot be deleted.

Media typeapplication/json

The envelope every /api/v1 ERROR response uses. state carries the machine-readable error code (see the Errors guide).

object
state
required
string
payload
required

Always null on an error response.

object
details
object
Examples
ExampleinUse
{
"state": "BUSINESS_DISCOUNT_CODE_IN_USE",
"payload": null,
"details": {
"usageCount": 3
}
}

Too many requests — see the Rate limits guide. Retry after the Retry-After header (seconds).

Media typeapplication/json

The envelope every /api/v1 ERROR response uses. state carries the machine-readable error code (see the Errors guide).

object
state
required
string
payload
required

Always null on an error response.

object
details
object
Example
{
"state": "NOT_FOUND_ORDER",
"payload": null
}
Retry-After
integer

Seconds to wait before retrying.