Ticket Booking Request

Type : POST
URL : /api/rail/booking/ticket

Core Block

Attribute Type Required Description
search_id String Required Search ID need to be carried from the search response.
e.g "jjcvagmcq763wy54azmjpmax2a"
group_code String Required Group Code you received at the time of search request
payment_type String Required The payment type used for the booking
is_round_trip Boolean Required Whether this is a round trip or not. If it is true then length of booking items should be two.
booking_items Array(Booking Item) Required Refer to the Booking Item

Departure & Arrival (Transfer Type)

Attribute Type Required Description
additional_info Object Refer to the Additional Info Block.
agent_remarks String Optional Remark given by agent.
ratekey String Required The rate key is required at the time of booking.( rate key of departure & return ).
group_code String Required Group code are required at the time of booking.
e.g qwqqz23sw52h7dyf44.

Booking Item

Attribute Type Required Description
rate_key String Required Received at the time of search response
paxes Array(Pax) Required Refer to the Pax
ticket_details Object Required Refer to the Ticket Details

Pax

Attribute Type Required Description
title String Required Title of the Holder Mr./Ms./Mrs.
name String Required Holder first name. Aarav
surname String Required Pax last name. Jais
age Integer Required Pax age.
date_of_birth String Required Date of birth in the format "YYYY-MM-DD" ex: 2024-01-30.
lead_pax Boolean Required Whether the pax is lead pax or not
type String Required Pax type whether adult - AD or child - CH or senior citizen - SR
country String Required Two-letter ISO country code of the lead passenger
"IN -Indian"
email String Required suppliersupport@grnconnect.com
phone String Required Holder telephone number. +91 11 46504444

Ticket Details

Attribute Type Required Description
travel_date String Required Travel date same as departuer date in the YYYY-MM-DD format. ex: 2024-06-29
origin_station_code String Required Origin code
destination_station_code String Required Destination code
ticket_type String Required Type of the ticket. Accepts only ["forward", "return"] values.
ticket_code String Required Received in search request
senior_citizens Integer Optional No of senior citizens >= 0
adults Integer Required No of Adults : >= 0
children Integer Optional No of children: >= 0

Sample Forward Ticket Booking Request

{
  "search_id": "ayvmtryzh7nezjrswa4so7s5zq",
  "group_code": "qoqrnzlpxzdxrhyt7pnte",
  "payment_type": "AT_WEB",
  "is_round_trip": false,
  "booking_items": [
    {
      "is_pass": false,
      "rate_key": "4pgv3zju4b5clr2x66jwoags4tikrxfbuky6jt343nab3lpndkbcvuneeedshy7j6netzdfvy4kfkvr74xjeebfn5pjqnw6k2x2f7gwqvxaffxqzyf2skpqhmisjmszizotxjitvgjoai3mwxp3ksqnbwwg7m3fwlphvhty5xmi4vcpvbvdu3r2jz7iq7kcrhhtsi4q",
      "paxes": [
        {
          "title": "Mr.",
          "name": "john",
          "surname": "man",
          "gender": "male",
          "age": 25,
          "date_of_birth": "2000-12-12",
          "lead_pax": "true",
          "type": "AD",
          "country": "IN",
          "email": "hello@gmail.com",
          "phone": "9494500001"
        },
        {
          "title": "Mr.",
          "name": "khan",
          "surname": "man",
          "gender": "male",
          "age": 25,
          "date_of_birth": "2000-12-12",
          "lead_pax": "true",
          "type": "AD",
          "country": "IN",
          "email": "hello@gmail.com",
          "phone": "9494500001"
        }
      ],
      "ticket_details": {
        "travel_date": "2024-08-20",
        "origin_station_code": "{{origincode}}",
        "destination_station_code": "{{destcode}}",
        "ticket_type": "forward",
        "ticket_code": "code",
        "senior_citizens": 0,
        "no_of_adults": 2,
        "no_of_children": 0
      }
    }
  ]
}

Sample Forward & Return Ticket Booking Request (Round Trip)

{
  "search_id": "ayvmtryzh7nezjrswa4so7s5zq",
  "group_code": "qoqrnzlpxzdxrhyt7pnte",
  "payment_type": "AT_WEB",
  "is_round_trip": true,
  "booking_items": [
    {
      "rate_key": "4pgv3zju4b5clr2x66jwoags4tikrxfbuky6jt343nab3lpndkbcvuneeedshy7j6netzdfvy4kfkvr74xjeebfn5pjqnw6k2x2f7gwqvxaffxqzyf2skpqhmisjmszizotxjitvgjoai3mwxp3ksqnbwwg7m3fwlphvhty5xmi4vcpvbvdu3r2jz7iq7kcrhhtsi4q",
      "paxes": [
        {
          "title": "Mr.",
          "name": "john",
          "surname": "man",
          "gender": "male",
          "age": 25,
          "date_of_birth": "2000-12-12",
          "lead_pax": "true",
          "type": "AD",
          "country": "IN",
          "email": "hello@gmail.com",
          "phone": "9494500001"
        },
        {
          "title": "Mr.",
          "name": "khan",
          "surname": "man",
          "gender": "male",
          "age": 25,
          "date_of_birth": "2000-12-12",
          "lead_pax": "true",
          "type": "AD",
          "country": "IN",
          "email": "hello@gmail.com",
          "phone": "9494500001"
        }
      ],
      "ticket_details": {
        "travel_date": "2024-08-20",
        "origin_station_code": "{{origincode}}",
        "destination_station_code": "{{destcode}}",
        "ticket_type": "forward",
        "ticket_code": "code",
        "senior_citizens": 0,
        "no_of_adults": 2,
        "no_of_children": 0
      }
    },
    {
      "rate_key": "4pgv3zju4b5clr2x66jwoags4tikrxfbuky6jt343nab3lpndkbcvuneeedshy7j6netzdfvy4kfkvr74xjeebfn5pjqnw6k2x2f7gwqvxaffxqzyf2skpqhmisjmszizotxjitvgjoai3mwxp3ksqnbwwg7m3fwlphvhty5xmi4vcpvbvdu3r2jz7iq7kcrhhtsi4q",
      "paxes": [
        {
          "title": "Mr.",
          "name": "john",
          "surname": "man",
          "gender": "male",
          "age": 25,
          "date_of_birth": "2000-12-12",
          "lead_pax": "true",
          "type": "AD",
          "country": "IN",
          "email": "hello@gmail.com",
          "phone": "9494500001"
        },
        {
          "title": "Mr.",
          "name": "khan",
          "surname": "man",
          "gender": "male",
          "age": 25,
          "date_of_birth": "2000-12-12",
          "lead_pax": "true",
          "type": "AD",
          "country": "IN",
          "email": "hello@gmail.com",
          "phone": "9494500001"
        }
      ],
      "ticket_details": {
        "travel_date": "2024-08-20",
        "origin_station_code": "{{origincode}}",
        "destination_station_code": "{{destcode}}",
        "ticket_type": "return",
        "ticket_code": "code",
        "senior_citizens": 0,
        "no_of_adults": 2,
        "no_of_children": 0
      }
    }
  ]
}