Skip to content

List your discount codes

GET
/api/v1/scent/discount-codes
curl --request GET \
--url 'https://api-omni.linra.net/api/v1/scent/discount-codes?page=1&pageSize=20&activeOnly=true' \
--header 'Authorization: Bearer <token>'
page
integer
default: 1 >= 1
pageSize
integer
default: 20 >= 1 <= 100
activeOnly
boolean
default: true

Filter to active-only codes.

A page of your own codes, including usage stats.

Media typeapplication/json
object
state
required
string
payload
required
details
object
payload
required
object
items
Array<object>
object
id
string format: uuid
partnerId
string format: uuid
code
string
discountType

A percentage (0,100] off, or a flat SAR amount off.

string
Allowed values: Percent FixedAmount
value
number format: decimal
validFrom
string format: date-time
nullable
validTo
string format: date-time
nullable
isActive
boolean
totalUsageCap
integer
nullable
perCustomerCap
integer
nullable
productScope

Applies to your whole catalog, or to an explicit variant list (see scopedVariantIds).

string
Allowed values: All VariantList
scopedVariantIds
Array<string>
minOrderValue
number format: decimal
nullable
usageCount

Running total of successful redemptions.

integer
createdAt
string format: date-time
nullable
lastModifiedAt
string format: date-time
nullable
pagination
object
page
integer
pageSize
integer
totalCount
integer
totalPages
integer
Example
{
"state": "SUCCESS",
"payload": {
"items": [
{
"discountType": "Percent",
"productScope": "All"
}
]
}
}

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.