# Book Bus

This API allows the customers to book the seat for the available buses.

## Book a bus&#x20;

<mark style="color:green;">`POST`</mark> `/np/bus/book`

**Headers**

| Name         | Value              |
| ------------ | ------------------ |
| Content-Type | `application/json` |
| Accept       | `application/json` |
| x-auth-token | `<token>`          |

**Body**

| Name               | Type  | Description                                          |
| ------------------ | ----- | ---------------------------------------------------- |
| `operator_type_id` | int   | The type of operator for the bus route               |
| `operator_id`      | int   | The ID of the operator for the bus route             |
| `bus_id`           | int   | The ID of bus                                        |
| `seats`            | array | An array of seat numbers to be booked.               |
| `reference_no`     | int   | A unique 6 digit reference number for the bus search |

**Response**

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

```json
{
    "error": false,
    "message": "Bus booked successfully",
    "data": {
        "boarding_point":"An array of boarding points with time"
        "ticket_serial_no": "The serial number of the ticket"
    }
}
```

{% endtab %}

{% tab title="4XX/5XX" %}

```json
{
    "error": true,
    "message": "Description for the error",
}
```

{% endtab %}
{% endtabs %}


---

# 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://docs.globaltopup.in/nepal-recharge/bus-booking/book-bus.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.
