Skip to main content
POST
Add a business model to a service

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"

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"

Body

application/json

Business model data

type
enum<string>
required

How the service is sold. SINGLE_BOOKING is one booking at a time; PACKAGE sells prepaid credits drawn down by later bookings; the SCHEDULED_* and FLEXIBLE_* variants add recurrence and subscription billing. This drives which order item skuType applies.

Available options:
SINGLE_BOOKING,
PACKAGE,
SCHEDULED_PACKAGE,
SCHEDULED_SUBSCRIPTION,
FLEXIBLE_SUBSCRIPTION
paymentOptions
enum<string>[]
required
Minimum array length: 1
Available options:
PAY_WHILE_BOOKING,
PAY_AFTER_SERVICE_DELIVERED,
NO_PAYMENT,
PAY_FULL_PRICE_WHILE_PURCHASING,
PAY_BEGINNING_OF_MONTH,
PAY_END_OF_MONTH
fees
object[]

Service fees — additional charges attached to this business model, applied to any order line sold under it. Each fee applies once per order regardless of how many lines it governs, and appears as its own entry on the order summary rather than being folded into tax.

Maximum array length: 20
Example:
config
object

Response

Business model created

data
object
required