Get checkout preview
Preview what checkout would do right now.
Cart
/api/v1/scent/cart/{customerRef}/checkout-previewALWAYS call this before POST /api/v1/scent/orders — it runs the SAME resolution order-create
runs (pricing, VAT, availability, and price availability) over the cart identified by the
required customerRef path segment and reports every line’s verdict at once. Read-only with
respect to the cart/order domain: takes NO reservations and performs NO wallet-funds check.
API Docs Review effort, Phase F (D33): this endpoint is genuinely pure-read now — it never
takes a price lock itself. To freeze the currently-previewed prices, call
POST /api/v1/scent/cart/{customerRef}/price-lock separately, which recomputes this SAME
preview internally and persists a lock only when it reports canCheckout: true. Issue codes:
UNAVAILABLE, INSUFFICIENT_STOCK, PRICE_NOT_AVAILABLE, NOT_PRICED, VARIANT_NOT_ASSIGNED (per line);
CART_HAS_PENDING_ORDER, PRODUCT_ACCESS_DISABLED, PRICE_NOT_AVAILABLE (cart-level,
via cartIssue). An empty cart returns canCheckout: false with no lines, not an error.
Path parameters
customerRefstringRequiredThe per-customer cart/registration selector this endpoint operates on (max 128 chars, URL-encoded) — every cart/wishlist/stock-notification endpoint carries it in the path (API Docs Review effort, Phase F/G, D29/R-CUSTOMERREF). Also the value a per-customer redemption cap, if any, is checked against.
Response
cartIdstring (uuid)customerRefstringlinesarray of objectcanCheckoutbooleanTrue iff every line is ok AND the cart is non-empty AND this cart has no live order already outstanding.
cartIssue.codestring (enum)cartIssue.pendingOrderReferencestringThe blocking order’s own id, populated only alongside CART_HAS_PENDING_ORDER.
baseCurrencystringtotals.chargedWithVatnumber (decimal)Sum of every line’s goods-sale total including VAT, PLUS the order-level shipping fee — what checkout would actually charge.
totals.commissionWithVatnumber (decimal)Sum of every CREDITABLE (Retail-mode) line’s commission including VAT — 0 for an all-Wholesale cart, never null.
totals.netAfterCommissionnumber (decimal)chargedWithVat minus commissionWithVat.
totals.shippingobjecttotals.displayobjectPopulated only for a supported non-SAR X-Partner-Currency.
pricedAtstring (date-time)The server UTC time of THIS read.
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).404No API route matches this path (NOT_FOUND_ROUTE). A missing resource on a real route returns that service’s own NOT_FOUND_* code instead.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/cart/value/checkout-preview \ --header 'Authorization: Bearer $TOKEN'const res = await fetch('https://api-omni.linra.net/api/v1/scent/cart/value/checkout-preview', { headers: { Authorization: `Bearer ${token}`, },});const { payload } = await res.json();var response = await httpClient.GetAsync("https://api-omni.linra.net/api/v1/scent/cart/value/checkout-preview");
var envelope = await response.Content.ReadFromJsonAsync<ApiResponse<CheckoutPreviewResponse>>();Response
{ "state": "SUCCESS", "payload": { "cartId": "5b1e3a1c-9d2e-4f3a-8b1c-9f0a2e3d4c5b", "customerRef": "string", "lines": [ { "variantId": "5b1e3a1c-9d2e-4f3a-8b1c-9f0a2e3d4c5b", "quantity": 0, "sku": "string", "ok": true, "issue": "UNAVAILABLE", "pricing": { "currency": "SAR", "unitPrice": 0, "line": { "subtotal": 0, "goodsVatAmount": 0, "totalWithVat": 0, "commission": { "amount": null, "vatAmount": null, "netAfterCommission": null, "rate": null } }, "rrp": 0, "display": { "unitPrice": 0, "line": { "subtotal": null, "goodsVatAmount": null, "totalWithVat": null, "commission": null }, "rrp": 0 } }, "availability": { "state": "Available", "availableQuantity": 0 }, "marketing": { "currentPrice": 0, "compareAtPrice": 0, "discountPercent": 0, "badges": [ "LIMITED" ], "currentPriceDisplay": 0, "compareAtPriceDisplay": 0 } } ], "canCheckout": true, "cartIssue": { "code": "CART_HAS_PENDING_ORDER", "pendingOrderReference": "string" }, "baseCurrency": "SAR", "totals": { "chargedWithVat": 0, "commissionWithVat": 0, "netAfterCommission": 0, "shipping": { "amount": 0, "vatAmount": 0, "amountWithVat": 0, "freeThreshold": 0, "isFree": true }, "display": { "currency": "string", "rate": 0, "chargedWithVat": 0, "commissionWithVat": 0, "netAfterCommission": 0, "shipping": { "amount": 0, "vatAmount": 0, "amountWithVat": 0, "freeThreshold": 0 } } }, "pricedAt": "2026-08-22T09:14:03Z" }, "details": null}
