{
  "info": {
    "name": "Voraal API · Train",
    "description": "Train search, seats and ticketing.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "Booking flow",
      "item": [
        {
          "name": "Search train journeys",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/train/search",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "train",
                "search"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"journey_type\": \"OneWay\",\n  \"segment\": [\n    {\n      \"departure_code\": \"MKX\",\n      \"arrival_code\": \"JXD\",\n      \"outbound_date\": \"2026-12-15\"\n    }\n  ],\n  \"travelers_adult\": 1,\n  \"travelers_child\": 0,\n  \"travelers_infants\": 0,\n  \"partner_id\": \"1\",\n  \"short_ref\": \"xxxx111\",\n  \"language\": \"en\",\n  \"guest_nationality\": \"BD\",\n  \"supplier_uid\": \"all\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Returns train journeys for a one-way or round-trip search. Send supplier_uid \"all\" to search every supplier."
          },
          "response": []
        },
        {
          "name": "Get train details",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/train/single-train",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "train",
                "single-train"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tracking_id\": \"11774948590VTY1\",\n  \"train_id\": \"JXD_DMX_0080_2026-04-05T08:32:00\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Loads one train from a search result by train ID."
          },
          "response": []
        },
        {
          "name": "Validate train and fare",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/train/validation",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "train",
                "validation"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tracking_id\": \"3117757287332YW1\",\n  \"guest_nationality\": \"BD\",\n  \"outbound_train_id\": \"MKX_JXD_0080_2026-04-19T08:00:00\",\n  \"outbound_fare_class\": \"Y\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Re-checks availability and price of the chosen train and fare class before booking."
          },
          "response": []
        },
        {
          "name": "Get validation details",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/train/validation-details",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "train",
                "validation-details"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tracking_id\": \"311177572884426194QMRVJ\",\n  \"member_id\": \"1\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Returns the stored result of an earlier validation for a tracking ID."
          },
          "response": []
        },
        {
          "name": "Update traveller details",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/train/update-travellers",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "train",
                "update-travellers"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tracking_id\": \"311177572884426194QMRVJ\",\n  \"member_id\": \"1\",\n  \"save_pax\": \"no\",\n  \"additional_request\": \"n/a\",\n  \"passenger\": [\n    {\n      \"pax_title\": \"Adult 1\",\n      \"pax_id\": \"1\",\n      \"pax_type\": \"ADT\",\n      \"title\": \"MR\",\n      \"first_name\": \"Mahade\",\n      \"last_name\": \"test\",\n      \"age\": \"24\",\n      \"isd_code\": \"880\",\n      \"contact_no\": \"1901402814\",\n      \"email_address\": \"test@example.com\",\n      \"gender\": \"male\",\n      \"dob\": \"2001-07-11\",\n      \"nationality\": \"BD\",\n      \"passport_no\": \"AE12519590\",\n      \"passport_issue_date\": \"2022-09-01\",\n      \"doc_country\": \"BD\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Saves passenger details and any additional request against the tracking ID."
          },
          "response": []
        },
        {
          "name": "Create train booking",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/train/booking",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "train",
                "booking"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"tracking_id\": \"311177572884426194QMRVJ\",\n  \"member_id\": \"1\",\n  \"isd_code\": \"880\",\n  \"contact_no\": \"1966330000\",\n  \"email_address\": \"test@example.com\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Confirms the booking for a validated tracking ID using the account balance."
          },
          "response": []
        },
        {
          "name": "Cancel train booking",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/train/cancel-booking",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "train",
                "cancel-booking"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"member_id\": \"1\",\n  \"tracking_id\": \"111775111387888638XGGS\",\n  \"reason\": \"I selected wrong date\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Requests cancellation of an existing booking with a reason."
          },
          "response": []
        }
      ]
    },
    {
      "name": "More endpoints",
      "item": [
        {
          "name": "List train stations",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/train/station-list",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "train",
                "station-list"
              ]
            },
            "description": "Returns train stations for the search autosuggest. itt_b2b sends no request body and reads `data[].code`. Observed in itt_b2b; other item fields unconfirmed."
          },
          "response": []
        },
        {
          "name": "Get train ticket download links",
          "request": {
            "method": "POST",
            "header": [
              {
                "key": "apikey",
                "value": "{{apikey}}",
                "type": "text"
              },
              {
                "key": "secretecode",
                "value": "{{secretecode}}",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/train/ticket-download",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "train",
                "ticket-download"
              ]
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"member_id\": \"1\",\n  \"tracking_id\": \"111775111387888638XGGS\",\n  \"pax_id\": [\n    0\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "description": "Returns signed download URLs for the tickets of the given passengers on a confirmed train booking. Observed in itt_b2b; semantics unconfirmed beyond the fields listed."
          },
          "response": []
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://serviceapi.rezencia.com"
    }
  ]
}