Skip to content

Carts & orders

Changing or validating carts requires WRITE (Authentication & scopes). Reading carts and orders works with READ.

A cart is an order that has not been validated yet. That is why cart endpoints use order_id and why creating a cart returns one. GET /carts/:order_id reads a cart; GET /orders and GET /orders/:order_id return validated orders only.

Each cart line references a catalog product, a delivery country, and optional fields such as assignee, shipping address, and keyboard layout (required when the product has one). See Catalog.

Carts are priced as LEASING (monthly lease, the default) or BUY (one-time purchase). Changing acquisition_mode on a cart reprices its lines and switches the mode of the whole company, so it is refused with CART_LOCKED while an approved quote froze any of the company’s carts.

  • PATCH /carts/:order_id changes the purchaser, the acquisition mode, or replaces every line with order_items. Send at least one of them.
  • POST /carts/:order_id/items adds lines and keeps the current ones.

Both return CART_LOCKED (409) when an approved quote froze the cart’s lines.

POST /carts/:order_id/validate turns the cart into an order and starts order processing at Fleet. Send the purchaser_id and optionally a signatory_id (defaults to the purchaser).

Give the signatory the signatory role first (PATCH /users/:user_id with is_signatory: true). Validating with someone who is not a signatory still grants them the role, but that is deprecated and will be refused in a future version.

For checkout flows that show the cart before confirming, two optional safeguards:

  • expected_device_ids — the cart devices the purchaser reviewed; CART_CHANGED (409) when the cart no longer holds exactly these.
  • require_signatory_role: true — SIGNATORY_REQUIRED (400) instead of granting the role.
  • Catalog — choosing products and layouts before building lines.
  • Devices — the devices a validated order creates.
  • API reference — Orders tag for carts and orders.