> For the complete documentation index, see [llms.txt](https://developer.ivvy.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.ivvy.com/venues/getoraddbookingdata/get-booking-document-version-list.md).

# Get Booking Document Version List

<mark style="color:green;">`POST`</mark> `[PlatformAddress]/api/1.0/venue?action=getBookingDocumentList`

Retrieve a list of documents associated with a specific booking.

#### Request Body

| Name           | Type    | Description                                                       |
| -------------- | ------- | ----------------------------------------------------------------- |
| venueId        | integer | The unique ID of the venue to which the booking belongs.          |
| bookingId      | integer | The unique ID of the booking whose documents are to be retrieved. |
| onlyGenerated  | boolean | Whether to fetch only generated documents.                        |
| documentNumber | integer | The document number of the booking document(s) to be retrieved.   |
| start          | integer | The starting index for pagination (zero-based).                   |
| perPage        | integer | The number of documents to retrieve per page.                     |

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

```javascript
{
    "meta": {
        "totalResults": 2,
        "start": 0,
        "perPage": 100,
        "count": 2
    },
    "results": [
        {
            "id": 3426,
            "venueId": 1,
            "bookingId": 22363,
            "type": 3,
            "documentNumber": 20,
            "version": 1,
            "file": {
                "url": "https://someurl/with/expiry",
                "urlExpiry": "2025-05-06 04:10:54 UTC",
                "filename": "25/12/2024 - Test - Peppers Soul Surfers Paradise Tax Exclusive - Accom Extra.pdf"
            },
            "templateName": null,
            "status": 4,
            "createdDate": "2025-04-09 02:34:21 UTC",
            "modifiedDate": "2025-04-09 02:38:36 UTC"
        },
        {
            "id": 3428,
            "venueId": 1,
            "bookingId": 22363,
            "type": 4,
            "documentNumber": 20,
            "version": 2,
            "file": {
                "url": "https://someurl/with/expiry2",
                "urlExpiry": "2025-05-06 04:10:54 UTC",
                "filename": "25/12/2024 - eashik - Peppers Soul Surfers Paradise Tax Exclusive - Accom Extra.pdf"
            },
            "templateName": null,
            "status": 4,
            "createdDate": "2025-04-09 02:50:39 UTC",
            "modifiedDate": "2025-04-09 02:57:45 UTC"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

### Example Request

```javascript
{
  "venueId": 1,
  "bookingId": 22363,
  "onlyGenerated": true,
  "documentNumber": 20
}
```

The result from this call will be a [collection](/getting-started/interpreting-the-response/collections.md) of booking room reservation records the user has access to. This call also accepts the [pagination](/getting-started/interpreting-the-response/pagination.md) and [filter](/getting-started/interpreting-the-response/filtering.md) properties.

### Booking Document

| Property     | Type     | Description                                                                                                                   |
| ------------ | -------- | ----------------------------------------------------------------------------------------------------------------------------- |
| id           | integer  | The unique ID of the document.                                                                                                |
| venueId      | integer  | The unique ID of the venue associated with the document.                                                                      |
| bookingId    | integer  | The unique ID of the booking associated with the document.                                                                    |
| type         | integer  | The type of document. See [Type](/venues/getoraddbookingdata/get-booking-document-list.md#type)                               |
| templateName | string   | The name of the template used to generate the document.                                                                       |
| status       | integer  | The status of the document. See [Status](/venues/getoraddbookingdata/get-booking-document-list.md#status)                     |
| createdDate  | datetime | The date and time when the document was created (UTC).                                                                        |
| modifiedDate | datetime | The date and time when the document was last modified (UTC).                                                                  |
| file         | object   | The file details (can be `null` if no file exists). see [File](/venues/getoraddbookingdata/get-booking-document-list.md#file) |

### File

| Property  | Type     | Description                                                                         |
| --------- | -------- | ----------------------------------------------------------------------------------- |
| url       | string   | The pre-signed URL where the document file can be accessed (if available).          |
| urlExpiry | datetime | The expiry time of the pre-signed URL.                                              |
| filename  | string   | The display name of the file, typically including the template and context details. |

### Type

| Type | Description                                       |
| ---- | ------------------------------------------------- |
| 1    | Quote created by the system                       |
| 2    | Contract created by the system                    |
| 3    | Quote uploaded by users                           |
| 4    | Contract uploaded by users                        |
| 5    | Other types of documents                          |
| 6    | Banquet Event Order (BEO) generated by the system |
| 7    | Resume                                            |
| 8    | Banquet Check                                     |

### Status

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 1      | Building (Document is in the building stage)          |
| 2      | Building Error (Error during document building)       |
| 3      | Draft (Document is still in draft form)               |
| 4      | Generated (Document's HTML is generated, PDF pending) |
| 5      | Sent (Document has been sent to the relevant party)   |
| 8      | Completed (Document has been completed)               |


---

# 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://developer.ivvy.com/venues/getoraddbookingdata/get-booking-document-version-list.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.
