OpheliaDocs
Search docs⌘K
DashboardCreate an account
v3 · Endpoints

POST /v3/bookings

Book or buy one entity: a reservation, an appointment, a ticket or an order. The answer is the finished booking, a pause waiting for you, or what went wrong.

POST/v3/bookings
This call presses the final button unless you say otherwise. authorize.max_commitment defaults to commit. Send "authorize": {"max_commitment": "begin"} to stop at the checkout form. v3 cannot cancel or change what it books.

How to book, and what each part of the request does: Book or buy, Pay, Order from a store and Use a person's own account.

Request

What to book
FieldTypeDefaultRule
entity_id
string
none
The ent_ id from search. Send it or url; it wins when both are sent.
url
string
none
The booking_url from search. Neither field → 400 invalid_input.
offer_id
string
none
An off_ id from availability. Send the offer's own time as datetime too: the offer_id alone does not choose what is booked.
idempotency_key
string
none
Or the Idempotency-Key header. 1 to 128 letters, digits, . _ -, starting with a letter or digit. The same key replays the first answer, a failure included: a new try takes a new key.
vertical
string
none
Which kind of ask: a drive_profile value from GET /v3/verticals (dining, hotels, shopping, …). A broad category that covers several (travel) answers 400 ambiguous_vertical naming the choices.
term
string
none
What to look for.
location
string
none
Where.
datetime
string
none
RFC 3339 with a zone. Write the place's own local time with its own offset (2026-11-14T19:00:00-05:00 is 7 PM in New York). With a location (or, with none, the customer's own city from customer.location or customer.address; assumed then says so), Ophelia converts it to the place's clock; a request by entity_id or url with no location is driven at the clock time you wrote. A time with no zone (2026-11-14T19:00:00 or 2026-11-14T19:00) is read as the place's own clock. Anything else → 400 invalid_input.
party_size
integer
none
0 to 64. Negative or over 64 → 400 invalid_input.
end_date
string
none
The other end of a span (a stay's check-out). end_datetime is accepted too; end_date wins when both are sent.
destination
string
none
The other end of a route. Also accepted: end_destination {city, state, country} and end_destination_address {street, line2, city, state, zip_code, country}.
slots
object
none
What the fields above cannot say, as {"role": {"type", "value"}}. Never put card values here.
actor
object
none
Same shape as slots.
selections
object
none
The item's choices, {"size": "M"}. At most 8; each name and value at most 80 characters.
quantity
integer
1
1 to 20.
end_user
string
none
Your own id for the person. Needed to use their connected account.
authorize
FieldTypeDefaultRule
max_commitment
string
commit
begin stops at the checkout form with nothing final pressed and no card typed. commit presses the final button. read → 409 commitment_refused. Any other value → 400 invalid_input.
fill_identity
boolean
false
Lets the drive type the customer's email and phone. Without it they are not typed.
sign_in
boolean
false
Sign in as the person on their connected account. Needs fill_identity: true and end_user.
authorized_for
string
the entity_id or url
Answers an authorize_action pause: send the booking again with this set to the pause's authorized_for and a new idempotency_key. The same key replays the pause.
max_total
number
none
The most it may cost, fees, shipping and tax included, in currency units (128 is $128.00). Above 0. Required at commit for an order and for a site whose booking may charge a fee (422 max_total_required). A reservation's own card needs none.
currency
string
none
ISO-4217, three letters (USD).
payment
string
none
account_on_file: pay with the card the connected account holds. Needs sign_in, fill_identity, end_user, max_total and currency on any vertical, and no other way to pay. A missing one is a 400 naming the field.
buy_now
boolean
false
Press the item's own Buy Now. Only with max_commitment: "commit" sent in the request (the default does not count) and payment: "account_on_file".
customer
FieldTypeDefaultRule
name, first_name, last_name
string
none
The person the booking is for.
email, phone
string
none
Typed only with authorize.fill_identity: true.
dob, sex, postal_code
string
none
When the site asks for them.
address
object
none
The shipping or contact address: street, line2, city, state, zip_code, country. Never the card's billing address.
location
object
none
city, state, country.
new_patient, screening
boolean, object
none
For a visit: whether the patient is new, and screening {routine, answers: [{question, answer}]} (at most 20 answers, each question and answer 1 to 400 characters).
Paying: one way per booking
FieldTypeDefaultRule
card
object
none
number, exp (MM/YY), cvv, name, and the billing address: street_address, address_line2, city, state, postal_code, country. Typed only at commit; never echoed.
payment
object
none
The same card under v1's names (card_number, exp_month, exp_year, name_on_card, address_line1, …). card wins field by field.
payment_collection
string
none
link: the cardholder types the card on a pay page. Not with a card (400 card_with_payment_link). Only at commit; an order, or a site whose booking may charge a fee, also needs max_total. link_wallet: the person's Link wallet issues a one-time card once they approve the purchase in Link. Needs link_wallet, max_total and currency, at commit; not with a card (400 card_with_link_wallet).
link_wallet
object
none
access_token: the person's Link access token (scope payment_methods.agentic); test: Link's test mode. Only with payment_collection: "link_wallet"; never echoed.

Every check and its exact error body: Request rules.

Response

FieldWhat it is
status
succeeded, processing, requires_action, needs_input or failed.
booking_id, attempt_id
The booking (bk_) and the attempt (att_). Continue and abandon take the attempt id. A booking that passed the checks has a booking_id, even one that stopped at the form or failed later. A request refused by the checks has none.
confirmation_number, confirmation
At commit, once the site confirmed. Check confirmation_number, not status, to know whether something was booked. An RSVP, an appointment request or a free event can succeed with none; reason then says so. See confirmation.
amount_cents, currency
What an order cost, when the confirmation page stated a total.
challenge_type, resumable, continue_with, live_url
With requires_action: the pause and how to answer it.
authorized_for, action
With an authorize_action pause: the press to authorize.
pay_url, pay_expires_at
With a payment_link pause: the page the cardholder opens, for 15 minutes. With a link_wallet_approval pause: Link's page where the person approves the purchase.
missing[]
With needs_input: what to add.
idempotent_replay, reason
This is an earlier answer, replayed. No second booking was made.
offer, booking
What the drive saw and pressed. An order at begin carries the store's total in booking.purchase.quote. booking.ALERT_BOOKING_CREATED means a begin drive landed on a confirmation anyway: a booking may have been made, so tell the person and check with the site. Other inner keys are not a contract.
cancellable, cancel_via
Always false and "contact the venue directly using the confirmation on this booking" (the API's words for the site or the place).
error_code
With failed (and on some processing answers), plus error and failure_class.

The full envelope: Objects. Pauses: When a drive pauses.

Statuses and error codes

HTTPStatus / error codeWhen
200
succeeded
At commit: booked. Check confirmation_number; when there is none, reason says why. At begin: the form was reached and nothing final was pressed. Nothing was booked.
200
processing
The outcome is not known yet. Read GET /v3/bookings/{booking_id} again until it changes.
202
requires_action
A pause: a code, a press to authorize, or a pay link.
422
needs_input
Something is missing, such as max_total_required for an order; missing[] lists it. Nothing was pressed, even when a drive ran. Send again with it.
409
not_confirmed_after_otp, transaction_status_unknown, booked_a_different_entity
May have booked. Never send it again. Tell the person and check with the site.
409
booking_error, entity_not_reached, no_action_found, offer_expired, offer_gone, over_max_total, total_unreadable, cart_mismatch, out_of_stock, variant_unavailable, card_declined, drive_lost, …
Nothing was booked: each is answered before any press that could book. Fix the request, then try again with a new idempotency_key.
409
any other code (checkout_incomplete, account_required, timeout, …)
The code does not say when it happened. Check GET /v3/bookings/{booking_id} and with the site before you book again. Each code: the table.
409
commitment_refused
max_commitment: "read" on a booking.
400
invalid_input, wrong_id_namespace, offer_entity_mismatch, card_with_payment_link, card_with_link_wallet
The request breaks a rule. A field rule answers {"error": "invalid request body", "field", "detail"}.
403
merchant_not_enabled_for_key
The key is not enabled for this site. Nothing was driven.
404
unknown_entity, unknown_offer
No such id in your organization.
429
site_paced
The site is busy with another drive. Come back later.
503
a block, drive_capacity
Nothing was booked. Honour Retry-After, then try again with a new idempotency_key.

If your client times out on this call, send the same request with the same idempotency_key. You get the booking as it stands (processing while the drive runs), never a second booking. Read GET /v3/bookings/{booking_id} for the outcome, or let a webhook tell you.

Example: stop at the form

curl
curl -X POST https://api.opheliaos.com/v3/bookings \
-H "Authorization: Bearer YOUR_TEST_KEY" \
-H "Content-Type: application/json" \
-d '{
"entity_id": "ent_bc78e91578f61f35555280df",
"offer_id": "off_ea27bf414d62895bf8c9bec4",
"idempotency_key": "docs-begin-001",
"datetime": "2026-11-14T19:00:00-05:00",
"party_size": 2,
"customer": {
"name": "Jane Smith",
"email": "jane.smith.diner@gmail.com",
"phone": "+12124567890"
},
"authorize": {
"max_commitment": "begin",
"fill_identity": true
}
}'

Response 200, shortened. succeeded here means the form was reached. There is no confirmation_number: nothing final was pressed and nothing was booked.

json
{
"status": "succeeded",
"path": "live",
"booking_id": "bk_d9a8ab05d47ca72b5c68615e",
"booking": {
"action": "Find a table",
"form": {
"fields": [
{ "key": "name", "tier": "pii" },
{ "key": "email", "tier": "pii" },
{ "key": "phone", "tier": "pii" }
],
"result": {
"complete": true,
"filled": ["name", "email", "phone"],
"missing": [],
"needs": []
}
},
"form_reached": true,
"screen": "identity",
"url": "https://opheliapractice.com/restaurant/practice-bistro",
"why": "the page asks for name, email, phone"
},
"served_by": "form",
"slot_source": "detail_live",
"drive_id": "drv_baa47f2933cb2171ecea56d4",
"cancellable": false,
"cancel_via": "contact the venue directly using the confirmation on this booking"
}