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