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

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.

bindingmeaning
WORLDS_SABRE_URLThis world's origin followed by /v1
WORLDS_API_KEYThe world key, accepted wherever Sabre expects a credential
WORLDS_WORLD_IDThe isolated world's identity
js · fetch
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
OriginDestinationInformationobject[]Legs with dates and airports
TravelerInfoSummaryobjectPassenger counts
PricedItinerariesobject[]Result itineraries
AirItineraryPricingInfoobjectFare 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
confirmationIdstringPNR locator
travelersobject[]Passengers
flightsobject[]Booked segments
startDatedateFirst travel date
bookingSourceobjectAgency 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
HotelCodestringProperty code
HotelNamestringProperty name
RoomStaysobject[]Room and rate options
TimeSpanobjectCheck-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
offerItemIdstringOffer item id
typestringSeat, bag or meal
priceobjectAmount and currency
segmentRefstringSegment reference

Test workflow

  1. Prepare. Select the Sabre setup for your workflow and review its starting records, including air shopping, reservations, hotels.
  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

  • 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.

yaml · worlds/tasks.yaml
# 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-available

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
session-expiresThe session token times out after inactivity
simultaneous-changesEnding the transaction fails because the PNR changed elsewhere
fare-not-availableThe new fare class sells out between quote and exchange
rate-limitedThe 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.

RecordsStarting setup
PNRs50 with itineraries and passenger data
tickets35 issued, some nonrefundable
fare rulesChange and cancel penalties on every fare basis
queuesSchedule change and ticketing queues with 20 items
exchanges6 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.

FieldTypeMeaning / relationship
OriginDestinationInformationobject[]Legs with dates and airports
TravelerInfoSummaryobjectPassenger counts
PricedItinerariesobject[]Result itineraries
AirItineraryPricingInfoobjectFare breakdown
json · illustrative record shape
{
  "OriginDestinationInformation": [],
  "TravelerInfoSummary": {},
  "PricedItineraries": [],
  "AirItineraryPricingInfo": {}
}

See air shopping operations

Reservations records

Reservations

PNR create, retrieve and cancel.

FieldTypeMeaning / relationship
confirmationIdstringPNR locator
travelersobject[]Passengers
flightsobject[]Booked segments
startDatedateFirst travel date
bookingSourceobjectAgency and PCC
json · illustrative record shape
{
  "confirmationId": "<PNR locator>",
  "travelers": [],
  "flights": [],
  "startDate": "<First travel date>",
  "bookingSource": {}
}

See reservations operations

Hotels records

Hotels

Hotel availability and content.

FieldTypeMeaning / relationship
HotelCodestringProperty code
HotelNamestringProperty name
RoomStaysobject[]Room and rate options
TimeSpanobjectCheck-in and check-out
json · illustrative record shape
{
  "HotelCode": "<Property code>",
  "HotelName": "<Property name>",
  "RoomStays": [],
  "TimeSpan": {}
}

See hotels operations

Ancillaries records

Ancillaries

Seats, bags and extras.

FieldTypeMeaning / relationship
offerItemIdstringOffer item id
typestringSeat, bag or meal
priceobjectAmount and currency
segmentRefstringSegment reference
json · illustrative record shape
{
  "offerItemId": "<Offer item id>",
  "type": "<Seat, bag or meal>",
  "price": {},
  "segmentRef": "<Segment reference>"
}

See ancillaries operations

See the Sabre world in the catalog