CORE OBJECTv0.1-draft

BookingRequest / Confirmation

The transaction pair, with a human principal required.

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

FieldTypeNotes
request_idstringREQUIRED
provider_idstringREQUIRED
service_codestringREQUIRED
slot_idstringREQUIRED
propertyobjectREQUIRED
customerobjectREQUIRED
agentobjectREQUIRED
price_acceptedobject

booking_confirmation

FieldTypeNotes
booking_idstringREQUIRED
request_idstringREQUIRED
statusstring · enumREQUIRED Values: confirmed, held_pending_provider, declined
confirmed_slotavailability-slot
price_confirmedobject
cancellation_policystring
provider_referencestring
deliverablestringWhat 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).