> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://open-api-docs.dice.tech/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://open-api-docs.dice.tech/_mcp/server.

# Push Flight Booking

POST https://heimdall.eka.io/apis/external/bookings/flight
Content-Type: application/json

### Push Flight Booking

Records a flight booking made outside Dice (e.g. by your TMC) and links it to the employee's trip.

### Request Parameters

| Param | Required | Description |
| --- | --- | --- |
| booking | Mandatory | Booking details. **Mandatory.** |
| booking.transId | Mandatory | **Your** unique booking reference (e.g. TMC booking id). Must be unique in your company – it is used to fetch and cancel the booking. |
| booking.bookingAmount | Mandatory | Total amount paid for the booking. Must be greater than 0. |
| booking.bookingDate | Mandatory | When the booking was made. Epoch time in **milliseconds** (UTC). |
| booking.currency | Optional | ISO-4217 currency code of `bookingAmount`. Defaults to the employee's currency. |
| booking.employeeCode | Conditional | Employee code of the booking owner. One of `employeeCode` or `employeeEmail` is mandatory; the code wins if both are sent. |
| booking.employeeEmail | Conditional | Email of the booking owner. Used when `employeeCode` is not sent. |
| booking.passengers[] | Mandatory | Travellers on this booking. **Mandatory – at least one.** |
| booking.passengers[].name | Mandatory | Passenger full name. |
| booking.passengers[].email | Mandatory | Passenger email. |
| booking.passengers[].employeeCode | Optional | Passenger's employee code, if an employee. |
| booking.passengers[].mobile | Optional | Mobile number. |
| booking.passengers[].gender | Optional | Gender. Validated only for non-employee passengers. Values: `MALE`, `FEMALE`. |
| booking.passengers[].seatNo | Optional | Seat / berth number. |
| booking.tripId | Optional | Dice trip reference to attach the booking to. Optional – if omitted, Dice tries to match one of the owner's open trips automatically. |
| booking.tripItineraryId | Optional | Itinerary (leg) id from Trip Details to attach the booking to. Only used together with `tripId`. |
| booking.vendorName | Optional | Vendor / agency name shown as the merchant. Defaults to the airline, hotel or bus operator name. |
| booking.remark | Optional | Free-text remark. |
| booking.ticketPdf | Optional | Publicly accessible URL of the ticket / voucher PDF. |
| booking.invoicePdf | Optional | Publicly accessible URL of the invoice PDF. |
| booking.invoice | Optional | Tax invoice details of the booking (for GST reporting). |
| booking.invoice.invoiceNo | Optional | Invoice number. |
| booking.invoice.invoiceDate | Optional | Invoice date. Epoch time in **milliseconds** (UTC). |
| booking.invoice.vendorGstin | Optional | Vendor / supplier GSTIN. |
| booking.invoice.hsn | Optional | HSN / SAC code. |
| booking.invoice.baseAmount | Optional | Taxable value. |
| booking.invoice.cgst | Optional | CGST amount. |
| booking.invoice.sgst | Optional | SGST amount. |
| booking.invoice.igst | Optional | IGST amount. |
| booking.invoice.totalTax | Optional | Total tax. |
| booking.gstDetails | Optional | GST details of the billing entity. |
| booking.gstDetails.gstNumber | Optional | Company GSTIN used for the booking. |
| booking.gstDetails.companyName | Optional | Registered company name. |
| booking.gstDetails.companyAddress | Optional | Registered address. |
| booking.gstDetails.emailAddress | Optional | GST contact email. |
| booking.gstDetails.mobileNumber | Optional | GST contact number. |
| booking.departureCity | Mandatory | Departure airport **IATA code** (e.g. `BOM`) or city name. |
| booking.arrivalCity | Mandatory | Arrival airport **IATA code** (e.g. `BLR`) or city name. |
| booking.departureDate | Mandatory | Onward departure date & time. Epoch time in **milliseconds** (UTC). |
| booking.arrivalDate | Optional | Onward arrival date & time. Epoch time in **milliseconds** (UTC). |
| booking.pnr | Mandatory | Airline PNR of the onward journey. |
| booking.journeyType | Optional | `ROUND_TRIP` for a return ticket; anything else is treated as one-way. Values: `ONE_WAY`, `ROUND_TRIP`. |
| booking.returnDate | Conditional | Return flight date & time, epoch milliseconds. Mandatory when `journeyType` is `ROUND_TRIP`. |
| booking.returnPnr | Optional | PNR of the return journey, if different. |
| booking.airlineName | Optional | Airline name. |
| booking.flightNumber | Optional | Flight number(s). |
| booking.ticketNumbers | Optional | Ticket number(s), comma separated for multiple passengers. |
| booking.cabinClass | Optional | Cabin class. |
| booking.fareType | Optional | Fare type / brand. |

Reference: https://open-api-docs.dice.tech/dice-standardized-ap-is-v-2-copy/booking/push-flight-booking

## Servers

- `https://heimdall.eka.io` (https://heimdall.eka.io, default)
- `https://heimdall.eka.ioapis` (https://heimdall.eka.ioapis)

## Request

### Headers

- `DICE-APP-ID` (string, optional) — Company Code of client
- `X-CLIENT-ID` (string, optional) — API Client ID
- `X-CLIENT-SECRET` (string, optional) — API Client Secret

### Body (application/json)

This endpoint expects an object.

- `booking` (ApisExternalBookingsFlightPostRequestBodyContentApplicationJsonSchemaBooking, required) — Booking details. **Mandatory.**

## Response

### 200

OK

- `success` (boolean, required) — Always `true` on HTTP 200.
- `transId` (string, required) — Your booking reference.
- `transactionId` (long, required) — Internal Dice transaction id.
- `tagged` (boolean, required) — `true` when the booking was attached to a trip.
- `tripId` (string, optional) — Trip the booking was attached to (absent when not attached).
- `tripItineraryId` (string, optional) — Itinerary leg the booking was attached to (absent when only the trip matched).

## Types

### ApisExternalBookingsFlightPostRequestBodyContentApplicationJsonSchemaBooking

Booking details. **Mandatory.**

- `transId` (string, required) — **Your** unique booking reference (e.g. TMC booking id). Must be unique in your company – it is used to fetch and cancel the booking.
- `bookingAmount` (double, required) — Total amount paid for the booking. Must be greater than 0.
- `bookingDate` (long, required) — When the booking was made. Epoch time in **milliseconds** (UTC).
- `passengers` (list of ApisExternalBookingsFlightPostRequestBodyContentApplicationJsonSchemaBookingPassengersItems, required) — Travellers on this booking. **Mandatory – at least one.**
- `departureCity` (string, required) — Departure airport **IATA code** (e.g. `BOM`) or city name.
- `arrivalCity` (string, required) — Arrival airport **IATA code** (e.g. `BLR`) or city name.
- `departureDate` (long, required) — Onward departure date & time. Epoch time in **milliseconds** (UTC).
- `pnr` (string, required) — Airline PNR of the onward journey.
- `currency` (string, optional) — ISO-4217 currency code of `bookingAmount`. Defaults to the employee's currency.
- `employeeCode` (string, optional) — Employee code of the booking owner (the employee the expense belongs to). **One of `employeeCode` / `employeeEmail` is mandatory**; the code wins if both are sent.
- `employeeEmail` (string, optional) — Email of the booking owner. Used when `employeeCode` is not sent.
- `tripId` (string, optional) — Dice trip reference to attach the booking to. Optional – if omitted, Dice tries to match one of the owner's open trips automatically.
- `tripItineraryId` (string, optional) — Itinerary (leg) id from Trip Details to attach the booking to. Only used together with `tripId`.
- `vendorName` (string, optional) — Vendor / agency name shown as the merchant. Defaults to the airline, hotel or bus operator name.
- `remark` (string, optional) — Free-text remark.
- `ticketPdf` (string, optional) — Publicly accessible URL of the ticket / voucher PDF.
- `invoicePdf` (string, optional) — Publicly accessible URL of the invoice PDF.
- `invoice` (ApisExternalBookingsFlightPostRequestBodyContentApplicationJsonSchemaBookingInvoice, optional) — Tax invoice details of the booking (for GST reporting).
- `gstDetails` (ApisExternalBookingsFlightPostRequestBodyContentApplicationJsonSchemaBookingGstDetails, optional) — GST details of the billing entity.
- `arrivalDate` (long, optional) — Onward arrival date & time. Epoch time in **milliseconds** (UTC).
- `journeyType` (enum, optional) — `ROUND_TRIP` for a return ticket; anything else is treated as one-way.
  - Allowed values: `ONE_WAY`, `ROUND_TRIP`
- `returnDate` (long, optional) — Return departure date & time. **Mandatory when `journeyType` = `ROUND_TRIP`**; cannot be before `departureDate`. Epoch time in **milliseconds** (UTC).
- `returnPnr` (string, optional) — PNR of the return journey, if different.
- `airlineName` (string, optional) — Airline name.
- `flightNumber` (string, optional) — Flight number(s).
- `ticketNumbers` (string, optional) — Ticket number(s), comma separated for multiple passengers.
- `cabinClass` (string, optional) — Cabin class.
- `fareType` (string, optional) — Fare type / brand.

### ApisExternalBookingsFlightPostRequestBodyContentApplicationJsonSchemaBookingPassengersItems

A traveller on the booking. If the passenger matches a Dice employee (by `employeeCode`, else by `email`), the employee's profile is used.

- `name` (string, required) — Passenger full name.
- `email` (string, required) — Passenger email.
- `employeeCode` (string, optional) — Passenger's employee code, if an employee.
- `mobile` (string, optional) — Mobile number.
- `gender` (enum, optional) — Gender. Validated only for non-employee passengers.
  - Allowed values: `MALE`, `FEMALE`
- `seatNo` (string, optional) — Seat / berth number.

### ApisExternalBookingsFlightPostRequestBodyContentApplicationJsonSchemaBookingInvoice

Tax invoice details of the booking (for GST reporting).

- `invoiceNo` (string, optional) — Invoice number.
- `invoiceDate` (long, optional) — Invoice date. Epoch time in **milliseconds** (UTC).
- `vendorGstin` (string, optional) — Vendor / supplier GSTIN.
- `hsn` (string, optional) — HSN / SAC code.
- `baseAmount` (double, optional) — Taxable value.
- `cgst` (double, optional) — CGST amount.
- `sgst` (double, optional) — SGST amount.
- `igst` (double, optional) — IGST amount.
- `totalTax` (double, optional) — Total tax.

### ApisExternalBookingsFlightPostRequestBodyContentApplicationJsonSchemaBookingGstDetails

GST details of the billing entity.

- `gstNumber` (string, optional) — Company GSTIN used for the booking.
- `companyName` (string, optional) — Registered company name.
- `companyAddress` (string, optional) — Registered address.
- `emailAddress` (string, optional) — GST contact email.
- `mobileNumber` (string, optional) — GST contact number.

## Examples

### All fields

**Request**

```json
{
  "booking": {
    "transId": "EXT-FLT-50002",
    "bookingAmount": 13080,
    "bookingDate": 1793614500000,
    "passengers": [
      {
        "name": "Rahul Sharma",
        "email": "rahul.sharma@acme.com",
        "employeeCode": "EMP001",
        "mobile": "+919876543210",
        "gender": "MALE",
        "seatNo": "14C"
      },
      {
        "name": "Karan Mehta",
        "email": "karan.mehta@partner.com",
        "mobile": "+919811122233",
        "gender": "MALE",
        "seatNo": "14D"
      }
    ],
    "departureCity": "BOM",
    "arrivalCity": "BLR",
    "departureDate": 1794274200000,
    "pnr": "X7K9QP",
    "currency": "INR",
    "employeeCode": "EMP001",
    "employeeEmail": "rahul.sharma@acme.com",
    "tripId": "EXT-TRIP-1001",
    "tripItineraryId": "3f6a1c2e-9b7d-4e21-8c55-1a2b3c4d5e6f",
    "vendorName": "Acme Travels",
    "remark": "Booked via corporate TMC",
    "ticketPdf": "https://files.acme.com/tickets/EXT-FLT-50002.pdf",
    "invoicePdf": "https://files.acme.com/invoices/EXT-FLT-50002.pdf",
    "invoice": {
      "invoiceNo": "INV/2026/11/00871",
      "invoiceDate": 1793614500000,
      "vendorGstin": "27AAACI1234F1Z5",
      "hsn": "996425",
      "baseAmount": 12000,
      "cgst": 0,
      "sgst": 0,
      "igst": 1080,
      "totalTax": 1080
    },
    "gstDetails": {
      "gstNumber": "27AABCA1234B1Z9",
      "companyName": "Acme India Pvt Ltd",
      "companyAddress": "Level 5, One BKC, Mumbai 400051",
      "emailAddress": "gst@acme.com",
      "mobileNumber": "+912240001234"
    },
    "arrivalDate": 1794280500000,
    "journeyType": "ROUND_TRIP",
    "returnDate": 1794579300000,
    "returnPnr": "Y2M4RT",
    "airlineName": "IndiGo",
    "flightNumber": "6E 5321 / 6E 5334",
    "ticketNumbers": "0962145587412,0962145587413",
    "cabinClass": "Economy",
    "fareType": "Saver"
  }
}
```

**Response**

```json
{
  "success": true,
  "transId": "EXT-FLT-50001",
  "transactionId": 7712093,
  "tagged": true,
  "tripId": "EXT-TRIP-1001",
  "tripItineraryId": "3f6a1c2e-9b7d-4e21-8c55-1a2b3c4d5e6f"
}
```

**SDK Code**

```python All fields
import requests

url = "https://heimdall.eka.io/apis/external/bookings/flight"

payload = { "booking": {
        "transId": "EXT-FLT-50002",
        "bookingAmount": 13080,
        "bookingDate": 1793614500000,
        "passengers": [
            {
                "name": "Rahul Sharma",
                "email": "rahul.sharma@acme.com",
                "employeeCode": "EMP001",
                "mobile": "+919876543210",
                "gender": "MALE",
                "seatNo": "14C"
            },
            {
                "name": "Karan Mehta",
                "email": "karan.mehta@partner.com",
                "mobile": "+919811122233",
                "gender": "MALE",
                "seatNo": "14D"
            }
        ],
        "departureCity": "BOM",
        "arrivalCity": "BLR",
        "departureDate": 1794274200000,
        "pnr": "X7K9QP",
        "currency": "INR",
        "employeeCode": "EMP001",
        "employeeEmail": "rahul.sharma@acme.com",
        "tripId": "EXT-TRIP-1001",
        "tripItineraryId": "3f6a1c2e-9b7d-4e21-8c55-1a2b3c4d5e6f",
        "vendorName": "Acme Travels",
        "remark": "Booked via corporate TMC",
        "ticketPdf": "https://files.acme.com/tickets/EXT-FLT-50002.pdf",
        "invoicePdf": "https://files.acme.com/invoices/EXT-FLT-50002.pdf",
        "invoice": {
            "invoiceNo": "INV/2026/11/00871",
            "invoiceDate": 1793614500000,
            "vendorGstin": "27AAACI1234F1Z5",
            "hsn": "996425",
            "baseAmount": 12000,
            "cgst": 0,
            "sgst": 0,
            "igst": 1080,
            "totalTax": 1080
        },
        "gstDetails": {
            "gstNumber": "27AABCA1234B1Z9",
            "companyName": "Acme India Pvt Ltd",
            "companyAddress": "Level 5, One BKC, Mumbai 400051",
            "emailAddress": "gst@acme.com",
            "mobileNumber": "+912240001234"
        },
        "arrivalDate": 1794280500000,
        "journeyType": "ROUND_TRIP",
        "returnDate": 1794579300000,
        "returnPnr": "Y2M4RT",
        "airlineName": "IndiGo",
        "flightNumber": "6E 5321 / 6E 5334",
        "ticketNumbers": "0962145587412,0962145587413",
        "cabinClass": "Economy",
        "fareType": "Saver"
    } }
headers = {
    "DICE-APP-ID": "{{Company Code}}",
    "X-CLIENT-ID": "{{API Client ID}}",
    "X-CLIENT-SECRET": "{{API Client Secret}}",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript All fields
const url = 'https://heimdall.eka.io/apis/external/bookings/flight';
const options = {
  method: 'POST',
  headers: {
    'DICE-APP-ID': '{{Company Code}}',
    'X-CLIENT-ID': '{{API Client ID}}',
    'X-CLIENT-SECRET': '{{API Client Secret}}',
    'Content-Type': 'application/json'
  },
  body: '{"booking":{"transId":"EXT-FLT-50002","bookingAmount":13080,"bookingDate":1793614500000,"passengers":[{"name":"Rahul Sharma","email":"rahul.sharma@acme.com","employeeCode":"EMP001","mobile":"+919876543210","gender":"MALE","seatNo":"14C"},{"name":"Karan Mehta","email":"karan.mehta@partner.com","mobile":"+919811122233","gender":"MALE","seatNo":"14D"}],"departureCity":"BOM","arrivalCity":"BLR","departureDate":1794274200000,"pnr":"X7K9QP","currency":"INR","employeeCode":"EMP001","employeeEmail":"rahul.sharma@acme.com","tripId":"EXT-TRIP-1001","tripItineraryId":"3f6a1c2e-9b7d-4e21-8c55-1a2b3c4d5e6f","vendorName":"Acme Travels","remark":"Booked via corporate TMC","ticketPdf":"https://files.acme.com/tickets/EXT-FLT-50002.pdf","invoicePdf":"https://files.acme.com/invoices/EXT-FLT-50002.pdf","invoice":{"invoiceNo":"INV/2026/11/00871","invoiceDate":1793614500000,"vendorGstin":"27AAACI1234F1Z5","hsn":"996425","baseAmount":12000,"cgst":0,"sgst":0,"igst":1080,"totalTax":1080},"gstDetails":{"gstNumber":"27AABCA1234B1Z9","companyName":"Acme India Pvt Ltd","companyAddress":"Level 5, One BKC, Mumbai 400051","emailAddress":"gst@acme.com","mobileNumber":"+912240001234"},"arrivalDate":1794280500000,"journeyType":"ROUND_TRIP","returnDate":1794579300000,"returnPnr":"Y2M4RT","airlineName":"IndiGo","flightNumber":"6E 5321 / 6E 5334","ticketNumbers":"0962145587412,0962145587413","cabinClass":"Economy","fareType":"Saver"}}'
};

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

```go All fields
package main

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

func main() {

	url := "https://heimdall.eka.io/apis/external/bookings/flight"

	payload := strings.NewReader("{\n  \"booking\": {\n    \"transId\": \"EXT-FLT-50002\",\n    \"bookingAmount\": 13080,\n    \"bookingDate\": 1793614500000,\n    \"passengers\": [\n      {\n        \"name\": \"Rahul Sharma\",\n        \"email\": \"rahul.sharma@acme.com\",\n        \"employeeCode\": \"EMP001\",\n        \"mobile\": \"+919876543210\",\n        \"gender\": \"MALE\",\n        \"seatNo\": \"14C\"\n      },\n      {\n        \"name\": \"Karan Mehta\",\n        \"email\": \"karan.mehta@partner.com\",\n        \"mobile\": \"+919811122233\",\n        \"gender\": \"MALE\",\n        \"seatNo\": \"14D\"\n      }\n    ],\n    \"departureCity\": \"BOM\",\n    \"arrivalCity\": \"BLR\",\n    \"departureDate\": 1794274200000,\n    \"pnr\": \"X7K9QP\",\n    \"currency\": \"INR\",\n    \"employeeCode\": \"EMP001\",\n    \"employeeEmail\": \"rahul.sharma@acme.com\",\n    \"tripId\": \"EXT-TRIP-1001\",\n    \"tripItineraryId\": \"3f6a1c2e-9b7d-4e21-8c55-1a2b3c4d5e6f\",\n    \"vendorName\": \"Acme Travels\",\n    \"remark\": \"Booked via corporate TMC\",\n    \"ticketPdf\": \"https://files.acme.com/tickets/EXT-FLT-50002.pdf\",\n    \"invoicePdf\": \"https://files.acme.com/invoices/EXT-FLT-50002.pdf\",\n    \"invoice\": {\n      \"invoiceNo\": \"INV/2026/11/00871\",\n      \"invoiceDate\": 1793614500000,\n      \"vendorGstin\": \"27AAACI1234F1Z5\",\n      \"hsn\": \"996425\",\n      \"baseAmount\": 12000,\n      \"cgst\": 0,\n      \"sgst\": 0,\n      \"igst\": 1080,\n      \"totalTax\": 1080\n    },\n    \"gstDetails\": {\n      \"gstNumber\": \"27AABCA1234B1Z9\",\n      \"companyName\": \"Acme India Pvt Ltd\",\n      \"companyAddress\": \"Level 5, One BKC, Mumbai 400051\",\n      \"emailAddress\": \"gst@acme.com\",\n      \"mobileNumber\": \"+912240001234\"\n    },\n    \"arrivalDate\": 1794280500000,\n    \"journeyType\": \"ROUND_TRIP\",\n    \"returnDate\": 1794579300000,\n    \"returnPnr\": \"Y2M4RT\",\n    \"airlineName\": \"IndiGo\",\n    \"flightNumber\": \"6E 5321 / 6E 5334\",\n    \"ticketNumbers\": \"0962145587412,0962145587413\",\n    \"cabinClass\": \"Economy\",\n    \"fareType\": \"Saver\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("DICE-APP-ID", "{{Company Code}}")
	req.Header.Add("X-CLIENT-ID", "{{API Client ID}}")
	req.Header.Add("X-CLIENT-SECRET", "{{API Client Secret}}")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

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

url = URI("https://heimdall.eka.io/apis/external/bookings/flight")

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

request = Net::HTTP::Post.new(url)
request["DICE-APP-ID"] = '{{Company Code}}'
request["X-CLIENT-ID"] = '{{API Client ID}}'
request["X-CLIENT-SECRET"] = '{{API Client Secret}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"booking\": {\n    \"transId\": \"EXT-FLT-50002\",\n    \"bookingAmount\": 13080,\n    \"bookingDate\": 1793614500000,\n    \"passengers\": [\n      {\n        \"name\": \"Rahul Sharma\",\n        \"email\": \"rahul.sharma@acme.com\",\n        \"employeeCode\": \"EMP001\",\n        \"mobile\": \"+919876543210\",\n        \"gender\": \"MALE\",\n        \"seatNo\": \"14C\"\n      },\n      {\n        \"name\": \"Karan Mehta\",\n        \"email\": \"karan.mehta@partner.com\",\n        \"mobile\": \"+919811122233\",\n        \"gender\": \"MALE\",\n        \"seatNo\": \"14D\"\n      }\n    ],\n    \"departureCity\": \"BOM\",\n    \"arrivalCity\": \"BLR\",\n    \"departureDate\": 1794274200000,\n    \"pnr\": \"X7K9QP\",\n    \"currency\": \"INR\",\n    \"employeeCode\": \"EMP001\",\n    \"employeeEmail\": \"rahul.sharma@acme.com\",\n    \"tripId\": \"EXT-TRIP-1001\",\n    \"tripItineraryId\": \"3f6a1c2e-9b7d-4e21-8c55-1a2b3c4d5e6f\",\n    \"vendorName\": \"Acme Travels\",\n    \"remark\": \"Booked via corporate TMC\",\n    \"ticketPdf\": \"https://files.acme.com/tickets/EXT-FLT-50002.pdf\",\n    \"invoicePdf\": \"https://files.acme.com/invoices/EXT-FLT-50002.pdf\",\n    \"invoice\": {\n      \"invoiceNo\": \"INV/2026/11/00871\",\n      \"invoiceDate\": 1793614500000,\n      \"vendorGstin\": \"27AAACI1234F1Z5\",\n      \"hsn\": \"996425\",\n      \"baseAmount\": 12000,\n      \"cgst\": 0,\n      \"sgst\": 0,\n      \"igst\": 1080,\n      \"totalTax\": 1080\n    },\n    \"gstDetails\": {\n      \"gstNumber\": \"27AABCA1234B1Z9\",\n      \"companyName\": \"Acme India Pvt Ltd\",\n      \"companyAddress\": \"Level 5, One BKC, Mumbai 400051\",\n      \"emailAddress\": \"gst@acme.com\",\n      \"mobileNumber\": \"+912240001234\"\n    },\n    \"arrivalDate\": 1794280500000,\n    \"journeyType\": \"ROUND_TRIP\",\n    \"returnDate\": 1794579300000,\n    \"returnPnr\": \"Y2M4RT\",\n    \"airlineName\": \"IndiGo\",\n    \"flightNumber\": \"6E 5321 / 6E 5334\",\n    \"ticketNumbers\": \"0962145587412,0962145587413\",\n    \"cabinClass\": \"Economy\",\n    \"fareType\": \"Saver\"\n  }\n}"

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

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

HttpResponse<String> response = Unirest.post("https://heimdall.eka.io/apis/external/bookings/flight")
  .header("DICE-APP-ID", "{{Company Code}}")
  .header("X-CLIENT-ID", "{{API Client ID}}")
  .header("X-CLIENT-SECRET", "{{API Client Secret}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"booking\": {\n    \"transId\": \"EXT-FLT-50002\",\n    \"bookingAmount\": 13080,\n    \"bookingDate\": 1793614500000,\n    \"passengers\": [\n      {\n        \"name\": \"Rahul Sharma\",\n        \"email\": \"rahul.sharma@acme.com\",\n        \"employeeCode\": \"EMP001\",\n        \"mobile\": \"+919876543210\",\n        \"gender\": \"MALE\",\n        \"seatNo\": \"14C\"\n      },\n      {\n        \"name\": \"Karan Mehta\",\n        \"email\": \"karan.mehta@partner.com\",\n        \"mobile\": \"+919811122233\",\n        \"gender\": \"MALE\",\n        \"seatNo\": \"14D\"\n      }\n    ],\n    \"departureCity\": \"BOM\",\n    \"arrivalCity\": \"BLR\",\n    \"departureDate\": 1794274200000,\n    \"pnr\": \"X7K9QP\",\n    \"currency\": \"INR\",\n    \"employeeCode\": \"EMP001\",\n    \"employeeEmail\": \"rahul.sharma@acme.com\",\n    \"tripId\": \"EXT-TRIP-1001\",\n    \"tripItineraryId\": \"3f6a1c2e-9b7d-4e21-8c55-1a2b3c4d5e6f\",\n    \"vendorName\": \"Acme Travels\",\n    \"remark\": \"Booked via corporate TMC\",\n    \"ticketPdf\": \"https://files.acme.com/tickets/EXT-FLT-50002.pdf\",\n    \"invoicePdf\": \"https://files.acme.com/invoices/EXT-FLT-50002.pdf\",\n    \"invoice\": {\n      \"invoiceNo\": \"INV/2026/11/00871\",\n      \"invoiceDate\": 1793614500000,\n      \"vendorGstin\": \"27AAACI1234F1Z5\",\n      \"hsn\": \"996425\",\n      \"baseAmount\": 12000,\n      \"cgst\": 0,\n      \"sgst\": 0,\n      \"igst\": 1080,\n      \"totalTax\": 1080\n    },\n    \"gstDetails\": {\n      \"gstNumber\": \"27AABCA1234B1Z9\",\n      \"companyName\": \"Acme India Pvt Ltd\",\n      \"companyAddress\": \"Level 5, One BKC, Mumbai 400051\",\n      \"emailAddress\": \"gst@acme.com\",\n      \"mobileNumber\": \"+912240001234\"\n    },\n    \"arrivalDate\": 1794280500000,\n    \"journeyType\": \"ROUND_TRIP\",\n    \"returnDate\": 1794579300000,\n    \"returnPnr\": \"Y2M4RT\",\n    \"airlineName\": \"IndiGo\",\n    \"flightNumber\": \"6E 5321 / 6E 5334\",\n    \"ticketNumbers\": \"0962145587412,0962145587413\",\n    \"cabinClass\": \"Economy\",\n    \"fareType\": \"Saver\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://heimdall.eka.io/apis/external/bookings/flight', [
  'body' => '{
  "booking": {
    "transId": "EXT-FLT-50002",
    "bookingAmount": 13080,
    "bookingDate": 1793614500000,
    "passengers": [
      {
        "name": "Rahul Sharma",
        "email": "rahul.sharma@acme.com",
        "employeeCode": "EMP001",
        "mobile": "+919876543210",
        "gender": "MALE",
        "seatNo": "14C"
      },
      {
        "name": "Karan Mehta",
        "email": "karan.mehta@partner.com",
        "mobile": "+919811122233",
        "gender": "MALE",
        "seatNo": "14D"
      }
    ],
    "departureCity": "BOM",
    "arrivalCity": "BLR",
    "departureDate": 1794274200000,
    "pnr": "X7K9QP",
    "currency": "INR",
    "employeeCode": "EMP001",
    "employeeEmail": "rahul.sharma@acme.com",
    "tripId": "EXT-TRIP-1001",
    "tripItineraryId": "3f6a1c2e-9b7d-4e21-8c55-1a2b3c4d5e6f",
    "vendorName": "Acme Travels",
    "remark": "Booked via corporate TMC",
    "ticketPdf": "https://files.acme.com/tickets/EXT-FLT-50002.pdf",
    "invoicePdf": "https://files.acme.com/invoices/EXT-FLT-50002.pdf",
    "invoice": {
      "invoiceNo": "INV/2026/11/00871",
      "invoiceDate": 1793614500000,
      "vendorGstin": "27AAACI1234F1Z5",
      "hsn": "996425",
      "baseAmount": 12000,
      "cgst": 0,
      "sgst": 0,
      "igst": 1080,
      "totalTax": 1080
    },
    "gstDetails": {
      "gstNumber": "27AABCA1234B1Z9",
      "companyName": "Acme India Pvt Ltd",
      "companyAddress": "Level 5, One BKC, Mumbai 400051",
      "emailAddress": "gst@acme.com",
      "mobileNumber": "+912240001234"
    },
    "arrivalDate": 1794280500000,
    "journeyType": "ROUND_TRIP",
    "returnDate": 1794579300000,
    "returnPnr": "Y2M4RT",
    "airlineName": "IndiGo",
    "flightNumber": "6E 5321 / 6E 5334",
    "ticketNumbers": "0962145587412,0962145587413",
    "cabinClass": "Economy",
    "fareType": "Saver"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'DICE-APP-ID' => '{{Company Code}}',
    'X-CLIENT-ID' => '{{API Client ID}}',
    'X-CLIENT-SECRET' => '{{API Client Secret}}',
  ],
]);

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

```csharp All fields
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/bookings/flight");
var request = new RestRequest(Method.POST);
request.AddHeader("DICE-APP-ID", "{{Company Code}}");
request.AddHeader("X-CLIENT-ID", "{{API Client ID}}");
request.AddHeader("X-CLIENT-SECRET", "{{API Client Secret}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"booking\": {\n    \"transId\": \"EXT-FLT-50002\",\n    \"bookingAmount\": 13080,\n    \"bookingDate\": 1793614500000,\n    \"passengers\": [\n      {\n        \"name\": \"Rahul Sharma\",\n        \"email\": \"rahul.sharma@acme.com\",\n        \"employeeCode\": \"EMP001\",\n        \"mobile\": \"+919876543210\",\n        \"gender\": \"MALE\",\n        \"seatNo\": \"14C\"\n      },\n      {\n        \"name\": \"Karan Mehta\",\n        \"email\": \"karan.mehta@partner.com\",\n        \"mobile\": \"+919811122233\",\n        \"gender\": \"MALE\",\n        \"seatNo\": \"14D\"\n      }\n    ],\n    \"departureCity\": \"BOM\",\n    \"arrivalCity\": \"BLR\",\n    \"departureDate\": 1794274200000,\n    \"pnr\": \"X7K9QP\",\n    \"currency\": \"INR\",\n    \"employeeCode\": \"EMP001\",\n    \"employeeEmail\": \"rahul.sharma@acme.com\",\n    \"tripId\": \"EXT-TRIP-1001\",\n    \"tripItineraryId\": \"3f6a1c2e-9b7d-4e21-8c55-1a2b3c4d5e6f\",\n    \"vendorName\": \"Acme Travels\",\n    \"remark\": \"Booked via corporate TMC\",\n    \"ticketPdf\": \"https://files.acme.com/tickets/EXT-FLT-50002.pdf\",\n    \"invoicePdf\": \"https://files.acme.com/invoices/EXT-FLT-50002.pdf\",\n    \"invoice\": {\n      \"invoiceNo\": \"INV/2026/11/00871\",\n      \"invoiceDate\": 1793614500000,\n      \"vendorGstin\": \"27AAACI1234F1Z5\",\n      \"hsn\": \"996425\",\n      \"baseAmount\": 12000,\n      \"cgst\": 0,\n      \"sgst\": 0,\n      \"igst\": 1080,\n      \"totalTax\": 1080\n    },\n    \"gstDetails\": {\n      \"gstNumber\": \"27AABCA1234B1Z9\",\n      \"companyName\": \"Acme India Pvt Ltd\",\n      \"companyAddress\": \"Level 5, One BKC, Mumbai 400051\",\n      \"emailAddress\": \"gst@acme.com\",\n      \"mobileNumber\": \"+912240001234\"\n    },\n    \"arrivalDate\": 1794280500000,\n    \"journeyType\": \"ROUND_TRIP\",\n    \"returnDate\": 1794579300000,\n    \"returnPnr\": \"Y2M4RT\",\n    \"airlineName\": \"IndiGo\",\n    \"flightNumber\": \"6E 5321 / 6E 5334\",\n    \"ticketNumbers\": \"0962145587412,0962145587413\",\n    \"cabinClass\": \"Economy\",\n    \"fareType\": \"Saver\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift All fields
import Foundation

let headers = [
  "DICE-APP-ID": "{{Company Code}}",
  "X-CLIENT-ID": "{{API Client ID}}",
  "X-CLIENT-SECRET": "{{API Client Secret}}",
  "Content-Type": "application/json"
]
let parameters = ["booking": [
    "transId": "EXT-FLT-50002",
    "bookingAmount": 13080,
    "bookingDate": 1793614500000,
    "passengers": [
      [
        "name": "Rahul Sharma",
        "email": "rahul.sharma@acme.com",
        "employeeCode": "EMP001",
        "mobile": "+919876543210",
        "gender": "MALE",
        "seatNo": "14C"
      ],
      [
        "name": "Karan Mehta",
        "email": "karan.mehta@partner.com",
        "mobile": "+919811122233",
        "gender": "MALE",
        "seatNo": "14D"
      ]
    ],
    "departureCity": "BOM",
    "arrivalCity": "BLR",
    "departureDate": 1794274200000,
    "pnr": "X7K9QP",
    "currency": "INR",
    "employeeCode": "EMP001",
    "employeeEmail": "rahul.sharma@acme.com",
    "tripId": "EXT-TRIP-1001",
    "tripItineraryId": "3f6a1c2e-9b7d-4e21-8c55-1a2b3c4d5e6f",
    "vendorName": "Acme Travels",
    "remark": "Booked via corporate TMC",
    "ticketPdf": "https://files.acme.com/tickets/EXT-FLT-50002.pdf",
    "invoicePdf": "https://files.acme.com/invoices/EXT-FLT-50002.pdf",
    "invoice": [
      "invoiceNo": "INV/2026/11/00871",
      "invoiceDate": 1793614500000,
      "vendorGstin": "27AAACI1234F1Z5",
      "hsn": "996425",
      "baseAmount": 12000,
      "cgst": 0,
      "sgst": 0,
      "igst": 1080,
      "totalTax": 1080
    ],
    "gstDetails": [
      "gstNumber": "27AABCA1234B1Z9",
      "companyName": "Acme India Pvt Ltd",
      "companyAddress": "Level 5, One BKC, Mumbai 400051",
      "emailAddress": "gst@acme.com",
      "mobileNumber": "+912240001234"
    ],
    "arrivalDate": 1794280500000,
    "journeyType": "ROUND_TRIP",
    "returnDate": 1794579300000,
    "returnPnr": "Y2M4RT",
    "airlineName": "IndiGo",
    "flightNumber": "6E 5321 / 6E 5334",
    "ticketNumbers": "0962145587412,0962145587413",
    "cabinClass": "Economy",
    "fareType": "Saver"
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://heimdall.eka.io/apis/external/bookings/flight")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```

### Mandatory fields only

**Request**

```json
{
  "booking": {
    "transId": "EXT-FLT-50001",
    "bookingAmount": 6540,
    "bookingDate": 1793614500000,
    "passengers": [
      {
        "name": "Rahul Sharma",
        "email": "rahul.sharma@acme.com"
      }
    ],
    "departureCity": "BOM",
    "arrivalCity": "BLR",
    "departureDate": 1794274200000,
    "pnr": "X7K9QP",
    "employeeEmail": "rahul.sharma@acme.com"
  }
}
```

**Response**

```json
{
  "success": true,
  "transId": "EXT-FLT-50001",
  "transactionId": 7712093,
  "tagged": true,
  "tripId": "EXT-TRIP-1001",
  "tripItineraryId": "3f6a1c2e-9b7d-4e21-8c55-1a2b3c4d5e6f"
}
```

**SDK Code**

```python Mandatory fields only
import requests

url = "https://heimdall.eka.io/apis/external/bookings/flight"

payload = { "booking": {
        "transId": "EXT-FLT-50001",
        "bookingAmount": 6540,
        "bookingDate": 1793614500000,
        "passengers": [
            {
                "name": "Rahul Sharma",
                "email": "rahul.sharma@acme.com"
            }
        ],
        "departureCity": "BOM",
        "arrivalCity": "BLR",
        "departureDate": 1794274200000,
        "pnr": "X7K9QP",
        "employeeEmail": "rahul.sharma@acme.com"
    } }
headers = {
    "DICE-APP-ID": "{{Company Code}}",
    "X-CLIENT-ID": "{{API Client ID}}",
    "X-CLIENT-SECRET": "{{API Client Secret}}",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Mandatory fields only
const url = 'https://heimdall.eka.io/apis/external/bookings/flight';
const options = {
  method: 'POST',
  headers: {
    'DICE-APP-ID': '{{Company Code}}',
    'X-CLIENT-ID': '{{API Client ID}}',
    'X-CLIENT-SECRET': '{{API Client Secret}}',
    'Content-Type': 'application/json'
  },
  body: '{"booking":{"transId":"EXT-FLT-50001","bookingAmount":6540,"bookingDate":1793614500000,"passengers":[{"name":"Rahul Sharma","email":"rahul.sharma@acme.com"}],"departureCity":"BOM","arrivalCity":"BLR","departureDate":1794274200000,"pnr":"X7K9QP","employeeEmail":"rahul.sharma@acme.com"}}'
};

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

```go Mandatory fields only
package main

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

func main() {

	url := "https://heimdall.eka.io/apis/external/bookings/flight"

	payload := strings.NewReader("{\n  \"booking\": {\n    \"transId\": \"EXT-FLT-50001\",\n    \"bookingAmount\": 6540,\n    \"bookingDate\": 1793614500000,\n    \"passengers\": [\n      {\n        \"name\": \"Rahul Sharma\",\n        \"email\": \"rahul.sharma@acme.com\"\n      }\n    ],\n    \"departureCity\": \"BOM\",\n    \"arrivalCity\": \"BLR\",\n    \"departureDate\": 1794274200000,\n    \"pnr\": \"X7K9QP\",\n    \"employeeEmail\": \"rahul.sharma@acme.com\"\n  }\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("DICE-APP-ID", "{{Company Code}}")
	req.Header.Add("X-CLIENT-ID", "{{API Client ID}}")
	req.Header.Add("X-CLIENT-SECRET", "{{API Client Secret}}")
	req.Header.Add("Content-Type", "application/json")

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

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

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

}
```

```ruby Mandatory fields only
require 'uri'
require 'net/http'

url = URI("https://heimdall.eka.io/apis/external/bookings/flight")

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

request = Net::HTTP::Post.new(url)
request["DICE-APP-ID"] = '{{Company Code}}'
request["X-CLIENT-ID"] = '{{API Client ID}}'
request["X-CLIENT-SECRET"] = '{{API Client Secret}}'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"booking\": {\n    \"transId\": \"EXT-FLT-50001\",\n    \"bookingAmount\": 6540,\n    \"bookingDate\": 1793614500000,\n    \"passengers\": [\n      {\n        \"name\": \"Rahul Sharma\",\n        \"email\": \"rahul.sharma@acme.com\"\n      }\n    ],\n    \"departureCity\": \"BOM\",\n    \"arrivalCity\": \"BLR\",\n    \"departureDate\": 1794274200000,\n    \"pnr\": \"X7K9QP\",\n    \"employeeEmail\": \"rahul.sharma@acme.com\"\n  }\n}"

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

```java Mandatory fields only
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://heimdall.eka.io/apis/external/bookings/flight")
  .header("DICE-APP-ID", "{{Company Code}}")
  .header("X-CLIENT-ID", "{{API Client ID}}")
  .header("X-CLIENT-SECRET", "{{API Client Secret}}")
  .header("Content-Type", "application/json")
  .body("{\n  \"booking\": {\n    \"transId\": \"EXT-FLT-50001\",\n    \"bookingAmount\": 6540,\n    \"bookingDate\": 1793614500000,\n    \"passengers\": [\n      {\n        \"name\": \"Rahul Sharma\",\n        \"email\": \"rahul.sharma@acme.com\"\n      }\n    ],\n    \"departureCity\": \"BOM\",\n    \"arrivalCity\": \"BLR\",\n    \"departureDate\": 1794274200000,\n    \"pnr\": \"X7K9QP\",\n    \"employeeEmail\": \"rahul.sharma@acme.com\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://heimdall.eka.io/apis/external/bookings/flight', [
  'body' => '{
  "booking": {
    "transId": "EXT-FLT-50001",
    "bookingAmount": 6540,
    "bookingDate": 1793614500000,
    "passengers": [
      {
        "name": "Rahul Sharma",
        "email": "rahul.sharma@acme.com"
      }
    ],
    "departureCity": "BOM",
    "arrivalCity": "BLR",
    "departureDate": 1794274200000,
    "pnr": "X7K9QP",
    "employeeEmail": "rahul.sharma@acme.com"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'DICE-APP-ID' => '{{Company Code}}',
    'X-CLIENT-ID' => '{{API Client ID}}',
    'X-CLIENT-SECRET' => '{{API Client Secret}}',
  ],
]);

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

```csharp Mandatory fields only
using RestSharp;

var client = new RestClient("https://heimdall.eka.io/apis/external/bookings/flight");
var request = new RestRequest(Method.POST);
request.AddHeader("DICE-APP-ID", "{{Company Code}}");
request.AddHeader("X-CLIENT-ID", "{{API Client ID}}");
request.AddHeader("X-CLIENT-SECRET", "{{API Client Secret}}");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"booking\": {\n    \"transId\": \"EXT-FLT-50001\",\n    \"bookingAmount\": 6540,\n    \"bookingDate\": 1793614500000,\n    \"passengers\": [\n      {\n        \"name\": \"Rahul Sharma\",\n        \"email\": \"rahul.sharma@acme.com\"\n      }\n    ],\n    \"departureCity\": \"BOM\",\n    \"arrivalCity\": \"BLR\",\n    \"departureDate\": 1794274200000,\n    \"pnr\": \"X7K9QP\",\n    \"employeeEmail\": \"rahul.sharma@acme.com\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Mandatory fields only
import Foundation

let headers = [
  "DICE-APP-ID": "{{Company Code}}",
  "X-CLIENT-ID": "{{API Client ID}}",
  "X-CLIENT-SECRET": "{{API Client Secret}}",
  "Content-Type": "application/json"
]
let parameters = ["booking": [
    "transId": "EXT-FLT-50001",
    "bookingAmount": 6540,
    "bookingDate": 1793614500000,
    "passengers": [
      [
        "name": "Rahul Sharma",
        "email": "rahul.sharma@acme.com"
      ]
    ],
    "departureCity": "BOM",
    "arrivalCity": "BLR",
    "departureDate": 1794274200000,
    "pnr": "X7K9QP",
    "employeeEmail": "rahul.sharma@acme.com"
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://heimdall.eka.io/apis/external/bookings/flight")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

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()
```