> 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 Bus Booking

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

### Push Bus Booking

Records a bus booking made outside Dice 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.pnr | Mandatory | Bus ticket PNR. |
| booking.operatorName | Mandatory | Bus operator name. |
| booking.departureCity | Mandatory | Boarding city **name** (IATA codes are not accepted for bus). |
| booking.arrivalCity | Mandatory | Destination city **name**. |
| booking.journeyDate | Mandatory | Departure date & time. Epoch time in **milliseconds** (UTC). |
| booking.arrivalDate | Optional | Arrival date & time. Epoch time in **milliseconds** (UTC). |
| booking.busType | Optional | Bus type. |
| booking.boardingPoint | Optional | Boarding point. Defaults to the departure city. |
| booking.droppingPoint | Optional | Dropping point. Defaults to the arrival city. |

Reference: https://open-api-docs.dice.tech/dice-standardized-ap-is-v-2-copy/booking/push-bus-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` (ApisExternalBookingsBusPostRequestBodyContentApplicationJsonSchemaBooking, 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

### ApisExternalBookingsBusPostRequestBodyContentApplicationJsonSchemaBooking

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 ApisExternalBookingsBusPostRequestBodyContentApplicationJsonSchemaBookingPassengersItems, required) — Travellers on this booking. **Mandatory – at least one.**
- `pnr` (string, required) — Bus ticket PNR.
- `operatorName` (string, required) — Bus operator name.
- `departureCity` (string, required) — Boarding city **name** (IATA codes are not accepted for bus).
- `arrivalCity` (string, required) — Destination city **name**.
- `journeyDate` (long, required) — Departure date & time. Epoch time in **milliseconds** (UTC).
- `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` (ApisExternalBookingsBusPostRequestBodyContentApplicationJsonSchemaBookingInvoice, optional) — Tax invoice details of the booking (for GST reporting).
- `gstDetails` (ApisExternalBookingsBusPostRequestBodyContentApplicationJsonSchemaBookingGstDetails, optional) — GST details of the billing entity.
- `arrivalDate` (long, optional) — Arrival date & time. Epoch time in **milliseconds** (UTC).
- `busType` (string, optional) — Bus type.
- `boardingPoint` (string, optional) — Boarding point. Defaults to the departure city.
- `droppingPoint` (string, optional) — Dropping point. Defaults to the arrival city.

### ApisExternalBookingsBusPostRequestBodyContentApplicationJsonSchemaBookingPassengersItems

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.

### ApisExternalBookingsBusPostRequestBodyContentApplicationJsonSchemaBookingInvoice

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.

### ApisExternalBookingsBusPostRequestBodyContentApplicationJsonSchemaBookingGstDetails

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-BUS-70002",
    "bookingAmount": 2900,
    "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"
      }
    ],
    "pnr": "BUS7788123",
    "operatorName": "KSRTC",
    "departureCity": "Bengaluru",
    "arrivalCity": "Chennai",
    "journeyDate": 1794501000000,
    "currency": "INR",
    "employeeCode": "EMP001",
    "employeeEmail": "rahul.sharma@acme.com",
    "tripId": "EXT-TRIP-1002",
    "tripItineraryId": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f",
    "vendorName": "Acme Travels",
    "remark": "Booked via corporate TMC",
    "ticketPdf": "https://files.acme.com/tickets/EXT-BUS-70002.pdf",
    "invoicePdf": "https://files.acme.com/invoices/EXT-BUS-70002.pdf",
    "invoice": {
      "invoiceNo": "INV/2026/11/00871",
      "invoiceDate": 1793614500000,
      "vendorGstin": "27AAACI1234F1Z5",
      "hsn": "996411",
      "baseAmount": 2762,
      "cgst": 0,
      "sgst": 0,
      "igst": 138,
      "totalTax": 138
    },
    "gstDetails": {
      "gstNumber": "27AABCA1234B1Z9",
      "companyName": "Acme India Pvt Ltd",
      "companyAddress": "Level 5, One BKC, Mumbai 400051",
      "emailAddress": "gst@acme.com",
      "mobileNumber": "+912240001234"
    },
    "arrivalDate": 1794528000000,
    "busType": "AC Sleeper",
    "boardingPoint": "Majestic Bus Stand",
    "droppingPoint": "Koyambedu"
  }
}
```

**Response**

```json
{
  "success": true,
  "transId": "EXT-BUS-70001",
  "transactionId": 7712095,
  "tagged": false
}
```

**SDK Code**

```python All fields
import requests

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

payload = { "booking": {
        "transId": "EXT-BUS-70002",
        "bookingAmount": 2900,
        "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"
            }
        ],
        "pnr": "BUS7788123",
        "operatorName": "KSRTC",
        "departureCity": "Bengaluru",
        "arrivalCity": "Chennai",
        "journeyDate": 1794501000000,
        "currency": "INR",
        "employeeCode": "EMP001",
        "employeeEmail": "rahul.sharma@acme.com",
        "tripId": "EXT-TRIP-1002",
        "tripItineraryId": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f",
        "vendorName": "Acme Travels",
        "remark": "Booked via corporate TMC",
        "ticketPdf": "https://files.acme.com/tickets/EXT-BUS-70002.pdf",
        "invoicePdf": "https://files.acme.com/invoices/EXT-BUS-70002.pdf",
        "invoice": {
            "invoiceNo": "INV/2026/11/00871",
            "invoiceDate": 1793614500000,
            "vendorGstin": "27AAACI1234F1Z5",
            "hsn": "996411",
            "baseAmount": 2762,
            "cgst": 0,
            "sgst": 0,
            "igst": 138,
            "totalTax": 138
        },
        "gstDetails": {
            "gstNumber": "27AABCA1234B1Z9",
            "companyName": "Acme India Pvt Ltd",
            "companyAddress": "Level 5, One BKC, Mumbai 400051",
            "emailAddress": "gst@acme.com",
            "mobileNumber": "+912240001234"
        },
        "arrivalDate": 1794528000000,
        "busType": "AC Sleeper",
        "boardingPoint": "Majestic Bus Stand",
        "droppingPoint": "Koyambedu"
    } }
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/bus';
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-BUS-70002","bookingAmount":2900,"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"}],"pnr":"BUS7788123","operatorName":"KSRTC","departureCity":"Bengaluru","arrivalCity":"Chennai","journeyDate":1794501000000,"currency":"INR","employeeCode":"EMP001","employeeEmail":"rahul.sharma@acme.com","tripId":"EXT-TRIP-1002","tripItineraryId":"9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f","vendorName":"Acme Travels","remark":"Booked via corporate TMC","ticketPdf":"https://files.acme.com/tickets/EXT-BUS-70002.pdf","invoicePdf":"https://files.acme.com/invoices/EXT-BUS-70002.pdf","invoice":{"invoiceNo":"INV/2026/11/00871","invoiceDate":1793614500000,"vendorGstin":"27AAACI1234F1Z5","hsn":"996411","baseAmount":2762,"cgst":0,"sgst":0,"igst":138,"totalTax":138},"gstDetails":{"gstNumber":"27AABCA1234B1Z9","companyName":"Acme India Pvt Ltd","companyAddress":"Level 5, One BKC, Mumbai 400051","emailAddress":"gst@acme.com","mobileNumber":"+912240001234"},"arrivalDate":1794528000000,"busType":"AC Sleeper","boardingPoint":"Majestic Bus Stand","droppingPoint":"Koyambedu"}}'
};

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/bus"

	payload := strings.NewReader("{\n  \"booking\": {\n    \"transId\": \"EXT-BUS-70002\",\n    \"bookingAmount\": 2900,\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    \"pnr\": \"BUS7788123\",\n    \"operatorName\": \"KSRTC\",\n    \"departureCity\": \"Bengaluru\",\n    \"arrivalCity\": \"Chennai\",\n    \"journeyDate\": 1794501000000,\n    \"currency\": \"INR\",\n    \"employeeCode\": \"EMP001\",\n    \"employeeEmail\": \"rahul.sharma@acme.com\",\n    \"tripId\": \"EXT-TRIP-1002\",\n    \"tripItineraryId\": \"9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f\",\n    \"vendorName\": \"Acme Travels\",\n    \"remark\": \"Booked via corporate TMC\",\n    \"ticketPdf\": \"https://files.acme.com/tickets/EXT-BUS-70002.pdf\",\n    \"invoicePdf\": \"https://files.acme.com/invoices/EXT-BUS-70002.pdf\",\n    \"invoice\": {\n      \"invoiceNo\": \"INV/2026/11/00871\",\n      \"invoiceDate\": 1793614500000,\n      \"vendorGstin\": \"27AAACI1234F1Z5\",\n      \"hsn\": \"996411\",\n      \"baseAmount\": 2762,\n      \"cgst\": 0,\n      \"sgst\": 0,\n      \"igst\": 138,\n      \"totalTax\": 138\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\": 1794528000000,\n    \"busType\": \"AC Sleeper\",\n    \"boardingPoint\": \"Majestic Bus Stand\",\n    \"droppingPoint\": \"Koyambedu\"\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/bus")

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-BUS-70002\",\n    \"bookingAmount\": 2900,\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    \"pnr\": \"BUS7788123\",\n    \"operatorName\": \"KSRTC\",\n    \"departureCity\": \"Bengaluru\",\n    \"arrivalCity\": \"Chennai\",\n    \"journeyDate\": 1794501000000,\n    \"currency\": \"INR\",\n    \"employeeCode\": \"EMP001\",\n    \"employeeEmail\": \"rahul.sharma@acme.com\",\n    \"tripId\": \"EXT-TRIP-1002\",\n    \"tripItineraryId\": \"9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f\",\n    \"vendorName\": \"Acme Travels\",\n    \"remark\": \"Booked via corporate TMC\",\n    \"ticketPdf\": \"https://files.acme.com/tickets/EXT-BUS-70002.pdf\",\n    \"invoicePdf\": \"https://files.acme.com/invoices/EXT-BUS-70002.pdf\",\n    \"invoice\": {\n      \"invoiceNo\": \"INV/2026/11/00871\",\n      \"invoiceDate\": 1793614500000,\n      \"vendorGstin\": \"27AAACI1234F1Z5\",\n      \"hsn\": \"996411\",\n      \"baseAmount\": 2762,\n      \"cgst\": 0,\n      \"sgst\": 0,\n      \"igst\": 138,\n      \"totalTax\": 138\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\": 1794528000000,\n    \"busType\": \"AC Sleeper\",\n    \"boardingPoint\": \"Majestic Bus Stand\",\n    \"droppingPoint\": \"Koyambedu\"\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/bus")
  .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-BUS-70002\",\n    \"bookingAmount\": 2900,\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    \"pnr\": \"BUS7788123\",\n    \"operatorName\": \"KSRTC\",\n    \"departureCity\": \"Bengaluru\",\n    \"arrivalCity\": \"Chennai\",\n    \"journeyDate\": 1794501000000,\n    \"currency\": \"INR\",\n    \"employeeCode\": \"EMP001\",\n    \"employeeEmail\": \"rahul.sharma@acme.com\",\n    \"tripId\": \"EXT-TRIP-1002\",\n    \"tripItineraryId\": \"9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f\",\n    \"vendorName\": \"Acme Travels\",\n    \"remark\": \"Booked via corporate TMC\",\n    \"ticketPdf\": \"https://files.acme.com/tickets/EXT-BUS-70002.pdf\",\n    \"invoicePdf\": \"https://files.acme.com/invoices/EXT-BUS-70002.pdf\",\n    \"invoice\": {\n      \"invoiceNo\": \"INV/2026/11/00871\",\n      \"invoiceDate\": 1793614500000,\n      \"vendorGstin\": \"27AAACI1234F1Z5\",\n      \"hsn\": \"996411\",\n      \"baseAmount\": 2762,\n      \"cgst\": 0,\n      \"sgst\": 0,\n      \"igst\": 138,\n      \"totalTax\": 138\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\": 1794528000000,\n    \"busType\": \"AC Sleeper\",\n    \"boardingPoint\": \"Majestic Bus Stand\",\n    \"droppingPoint\": \"Koyambedu\"\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/bus', [
  'body' => '{
  "booking": {
    "transId": "EXT-BUS-70002",
    "bookingAmount": 2900,
    "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"
      }
    ],
    "pnr": "BUS7788123",
    "operatorName": "KSRTC",
    "departureCity": "Bengaluru",
    "arrivalCity": "Chennai",
    "journeyDate": 1794501000000,
    "currency": "INR",
    "employeeCode": "EMP001",
    "employeeEmail": "rahul.sharma@acme.com",
    "tripId": "EXT-TRIP-1002",
    "tripItineraryId": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f",
    "vendorName": "Acme Travels",
    "remark": "Booked via corporate TMC",
    "ticketPdf": "https://files.acme.com/tickets/EXT-BUS-70002.pdf",
    "invoicePdf": "https://files.acme.com/invoices/EXT-BUS-70002.pdf",
    "invoice": {
      "invoiceNo": "INV/2026/11/00871",
      "invoiceDate": 1793614500000,
      "vendorGstin": "27AAACI1234F1Z5",
      "hsn": "996411",
      "baseAmount": 2762,
      "cgst": 0,
      "sgst": 0,
      "igst": 138,
      "totalTax": 138
    },
    "gstDetails": {
      "gstNumber": "27AABCA1234B1Z9",
      "companyName": "Acme India Pvt Ltd",
      "companyAddress": "Level 5, One BKC, Mumbai 400051",
      "emailAddress": "gst@acme.com",
      "mobileNumber": "+912240001234"
    },
    "arrivalDate": 1794528000000,
    "busType": "AC Sleeper",
    "boardingPoint": "Majestic Bus Stand",
    "droppingPoint": "Koyambedu"
  }
}',
  '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/bus");
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-BUS-70002\",\n    \"bookingAmount\": 2900,\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    \"pnr\": \"BUS7788123\",\n    \"operatorName\": \"KSRTC\",\n    \"departureCity\": \"Bengaluru\",\n    \"arrivalCity\": \"Chennai\",\n    \"journeyDate\": 1794501000000,\n    \"currency\": \"INR\",\n    \"employeeCode\": \"EMP001\",\n    \"employeeEmail\": \"rahul.sharma@acme.com\",\n    \"tripId\": \"EXT-TRIP-1002\",\n    \"tripItineraryId\": \"9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f\",\n    \"vendorName\": \"Acme Travels\",\n    \"remark\": \"Booked via corporate TMC\",\n    \"ticketPdf\": \"https://files.acme.com/tickets/EXT-BUS-70002.pdf\",\n    \"invoicePdf\": \"https://files.acme.com/invoices/EXT-BUS-70002.pdf\",\n    \"invoice\": {\n      \"invoiceNo\": \"INV/2026/11/00871\",\n      \"invoiceDate\": 1793614500000,\n      \"vendorGstin\": \"27AAACI1234F1Z5\",\n      \"hsn\": \"996411\",\n      \"baseAmount\": 2762,\n      \"cgst\": 0,\n      \"sgst\": 0,\n      \"igst\": 138,\n      \"totalTax\": 138\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\": 1794528000000,\n    \"busType\": \"AC Sleeper\",\n    \"boardingPoint\": \"Majestic Bus Stand\",\n    \"droppingPoint\": \"Koyambedu\"\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-BUS-70002",
    "bookingAmount": 2900,
    "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"
      ]
    ],
    "pnr": "BUS7788123",
    "operatorName": "KSRTC",
    "departureCity": "Bengaluru",
    "arrivalCity": "Chennai",
    "journeyDate": 1794501000000,
    "currency": "INR",
    "employeeCode": "EMP001",
    "employeeEmail": "rahul.sharma@acme.com",
    "tripId": "EXT-TRIP-1002",
    "tripItineraryId": "9c1d2e3f-4a5b-4c6d-8e7f-0a1b2c3d4e5f",
    "vendorName": "Acme Travels",
    "remark": "Booked via corporate TMC",
    "ticketPdf": "https://files.acme.com/tickets/EXT-BUS-70002.pdf",
    "invoicePdf": "https://files.acme.com/invoices/EXT-BUS-70002.pdf",
    "invoice": [
      "invoiceNo": "INV/2026/11/00871",
      "invoiceDate": 1793614500000,
      "vendorGstin": "27AAACI1234F1Z5",
      "hsn": "996411",
      "baseAmount": 2762,
      "cgst": 0,
      "sgst": 0,
      "igst": 138,
      "totalTax": 138
    ],
    "gstDetails": [
      "gstNumber": "27AABCA1234B1Z9",
      "companyName": "Acme India Pvt Ltd",
      "companyAddress": "Level 5, One BKC, Mumbai 400051",
      "emailAddress": "gst@acme.com",
      "mobileNumber": "+912240001234"
    ],
    "arrivalDate": 1794528000000,
    "busType": "AC Sleeper",
    "boardingPoint": "Majestic Bus Stand",
    "droppingPoint": "Koyambedu"
  ]] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://heimdall.eka.io/apis/external/bookings/bus")! 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-BUS-70001",
    "bookingAmount": 1450,
    "bookingDate": 1793614500000,
    "passengers": [
      {
        "name": "Rahul Sharma",
        "email": "rahul.sharma@acme.com"
      }
    ],
    "pnr": "BUS7788123",
    "operatorName": "KSRTC",
    "departureCity": "Bengaluru",
    "arrivalCity": "Chennai",
    "journeyDate": 1794501000000,
    "employeeEmail": "rahul.sharma@acme.com"
  }
}
```

**Response**

```json
{
  "success": true,
  "transId": "EXT-BUS-70001",
  "transactionId": 7712095,
  "tagged": false
}
```

**SDK Code**

```python Mandatory fields only
import requests

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

payload = { "booking": {
        "transId": "EXT-BUS-70001",
        "bookingAmount": 1450,
        "bookingDate": 1793614500000,
        "passengers": [
            {
                "name": "Rahul Sharma",
                "email": "rahul.sharma@acme.com"
            }
        ],
        "pnr": "BUS7788123",
        "operatorName": "KSRTC",
        "departureCity": "Bengaluru",
        "arrivalCity": "Chennai",
        "journeyDate": 1794501000000,
        "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/bus';
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-BUS-70001","bookingAmount":1450,"bookingDate":1793614500000,"passengers":[{"name":"Rahul Sharma","email":"rahul.sharma@acme.com"}],"pnr":"BUS7788123","operatorName":"KSRTC","departureCity":"Bengaluru","arrivalCity":"Chennai","journeyDate":1794501000000,"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/bus"

	payload := strings.NewReader("{\n  \"booking\": {\n    \"transId\": \"EXT-BUS-70001\",\n    \"bookingAmount\": 1450,\n    \"bookingDate\": 1793614500000,\n    \"passengers\": [\n      {\n        \"name\": \"Rahul Sharma\",\n        \"email\": \"rahul.sharma@acme.com\"\n      }\n    ],\n    \"pnr\": \"BUS7788123\",\n    \"operatorName\": \"KSRTC\",\n    \"departureCity\": \"Bengaluru\",\n    \"arrivalCity\": \"Chennai\",\n    \"journeyDate\": 1794501000000,\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/bus")

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-BUS-70001\",\n    \"bookingAmount\": 1450,\n    \"bookingDate\": 1793614500000,\n    \"passengers\": [\n      {\n        \"name\": \"Rahul Sharma\",\n        \"email\": \"rahul.sharma@acme.com\"\n      }\n    ],\n    \"pnr\": \"BUS7788123\",\n    \"operatorName\": \"KSRTC\",\n    \"departureCity\": \"Bengaluru\",\n    \"arrivalCity\": \"Chennai\",\n    \"journeyDate\": 1794501000000,\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/bus")
  .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-BUS-70001\",\n    \"bookingAmount\": 1450,\n    \"bookingDate\": 1793614500000,\n    \"passengers\": [\n      {\n        \"name\": \"Rahul Sharma\",\n        \"email\": \"rahul.sharma@acme.com\"\n      }\n    ],\n    \"pnr\": \"BUS7788123\",\n    \"operatorName\": \"KSRTC\",\n    \"departureCity\": \"Bengaluru\",\n    \"arrivalCity\": \"Chennai\",\n    \"journeyDate\": 1794501000000,\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/bus', [
  'body' => '{
  "booking": {
    "transId": "EXT-BUS-70001",
    "bookingAmount": 1450,
    "bookingDate": 1793614500000,
    "passengers": [
      {
        "name": "Rahul Sharma",
        "email": "rahul.sharma@acme.com"
      }
    ],
    "pnr": "BUS7788123",
    "operatorName": "KSRTC",
    "departureCity": "Bengaluru",
    "arrivalCity": "Chennai",
    "journeyDate": 1794501000000,
    "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/bus");
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-BUS-70001\",\n    \"bookingAmount\": 1450,\n    \"bookingDate\": 1793614500000,\n    \"passengers\": [\n      {\n        \"name\": \"Rahul Sharma\",\n        \"email\": \"rahul.sharma@acme.com\"\n      }\n    ],\n    \"pnr\": \"BUS7788123\",\n    \"operatorName\": \"KSRTC\",\n    \"departureCity\": \"Bengaluru\",\n    \"arrivalCity\": \"Chennai\",\n    \"journeyDate\": 1794501000000,\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-BUS-70001",
    "bookingAmount": 1450,
    "bookingDate": 1793614500000,
    "passengers": [
      [
        "name": "Rahul Sharma",
        "email": "rahul.sharma@acme.com"
      ]
    ],
    "pnr": "BUS7788123",
    "operatorName": "KSRTC",
    "departureCity": "Bengaluru",
    "arrivalCity": "Chennai",
    "journeyDate": 1794501000000,
    "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/bus")! 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()
```