Create a scent order from the caller's own open cart
const url = 'https://api-omni.linra.net/api/v1/orders/scent';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"partnerId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","externalReference":"example","geoScopeId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","sagaId":"example","shippingAddress":{"recipient":"example","line1":"example","line2":"example","city":"example","region":"example","postalCode":"example","country":"example","phone":"example"},"customerRef":"example","partnerTaxRegistrationNumber":"example","partnerIsVatRegistered":false,"lockId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api-omni.linra.net/api/v1/orders/scent \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "partnerId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "externalReference": "example", "geoScopeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "sagaId": "example", "shippingAddress": { "recipient": "example", "line1": "example", "line2": "example", "city": "example", "region": "example", "postalCode": "example", "country": "example", "phone": "example" }, "customerRef": "example", "partnerTaxRegistrationNumber": "example", "partnerIsVatRegistered": false, "lockId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Order LINES are never part of this request — they are taken from the partner’s (optionally
customerRef-scoped) open cart. Use GET /api/v1/scent/cart/checkout-preview first to
validate pricing/availability, and optionally lock the priced lines with ?lock=true
before calling this endpoint with the returned lockId — see the Cart preview & price
locks guide.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Your own idempotency key.
object
ISO 3166-1 alpha-2 country code.
Must match the customerRef used when building the cart being checked out.
Optional — a price lock obtained from checkout-preview?lock=true. See the price-locks guide.
Responses
Section titled “Responses”Order accepted.
object
object
object
Example
{ "state": "SUCCESS"}Validation failure, INCLUDING an invalid, expired, or stale lockId (VALIDATION_PRICE_LOCK_INVALID /
VALIDATION_PRICE_LOCK_EXPIRED — see the price-locks guide) as well as ordinary field validation.
The envelope every /api/v1 ERROR response uses. state carries the machine-readable error code (see the Errors guide).
object
Always null on an error response.
object
object
Example
{ "state": "NOT_FOUND_ORDER", "payload": null}Duplicate/in-progress/intervention-required prior attempt, or a checkout race on the same cart.
The envelope every /api/v1 ERROR response uses. state carries the machine-readable error code (see the Errors guide).
object
Always null on an error response.
object
object
Examples
{ "state": "CONFLICT_CART_HAS_PENDING_ORDER", "payload": null, "details": {}}{ "state": "CONFLICT_CART_CHECKOUT_RACE", "payload": null, "details": {}}A business-rule rejection — most commonly the margin floor (BUSINESS_MARGIN_BELOW_FLOOR /
BUSINESS_PRICE_BELOW_COST) firing because live prices/costs moved since the cart was
priced (or since a lock was taken).
The envelope every /api/v1 ERROR response uses. state carries the machine-readable error code (see the Errors guide).
object
Always null on an error response.
object
object
Example
{ "state": "NOT_FOUND_ORDER", "payload": null}Too many requests — see the Rate limits guide. Retry after the Retry-After header (seconds).
The envelope every /api/v1 ERROR response uses. state carries the machine-readable error code (see the Errors guide).
object
Always null on an error response.
object
object
Example
{ "state": "NOT_FOUND_ORDER", "payload": null}Headers
Section titled “Headers”Seconds to wait before retrying.