Create a booking
Books an appointment. The start is re-checked exactly the way the public booking page re-checks it: the staff member's working hours, the location's hours, existing bookings, classes, rooms, and the location's booking rules (same day, how far ahead, minimum notice). The visit is sized for the staff member doing it (their own duration, waiting period and cleanup time for the service). A taken or closed time returns `409 slot_unavailable`; a broken booking rule returns `422 booking_rule_violation`. Without `technician_id`, at a location where every appointment needs a staff member, the first free staff member who performs the service (in the location's booking priority order) is assigned: the same person `GET /availability` named for that slot. At a location that books onto rooms, the appointment is booked onto a room with no staff member (the service must have a room there, else `422 service_not_bookable`).
Authorization
ApiKeyAuth Send your API key as a bearer token: Authorization: Bearer bp_sk_live_.... Mint and revoke keys in your dashboard under Settings -> Developers.
In: header
Header Parameters
A unique key you generate per logical create. Retrying with the same key returns the original result instead of creating a duplicate.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/bookings" \ -H "Content-Type: application/json" \ -d '{ "location_id": "46910cc3-ab41-4b80-b4a7-94dab9f1b795", "service_id": "641e839f-864e-4cce-98f9-40f6cbb3e9e0", "start": "2019-08-24T14:15:22Z" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "location_id": "46910cc3-ab41-4b80-b4a7-94dab9f1b795", "contact_id": "f245e2a3-e141-4d41-912c-b1c1f5bd5598", "service_id": "641e839f-864e-4cce-98f9-40f6cbb3e9e0", "technician_id": "557e6e8c-3c29-4825-b73f-0884ad39f2d9", "start": "2019-08-24T14:15:22Z", "end": "2019-08-24T14:15:22Z", "status": "booked", "status_name": "string", "staff_busy": [ { "start": "2019-08-24T14:15:22Z", "end": "2019-08-24T14:15:22Z" } ], "source": "string", "created_at": "2019-08-24T14:15:22Z", "slug": "string"}Cancel a booking
Cancels the appointment the same way the dashboard does: it gets the business's Cancelled status, the customer and staff are notified, the calendar event is removed, and automations and webhooks (`booking.cancelled`) fire. Cancelling a booking that is already cancelled changes nothing and returns it. Money: anything the customer already paid toward the appointment (a deposit) becomes their store credit with the business. When the business's late-cancellation policy applies, the fee is taken from that deposit first (a $100 deposit with a $25 late fee leaves $75 of credit). Nothing is refunded to a card automatically; the business can refund the credit or waive the fee from the dashboard.
Retrieve a booking
Next Page