Worlds / Travel
Sabre API
A local Sabre with PNRs, itineraries, fare rules, exchanges and queues. Test the travel agent that reads fare rules, exchanges tickets and cleans up itineraries.
- Base path
/v1- Auth
- OAuth 2.0 bearer token, the world key
- Endpoints
- 12
- Status
- Active today
This reference previews the surface the Sabre world serves in the closed beta. Paths mirror the public Sabre 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_SABRE_URL | This world's origin followed by /v1 |
WORLDS_API_KEY | The world key, accepted wherever Sabre expects a credential |
WORLDS_WORLD_ID | The isolated world's identity |
const base = process.env.WORLDS_SABRE_URL + "/v1";
const res = await fetch(base + "/offers/shop", {
method: "POST",
headers: {
Authorization: "Bearer " + process.env.WORLDS_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
OTA_AirLowFareSearchRQ: { Version: "6", POS: { Source: [{ PseudoCityCode: "F9CE" }] } },
}),
});
const offers = await res.json();API reference
Air shopping
Low-fare search across carriers.
- POST
/v1/offers/shopSearch air offers - POST
/v1/shop/flightsSearch flights, BFM - GET
/v1/shop/flights/faresFind lowest fares by destination
Fields · 4
OriginDestinationInformation | object[] | Legs with dates and airports |
TravelerInfoSummary | object | Passenger counts |
PricedItineraries | object[] | Result itineraries |
AirItineraryPricingInfo | object | Fare breakdown |
Reservations
PNR create, retrieve and cancel.
- POST
/v1/trip/orders/createBookingCreate a booking - POST
/v1/trip/orders/getBookingRetrieve a booking - POST
/v1/trip/orders/cancelBookingCancel a booking
Fields · 5
confirmationId | string | PNR locator |
travelers | object[] | Passengers |
flights | object[] | Booked segments |
startDate | date | First travel date |
bookingSource | object | Agency and PCC |
Hotels
Hotel availability and content.
- POST
/v1/get/hotelavailSearch hotel availability - POST
/v1/get/hotelcontentGet hotel content - POST
/v1/book/hotelsBook a hotel
Fields · 4
HotelCode | string | Property code |
HotelName | string | Property name |
RoomStays | object[] | Room and rate options |
TimeSpan | object | Check-in and check-out |
Ancillaries
Seats, bags and extras.
- POST
/v1/offers/getSeatMapGet a seat map - POST
/v1/offers/getAncillariesList ancillary offers - POST
/v1/orders/addAncillariesAdd ancillaries to a booking
Fields · 4
offerItemId | string | Offer item id |
type | string | Seat, bag or meal |
price | object | Amount and currency |
segmentRef | string | Segment reference |
Test workflow
- Prepare. Select the Sabre setup for your workflow and review its starting records, including air shopping, reservations, hotels.
- 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
- ABCDEF exchanged with the fare rule change fee collected
- MNOPQR ticket still open, no refund issued
- Every exchanged PNR has a new ticket number
- Every touched PNR saved with a received from field
- No queue item removed without a remark
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 · Sabre
version: 2
connector: sabre
seed: sabre-starter
mode: isolated
policy: >
Handle today's change requests. Read the fare rules first, exchange only
where changes are permitted and collect the fee, and decline anything the
rules do not allow.
tasks:
- id: exchange-tickets-for-voluntary-date-changes
prompt: Exchange tickets for voluntary date changes
- id: read-fare-rules-before-quoting-a-change-fee
prompt: Read fare rules before quoting a change fee
- id: clear-pnrs-from-the-agency-s-queues
prompt: "Clear PNRs from the agency's queues"
expected:
- ABCDEF exchanged with the fare rule change fee collected
- "MNOPQR ticket still open, no refund issued"
- Every exchanged PNR has a new ticket number
- Every touched PNR saved with a received from field
- No queue item removed without a remark
scenarios:
- session-expires
- simultaneous-changes
- fare-not-availableSee 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 |
|---|---|
session-expires | The session token times out after inactivity |
simultaneous-changes | Ending the transaction fails because the PNR changed elsewhere |
fare-not-available | The new fare class sells out between quote and exchange |
rate-limited | The REST APIs return 429 |
Starting data
Start each run from the same records and relationships. The overview below describes the Sabre starter; use the setup supplied for your workflow when preparing your own snapshot.
| Records | Starting setup |
|---|---|
| PNRs | 50 with itineraries and passenger data |
| tickets | 35 issued, some nonrefundable |
| fare rules | Change and cancel penalties on every fare basis |
| queues | Schedule change and ticketing queues with 20 items |
| exchanges | 6 completed exchanges with residual value |
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.
Air shopping records
Air shopping
Low-fare search across carriers.
| Field | Type | Meaning / relationship |
|---|---|---|
OriginDestinationInformation | object[] | Legs with dates and airports |
TravelerInfoSummary | object | Passenger counts |
PricedItineraries | object[] | Result itineraries |
AirItineraryPricingInfo | object | Fare breakdown |
{
"OriginDestinationInformation": [],
"TravelerInfoSummary": {},
"PricedItineraries": [],
"AirItineraryPricingInfo": {}
}Reservations records
Reservations
PNR create, retrieve and cancel.
| Field | Type | Meaning / relationship |
|---|---|---|
confirmationId | string | PNR locator |
travelers | object[] | Passengers |
flights | object[] | Booked segments |
startDate | date | First travel date |
bookingSource | object | Agency and PCC |
{
"confirmationId": "<PNR locator>",
"travelers": [],
"flights": [],
"startDate": "<First travel date>",
"bookingSource": {}
}Hotels records
Hotels
Hotel availability and content.
| Field | Type | Meaning / relationship |
|---|---|---|
HotelCode | string | Property code |
HotelName | string | Property name |
RoomStays | object[] | Room and rate options |
TimeSpan | object | Check-in and check-out |
{
"HotelCode": "<Property code>",
"HotelName": "<Property name>",
"RoomStays": [],
"TimeSpan": {}
}Ancillaries records
Ancillaries
Seats, bags and extras.
| Field | Type | Meaning / relationship |
|---|---|---|
offerItemId | string | Offer item id |
type | string | Seat, bag or meal |
price | object | Amount and currency |
segmentRef | string | Segment reference |
{
"offerItemId": "<Offer item id>",
"type": "<Seat, bag or meal>",
"price": {},
"segmentRef": "<Segment reference>"
}