> For the complete documentation index, see [llms.txt](https://developers.airship.co.uk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.airship.co.uk/basics/bookings/booking-search-by-reference.md).

# Booking Search by reference

### Overview

Airship allows partners to query bookings on certain fields. If a booking reference is provided when the data is passed to Airship, then the `/bookings` endpoint can be used to search for that booking, and return key information about it.&#x20;

### Endpoint

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

```
https://api.airship.co.uk/v1/bookings?account_id={account_id}&booking_reference={your_ref}
```

{% endtab %}
{% endtabs %}

### Configuration

#### Path Parameters

| Field               | Notes                                                                                                                                                                                 |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account_id`        | The account ID represents the account that you are searching bookings in. If you are unsure of what your account ID is, ask our support team to confirm.                              |
| `booking_reference` | The booking reference is the reference you have previously provided against the booking. Note, this must have been provided in the booking\_reference field when creating the booking |

#### Headers

| Field                           | Notes                                                                                                                                                                          |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Authentication` (bearer token) | The authentication token is linked to the account that you are searching bookings in. If you are unsure of what your Authentication token is, ask our support team to confirm. |

### Basic booking search payload

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

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "booking_contact_id": "87534364",
    "booking_reference": "test-booook1",
    "id": 44922318,
    "account_id": "806",
    "contact_id": "87534364",
    "unit_id": "13835",
    "stage_value": "69",
    "type_id": "51",
    "datetime": "2021-04-27 20:30:00",
    "source_id": "6",
    "party_datetime": "2022-07-20 20:30:00",
    "party_size": "10",
    "deposit_paid": "501.00",
    "hpbr_food": "0.00",
    "hpbr_drink": "0.00",
    "hpbr_entertainment": "0.00",
    "updated_at": "2021-04-27 20:30:00"
}
</code></pre>

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://developers.airship.co.uk/basics/bookings/booking-search-by-reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
