Get told when it changes
A booking can take minutes, and it can pause or finish after your call has returned. A webhook tells you the moment it moves, with what happened and why.
What you get
Every time a booking changes, Ophelia sends your webhook URL the booking as GET /v3/bookings/{booking_id}would answer it at that moment. You don't need to poll: act on the event, and read the booking only when you want to be sure of its latest state.
The events
v3.booking.processingv3.booking.requires_actioncontinue_with says how to answer.v3.booking.succeededbegin drive reached the form. confirmation_number when the site issued one.v3.booking.failedfailure_class and error_code say which.The v3. prefix keeps these apart from v1's booking.* events if you use both: the ids and statuses are not the same.
What an event says
data.object is the API's own answer for the booking, plus object, host, entity_id, created_at and updated_at. On a failure, read it in this order:
failure_classretryable_elsewhere: nothing was committed, so trying again is safe. terminal: stop; a retry could book twice.error_codeerrordiagnosiscause names the kind, detail usually names the field it wanted, alerts are the messages the page showed.bookingpressed, the screen and url it stopped on, the form it found and what was filled.GET keeps the status, the code and the message, but not diagnosis or the drive's booking report. Keep the event if you want the detail.Examples
Nothing was booked (booking_error), and the site said why: it wanted a phone number. Send customer.phone and book again with a new idempotency_key.
The drive holds the site's page for 10 minutes. See When a drive pauses.
Where they go
Events go to your organization's webhook URL, set on the dashboard's Settings page, with the same signature, retries and delivery history as v1. Webhooks covers all three, with code to check the signature.
id. When order matters, read the booking.Next: Pay.