Skip to main content
POST
Add an item to an order

Authorizations

x-api-key
string
header
required

API key minted in the MarketBox dashboard. Scope is restricted to the projects you select at creation time. Every route needs the key's standard API access (*) except POST /v1/projects/{projectId}/events, which needs events:write; a key without * is refused with 403 CAPABILITY_NOT_GRANTED.

Path Parameters

projectId
string
required

The project (tenant) that owns the resource. Every resource in this API is scoped to a project, and your API key is restricted to the projects it was issued for — a project outside that scope returns 403.

Minimum string length: 1
Example:

"prj_01kv60qgnef2kt3pvqgwmkbzfr"

orderId
string
required

The order — the commercial record. Order items are drawn down into bookings.

Minimum string length: 1
Example:

"ord_01kv8m92p4jcrywn14znp8cym0"

Body

application/json

Item data

skuType
enum<string>
required

What kind of line this is. PACKAGE is not accepted here: a package is bought when the order is created, by packageId.

Available options:
SINGLE_SESSION,
SUBSCRIPTION,
MEMBERSHIP,
DEPOSIT
serviceId
string
required

The service — the sellable thing (a lesson, a treatment). Offerings hang off a service and carry the duration and price.

Minimum string length: 1
Example:

"srv_01kv60qg12e82acr78edfnjhvv"

offeringId
string
required

The offering — one bookable variant of a service, carrying its own duration and regional pricing rules.

Minimum string length: 1
Example:

"off_01kv60qge5eh59ap0gw0pqrrys"

quantity
integer
required
Required range: x >= 1

Response

Item added

data
object
required