Skip to content

Create a cart

POST
/carts
object
purchaser_id
required

User id of the purchaser (company employee)

integer
order_items
required

Line items to add to the cart

Array<object>
>= 1 items
object
product_id
required

Catalog product id (products.id; product under a product group)

integer
Example
101
delivery_country
required

ISO 3166-1 alpha-2 delivery country code (e.g. FR). Filters catalog by available_countries; cart line items must use a country allowed for the catalog product.

string
Example
FR
keyboard_layout

Required when the catalog product uses a keyboard layout for pricing; omit when the product does not offer keyboard options.

string
Allowed values: FRENCH_AZERTY SPANISH_QWERTY ITALIAN_QWERTY INTERNATIONAL_ENGLISH_QWERTY GERMAN_QWERTZ PORTUGUESE_QWERTY ENGLISH_QWERTY SWISS_QWERTZ AMERICAN_ENGLISH_QWERTY CANADIAN_ENGLISH_QWERTY DUTCH_QWERTY
Example
FRENCH_AZERTY
user_id

Optional company employee to assign the device to; must be a user in the same company as the API token.

integer
Example
12
shipping_address_id

Optional delivery address id from the company’s saved addresses. When omitted, the cart or company default shipping address is used.

integer
Example
56
acquisition_mode

LEASING vs one-time purchase (BUY). For catalog pricing, LEASING selects monthly lease; BUY selects purchase price.

string
default: LEASING
Allowed values: LEASING BUY
Example
LEASING

Cart created

object
data
required
object
order_id
required
integer

Validation or business rule error

Any of:
object
error
required
string

Forbidden

object
error
required
string
Allowed values: INSUFFICIENT_SCOPE

Resource not found

object
error
required
string
Allowed values: COMPANY_NOT_FOUND DELIVERY_COUNTRY_NOT_FOUND PRODUCT_NOT_FOUND PRODUCT_PRICING_UNAVAILABLE

Cart already exists

object
error
required
string
Allowed values: CART_ALREADY_EXISTS

Internal error

object
error
required
string
Allowed values: INTERNAL_ERROR