Closed beta · run Worlds on your machineBrowse worlds →
Docs menu · OpenTable API

Worlds / Travel

OpenTable API

A local OpenTable restaurant with tables, shifts, reservations, covers, guest notes and no show rules. Test the host agent that books, moves and cancels reservations and handles parties that do not show.

Base path
/v2
Auth
OAuth 2.0 client credentials bearer token, the world key
Endpoints
13
Status
Active today

This reference previews the surface the OpenTable world serves in the closed beta. Paths mirror the public OpenTable API; the exact subset is confirmed when your workflow is scoped.

Connect

The run gives your agent these bindings. Keep your SDK; change only where it sends requests.

bindingmeaning
WORLDS_OPENTABLE_URLThis world's origin followed by /v2
WORLDS_API_KEYThe world key, accepted wherever OpenTable expects a credential
WORLDS_WORLD_IDThe isolated world's identity
js · fetch
const base = process.env.WORLDS_OPENTABLE_URL + "/v2";

const res = await fetch(base + "/restaurants/1234/availability?party_size=2&start_date_time=2026-11-14T19:00", {
  headers: { Authorization: "Bearer " + process.env.WORLDS_API_KEY },
});

const { times } = await res.json();
console.log(times[0]);

API reference

Restaurants

Restaurants the partner can book.

  • GET/v2/restaurantsList restaurants
  • GET/v2/restaurants/{rid}Get a restaurant
Fields · 5
ridintegerRestaurant id
namestringRestaurant name
addressobjectStreet and city
cuisinestringPrimary cuisine
timezonestringIANA time zone

Availability

Open times for a party size.

  • GET/v2/restaurants/{rid}/availabilityGet availability
  • POST/v2/restaurants/{rid}/slot_locksLock a slot
  • DELETE/v2/restaurants/{rid}/slot_locks/{lock_id}Release a slot lock
Fields · 4
ridintegerRestaurant id
party_sizeintegerGuests
timesstring[]Available start times
slot_hashstringToken to lock a slot

Reservations

Create, change and cancel bookings.

  • POST/v2/reservationsCreate a reservation
  • GET/v2/reservations/{confirmation_number}Get a reservation
  • PUT/v2/reservations/{confirmation_number}Change a reservation
  • DELETE/v2/reservations/{confirmation_number}Cancel a reservation
  • GET/v2/restaurants/{rid}/reservationsList restaurant reservations
Fields · 6
confirmation_numberintegerConfirmation number
ridintegerRestaurant id
date_timedatetimeReservation time
party_sizeintegerGuests
statestringConfirmed, seated, cancelled
special_requeststringGuest note

Guests

Diner profiles and visit history.

  • GET/v2/guestsSearch guests
  • GET/v2/guests/{gpid}Get a guest
  • PUT/v2/guests/{gpid}Update a guest
Fields · 5
gpidstringGuest profile id
first_namestringGiven name
last_namestringFamily name
emailstringEmail
phonestringPhone

Test workflow

  1. Prepare. Select the OpenTable setup for your workflow and review its starting records, including restaurants, availability, reservations.
  2. Connect. Configure your agent with this world's URL and key using the SDK example. Check that it reaches the intended API before running a test.
  3. Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
  4. Run and inspect. Use the dashboard or your workflow's generated CLI setup. Review final records and changes, then rerun from the same starting setup with the relevant failure conditions. Use Deployment and CI to automate the same workflow.

What to verify

  • Test party of 4 moved to Thursday 19:00
  • Example party of 6 still on a table that seats 6
  • Placeholder party canceled with no fee
  • No seated party marked no show
  • Thursday 19:00 covers within the shift limit

Test file

A task file names the jobs, the policy your agent is given and what the grader reads back from the world's final state. The agent never sees the expected outcomes.

yaml · worlds/tasks.yaml
# worlds/tasks.yaml · OpenTable
version: 2
connector: opentable
seed: opentable-starter
mode: isolated
policy: >
  Handle tonight's guest messages. Move parties only to tables that fit them,
  cancel when asked without charging parties under 6, and do not mark no shows
  until 15 minutes past the time.
tasks:
  - id: book-and-move-reservations-within-table-capacity
    prompt: Book and move reservations within table capacity
  - id: mark-no-shows-after-the-grace-period
    prompt: Mark no shows after the grace period
  - id: cancel-reservations-when-guests-ask
    prompt: Cancel reservations when guests ask
expected:
  - "Test party of 4 moved to Thursday 19:00"
  - Example party of 6 still on a table that seats 6
  - Placeholder party canceled with no fee
  - No seated party marked no show
  - "Thursday 19:00 covers within the shift limit"
scenarios:
  - slot-lock-expires
  - slot-gone
  - rate-limited

See Tasks and outcomes for every field, and Deployment and CI to run the file on every pull request.

Failure conditions

Each one fires before the handler, at the same step on every run.

conditionwhat the agent sees
slot-lock-expiresThe held slot expires before the reservation is made
slot-goneAnother diner books the time between search and booking
rate-limitedAvailability searches return 429
webhook-lateA seated update arrives after the agent checks the book

Starting data

Start each run from the same records and relationships. The overview below describes the OpenTable starter; use the setup supplied for your workflow when preparing your own snapshot.

RecordsStarting setup
tables22 tables, two that combine into a 10 top
shiftsLunch and dinner, closed Mondays
reservations140 across booked, confirmed, seated, completed and canceled
guests120 fake guest profiles, a few with allergy notes
no show rules15 minute grace, card on file for parties of 6 or more

The record shapes below reuse this world's API field definitions. They show illustrative values and placeholders, not an importable seed. API responses and seed input can differ; include all required records and references in the accepted import format for your workflow.

Restaurants records

Restaurants

Restaurants the partner can book.

FieldTypeMeaning / relationship
ridintegerRestaurant id
namestringRestaurant name
addressobjectStreet and city
cuisinestringPrimary cuisine
timezonestringIANA time zone
json · illustrative record shape
{
  "rid": 1,
  "name": "<Restaurant name>",
  "address": {},
  "cuisine": "<Primary cuisine>",
  "timezone": "<IANA time zone>"
}

See restaurants operations

Availability records

Availability

Open times for a party size.

FieldTypeMeaning / relationship
ridintegerRestaurant id
party_sizeintegerGuests
timesstring[]Available start times
slot_hashstringToken to lock a slot
json · illustrative record shape
{
  "rid": 1,
  "party_size": 1,
  "times": [],
  "slot_hash": "<Token to lock a slot>"
}

See availability operations

Reservations records

Reservations

Create, change and cancel bookings.

FieldTypeMeaning / relationship
confirmation_numberintegerConfirmation number
ridintegerRestaurant id
date_timedatetimeReservation time
party_sizeintegerGuests
statestringConfirmed, seated, cancelled
special_requeststringGuest note
json · illustrative record shape
{
  "confirmation_number": 1,
  "rid": 1,
  "date_time": "<Reservation time>",
  "party_size": 1,
  "state": "<Confirmed, seated, cancelled>",
  "special_request": "<Guest note>"
}

See reservations operations

Guests records

Guests

Diner profiles and visit history.

FieldTypeMeaning / relationship
gpidstringGuest profile id
first_namestringGiven name
last_namestringFamily name
emailstringEmail
phonestringPhone
json · illustrative record shape
{
  "gpid": "<Guest profile id>",
  "first_name": "<Given name>",
  "last_name": "<Family name>",
  "email": "person@example.test",
  "phone": "<Phone>"
}

See guests operations

See the OpenTable world in the catalog