Create a cart
tenantKeyX-Tenant-Key<token>The public store key (pk_live_…). Required on every call.
X-Client-IP?stringOptional. IP address of the shopper (one IPv4/IPv6, no port, no list). Honoured only together with a valid X-Tenant-Secret; ignored otherwise. Used for rate limits and recorded with form submissions.
X-Tenant-Secret?stringOptional here. Server secret of the store: server-to-server only, never from a browser. Enables X-Client-IP.
Success.
application/json- response
data*curl -X POST 'https://api.elaraone.app/api/v1/cart' \ -H 'X-Tenant-Key: pk_live_…' \ -H 'X-Tenant-Secret: your-server-secret'{ "data": { "cart_token": "string", "cart": { "id": 0, "currency": "string", "coupon_code": "string", "coupon": { "code": "string", "status": "string", "reason": "string", "reason_code": "string", "remaining": { "amount": 0, "currency": "string", "formatted": "string" } }, "lines": [ { "id": 0, "quantity": 0, "variant": { "id": 0, "sku": "string", "name": "string" }, "unit_price": { "amount": 0, "currency": "string", "formatted": "string" }, "sub_total": { "amount": 0, "currency": "string", "formatted": "string" }, "discount_total": { "amount": 0, "currency": "string", "formatted": "string" }, "sub_total_discounted": { "amount": 0, "currency": "string", "formatted": "string" }, "discounts": [ { "id": 0, "amount": { "amount": 0, "currency": "string", "formatted": "string" } } ], "gift": true, "gift_promotion_id": 0, "tax_amount": { "amount": 0, "currency": "string", "formatted": "string" }, "total": { "amount": 0, "currency": "string", "formatted": "string" } } ], "shippable": true, "addresses": { "shipping": { "title": "string", "first_name": "string", "last_name": "string", "company_name": "string", "line_one": "string", "line_two": "string", "line_three": "string", "city": "string", "state": "string", "postcode": "string", "country_id": 0, "delivery_instructions": "string", "contact_email": "string", "contact_phone": "string", "shipping_option": "string", "collection_location_id": 0, "address_id": 0, "save_to_account": true }, "billing": { "title": "string", "first_name": "string", "last_name": "string", "company_name": "string", "line_one": "string", "line_two": "string", "line_three": "string", "city": "string", "state": "string", "postcode": "string", "country_id": 0, "delivery_instructions": "string", "contact_email": "string", "contact_phone": "string", "shipping_option": "string", "collection_location_id": 0, "address_id": 0, "save_to_account": true } }, "shipping": { "option": "string", "sub_total": { "amount": 0, "currency": "string", "formatted": "string" }, "tax_total": { "amount": 0, "currency": "string", "formatted": "string" }, "total": { "amount": 0, "currency": "string", "formatted": "string" }, "breakdown": [ { "identifier": "string", "name": "string", "price": { "amount": 0, "currency": "string", "formatted": "string" } } ] }, "discounts": [ { "id": 0, "name": "string", "label": "string", "kind": "string", "coupon": "string", "amount": { "amount": 0, "currency": "string", "formatted": "string" }, "items_amount": { "amount": 0, "currency": "string", "formatted": "string" }, "shipping_amount": { "amount": 0, "currency": "string", "formatted": "string" } } ], "tax_breakdown": [ { "identifier": "string", "description": "string", "percentage": "string", "price": { "amount": 0, "currency": "string", "formatted": "string" } } ], "sub_total": { "amount": 0, "currency": "string", "formatted": "string" }, "discount_total": { "amount": 0, "currency": "string", "formatted": "string" }, "shipping_discount": { "amount": 0, "currency": "string", "formatted": "string" }, "savings": { "amount": 0, "currency": "string", "formatted": "string" }, "nudges": [ { "promotion_id": 0, "message": "string", "remaining": { "amount": 0, "currency": "string", "formatted": "string" } } ], "rewards": [ { "promotion_id": 0, "label": "string", "type": "string", "choose_qty": 0, "chosen_qty": 0, "variant_ids": [ 0 ], "product_ids": [ 0 ], "collection": { "id": 0, "slug": "string" }, "unavailable": [ 0 ], "items": [ { "variant_id": 0, "product_id": 0, "name": "string", "slug": "string", "sku": "string", "thumbnail": "string", "price": { "amount": 0, "currency": "string", "formatted": "string" }, "variant_count": 0 } ] } ], "tax_total": { "amount": 0, "currency": "string", "formatted": "string" }, "tax_zone": { "id": 0, "name": "string", "price_display": "string", "prices_include_tax": true }, "total": { "amount": 0, "currency": "string", "formatted": "string" } } }}Record search events POST
Reports, in batches of 1–20, what the shopper did with search answers: `settled` (a suggest answer they stopped at: it becomes a counted search), `click` and `add_to_cart`. Each event names the answer by its `X-Search-Id`; the engine takes the query and the totals from its own 15-minute record of that answer, so the client never sends query text, counts or anything personal. Events for an unknown or expired search id, a repeated `settled`, a `settled` for a results page, or a click on something the answer cannot have shown are dropped silently: every well-formed batch is `202`. Never retry a failed beacon.
Get the cart GET
Next Page