OpheliaDocs
Search docs⌘K
DashboardCreate an account
v3 · Guide

Test on the practice site

Set site to opheliapractice.com and v3 answers the request itself: the same routes, ids, statuses and error codes as a real site, with nothing reserved, bought or charged.

v3 works real websites, and POST /v3/bookings presses the final button by default. That holds for a test key too: only the practice site is pretend. The practice site is where you build and test your integration first. Send "site": "opheliapractice.com/restaurant" (or any path below) with your test key. No browser opens and no website is contacted. Everything else is the production API.

Copy the host exactly. opheliapractice.com is a name the API recognises, not a website. A misspelling such as opheliapractise.com is treated as an ordinary site and worked for real, and a booking there commits by default.

How it works

Practice answers are not mock responses written for the docs. Each one is the answer a real drive gives for that kind of page, read by the same code that reads a real drive. So the practice site behaves the way v3 does today, limits included: where a real drive returns less, so does practice.

Practice site
Key
Your test key (oph_test_…) or live key. A test key holds v3:search and v3:book, and they work here as on any v3 call.
Rate limits
The same as on real sites. Every practice request starts a drive, so it counts against them.
What it books
Nothing. No website, business, account or card is involved, and nobody is texted or emailed.
Charges
Nothing is charged. With a test key, practice bookings never use your free allowance, but once the allowance is used up practice calls are refused too (402 free_tier_exhausted). A live key needs billing set up (402 billing_required without it).
Code
246810, for every practice entity and for connecting an account (POST /v3/sessions). It never appears in a response: your agent has to ask the person, as with a real site.
Ids, statuses, error codes
The real ones: ent_, off_, bk_, att_, vss_ ids, the same HTTP statuses and error codes
The practice site shows how the API behaves. It cannot tell you whether v3 can book on a particular real website.

The practice site

Each path stands for a kind of site. A bare opheliapractice.com takes its kind from your vertical. Every listing has at least three entities, because a real search that finds fewer than three results, with no term to narrow it, fails. Every restaurant, hotel, ticket and class page offers at least three things. Each shop item is one thing to buy.

siteEntitiesHow a booking finishes
opheliapractice.com/restaurant
Practice Bistro, Practice Trattoria, Practice Omakase
The Bistro texts a code. The Trattoria confirms on the press. The Omakase holds the table with a card.
opheliapractice.com/hotel
Practice Inn, Harbor Practice Hotel, Practice Lodge
A card holds the room. Practice Lodge is fully booked on every date.
opheliapractice.com/tickets
Practice Symphony: Autumn Program, The Test Tour, live, Practice Comedy Night
A card, then an emailed code. Each event is on its own date.
opheliapractice.com/class
Morning Flow Yoga, Practice Spin 45, Reformer Pilates
Confirms on the press. Nothing to pay up front.
opheliapractice.com/shop
Practice Over-Ear Headphones, Ophelia Practice Mug, Practice Day Pack
A card places the order.

The entities are in Ophelia Test City. Send "location": "Ophelia Test City" or no location. On the restaurant, ticket and class listings, an area such as "Old Town" works too. A search for another city fails the way a real one does when the page never mentions the place you asked for.

Walkthrough: a table with a texted code

curl
# 1. Search
curl -X POST https://api.opheliaos.com/v3/search \
-H "Authorization: Bearer YOUR_TEST_KEY" \
-H "Content-Type: application/json" \
-d '{
"site": "opheliapractice.com/restaurant",
"vertical": "dining",
"location": "Ophelia Test City",
"datetime": "2026-11-14T19:00:00-05:00",
"party_size": 2
}'
# → entities[]: Practice Bistro (ent_bc78e91578f61f35555280df), Practice Trattoria, Practice Omakase
 
# 2. Read one entity's availability
curl -X POST https://api.opheliaos.com/v3/availability \
-H "Authorization: Bearer YOUR_TEST_KEY" \
-H "Content-Type: application/json" \
-d '{ "entity_id": "ent_bc78e91578f61f35555280df", "datetime": "2026-11-14T19:00:00-05:00", "party_size": 2 }'
# → offers[]: "5:00 PM", "5:30 PM", "6:00 PM", "7:00 PM" (off_ea27bf414d62895bf8c9bec4), ...
 
# 3. Book the 7:00 PM offer. fill_identity lets Ophelia type the customer's email and phone.
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-commit-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": { "fill_identity": true }
}'
# → 202, "status": "requires_action", "challenge_type": "otp", "resumable": true,
# "attempt_id": "att_64bf82ce9687b7a239ed5f1c"
 
# 4. Send the code
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" }'
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"
}

Send "max_commitment": "begin" in authorize to stop at the checkout form instead. The answer says what was pressed and what the form asks for, and nothing is booked.

What the answers look like

Search

Each result carries what the practice listing publishes: images, description, reviews, attributes, rating and rating_scale, a price with currency (a restaurant shows only a price band such as "$$$", with no price_amount or currency), and for products brand, seller and availability. Real sites publish less, often much less, so treat every one of these fields as optional. The reviews are written for the practice entities and describe nothing real.

A search with no term lists every entity of its kind. A term that matches only one or two entities returns those, as a real site's narrow search does: on the shop, "term": "headphones" returns Practice Over-Ear Headphones, and on the hotel, "term": "inn" returns Practice Inn. A term that matches nothing fails with 409 no_results, as a real site does when its own search says it found nothing: on the shop, "term": "spaceship".

A search sent with authorize.max_commitment: "begin" succeeds and also walks a result to its booking form, stopping there with nothing final pressed. Its answer carries the offer and booking reports beside the entities. Send searches with no authorize unless you want that.

Availability

Availability offers are what production reads off the page: the label on each control. A restaurant or class offer is its time ("7:00 PM"). A room or a ticket tier is the price printed on its button ("$378.00"), with no room name, price, unit or end date on the offer. Each offer's expires_at is at most 15 minutes after the read.

PageAnswer
A hotel with no date in the request
422, status: "needs_input", missing date
Practice Lodge (fully booked)
409 search_error
A shop item
409 search_error: a product page has no availability to read. Book it directly.
Booking

Send authorize.fill_identity: true when the customer's email or phone is needed.Without it Ophelia will not type either one into a form. The booking then stalls on the details form, and if that form's own button is the final one, it has already been pressed.

Send the offer_id and the offer's own time. The offer_id is checked before anything runs: an unknown one is 404 unknown_offer, another entity's is 400 offer_entity_mismatch, and an expired one is 409 offer_expired. It does not choose what is booked. The booking is for your datetime and party_size: the time you asked for if the page shows it, and otherwise the first time on the page. For a room or ticket tier, it books the row whose label names the room or tier your request asks for (slots room_type, bed_type, cabin or seat_preference), else the first row. So send the offer's time as datetime with the party, name the room or tier when there are several, and check the confirmation. Book or buy has the rule.
WhenAnswer
Booked
200, status: "succeeded" with confirmation_number
A code is needed (Practice Bistro, every ticket)
202 requires_action, challenge_type: "otp". Send it to POST /v3/bookings/{attempt_id}/continue within 10 minutes.
A wrong code
The page says the code isn't right and asks again: 202 requires_action under the same attempt_id. The code is asked for three times in all. The third wrong code is 409 not_confirmed_after_otp.
The right code after a wrong one
200 succeeded
A continue after 10 minutes
410 attempt_expired. GET /v3/bookings/{booking_id} then reads failed, attempt_expired.
The form still needs something and its button is the final one
409 not_confirmed_after_otp. The final press landed: do not retry.
The form still needs something before payment
409 booking_error. Nothing final was pressed.
A card is needed and none was sent
409 booking_error
A page with nothing to book
409 no_bookable_action, with no message

Send a code within the 10-minute window. If the person is not going to answer, call POST /v3/bookings/{attempt_id}/abandon. How pauses work is on When a drive pauses.

Test cards

Send the card in card on POST /v3/bookings. Practice entities never charge it. These numbers fail on purpose, at the payment step.

Card numberAnswer
4242424242424242
Booked (or the code pause, for tickets). Any number not below works the same way.
4000000000000002
Declined after the final press: 409 card_declined, as a real store answers a decline. The page still asks for payment and shows no order: nothing was bought. Try another card.
4000000000000119
Pressed, and the drive was lost: 409 transaction_status_unknown. The booking may exist. On tickets it fails after the code.
Practise the unknown outcome. On transaction_status_unknown (the 4000000000000119 card, or the timeout scenario) or not_confirmed_after_otp (the not_confirmed_after_otp or otp_not_sent scenario), the final button may have been pressed. Your agent must stop and tell the person. It must never retry: v3 cannot cancel, and a second attempt on a real site can book twice. See Handle errors.

Failing on purpose

Set the Ophelia-Practice-Scenario header to make a request fail the way a real one does, at the step where it fails. For a scenario that fails on POST /v3/bookings/{attempt_id}/continue, set the header on the booking request; the continue does not need it. Any other value returns 400 invalid_practice_scenario. A bad Ophelia-Practice-Timing value returns 400 invalid_practice_timing, and is checked first.

ScenarioWhat you get
blocked
The site's bot wall: 503 bot_wall_blocked, failure_class: "retryable_elsewhere"
timeout
The drive is lost. A booking at commit fails with 409 transaction_status_unknown. A booking at begin, a search or an availability call fails with 502 runner_transport.
slow
Every step takes as long as the slowest tenth of real drives (below).
no_availability
Availability is 409 search_error. A booking is 409 no_bookable_action.
phone_only
The page has no way to book online: 409 no_bookable_action
card_declined
At the payment step of an entity that takes a card: 409 card_declined. Nothing was bought.
otp_not_sent
The code screen says no code could be sent: 409 not_confirmed_after_otp
otp_expired
The booking pauses. Its continue is 410 attempt_expired.
card_security_code
A store order paid from the account (account_on_file, after a connect) pauses after its order press with challenge_type: "card_security_code". Continue with 123 to confirm; any other code ends in 409 not_confirmed_after_otp.
not_confirmed_after_otp
The booking pauses. Even the right code ends in 409 not_confirmed_after_otp.

modify_not_verified, phone_invalid and terms_changed are accepted, because v1 uses them, but they have no effect on v3.

Timing

v3 works somebody else's website the way a person would, so it is much slower than an ordinary API. By default every practice step takes as long as a typical real drive. Set your client's timeouts against these numbers, not against a fast test.

StepTypicalSlow (the slow scenario)
Search
26 s
54 s
Availability
26 s
54 s
Booking that stops at the form
56 s
160 s
Booking that completes
75 s
220 s
Answering a code
15 s
40 s

The search and booking-form numbers come from real drives. The numbers for availability, completing a booking and answering a code are estimates. A site Ophelia read moments ago can add up to 25 s more on a real drive.

Ophelia-Practice-TimingEach step takes
live
As long as a real drive. The default.
fast
A tenth of that.
instant
No time at all. For automated test suites.