Skip to content

Update a cart

PATCH
/carts/{order_id}
order_id
required

Order id

string
/^[1-9]\d*$/
Example
42
object
purchaser_id
integer
order_items
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
Allowed values: LEASING BUY
Example
LEASING

Updated cart

object
data
required
object
id
required
integer
purchaser_id
required
integer
nullable
num_devices
required
integer
nullable
rent
required
string
nullable
currency
required
string
nullable
devices
required
Array<object>
object
id
required
integer
name
required
string
nullable
rent
required
string
nullable
product_id
required

Catalog product id (products.id) when the line is tied to a catalog product

integer
nullable
Example
101

Validation or business rule error

Any of:
object
error
required
string

Forbidden

object
error
required
string
Allowed values: INSUFFICIENT_SCOPE

Not found

object
error
required
string
Allowed values: CART_NOT_FOUND COMPANY_NOT_FOUND DELIVERY_COUNTRY_NOT_FOUND PRODUCT_NOT_FOUND PRODUCT_PRICING_UNAVAILABLE

Cart is no longer editable for this operation

object
error
required
string
Allowed values: ORDER_NOT_CART

Internal error

object
error
required
string
Allowed values: INTERNAL_ERROR