OpheliaDocs
Search docs⌘K
DashboardCreate an account
v3 · Endpoints

GET /v3/bookings/{booking_id}

Read a booking as it stands now, and its confirmation once it has one.

When to read it: Book or buy and When a drive pauses.

Request

FieldTypeDefaultRule
booking_id
path
none
The bk_ id from POST /v3/bookings. No body.

Response

The booking as it stands now. A pause is read again: one no longer held reads failed with attempt_expired (410), a pay link that lapsed reads payment_link_expired (409), a Link approval that lapsed reads link_wallet_expired (409), and a pause a continue is answering reads processing with continue_in_flight (200). Otherwise it is the stored answer. Fields: status, booking_id, attempt_id, confirmation_number, confirmation, cancellable, cancel_via, and error_code, error, failure_class when it failed. Every field: Objects.

While a booking is processing, read this route again until it changes, or let a webhook tell you.

Statuses and error codes

HTTPStatus / error codeWhen
200
succeeded
Booked, or a begin that reached the form.
200
processing
The outcome is not known yet (also continue_in_flight: a continue is answering the pause). Read it again until it changes.
202
requires_action
The booking is paused and waiting for you.
410
attempt_expired
The pause is no longer held: it lapsed before a code arrived. Almost certainly not booked, but not confirmed.
409
payment_link_expired
The pay link lapsed before a card arrived. Nothing was attempted or charged.
409
link_wallet_expired
The person did not approve the purchase in Link in time. Nothing was attempted or charged.
by code
failed
The booking failed. The HTTP status is the one its error_code answers (409 for most). See the table.
404
unknown_booking
No booking with that id in your organization.
400
wrong_id_namespace
The id is not a bk_ id.

Example

curl
curl https://api.opheliaos.com/v3/bookings/bk_a12d331e7b3dcd72d6fb057f \
-H "Authorization: Bearer YOUR_TEST_KEY"

Response 200:

json
{
"status": "succeeded",
"booking_id": "bk_a12d331e7b3dcd72d6fb057f",
"attempt_id": "att_64bf82ce9687b7a239ed5f1c",
"confirmation_number": "PB-108554",
"confirmation": {
"reference": "PB-108554",
"screen": "confirmed",
"url": "https://opheliapractice.com/restaurant/practice-bistro"
},
"cancellable": false,
"cancel_via": "contact the venue directly using the confirmation on this booking"
}