Get discount code
Get one of your discount codes by ID.
Discount Codes
GET
/api/v1/scent/discount-codes/{id}Returns a single discount code by ID, including usage statistics. A code belonging to another partner, or an unknown ID, returns 404.
Path parameters
idstring (uuid)RequiredResponse
idstring (uuid)codestringdiscountTypestring (enum)A percentage (0,100] off, or a flat SAR amount off.
valuenumber (decimal)validFromstring (date-time)validTostring (date-time)isActivebooleantotalUsageCapintegerperCustomerCapintegerscopedVariantIdsarray of string (uuid)Present and non-empty ⇒ the code applies only to these variants. Empty ⇒ applies to your whole catalog.
minOrderValuenumber (decimal)usageCountintegerRunning total of successful redemptions.
createdAtstring (date-time)lastModifiedAtstring (date-time)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).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 GET \ --url https://api-omni.linra.net/api/v1/scent/discount-codes/5b1e3a1c-9d2e-4f3a-8b1c-9f0a2e3d4c5b \ --header 'Authorization: Bearer $TOKEN'const res = await fetch('https://api-omni.linra.net/api/v1/scent/discount-codes/5b1e3a1c-9d2e-4f3a-8b1c-9f0a2e3d4c5b', { headers: { Authorization: `Bearer ${token}`, },});const { payload } = await res.json();var response = await httpClient.GetAsync("https://api-omni.linra.net/api/v1/scent/discount-codes/5b1e3a1c-9d2e-4f3a-8b1c-9f0a2e3d4c5b");
var envelope = await response.Content.ReadFromJsonAsync<ApiResponse<DiscountCodePartnerResponse>>();Response
{ "state": "SUCCESS", "payload": { "id": "5b1e3a1c-9d2e-4f3a-8b1c-9f0a2e3d4c5b", "code": "string", "discountType": "Percent", "value": 0, "validFrom": "2026-08-22T09:14:03Z", "validTo": "2026-08-22T09:14:03Z", "isActive": true, "totalUsageCap": 0, "perCustomerCap": 0, "scopedVariantIds": [ "5b1e3a1c-9d2e-4f3a-8b1c-9f0a2e3d4c5b" ], "minOrderValue": 0, "usageCount": 0, "createdAt": "2026-08-22T09:14:03Z", "lastModifiedAt": "2026-08-22T09:14:03Z" }, "details": null}
