> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://wt.hhr.systems/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://wt.hhr.systems/_mcp/server.

# Overview

The HHR Ticketing System OTA API lets Online Travel Agencies search, book, pay for, and cancel journeys on Saudi Arabia Railway's Haramain High-Speed Railway (HHR). It follows the OpenTravel Alliance (OTA) standard, adapted to JSON.

You reach the railway through WorldTicket (GO7). Indra EBKS is the core booking system, GO7 is the OTA-standard layer on top of it, and you integrate with GO7. Everything in this reference is live in production.

The GO7 documentation is the production source of truth. For anything this site does not cover, follow the [GO7 OTA API docs](https://go7-worldticket.github.io/docs/ota/OTA_API_SAR.html).

## How the API is shaped

Every operation is a single HTTP `POST` to one OTA endpoint. You choose the operation with the `local-name` header. The request and response bodies change per operation, but the URL and the method never do.

```bash
curl -X POST https://api.sar.worldticket.cloud/ota/v2015b/OTA \
  -H "x-api-key: YOUR_API_KEY" \
  -H "local-name: OTA_AirLowFareSearchRQ" \
  -H "Content-Type: application/json" \
  -d '{ ... }'
```

## The operations

| Operation (`local-name`) | What it does                                           |
| ------------------------ | ------------------------------------------------------ |
| `OTA_AirLowFareSearchRQ` | Search trains and fares, one way or round trip.        |
| `OTA_AirBookRQ`          | Create an individual booking with full passenger data. |
| `OTA_AirPriceRQ`         | Hold seats for a group with passenger counts only.     |
| `OTA_AirBookModifyRQ`    | Add or change passenger details on a booking.          |
| `OTA_AirDemandTicketRQ`  | Pay from the wallet and issue tickets.                 |
| `OTA_ReadRQ`             | Read a booking by its W1 record locator.               |
| `OTA_AirSeatMapRQ`       | Get the seat map for a segment.                        |
| `OTA_CancelRQ`           | Cancel a whole booking.                                |

The ticket documents also live on their own services: resend the confirmation emails and download the ticket PDFs. See [Ticket documents](/tickets).

A typical journey runs in order: search for a train, create the booking, pay and issue the tickets. See [Booking flows](/booking-flows) for the full sequence and [Booking models](/booking-models) to choose between individual and group. When a call fails, [Errors](/errors) explains what came back.

## Environments

|         | Production                                         | Test                                              |
| ------- | -------------------------------------------------- | ------------------------------------------------- |
| OTA API | `https://api.sar.worldticket.cloud/ota/v2015b/OTA` | `https://test-api.worldticket.net/ota/v2015b/OTA` |
| Auth    | `https://api.sar.worldticket.cloud/auth`           | `https://test-auth.worldticket.net/auth`          |

Build against Test first, then switch the base URL for Production. See [Authentication](/authentication) for how to get a key or a token.

## Stations

| Station                              | Code |
| ------------------------------------ | ---- |
| King Abdulaziz International Airport | JED  |
| Al-Sulimaniyah                       | JXD  |
| King Abdullah Economic City          | KCX  |
| Makkah                               | MKX  |
| Madinah                              | DMX  |

## Codes you will use

**Booking class.** `Y` is Economy (HHR class T). `C` is Business (HHR class P).

**Passenger type.** `ADT`, `CHD`, and `INF` map to HHR codes `1`, `2`, and `3`.

**Document type.** `2` is a passport. `5` is a national ID.

## Record locators

A booking carries two locators. The **W1** locator is the WorldTicket PNR, and you use it in every API call. The **HHR** locator is the railway's own reference. Read either one back from the booking.