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

# List the routes

GET https://api.sar.worldticket.cloud/sms-gateway-service/schedule/routes

List every origin station and the destinations you can sell from it. Use the station `code` as the `locationCode` in a search. The list changes rarely, so cache it and refresh it daily.


Reference: https://wt.hhr.systems/hhr-ticketing-system-api/schedule/routes

## Servers

- `https://api.sar.worldticket.cloud` (Production, default)
- `https://test-api.worldticket.net` (Test)

## Request

### Query parameters

- `sales_channel` (enum, required, default: OTA) — The sales channel to list routes for. Always OTA.
  - Allowed values: `OTA`

## Response

### 200

The origins and their destinations.

- `list of Route`

## Types

### Route

- `origin` (Station, optional)
- `destinations` (list of Station, optional)

### Station

- `code` (string, optional) — The station code. Use it as locationCode in a search.
- `name` (string, optional)
- `cityName` (string, optional)
- `cityCode` (string, optional)
- `country` (string, optional) — ISO country code.

## Examples

**Response**

```json
[
  {
    "origin": {
      "code": "DMX",
      "name": "Madinah",
      "cityName": "Madinah",
      "cityCode": "DMX",
      "country": "SA"
    },
    "destinations": [
      {
        "code": "JXD",
        "name": "Al-Sulimaniyah",
        "cityName": "Jeddah",
        "cityCode": "JXD",
        "country": "SA"
      },
      {
        "code": "KCX",
        "name": "KCX",
        "cityName": "King Abdullah Economic City",
        "cityCode": "KCX",
        "country": "SA"
      },
      {
        "code": "MKX",
        "name": "Makkah",
        "cityName": "Makkah",
        "cityCode": "MKX",
        "country": "SA"
      }
    ]
  },
  {
    "origin": {
      "code": "MKX",
      "name": "Makkah",
      "cityName": "Makkah",
      "cityCode": "MKX",
      "country": "SA"
    },
    "destinations": [
      {
        "code": "DMX",
        "name": "Madinah",
        "cityName": "Madinah",
        "cityCode": "DMX",
        "country": "SA"
      },
      {
        "code": "JXD",
        "name": "Al-Sulimaniyah",
        "cityName": "Jeddah",
        "cityCode": "JXD",
        "country": "SA"
      },
      {
        "code": "KCX",
        "name": "KCX",
        "cityName": "King Abdullah Economic City",
        "cityCode": "KCX",
        "country": "SA"
      }
    ]
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.sar.worldticket.cloud/sms-gateway-service/schedule/routes"

querystring = {"sales_channel":"OTA"}

headers = {"x-api-key": "YOUR_API_KEY"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript
const url = 'https://api.sar.worldticket.cloud/sms-gateway-service/schedule/routes?sales_channel=OTA';
const options = {method: 'GET', headers: {'x-api-key': 'YOUR_API_KEY'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sar.worldticket.cloud/sms-gateway-service/schedule/routes?sales_channel=OTA"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("x-api-key", "YOUR_API_KEY")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.sar.worldticket.cloud/sms-gateway-service/schedule/routes?sales_channel=OTA")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = 'YOUR_API_KEY'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.sar.worldticket.cloud/sms-gateway-service/schedule/routes?sales_channel=OTA")
  .header("x-api-key", "YOUR_API_KEY")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.sar.worldticket.cloud/sms-gateway-service/schedule/routes?sales_channel=OTA', [
  'headers' => [
    'x-api-key' => 'YOUR_API_KEY',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.sar.worldticket.cloud/sms-gateway-service/schedule/routes?sales_channel=OTA");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "YOUR_API_KEY");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["x-api-key": "YOUR_API_KEY"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sar.worldticket.cloud/sms-gateway-service/schedule/routes?sales_channel=OTA")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```