Worlds / Travel
Expedia Partner API
A local Expedia Partner Central with properties, room types, rate plans, inventory, bookings and payouts. Test the revenue agent that manages rates and inventory and reconciles bookings.
- Base path
/lodging- Auth
- HTTP basic or OAuth bearer token, the world key
- Endpoints
- 13
- Status
- Active today
This reference previews the surface the Expedia Partner world serves in the closed beta. Paths mirror the public Expedia Partner 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.
| binding | meaning |
|---|---|
WORLDS_EXPEDIA_PARTNER_URL | This world's origin followed by /lodging |
WORLDS_API_KEY | The world key, accepted wherever Expedia Partner expects a credential |
WORLDS_WORLD_ID | The isolated world's identity |
const base = process.env.WORLDS_EXPEDIA_PARTNER_URL + "/lodging";
const res = await fetch(base + "/properties/12345/reservations?status=booked", {
headers: {
Authorization: "Bearer " + process.env.WORLDS_API_KEY,
Accept: "application/json",
},
});
const { entity } = await res.json();
console.log(entity.length);API reference
Reservations
Bookings for a property.
- GET
/lodging/properties/{propertyId}/reservationsList reservations - GET
/lodging/properties/{propertyId}/reservations/{reservationId}Get a reservation - PUT
/lodging/properties/{propertyId}/reservations/{reservationId}/cancelCancel a reservation
Fields · 6
reservationId | string | Reservation id |
status | string | booked, cancelled, modified |
checkIn | date | Check-in |
checkOut | date | Check-out |
guests | object[] | Guest names and ages |
total | object | Amount and currency |
Properties
Lodging properties and their content.
- GET
/lodging/propertiesList properties - GET
/lodging/properties/{propertyId}Get a property - PATCH
/lodging/properties/{propertyId}Update a property
Fields · 5
propertyId | string | Property id |
name | string | Property name |
status | string | Active or inactive |
address | object | Street, city, country |
currency | string | Currency |
Room types
Room types and their rate plans.
- GET
/lodging/properties/{propertyId}/roomTypesList room types - GET
/lodging/properties/{propertyId}/roomTypes/{roomTypeId}Get a room type - POST
/lodging/properties/{propertyId}/roomTypesCreate a room type
Fields · 4
roomTypeId | string | Room type id |
name | object | Localized name |
maxOccupancy | integer | Max guests |
ratePlans | object[] | Attached rate plans |
Availability and rates
Inventory and nightly rates.
- GET
/lodging/properties/{propertyId}/availabilityGet availability and rates - PUT
/lodging/properties/{propertyId}/availabilityUpdate availability and rates
Fields · 5
roomTypeId | string | Room type id |
ratePlanId | string | Rate plan id |
date | date | Stay date |
totalInventoryAvailable | integer | Units open |
baseRate | number | Nightly base rate |
Messages
Guest conversations.
- GET
/lodging/properties/{propertyId}/conversationsList conversations - POST
/lodging/properties/{propertyId}/conversations/{conversationId}/messagesSend a message
Fields · 4
conversationId | string | Conversation id |
reservationId | string | Related reservation |
messages | object[] | Message history |
unread | boolean | Unread flag |
Test workflow
- Prepare. Select the Expedia Partner setup for your workflow and review its starting records, including reservations, properties, room types.
- 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.
- Define. Describe the task, expected final changes and records that must stay untouched. Keep expected outcomes separate from the agent's instructions.
- 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
- 7301884452 confirmed as HC-5512
- No confirmation number used on two itineraries
- 7301884456 confirmed by end of run
- Missing payout booking flagged, payout not marked complete
- No rate or inventory changes during the run
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.
# worlds/tasks.yaml · Expedia Partner
version: 2
connector: expedia-partner
seed: expedia-partner-starter
mode: isolated
policy: >
Confirm every booking missing a hotel confirmation number with a new unique
number, then reconcile last week's payout. Flag any Expedia Collect booking
missing from it.
tasks:
- id: load-rates-and-inventory-for-upcoming-dates
prompt: Load rates and inventory for upcoming dates
- id: confirm-bookings-with-a-hotel-confirmation-number
prompt: Confirm bookings with a hotel confirmation number
- id: reconcile-expedia-collect-bookings-against-payouts
prompt: Reconcile Expedia Collect bookings against payouts
expected:
- 7301884452 confirmed as HC-5512
- No confirmation number used on two itineraries
- 7301884456 confirmed by end of run
- "Missing payout booking flagged, payout not marked complete"
- No rate or inventory changes during the run
scenarios:
- booking-retrieved-twice
- rate-limited
- invalid-rateSee 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.
| condition | what the agent sees |
|---|---|
booking-retrieved-twice | The same booking comes back on two pulls |
rate-limited | Availability and rates updates return 429 |
invalid-rate | A rate below the plan's minimum is rejected |
credentials-expire | The API credentials return 401 after rotation |
Starting data
Start each run from the same records and relationships. The overview below describes the Expedia Partner starter; use the setup supplied for your workflow when preparing your own snapshot.
| Records | Starting setup |
|---|---|
| properties | 3 hotels with 10 room types |
| rate plans | Refundable and non refundable, Expedia Collect and Hotel Collect |
| bookings | 70 across booked, modified and cancelled |
| inventory | 90 days with closed out dates |
| payouts | 4 payout batches, one short a booking |
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.
Reservations records
Reservations
Bookings for a property.
| Field | Type | Meaning / relationship |
|---|---|---|
reservationId | string | Reservation id |
status | string | booked, cancelled, modified |
checkIn | date | Check-in |
checkOut | date | Check-out |
guests | object[] | Guest names and ages |
total | object | Amount and currency |
{
"reservationId": "<Reservation id>",
"status": "<booked, cancelled, modified>",
"checkIn": "<Check-in>",
"checkOut": "<Check-out>",
"guests": [],
"total": {}
}Properties records
Properties
Lodging properties and their content.
| Field | Type | Meaning / relationship |
|---|---|---|
propertyId | string | Property id |
name | string | Property name |
status | string | Active or inactive |
address | object | Street, city, country |
currency | string | Currency |
{
"propertyId": "<Property id>",
"name": "<Property name>",
"status": "<Active or inactive>",
"address": {},
"currency": "<Currency>"
}Room types records
Room types
Room types and their rate plans.
| Field | Type | Meaning / relationship |
|---|---|---|
roomTypeId | string | Room type id |
name | object | Localized name |
maxOccupancy | integer | Max guests |
ratePlans | object[] | Attached rate plans |
{
"roomTypeId": "<Room type id>",
"name": {},
"maxOccupancy": 1,
"ratePlans": []
}Availability and rates records
Availability and rates
Inventory and nightly rates.
| Field | Type | Meaning / relationship |
|---|---|---|
roomTypeId | string | Room type id |
ratePlanId | string | Rate plan id |
date | date | Stay date |
totalInventoryAvailable | integer | Units open |
baseRate | number | Nightly base rate |
{
"roomTypeId": "<Room type id>",
"ratePlanId": "<Rate plan id>",
"date": "<Stay date>",
"totalInventoryAvailable": 1,
"baseRate": 1
}Messages records
Messages
Guest conversations.
| Field | Type | Meaning / relationship |
|---|---|---|
conversationId | string | Conversation id |
reservationId | string | Related reservation |
messages | object[] | Message history |
unread | boolean | Unread flag |
{
"conversationId": "<Conversation id>",
"reservationId": "<Related reservation>",
"messages": [],
"unread": false
}