OpheliaDocs
Search docs⌘K
DashboardCreate an account
v3 · Endpoints

POST /v3/bookings/{attempt_id}/continue

Send the code a site asked for, so a paused booking can go on.

POST/v3/bookings/{attempt_id}/continue

Only for a pause with challenge_type: "otp" and resumable: true. How pauses work: When a drive pauses.

Request

FieldTypeDefaultRule
attempt_id
path
none
The att_ id from the 202 requires_action answer.
code
string
none
Required. The code the site sent the person. otp_code is accepted as the same field. Empty → 400 invalid_input.

Response

The booking's answer, in the same shape as POST /v3/bookings: status, booking_id, attempt_id, confirmation_number and confirmation once booked, the pause fields when the site asks again, idempotent_replay when the attempt already ended, and cancellable, cancel_via.

Statuses and error codes

HTTPStatus / error codeWhen
200
succeeded
The site took the code and confirmed.
202
requires_action
The site said the code was wrong and asked again, or asked for something else (a bank check). Same attempt, a fresh window.
200
processing + continue_in_flight
Another continue is applying a code for this attempt. Do not resend; read GET /v3/bookings/{booking_id}.
200
processing
The booking has not paused yet: nothing was typed. Read GET /v3/bookings/{booking_id}.
202
requires_action, not resumable
The pause is a pay link, a Link approval or a press to authorize, which a code does not answer. Nothing was typed.
409
not_confirmed_after_otp
The third wrong code ended it, or the site never confirmed. May have booked: never send it again. Tell the person and check with the site.
409
transaction_status_unknown
The drive was lost after the code was typed. May have booked: never send it again. Tell the person and check with the site.
410
attempt_expired
The pause lapsed (600 seconds, or Ophelia restarted) before the code arrived. The code was never typed: almost certainly not booked, but not confirmed.
any
the stored result + idempotent_replay: true
The attempt already finished (booked, failed or abandoned). This is its answer again; nothing was typed.
404
unknown_attempt
No attempt with that id exists in your organization. Check the attempt_id the booking returned.
400
invalid_input, wrong_id_namespace
No code, or the id is not an att_ id.

Every code: Statuses and error codes.

Example

curl
curl -X POST https://api.opheliaos.com/v3/bookings/att_64bf82ce9687b7a239ed5f1c/continue \
-H "Authorization: Bearer YOUR_TEST_KEY" \
-H "Content-Type: application/json" \
-d '{ "code": "246810" }'

Response 200, shortened:

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"
},
"slot_source": "detail_live",
"cancellable": false,
"cancel_via": "contact the venue directly using the confirmation on this booking"
}