Spec → BookingRequest / Confirmation
What is BookingRequest? Request submitted by an agent and the server-authoritative confirmation returned.
The request/confirmation pair is the money moment, and three protections live here. Idempotency by request_id: retries can never double-book. Price integrity: on fixed-price work, a mismatched price_accepted is rejected with 409 PRICE_MISMATCH. And the human principal rule: v0.1 refuses any booking where on_behalf_of_human is not true — autonomous agent-to-agent booking is deliberately out of scope until liability questions mature.
Fields
booking_request
| Field | Type | Notes |
|---|---|---|
request_id | string | REQUIRED |
provider_id | string | REQUIRED |
service_code | string | REQUIRED |
slot_id | string | REQUIRED |
property | object | REQUIRED |
customer | object | REQUIRED |
agent | object | REQUIRED |
price_accepted | object |
booking_confirmation
| Field | Type | Notes |
|---|---|---|
booking_id | string | REQUIRED |
request_id | string | REQUIRED |
status | string · enum | REQUIRED Values: confirmed, held_pending_provider, declined |
confirmed_slot | availability-slot | |
price_confirmed | object | |
cancellation_policy | string | |
provider_reference | string | |
deliverable | string | What the customer receives, e.g. 'CP12 certificate PDF within 24h of visit'. |
Example
{
"booking_request": {
"request_id": "req_a1b2c3d4e5",
"provider_id": "prv_fda0939423",
"service_code": "cp12_gas_safety",
"slot_id": "slt_demo000001",
"property": {
"postcode": "LS6 2AB",
"address_line1": "14 Example Terrace"
},
"customer": {
"name": "A. Landlord",
"phone_e164": "+447700900999",
"role": "landlord"
},
"agent": {
"agent_name": "assistant-name",
"on_behalf_of_human": true
},
"price_accepted": {
"amount": 68,
"currency": "GBP",
"vat_treatment": "ex_vat"
}
}
}
Schema: booking.schema.json (JSON Schema 2020-12, MIT).