OpheliaDocs
Search docs⌘K
DashboardCreate an account
v3 · Start

What v3 does

v3 books and buys on websites for you. You name a site and say what you want.

Get an API key
Issue API key makes a test key. A live key comes from a project's Go live step.
A test key works on real sites too: a booking there is real and charges the card.

What v3 does

Ophelia opens the site and does what a person would do: it searches, reads the times or prices, fills in the form, pays and presses the final button. Then it tells you what happened, in the same shape for every site.

It can:

  • find things on a site (POST /v3/search);
  • show what is open for one of them (POST /v3/availability);
  • book it or buy it (POST /v3/bookings);
  • sign in as a person on their own account (POST /v3/sessions).

It cannot cancel or change a booking. Once something is booked, only the site or the place can undo it.

A booking presses the final button unless you say otherwise. Send "authorize": {"max_commitment": "begin"} to stop at the checkout form with nothing final pressed.

Sites sometimes ask for a code. You get 202 requires_action; send the code to POST /v3/bookings/{attempt_id}/continue.

Test on opheliapractice.com first. It answers like a real site, and nothing there is real.

Read in this order

  1. Words we use: the words these pages use, each with one meaning.
  2. Get started: your key, then five calls on the practice site.
  3. Find something: search a site.
  4. See what’s open: read the times, rooms or prices of one result.
  5. Book or buy: stop at the checkout form, or press the final button.
  6. When a drive pauses: answer a code, or let the booking go.
  7. Pay: a card, a payment link, or the card on a person’s account.
  8. Order from a store: quantity, size and colour, shipping, and a price ceiling.
  9. Use a person’s own account: connect it with the site’s code, then book with it.
  10. Know what an answer means: what the drive assumed, checked and could not check.
  11. Handle errors: what to do for each kind of failure.
  12. Test on the practice site: every practice place, code, card and scenario.

To look up one route, field or error code, use the reference: Endpoints, Objects and Statuses and error codes.

Try it on the practice site

This calls the real API with your key against opheliapractice.com, so nothing is booked. Use a test key (oph_test_…) or a live key (oph_live_…); a test key holds v3:search and v3:book. Only opheliapractice.com is pretend: on any other site a test key books for real, and the booking charges the card and cannot be cancelled through Ophelia. Keys and scopes has the details.

Enter to send · Shift+Enter for new line

Next: Words we use.