---
updatedAt: 2025-03-19T06:56:42.000Z
agentTools:
  projectIndex: https://volt-docs.travclan.com/llms.txt
---

# Booking API

This API is used to book a flight based on a previously created itinerary. The booking process finalizes the itinerary and issues a booking reference or PNR (Passenger Name Record).

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Flight API",
    "contact": {},
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://flight-aggregator-api-sandbox.travclan.com",
      "description": "SandBox"
    }
  ],
  "paths": {
    "/api/v2/flights/itinerary/{itineraryCode}/book": {
      "post": {
        "tags": [
          "Booking"
        ],
        "summary": "Booking API",
        "description": "This API is used to book a flight based on a previously created itinerary. The booking process finalizes the itinerary and issues a booking reference or PNR (Passenger Name Record).",
        "operationId": "BookingAPI",
        "parameters": [
          {
            "name": "Content-Type",
            "in": "header",
            "description": "",
            "required": true,
            "style": "simple",
            "schema": {
              "enum": [
                "application/json"
              ],
              "type": "string",
              "example": "application/json"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "required": true,
            "description": "Authorization token to authenticate the API request.",
            "schema": {
              "type": "string"
            },
            "example": "Bearer {{authorization}}"
          },
          {
            "name": "Authorization-Type",
            "in": "header",
            "required": true,
            "description": "Specifies the type of authorization, here it is set to external-service.",
            "schema": {
              "type": "string",
              "default": "external-service"
            },
            "example": "external-service"
          },
          {
            "name": "source",
            "in": "header",
            "required": true,
            "description": "Specifies the source of the request (End User Source). Available choices: website, android, mweb, ios.",
            "schema": {
              "type": "string",
              "enum": [
                "website",
                "android",
                "mweb",
                "ios"
              ],
              "default": "website"
            },
            "example": "website"
          },
          {
            "name": "itineraryCode",
            "in": "path",
            "description": "",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "title": "BookingAPIRequest",
                    "required": [
                      "traceId",
                      "isPriceChangeAccepted"
                    ],
                    "type": "object",
                    "properties": {
                      "traceId": {
                        "type": "string",
                        "description": "Unique identifier for the search."
                      },
                      "isPriceChangeAccepted": {
                        "type": "boolean"
                      }
                    },
                    "example": {
                      "traceId": "{{traceId}}",
                      "isPriceChangeAccepted": false
                    }
                  },
                  {
                    "example": {
                      "traceId": "{{traceId}}",
                      "isPriceChangeAccepted": false
                    }
                  }
                ]
              },
              "example": {
                "traceId": "{{traceId}}",
                "isPriceChangeAccepted": false
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OK",
            "headers": {
              "X-Powered-By": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Express"
                  }
                }
              },
              "Access-Control-Allow-Headers": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Content-Type, Authorization, source, client-version, platform, Authorization-Mode"
                  }
                }
              },
              "Content-Length": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "399"
                  }
                }
              },
              "ETag": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "W/\"18f-J528/It5wiFTvl5IgCoJH3Xuamo\""
                  }
                }
              },
              "Date": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "Tue, 30 Jul 2024 10:06:41 GMT"
                  }
                }
              },
              "Connection": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "keep-alive"
                  }
                }
              },
              "Keep-Alive": {
                "content": {
                  "text/plain": {
                    "schema": {
                      "type": "string"
                    },
                    "example": "timeout=5"
                  }
                }
              }
            },
            "content": {
              "application/json; charset=utf-8": {
                "schema": {
                  "allOf": [
                    {
                      "title": "BookingAPI",
                      "required": [
                        "results"
                      ],
                      "type": "object",
                      "properties": {
                        "results": {
                          "allOf": [
                            {
                              "title": "Results5",
                              "required": [
                                "itineraryCode",
                                "details"
                              ],
                              "type": "object",
                              "properties": {
                                "itineraryCode": {
                                  "type": "string",
                                  "description": "The unique code representing the itinerary."
                                },
                                "details": {
                                  "type": "array",
                                  "items": {
                                    "title": "Detail",
                                    "required": [
                                      "itemCode",
                                      "provider",
                                      "bmsBookingCode",
                                      "isBookingSucessfullOnBMS",
                                      "isBookingSuccessfullByProvider",
                                      "pnr",
                                      "pnrDetails",
                                      "bookingStatus",
                                      "isSuccessful"
                                    ],
                                    "type": "object",
                                    "properties": {
                                      "itemCode": {
                                        "type": "string",
                                        "description": "The unique code for the booked item."
                                      },
                                      "provider": {
                                        "type": "string"
                                      },
                                      "bmsBookingCode": {
                                        "type": "string",
                                        "description": "The booking code generated by the Travclan Booking Management System (BMS)."
                                      },
                                      "isBookingSucessfullOnBMS": {
                                        "type": "boolean",
                                        "description": "Indicates whether the booking was successfully processed on the Travclan Booking Management System (BMS)."
                                      },
                                      "isBookingSuccessfullByProvider": {
                                        "type": "boolean",
                                        "description": "Indicates whether the booking was successful with the provider."
                                      },
                                      "pnr": {
                                        "type": "string",
                                        "description": "The Passenger Name Record (PNR) provided by the airline or booking system."
                                      },
                                      "pnrDetails": {
                                        "type": "array",
                                        "items": {
                                          "title": "PnrDetail3",
                                          "required": [
                                            "origin",
                                            "destination",
                                            "pnr"
                                          ],
                                          "type": "object",
                                          "properties": {
                                            "origin": {
                                              "type": "string",
                                              "description": "The origin airport code for the segment."
                                            },
                                            "destination": {
                                              "type": "string",
                                              "description": "The destination airport code for the segment."
                                            },
                                            "pnr": {
                                              "type": "string",
                                              "description": "The Passenger Name Record (PNR) provided by the airline or booking system."
                                            }
                                          },
                                          "example": {
                                            "origin": "DEL",
                                            "destination": "BOM",
                                            "pnr": "TESTPNR"
                                          }
                                        },
                                        "description": "A list of objects containing PNR details for each segment of the journey."
                                      },
                                      "bookingStatus": {
                                        "type": "string",
                                        "description": "The status of the booking (e.g., CONFIRMED, FAILED, PENDING, HOLD, RELEASED)."
                                      },
                                      "isSuccessful": {
                                        "type": "boolean",
                                        "description": "Indicates whether the overall booking process was successful."
                                      }
                                    },
                                    "example": {
                                      "itemCode": "itmj0vw",
                                      "provider": "P2",
                                      "bmsBookingCode": "trxp4",
                                      "isBookingSucessfullOnBMS": true,
                                      "isBookingSuccessfullByProvider": true,
                                      "pnr": "TESTPNR",
                                      "pnrDetails": [
                                        {
                                          "origin": "DEL",
                                          "destination": "BOM",
                                          "pnr": "TESTPNR"
                                        }
                                      ],
                                      "bookingStatus": "CONFIRMED",
                                      "isSuccessful": true
                                    }
                                  },
                                  "description": "A list containing details about the booking status and provider information."
                                }
                              },
                              "example": {
                                "itineraryCode": "itrjier",
                                "details": [
                                  {
                                    "itemCode": "itmj0vw",
                                    "provider": "P2",
                                    "bmsBookingCode": "trxp4",
                                    "isBookingSucessfullOnBMS": true,
                                    "isBookingSuccessfullByProvider": true,
                                    "pnr": "TESTPNR",
                                    "pnrDetails": [
                                      {
                                        "origin": "DEL",
                                        "destination": "BOM",
                                        "pnr": "TESTPNR"
                                      }
                                    ],
                                    "bookingStatus": "CONFIRMED",
                                    "isSuccessful": true
                                  }
                                ]
                              }
                            },
                            {}
                          ],
                          "description": "Contain the details."
                        }
                      },
                      "example": {
                        "results": {
                          "itineraryCode": "itrjier",
                          "details": [
                            {
                              "itemCode": "itmj0vw",
                              "provider": "P2",
                              "bmsBookingCode": "trxp4",
                              "isBookingSucessfullOnBMS": true,
                              "isBookingSuccessfullByProvider": true,
                              "pnr": "TESTPNR",
                              "pnrDetails": [
                                {
                                  "origin": "DEL",
                                  "destination": "BOM",
                                  "pnr": "TESTPNR"
                                }
                              ],
                              "bookingStatus": "CONFIRMED",
                              "isSuccessful": true
                            }
                          ]
                        }
                      }
                    },
                    {
                      "example": {
                        "results": {
                          "itineraryCode": "itrjier",
                          "details": [
                            {
                              "itemCode": "itmj0vw",
                              "provider": "P2",
                              "bmsBookingCode": "trxp4",
                              "isBookingSucessfullOnBMS": true,
                              "isBookingSuccessfullByProvider": true,
                              "pnr": "TESTPNR",
                              "pnrDetails": [
                                {
                                  "origin": "DEL",
                                  "destination": "BOM",
                                  "pnr": "TESTPNR"
                                }
                              ],
                              "bookingStatus": "CONFIRMED",
                              "isSuccessful": true
                            }
                          ]
                        }
                      }
                    }
                  ]
                },
                "example": {
                  "results": {
                    "itineraryCode": "itrjier",
                    "details": [
                      {
                        "itemCode": "itmj0vw",
                        "provider": "P2",
                        "bmsBookingCode": "trxp4",
                        "isBookingSucessfullOnBMS": true,
                        "isBookingSuccessfullByProvider": true,
                        "pnr": "TESTPNR",
                        "pnrDetails": [
                          {
                            "origin": "DEL",
                            "destination": "BOM",
                            "pnr": "TESTPNR"
                          }
                        ],
                        "bookingStatus": "CONFIRMED",
                        "isSuccessful": true
                      }
                    ]
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request. The create booking request parameter is invalid or missing."
          },
          "401": {
            "description": "Unauthorized. The access token is missing or invalid."
          },
          "422": {
            "description": "Bad Request. Client Side Error in Request Body."
          },
          "500": {
            "description": "Internal Server Error."
          }
        },
        "deprecated": false,
        "security": []
      }
    }
  },
  "tags": [
    {
      "name": "Booking"
    }
  ]
}
```