# Bus Block Ticket

## &#x20;Bus Block Ticket

<mark style="color:green;">`POST`</mark> `https://traveloapi.com/yourapi/bus/block_ticket`&#x20;

#### Path Parameters

| Name   | Type   | Description                                               |
| ------ | ------ | --------------------------------------------------------- |
| gatkey | string | gatkey (provided by traveloapi) **Pass gatkey with url**. |

#### Query Parameters

| Name                  | Type   | Description                                                                                                                                                                                                   |
| --------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| APIBlockTicketRequest | string |                                                                                                                                                                                                               |
| sourceCity            | string | Name of the source city                                                                                                                                                                                       |
| destinationCity       | string | Name of the destination city                                                                                                                                                                                  |
| inventoryType         | string | InventoryType value                                                                                                                                                                                           |
| routeScheduleId       | string | routeScheduleId value                                                                                                                                                                                         |
| customerName          | string | Name of the person who book the ticket                                                                                                                                                                        |
| customerLastName      | string | Last Name of the person who book the ticket                                                                                                                                                                   |
| customerEmail         | string | Email id of the person who book the ticket                                                                                                                                                                    |
| doj                   | string | Date of Journey in the yyyy-mm-dd format                                                                                                                                                                      |
| boardingPoint         | array  | It consists of id, location, time                                                                                                                                                                             |
| id                    | string | Boarding point id                                                                                                                                                                                             |
| location              | string | Boarding point location                                                                                                                                                                                       |
| Time                  | string | Boarding point dispatcher time                                                                                                                                                                                |
| customerPhone         | string | Mobile number of the person who book the ticket                                                                                                                                                               |
| emergencyPhNumber     | string | Emergency mobile number                                                                                                                                                                                       |
| CustomerAddress       | string | Address of the person who book the ticket                                                                                                                                                                     |
| blockSeatPaxDetails   | array  | List of BlockSeatPaxDetails member variables. It Consists of age, name, seatNbr, sex, fare, totalFareWithTaxes, ladiesSeat, lastName, mobile, title, email, idType, idNumber, nameOnId, primary, ac, sleeper. |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
| dd                    | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
| dd                    | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |
|                       | string |                                                                                                                                                                                                               |

{% tabs %}
{% tab title="200 " %}

```javascript
{

   "blockTicketKey":"TRVALOS0S2833565",

   "inventoryType":0,

   "apiStatus":{

      "message":"SUCCESS",

      "success":true

   }

}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
    "message": "error"
}
```

{% endtab %}
{% endtabs %}

### EXAMPLE REQUEST :

```php
{

  "sourceCity": "Hyderabad",

  "destinationCity": "Bangalore",

  "doj": "2014-04-11",

  "routeScheduleId": "6310",

  "boardingPoint": {

    "id": "6",

    "location": "Ameerpet,|Jeans Corner",

    "time": "09:00PM"

  },

  "customerName": "test",

  "customerLastName": "testing",

  "customerEmail": "test@gmail.com",

  "customerPhone": "9999999999",

  "emergencyPhNumber": "8888888888",

  "customerAddress": "kphp",

  "blockSeatPaxDetails": [

    {

      "age": "26",

      "name": "test123",

      "seatNbr": "R9",

      "sex": "M",

      "fare": 425,

      "totalFareWithTaxes": 456,

      "ladiesSeat": false,

      "lastName": "test456",

      "mobile": "7777777777",

      "title": "Mr",

      "email": "testing@gmail.com",

      "idType": "PAN",

      "idNumber": "AWk123232",

      "nameOnId": "test",

      "primary": true,

      "ac": false,

      "sleeper": false

    }

    

  ],

  "inventoryType": 0

}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://traveloapi.gitbook.io/api/bus-api/untitled-4.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
