Skip to main content
POST
Cancel one of the signed-in supplier’s bookings

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.

Authorization
string
header
required

The signed-in person's Cognito access token, issued to this application's app client. Sent with the API key on the /clients/me and /suppliers/me routes.

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"

bookingId
string
required

The booking — one scheduled unit of service occupying supplier time.

Minimum string length: 1
Example:

"bk_01kv7q41n2hbqxwm03ymn7bxl9"

Body

application/json

Why

reasonCode
enum<string>
required

Why the booking is cancelled. Recorded on the booking’s history.

Available options:
CLIENT_REQUESTED,
CLIENT_UNWELL,
SUPPLIER_UNAVAILABLE,
WEATHER,
FACILITY_UNAVAILABLE,
BOOKED_IN_ERROR,
OTHER
Example:

"SUPPLIER_UNAVAILABLE"

note
string

Optional free text kept on the booking’s history (at most 1000 characters). Never emailed.

Maximum string length: 1000
Example:

"Pool closed for maintenance that morning."

Response

Cancelled booking

data
object
required