Skip to main content
POST
/
flight
/
booking
/
create
Create PNR
curl --request POST \
  --url https://api.travomatrix.com/api/v1/flight/booking/create \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "fare_token": "VALID_TOKEN_123",
  "agent_id": "AGENT_456",
  "idempotency_key": "IDEM_REQ_001",
  "passengers": [
    {
      "id": "ADT1",
      "type": "ADT",
      "title": "MR",
      "first_name": "JOHN",
      "last_name": "DOE",
      "gender": "M",
      "dob": "1990-05-15",
      "nationality": "IN"
    }
  ],
  "contact_info": {
    "email": "john.doe@example.com",
    "phone": "+919876543210"
  }
}
'
{
  "booking_id": "<string>",
  "pnr": "<string>",
  "status": "PENDING",
  "total_price_paise": 123,
  "currency": "<string>"
}
Book the original flight and copy the booking_id.

Request Setup

Idempotency-Key
string
required
Generate a random string (e.g. idem-123).
fare_token
string
required
Paste the token from Step 2.
agent_id
string
default:"YOUR_AGENT_ID"
required
Your specific UAT Agent ID.
idempotency_key
string
default:"idem-123"
passengers
array
required
contact_info
object
required

Instructions

  1. Review the requirements and set up the request payload.
  2. Hit the Send button.
Requirement: Copy the booking_id. The booking must show a BOOKED status.

Authorizations

X-API-Key
string
header
required

Headers

Idempotency-Key
string

A unique string to identify this request. Retrying a request with the same key will return the cached response.

X-Request-ID
string

Unique correlation ID for tracing.

Body

application/json
fare_token
string
required

Token obtained from Fare Validation.

passengers
object[]
required
contact_info
object
required
agent_id
string
idempotency_key
string

Response

Booking created.

booking_id
string
pnr
string
status
enum<string>
Available options:
PENDING,
BOOKED,
TICKETED,
FAILED
total_price_paise
integer
currency
string