> For the complete documentation index, see [llms.txt](https://docs.zaui.com/octo/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zaui.com/octo/basic-workflow/booking.md).

# Booking

When making a reservation for availability this is performed in 2 steps:

1. **Check Availability**:  Check for availability using the [POST /availability](/octo/basic-workflow/availability.md) endpoint to retrieve the `availabilityId`.
2. **Booking Reservation**:  Create the booking which reserves that availability.  The booking will keep the status `ON_HOLD` until the booking is confirmed or the reservation `expirationMinutes` expires.  A reservation can be extended by calling the POST /bookings/:uuid/extend endpoint.

We have described the possible Booking calls here:&#x20;

1. **Booking Endpoints**
   1. **Reserve** - stage 1 reserves the availability by providing the `availabilityId`.  The Availability ID comes from checking inventory.
   2. **Confirm -** stage 2 finalizes the booking.  You will store the `supplierReferenceNumber`.
   3. **Cancel (Optional)** - allows cancelling a confirmed booking.
   4. **Update (Optional)** - allows updating of an existing booking.
   5. **Extend (Optional)** - allows extending the `expirationMinutes` or hold time.
2. **Access to Existing Bookings**
   1. **Get Booking** - this end point will retrieve a single valid booking associated with your reseller account
   2. **List Bookings** - this end point will retrieve a list of bookings associated with your reseller account

## Bookings - Reserve

<mark style="color:green;">`POST`</mark> `https://api.zaui.io/octo/bookings`

This endpoint reserves the availability for a product and creates a pending booking.

#### Request Body

| Name                                                  | Type        | Description                                                                                           |
| ----------------------------------------------------- | ----------- | ----------------------------------------------------------------------------------------------------- |
| notes                                                 | string      | Notes to be passed to the supplier                                                                    |
| productId<mark style="color:red;">\*</mark>           | string/uuid | The product ID being booked                                                                           |
| optionId<mark style="color:red;">\*</mark>            | string      | The option ID                                                                                         |
| availabilityId<mark style="color:red;">\*</mark>      | string      | The availability ID provided by checking availability                                                 |
| unitItems<mark style="color:red;">\*</mark>           | array       | An array of units items                                                                               |
| unitItems\[].unitId<mark style="color:red;">\*</mark> | string/uuid | The unit ID for the item                                                                              |
| expirationMinutes                                     | integer     | Number of minutes to reserve the availability otherwise will default to the supplier's default amount |
| unitItems\[].uuid                                     | string/uuid | A UUID you can set when generating the booking to use as an idempotency key.                          |
| uuid                                                  | string/uuid | A UUID you can set when generating the booking to use as an idempotency key.                          |

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

```javascript
{
    "id": "e9f0e272-a966-4f74-bea2-c290218d4f83",
    "uuid": "e9f0e272-a966-4f74-bea2-c290218d4f83",
    "testMode": true,
    "supplierReference": "14XY29Z",
    "status": "ON_HOLD",
    "resellerReference": null,
    "utcCreatedAt": "2021-04-10T09:00:52-07:00",
    "utcUpdatedAt": "2021-04-10T09:00:52-07:00",
    "utcExpiresAt": "2021-04-10T09:05:52-07:00",
    "utcRedeemedAt": null,
    "utcConfirmedAt": null,
    "productId": "846c36a4-8cb7-4abb-afff-944be62aa312",
    "product": {
        "id": "846c36a4-8cb7-4abb-afff-944be62aa312",
        "internalName": "Wilderness Tour",
        "reference": null,
        "locale": "en", 
        "timeZone": "America/Vancouver",
        "allowFreesale": false,
        "instantConfirmation": true,
        "instantDelivery": true,
        "availabilityRequired": true,
        "availabilityType": "OPENING_HOURS",
        "deliveryFormats": [
            "PDF_URL",
            "QRCODE"
        ],
        "deliveryMethods": [
            "TICKET",
            "VOUCHER"
        ],
        "redemptionMethod": "DIGITAL",
        "options": [
            {
                "id": "DEFAULT",
                "default": true,
                "internalName": "Standard Tour 10:00",
                "reference": null,
                "availabilityLocalStartTimes": [
                    "10:00"
                ],
                "cancellationCutoff": "24 hours",
                "cancellationCutoffAmount": 24,
                "cancellationCutoffUnit": "hour",
                "requiredContactFields": [],
                "restrictions": {
                    "minUnits": 0,
                    "maxUnits": null
                },
                "units": [
                    {
                        "id": "adults_0e064227-c793-426b-857c-2d1fcba62582",
                        "internalName": "adult", 
                        "reference": "adult",
                        "type": "ADULT",
                        "requiredContactFields": [],
                        "restrictions": {
                            "minAge": 18,
                            "maxAge": 100,
                            "idRequired": false,
                            "minQuantity": null,
                            "maxQuantity": null,
                            "paxCount": 1,
                            "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                        }
                    }
                ]
            }
        ]
    },
    "optionId": "DEFAULT",
    "option": {
        "id": "DEFAULT",
        "default": true,
        "internalName": "Standard Tour 10:00",
        "reference": null,
        "availabilityLocalStartTimes": [
            "10:00"
        ],
        "cancellationCutoff": "24 hours",
        "cancellationCutoffAmount": 24,
        "cancellationCutoffUnit": "hour",
        "requiredContactFields": [],
        "restrictions": {
            "minUnits": 0,
            "maxUnits": null
        },
        "units": [
            {
                "id": "adults_0e064227-c793-426b-857c-2d1fcba62582",
                "internalName": "adult", 
                "reference": "adult",
                "type": "ADULT",
                "requiredContactFields": [],
                "restrictions": {
                    "minAge": 18,
                    "maxAge": 100,
                    "idRequired": false,
                    "minQuantity": null,
                    "maxQuantity": null,
                    "paxCount": 1,
                    "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582"]
                }
            }
        ]
    },
    "cancellable": true,
    "cancellation": null, 
    "freesale": false,
    "availabilityId": "2021-07-05T10:00:00-07:00",
    "availability": {
        "id": "2021-07-05T10:00:00-07:00",
        "localDateTimeStart": "2021-07-05T10:00:00-07:00",
        "localDateTimeEnd": "",
        "allDay": true,
        "openingHours": [
            {
                "from": "10:00",
                "to": "17:00",
            }
        ]
    },
    "contact": {
        "fullName": "Chris Smith",
        "firstName": "Chris",
        "lastName": "Smith",
        "emailAddress": "zaui@test.com",
        "phoneNumber": "+1 604 404 3841",
        "locales": [],
        "country": null,
        "notes": null
    },
    "notes": null,
    "deliveryMethods": "VOUCHER",
    "voucher": {
        "redemptionMethod": "DIGITAL",
        "deliveryOptions": [
            {
                "deliveryFormat": "QRCODE",
                "deliveryValue": "%^5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb^58902_A2829|2022-04-30|10:00:00|^%"
            }
        ],
        "utcRedeemedAt": null
    },
    "unitItems": [
        {
            "uuid": "cfd3968e-b820-4c47-b8da-7912d65eac03",
            "unitId": "adults_0e064227-c793-426b-857c-2d1fcba62582",
            "resellerReference": null,
            "supplierReference": null,
            "unit": {
                "id": "adults_0e064227-c793-426b-857c-2d1fcba62582", 
                "internalName": "adult",
                "reference": "adult",
                "type": "ADULT",
                "requiredContactFields": [],
                "restrictions": {
                    "minAge": 18,
                    "maxAge": 100, 
                    "idRequired": false,
                    "minQuantity": null,
                    "maxQuantity": null,
                    "paxCount": 1,
                    "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                }
            },
            "status": "ON_HOLD",
            "utcRedeemedAt": null,
            "contact": {
                "fullName": "Chris Smith",
                "firstName": "Chris",
                "lastName": "Smith",
                "emailAddress": "zaui@test.com",
                "phoneNumber": null,
                "locales": [],
                "country": null,
                "notes": null
            },
            "ticket": {
                "deliveryOptions": [
                    {
                        "deliveryFormat": "QRCODE",
                        "deliveryValue": "%^5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb^58902_A2829|2022-04-30|10:00:00|^%"
                    }
                ],
                "redemptionMethod": "DIGITAL",
                "utcRedeemedAt": null
            }
        }
    ]
}
```

{% endtab %}
{% endtabs %}

#### Example Request:

```javascript
{
  "productId": "846c36a4-8cb7-4abb-afff-944be62aa312",
  "optionId": "DEFAULT",
  "availabilityId": "2021-07-05T10:00:00-07:00",
  "expirationMinutes": 10,
  "notes": "Optional notes that can be passed to the supplier system",
  "unitItems": [
    { "unitId": "adults_0e064227-c793-426b-857c-2d1fcba62582" }
  ]
}
```

## Bookings - Confirm

<mark style="color:green;">`POST`</mark> `https://api.zaui.io/octo/bookings/{id}/confirm`

This endpoint confirms the reserved availability and the booking is finalized.

#### Path Parameters

| Name                                 | Type        | Description    |
| ------------------------------------ | ----------- | -------------- |
| id<mark style="color:red;">\*</mark> | string/uuid | The booking ID |

#### Request Body

| Name                                                | Type        | Description                                                                                                                                         |
| --------------------------------------------------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| resellerReference<mark style="color:red;">\*</mark> | string      | Your reference number for this booking - Voucher Number                                                                                             |
| contact<mark style="color:red;">\*</mark>           | object      | Guest information                                                                                                                                   |
| contact.fullName                                    | string      | Guest first and last name.                                                                                                                          |
| contact.emailAddress                                | string      | Guest email address                                                                                                                                 |
| contact.phoneNumber                                 | string      | Guest's phone number                                                                                                                                |
| contact.country                                     | string      | The guests country code                                                                                                                             |
| emailConfirmation                                   | boolean     | Indicate if the booking confirmation and tickets are to be sent to the guest's email from the supplier.  `Default: false`                           |
| contact.firstName                                   | string      | The first name of the booking holder.                                                                                                               |
| contact.lastName                                    | string      | The last name of the booking holder.                                                                                                                |
| contact.postalCode                                  | string      |                                                                                                                                                     |
| contact.locales                                     | array       |                                                                                                                                                     |
| contact.notes                                       | string      | Optional notes for the booking holder.                                                                                                              |
| unitItems                                           | array       | An array of unit items that will be included in the booking. This allows you to provide contact details or a reseller reference for each unit item. |
| unitItems.uuid                                      | string/uuid |                                                                                                                                                     |
| unitItems.unitId<mark style="color:red;">\*</mark>  | string/uuid | Required if unitItems is passed into request                                                                                                        |
| unitItems.resellerReference                         | String      |                                                                                                                                                     |
| unitItems.contact                                   | object      | Same properties as above.                                                                                                                           |

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

```javascript
{
    "id": "e9f0e272-a966-4f74-bea2-c290218d4f83",
    "uuid": "e9f0e272-a966-4f74-bea2-c290218d4f83",
    "testMode": true,
    "supplierReference": "X4CJGE6",
    "status": "CONFIRMED",
    "resellerReference": null,
    "utcCreatedAt": "2021-04-10T09:00:52-07:00",
    "utcUpdatedAt": "2021-04-10T09:00:52-07:00",
    "utcExpiresAt": "2021-04-10T09:05:52-07:00",
    "utcRedeemedAt": null,
    "utcConfirmedAt": null,
    "productId": "846c36a4-8cb7-4abb-afff-944be62aa312",
    "product": {
        "id": "846c36a4-8cb7-4abb-afff-944be62aa312",
        "internalName": "Wilderness Tour",
        "reference": null,
        "locale": "en", 
        "timeZone": "America/Vancouver",
        "allowFreesale": false,
        "instantConfirmation": true,
        "instantDelivery": true,
        "availabilityRequired": true,
        "availabilityType": "OPENING_HOURS",
        "deliveryFormats": [
            "PDF_URL",
            "QRCODE"
        ],
        "deliveryMethods": [
            "TICKET",
            "VOUCHER"
        ],
        "redemptionMethod": "DIGITAL",
        "options": [
            {
                "id": "DEFAULT",
                "default": true,
                "internalName": "Standard Tour 10:00",
                "reference": null,
                "availabilityLocalStartTimes": [
                    "10:00"
                ],
                "cancellationCutoff": "24 hours",
                "cancellationCutoffAmount": 24,
                "cancellationCutoffUnit": "hour",
                "requiredContactFields": [],
                "restrictions": {
                    "minUnits": 0,
                    "maxUnits": null
                },
                "units": [
                    {
                        "id": "adults_0e064227-c793-426b-857c-2d1fcba6258",
                        "internalName": "adult", 
                        "reference": "adult",
                        "type": "ADULT",
                        "requiredContactFields": [],
                        "restrictions": {
                            "minAge": 18,
                            "maxAge": 100,
                            "idRequired": false,
                            "minQuantity": null,
                            "maxQuantity": null,
                            "paxCount": 1,
                            "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba6258" ]
                        }
                    }
                ]
            }
        ]
    },
    "optionId": "DEFAULT",
    "option": {
        "id": "DEFAULT",
        "default": true,
        "internalName": "Standard Tour 10:00",
        "reference": null,
        "availabilityLocalStartTimes": [
            "10:00"
        ],
        "cancellationCutoff": "24 hours",
        "cancellationCutoffAmount": 24,
        "cancellationCutoffUnit": "hour",
        "requiredContactFields": [],
        "restrictions": {
            "minUnits": 0,
            "maxUnits": null
        },
        "units": [
            {
                "id": "adults_0e064227-c793-426b-857c-2d1fcba6258",
                "internalName": "adult", 
                "reference": "adult",
                "type": "ADULT",
                "requiredContactFields": [],
                "restrictions": {
                    "minAge": 18,
                    "maxAge": 100,
                    "idRequired": false,
                    "minQuantity": null,
                    "maxQuantity": null,
                    "paxCount": 1,
                    "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba6258" ]
                }
            }
        ]
    },
    "cancellable": true,
    "cancellation": null, 
    "freesale": false,
    "availabilityId": "2021-07-05T10:00:00-07:00", 
    "availability": {
        "id": "2021-07-05T10:00:00-07:00",
        "localDateTimeStart": "2021-07-05T10:00:00-07:00",
        "localDateTimeEnd": "",
        "allDay": true,
        "openingHours": [
            {
                "from": "10:00",
                "to": "17:00",
            }
        ]
    },
    "contact": {
        "fullName": null,
        "firstName": null,
        "lastName": null,
        "emailAddress": null,
        "phoneNumber": null,
        "locales": [],
        "country": null,
        "notes": null
    },
    "notes": null,
    "deliveryMethods": "VOUCHER",
    "voucher": {
            "redemptionMethod": "DIGITAL",
            "deliveryOptions": [
                {
                    "deliveryFormat": "QRCODE",
                    "deliveryValue": "%^5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb^58902_A2829|2022-04-30|10:00:00|^%"
                }
            ],
            "utcRedeemedAt": null
    },
    "unitItems": [
        {
            "uuid": "cfd3968e-b820-4c47-b8da-7912d65eac03",
            "unitId": "adults_0e064227-c793-426b-857c-2d1fcba6258",
            "resellerReference": null,
            "supplierReference": "",
            "unit": {
                "id": "adults_0e064227-c793-426b-857c-2d1fcba6258", 
                "internalName": "adult",
                "reference": "adult",
                "type": "ADULT",
                "requiredContactFields": [],
                "restrictions": {
                    "minAge": 18,
                    "maxAge": 100, 
                    "idRequired": false,
                    "minQuantity": null,
                    "maxQuantity": null,
                    "paxCount": 1,
                    "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba6258" ]
                }
            },
            "status": "CONFIRMED",
            "utcRedeemedAt": null,
            "contact": {
                "fullName": null,
                "firstName": null,
                "lastName": null,
                "emailAddress": null,
                "phoneNumber": null,
                "locales": [],
                "country": null,
                "notes": null
            },
            "ticket": {
                "deliveryOptions": [
                    {
                        "deliveryFormat": "QRCODE",
                        "deliveryValue": "%^5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb^58902_A2829|2022-04-30|10:00:00|^%"
                    }
                ],
                "redemptionMethod": "DIGITAL",
                "utcRedeemedAt": null
            }
        }
    ]   
}
```

{% endtab %}
{% endtabs %}

#### Example Request:

```javascript
{
  "resellerReference": "VOUCHER-0123",
  "contact": {
    "fullName": "Muddy Waters",
    "emailAddress": "info@zaui.com",
    "phoneNumber": "+1604-566-9284",
    "locales": ["en-GB", "en-US", "en"],
    "country": "CA"
  }
}
```

## Bookings - Cancel

<mark style="color:red;">`DELETE`</mark> `https://api.zaui.io/octo/bookings/{uuid}/cancel`

This endpoint will cancel a booking confirmed in the supplier system or release availability placed on hold.

#### Path Parameters

| Name                                   | Type        | Description    |
| -------------------------------------- | ----------- | -------------- |
| uuid<mark style="color:red;">\*</mark> | string/uuid | The booking ID |

#### Request Body

| Name   | Type   | Description                       |
| ------ | ------ | --------------------------------- |
| reason | string | Reason for cancelling the booking |

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

```javascript
{
    "id": "e9f0e272-a966-4f74-bea2-c290218d4f83",
    "uuid": "e9f0e272-a966-4f74-bea2-c290218d4f83",
    "testMode": true,
    "supplierReference": "X4CJGE6",
    "status": "CANCELLED",
    "resellerReference": null,
    "utcCreatedAt": "2021-04-10T09:00:52-07:00",
    "utcUpdatedAt": "2021-04-10T09:00:52-07:00",
    "utcExpiresAt": null,
    "utcRedeemedAt": null,
    "utcConfirmedAt": null,
    "productId": "846c36a4-8cb7-4abb-afff-944be62aa312",
    "product": {
        "id": "846c36a4-8cb7-4abb-afff-944be62aa312",
        "internalName": "Wilderness Tour",
        "reference": null,
        "locale": "en", 
        "timeZone": "America/Vancouver",
        "allowFreesale": false,
        "instantConfirmation": true,
        "instantDelivery": true,
        "availabilityRequired": true,
        "availabilityType": "OPENING_HOURS",
        "deliveryFormats": [
            "PDF_URL",
            "QRCODE"
        ],
        "deliveryMethods": [
            "TICKET",
            "VOUCHER"
        ],
        "redemptionMethod": "DIGITAL",
        "options": [
            {
                "id": "DEFAULT",
                "default": true,
                "internalName": "Stanard Tour 10:00",
                "reference": null,
                "availabilityLocalStartTimes": [
                    "10:00"
                ],
                "cancellationCutoff": "24 hours",
                "cancellationCutoffAmount": 24,
                "cancellationCutoffUnit": "hour",
                "requiredContactFields": [],
                "restrictions": {
                    "minUnits": 0,
                    "maxUnits": null
                },
                "units": [
                    {
                        "id": "adults_0e064227-c793-426b-857c-2d1fcba62582",
                        "internalName": "adult", 
                        "reference": "adult",
                        "type": "ADULT",
                        "requiredContactFields": [],
                        "restrictions": {
                            "minAge": 18,
                            "maxAge": 100,
                            "idRequired": false,
                            "minQuantity": null,
                            "maxQuantity": null,
                            "paxCount": 1,
                            "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                        }
                    }
                ]
            }
        ]
    },
    "optionId": "DEFAULT",
    "option": {
        "id": "DEFAULT",
        "default": true,
        "internalName": "Stanard Tour 10:00",
        "reference": null,
        "availabilityLocalStartTimes": [
            "10:00"
        ],
        "cancellationCutoff": "24 hours",
        "cancellationCutoffAmount": 24,
        "cancellationCutoffUnit": "hour",
        "requiredContactFields": [],
        "restrictions": {
            "minUnits": 0,
            "maxUnits": null
        },
        "units": [
            {
                "id": "adults_0e064227-c793-426b-857c-2d1fcba62582",
                "internalName": "adult", 
                "reference": "adult",
                "type": "ADULT",
                "requiredContactFields": [],
                "restrictions": {
                    "minAge": 18,
                    "maxAge": 100,
                    "idRequired": false,
                    "minQuantity": null,
                    "maxQuantity": null,
                    "paxCount": 1,
                    "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                }
            }
        ]
    },
    "cancellable": true,
    "cancellation": {
        "refund": "FULL",
        "reason": "Guest sickness",
        "utcCancelledAt": "2021-04-10T09:00:52-07:00"
    }, 
    "freesale": false,
    "availabilityId": "2021-07-05T10:00:00-07:00", 
    "availability": {
        "id": "2021-07-05T10:00:00-07:00",
        "localDateTimeStart": "2021-07-05T10:00:00-07:00",
        "localDateTimeEnd": "",
        "allDay": true,
        "openingHours": [
            {
                "from": "10:00",
                "to": "17:00",
            }
        ]
    },
    "contact": {
        "fullName": null,
        "firstName": null,
        "lastName": null,
        "emailAddress": null,
        "phoneNumber": null,
        "locales": [],
        "country": null,
        "notes": null
    },
    "notes": null,
    "deliveryMethods": "VOUCHER",
    "voucher": {
            "redemptionMethod": "DIGITAL",
            "deliveryOptions": [
                {
                    "deliveryFormat": "QRCODE",
                    "deliveryValue": ""
                }
            ],
            "utcRedeemedAt": null
    },
    "unitItems": [
        {
            "uuid": "83af6d2c-1c35-4728-ac03-3418a75c5579",
            "unitId": "adults_0e064227-c793-426b-857c-2d1fcba62582",
            "resellerReference": null,
            "supplierReference": "",
            "unit": {
                "id": "adults_0e064227-c793-426b-857c-2d1fcba62582", 
                "internalName": "adult",
                "reference": "adult",
                "type": "ADULT",
                "requiredContactFields": [],
                "restrictions": {
                    "minAge": 18,
                    "maxAge": 100, 
                    "idRequired": false,
                    "minQuantity": null,
                    "maxQuantity": null,
                    "paxCount": 1,
                    "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                }
            },
            "status": "CANCELLED",
            "utcRedeemedAt": null,
            "contact": {
                "fullName": null,
                "firstName": null,
                "lastName": null,
                "emailAddress": null,
                "phoneNumber": null,
                "locales": [],
                "country": null,
                "notes": null
            },
            "ticket": {
                "deliveryOptions": [
                    {
                        "deliveryFormat": "QRCODE",
                        "deliveryValue": ""
                    }
                ],
                "redemptionMethod": "DIGITAL",
                "utcRedeemedAt": null
            }
        }
    ]   
}
```

{% endtab %}
{% endtabs %}

#### Example Request:

```javascript
{
  "reason": "CUSTOMER_REQUESTED",
  "reasonDetails": "Child came down with the flu the day before the activity."
}
```

## Bookings - Extend Reservation

<mark style="color:green;">`POST`</mark> `https://api.zaui.io/octo/bookings/{uuid}/extend`

This endpoint will extend the availability hold or `expirationMinutes` if the booking status is `ON_HOLD`.

#### Path Parameters

| Name                                   | Type        | Description    |
| -------------------------------------- | ----------- | -------------- |
| uuid<mark style="color:red;">\*</mark> | string/uuid | The booking ID |

#### Request Body

| Name                                                | Type    | Description                                                                |
| --------------------------------------------------- | ------- | -------------------------------------------------------------------------- |
| expirationMinutes<mark style="color:red;">\*</mark> | Integer | How many minutes from now you want to have the booking hold time extended. |

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

```javascript
{
    "id": "e9f0e272-a966-4f74-bea2-c290218d4f83",
    "uuid": "e9f0e272-a966-4f74-bea2-c290218d4f83 ",
    "testMode": true,
    "supplierReference": "XY7N19VOU3",
    "status": "ON_HOLD",
    "resellerReference": null,
    "utcCreatedAt": "2021-04-10T09:00:52-07:00",
    "utcUpdatedAt": "2021-04-10T09:00:52-07:00",
    "utcExpiresAt": "2021-04-10T09:05:52-07:00",
    "utcRedeemedAt": null,
    "utcConfirmedAt": null,
    "productId": "846c36a4-8cb7-4abb-afff-944be62aa312",
    "product": {
        "id": "846c36a4-8cb7-4abb-afff-944be62aa312",
        "internalName": "Wilderness Tour",
        "reference": null,
        "locale": "en", 
        "timeZone": "America/Vancouver",
        "allowFreesale": false,
        "instantConfirmation": true,
        "instantDelivery": true,
        "availabilityRequired": true,
        "availabilityType": "OPENING_HOURS",
        "deliveryFormats": [
            "PDF_URL",
            "QRCODE"
        ],
        "deliveryMethods": [
            "TICKET",
            "VOUCHER"
        ],
        "redemptionMethod": "DIGITAL",
        "options": [
            {
                "id": "DEFAULT",
                "default": true,
                "internalName": "Stanard Tour 10:00",
                "reference": null,
                "availabilityLocalStartTimes": [
                    "10:00"
                ],
                "cancellationCutoff": "24 hours",
                "cancellationCutoffAmount": 24,
                "cancellationCutoffUnit": "hour",
                "requiredContactFields": [],
                "restrictions": {
                    "minUnits": 0,
                    "maxUnits": null
                },
                "units": [
                    {
                        "id": "adults_0e064227-c793-426b-857c-2d1fcba62582",
                        "internalName": "adult", 
                        "reference": "adult",
                        "type": "ADULT",
                        "requiredContactFields": [],
                        "restrictions": {
                            "minAge": 18,
                            "maxAge": 100,
                            "idRequired": false,
                            "minQuantity": null,
                            "maxQuantity": null,
                            "paxCount": 1,
                            "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                        }
                    }
                ]
            }
        ]
    },
    "optionId": "DEFAULT",
    "option": {
        "id": "DEFAULT",
        "default": true,
        "internalName": "Stanard Tour 10:00",
        "reference": null,
        "availabilityLocalStartTimes": [
            "10:00"
        ],
        "cancellationCutoff": "24 hours",
        "cancellationCutoffAmount": 24,
        "cancellationCutoffUnit": "hour",
        "requiredContactFields": [],
        "restrictions": {
            "minUnits": 0,
            "maxUnits": null
        },
        "units": [
            {
                "id": "adults_0e064227-c793-426b-857c-2d1fcba62582",
                "internalName": "adult", 
                "reference": "adult",
                "type": "ADULT",
                "requiredContactFields": [],
                "restrictions": {
                    "minAge": 18,
                    "maxAge": 100,
                    "idRequired": false,
                    "minQuantity": null,
                    "maxQuantity": null,
                    "paxCount": 1,
                    "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                }
            }
        ]
    },
    "cancellable": true,
    "cancellation": null, 
    "freesale": false,
    "availabilityId": "2021-07-05T10:00:00-07:00", 
    "availability": {
        "id": "2021-07-05T10:00:00-07:00",
        "localDateTimeStart": "2021-07-05T10:00:00-07:00",
        "localDateTimeEnd": "",
        "allDay": true,
        "openingHours": [
            {
                "from": "10:00",
                "to": "17:00",
            }
        ]
    },
    "contact": {
        "fullName": null,
        "firstName": null,
        "lastName": null,
        "emailAddress": null,
        "phoneNumber": null,
        "locales": [],
        "country": null,
        "notes": null
    },
    "notes": null,
    "deliveryMethods": "VOUCHER",
    "voucher": {
            "redemptionMethod": "DIGITAL",
            "deliveryOptions": [
                {
                    "deliveryFormat": "QRCODE",
                    "deliveryValue": "%^5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb^58902_A2829|2022-04-30|10:00:00|^%"
                }
            ],
            "utcRedeemedAt": null
    },
    "unitItems": [
        {
            "uuid": "83af6d2c-1c35-4728-ac03-3418a75c5579",
            "unitId": "adults_0e064227-c793-426b-857c-2d1fcba62582",
            "resellerReference": null,
            "supplierReference": "",
            "unit": {
                "id": "adults_0e064227-c793-426b-857c-2d1fcba62582", 
                "internalName": "adult",
                "reference": "adult",
                "type": "ADULT",
                "requiredContactFields": [],
                "restrictions": {
                    "minAge": 18,
                    "maxAge": 100, 
                    "idRequired": false,
                    "minQuantity": null,
                    "maxQuantity": null,
                    "paxCount": 1,
                    "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                }
            },
            "status": "ON_HOLD",
            "utcRedeemedAt": null,
            "contact": {
                "fullName": null,
                "firstName": null,
                "lastName": null,
                "emailAddress": null,
                "phoneNumber": null,
                "locales": [],
                "country": null,
                "notes": null
            },
            "ticket": {
                "deliveryOptions": [
                   {
                        "deliveryFormat": "QRCODE",
                        "deliveryValue": "%^5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb^58902_A2829|2022-04-30|10:00:00|^%"
                   }
                ],
                "redemptionMethod": "DIGITAL",
                "utcRedeemedAt": null
            }
        }
    ]   
}
```

{% endtab %}
{% endtabs %}

## Booking - Update

<mark style="color:purple;">`PATCH`</mark> `https://api.zaui.io/octo/bookings/{uuid}`

This endpoint allows updating an existing booking.  The request parameters are the same as the [POST /bookings](#bookings-reserve)[ reserve](#bookings-reserve) endpoint.

#### Path Parameters

| Name                                   | Type        | Description    |
| -------------------------------------- | ----------- | -------------- |
| uuid<mark style="color:red;">\*</mark> | string/uuid | The booking ID |

#### Request Body

| Name                              | Type           | Description                                                                                     |
| --------------------------------- | -------------- | ----------------------------------------------------------------------------------------------- |
| resellerReference                 | String         | Your reference for this booking.                                                                |
| productId                         | String         | The product ID                                                                                  |
| optionId                          | String         | The option ID                                                                                   |
| availabilityId                    | String         | The availability ID for the selected timeslot                                                   |
| expirationMinutes                 | string         | How many minutes to reserve the availability, otherwise defaults to the supplier default amount |
| notes                             | String         | Optional notes for the booking                                                                  |
| emailReceipt                      | Boolean        | Whether you want to email the guest a copy of their receipt and tickets                         |
| unitItems                         | Array\[object] |                                                                                                 |
| unitItems\[].uuid                 | String         | A unique UUID to identify the unit item                                                         |
| unitItems\[].unitId               | String         | The unit item unit ID                                                                           |
| unitItems\[].resellerRefrence     | String         | A reference the reseller uses to identify the unit within all bookings                          |
| unitItems\[].contact              | Object         |                                                                                                 |
| unitItems\[].contact.fullName     | String         | The fullname of the ticket holder                                                               |
| unitItems\[].contact.firstName    | String         | The first name of the ticket holder                                                             |
| unitItems\[].contact.lastName     | String         | The last name of the ticket holder                                                              |
| unitItems\[].contact.emailAddress | String         | The email address of the ticket holder                                                          |
| unitItems\[].contact.phoneNumber  | String         | The phone number of the ticket holder                                                           |
| unitItems\[].contact.locales      | Array\[string] | An array of locale values                                                                       |
| unitItems\[].contact.country      | String         | The country of the ticket holder                                                                |
| unitItems\[].contact.notes        | String         | Optional notes for the ticket holder                                                            |
| contact                           | Object         |                                                                                                 |
| contact.fullName                  | String         | The fullname of the booking holder                                                              |
| contact.firstName                 | String         | The first name of the booking holder                                                            |
| contact.lastName                  | String         | The last name of the booking holder                                                             |
| contact.emailAddress              | String         | The email address of the booking holder                                                         |
| contact.phoneNumber               | String         | The phone number of the booking holder                                                          |
| contact.locales                   | Array\[string] | An array of locale values                                                                       |
| contact.country                   | String         | The country of the booking holder                                                               |
| contact.notes                     | String         | Optional notes for the booking holder                                                           |

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

```javascript
{
    "id": "e9f0e272-a966-4f74-bea2-c290218d4f83",
    "uuid": "e9f0e272-a966-4f74-bea2-c290218d4f83 ",
    "testMode": true,
    "supplierReference": "XYN887FS",
    "status": "ON_HOLD",
    "resellerReference": null,
    "utcCreatedAt": "2021-04-10T09:00:52-07:00",
    "utcUpdatedAt": "2021-04-10T09:00:52-07:00",
    "utcExpiresAt": "2021-04-10T09:05:52-07:00",
    "utcRedeemedAt": null,
    "utcConfirmedAt": null,
    "productId": "846c36a4-8cb7-4abb-afff-944be62aa312",
    "product": {
        "id": "846c36a4-8cb7-4abb-afff-944be62aa312",
        "internalName": "Wilderness Tour",
        "reference": null,
        "locale": "en", 
        "timeZone": "America/Vancouver",
        "allowFreesale": false,
        "instantConfirmation": true,
        "instantDelivery": true,
        "availabilityRequired": true,
        "availabilityType": "OPENING_HOURS",
        "deliveryFormats": [
            "PDF_URL",
            "QRCODE"
        ],
        "deliveryMethods": [
            "TICKET",
            "VOUCHER"
        ],
        "redemptionMethod": "DIGITAL",
        "options": [
            {
                "id": "DEFAULT",
                "default": true,
                "internalName": "Stanard Tour 10:00",
                "reference": null,
                "availabilityLocalStartTimes": [
                    "10:00"
                ],
                "cancellationCutoff": "24 hours",
                "cancellationCutoffAmount": 24,
                "cancellationCutoffUnit": "hour",
                "requiredContactFields": [],
                "restrictions": {
                    "minUnits": 0,
                    "maxUnits": null
                },
                "units": [
                    {
                        "id": "adults_0e064227-c793-426b-857c-2d1fcba62582",
                        "internalName": "adult", 
                        "reference": "adult",
                        "type": "ADULT",
                        "requiredContactFields": [],
                        "restrictions": {
                            "minAge": 18,
                            "maxAge": 100,
                            "idRequired": false,
                            "minQuantity": null,
                            "maxQuantity": null,
                            "paxCount": 1,
                            "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                        }
                    }
                ]
            }
        ]
    },
    "optionId": "DEFAULT",
    "option": {
        "id": "DEFAULT",
        "default": true,
        "internalName": "Stanard Tour 10:00",
        "reference": null,
        "availabilityLocalStartTimes": [
            "10:00"
        ],
        "cancellationCutoff": "24 hours",
        "cancellationCutoffAmount": 24,
        "cancellationCutoffUnit": "hour",
        "requiredContactFields": [],
        "restrictions": {
            "minUnits": 0,
            "maxUnits": null
        },
        "units": [
            {
                "id": "adults_0e064227-c793-426b-857c-2d1fcba62582",
                "internalName": "adult", 
                "reference": "adult",
                "type": "ADULT",
                "requiredContactFields": [],
                "restrictions": {
                    "minAge": 18,
                    "maxAge": 100,
                    "idRequired": false,
                    "minQuantity": null,
                    "maxQuantity": null,
                    "paxCount": 1,
                    "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                }
            }
        ]
    },
    "cancellable": true,
    "cancellation": {
        "refund": "FULL",
        "reason": "Guest sickness",
        "utcCancelledAt": ""
    }, 
    "freesale": false,
    "availabilityId": "2021-07-05T10:00:00-07:00", 
    "availability": {
        "id": "2021-07-05T10:00:00-07:00",
        "localDateTimeStart": "2021-07-05T10:00:00-07:00",
        "localDateTimeEnd": "",
        "allDay": true,
        "openingHours": [
            {
                "from": "10:00",
                "to": "17:00",
            }
        ]
    },
    "contact": {
        "fullName": "Chris Smith",
        "firstName": "Chris",
        "lastName": "Smith",
        "emailAddress": "csmith@zaui.com",
        "phoneNumber": "+1 503 405 4920",
        "locales": [],
        "country": null,
        "notes": null
    },
    "notes": null,
    "deliveryMethods": "VOUCHER",
    "voucher": {
            "redemptionMethod": "DIGITAL",
            "deliveryOptions": [
                {
                    "deliveryFormat": "QRCODE",
                    "deliveryValue": "%^5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb^58902_A2829|2022-04-30|10:00:00|^%"
                }
            ],
            "utcRedeemedAt": null
    },
    "unitItems": [
        {
            "uuid": "83af6d2c-1c35-4728-ac03-3418a75c5579",
            "unitId": "adults",
            "resellerReference": null,
            "supplierReference": "",
            "unit": {
                "id": "adults_0e064227-c793-426b-857c-2d1fcba62582", 
                "internalName": "adult",
                "reference": "adult",
                "type": "ADULT",
                "requiredContactFields": [],
                "restrictions": {
                    "minAge": 18,
                    "maxAge": 100, 
                    "idRequired": false,
                    "minQuantity": null,
                    "maxQuantity": null,
                    "paxCount": 1,
                    "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                }
            },
            "status": "ON_HOLD",
            "utcRedeemedAt": null,
            "contact": {
                "fullName": null,
                "firstName": null,
                "lastName": null,
                "emailAddress": null,
                "phoneNumber": null,
                "locales": [],
                "country": null,
                "notes": null
            },
            "ticket": {
                "deliveryOptions": [
                    {
                        "deliveryFormat": "QRCODE",
                        "deliveryValue": "%^5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb^58902_A2829|2022-04-30|10:00:00|^%"
                    }
                ],
                "redemptionMethod": "DIGITAL",
                "utcRedeemedAt": null
            }
        }
    ]   
}
```

{% endtab %}
{% endtabs %}

## Get Booking &#x20;

<mark style="color:blue;">`GET`</mark> `https://api.zaui.io/octo/bookings/{uuid}/`

This endpoint will retrieve the booking object from Zaui, if the booking is associated with your reseller account

#### Path Parameters

| Name                                   | Type        | Description      |
| -------------------------------------- | ----------- | ---------------- |
| uuid<mark style="color:red;">\*</mark> | string/uuid | The booking uuid |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "id": "e9f0e272-a966-4f74-bea2-c290218d4f83 ",
    "uuid": "e9f0e272-a966-4f74-bea2-c290218d4f83 ",
    "testMode": true,
    "supplierReference": "XYNY58F",
    "status": "CONFIRMED",
    "resellerReference": null,
    "utcCreatedAt": "2021-04-10T09:00:52-07:00",
    "utcUpdatedAt": "2021-04-10T09:00:52-07:00",
    "utcExpiresAt": null,
    "utcRedeemedAt": null,
    "utcConfirmedAt": null,
    "productId": "846c36a4-8cb7-4abb-afff-944be62aa312",
    "product": {
        "id": "846c36a4-8cb7-4abb-afff-944be62aa312",
        "internalName": "Wilderness Tour",
        "reference": null,
        "locale": "en", 
        "timeZone": "America/Vancouver",
        "allowFreesale": false,
        "instantConfirmation": true,
        "instantDelivery": true,
        "availabilityRequired": true,
        "availabilityType": "OPENING_HOURS",
        "deliveryFormats": [
            "PDF_URL",
            "QRCODE"
        ],
        "deliveryMethods": [
            "TICKET",
            "VOUCHER"
        ],
        "redemptionMethod": "DIGITAL",
        "options": [
            {
                "id": "DEFAULT",
                "default": true,
                "internalName": "Stanard Tour 10:00",
                "reference": null,
                "availabilityLocalStartTimes": [
                    "10:00"
                ],
                "cancellationCutoff": "24 hours",
                "cancellationCutoffAmount": 24,
                "cancellationCutoffUnit": "hour",
                "requiredContactFields": [],
                "restrictions": {
                    "minUnits": 0,
                    "maxUnits": null
                },
                "units": [
                    {
                        "id": "adults_0e064227-c793-426b-857c-2d1fcba62582",
                        "internalName": "adult", 
                        "reference": "adult",
                        "type": "ADULT",
                        "requiredContactFields": [],
                        "restrictions": {
                            "minAge": 18,
                            "maxAge": 100,
                            "idRequired": false,
                            "minQuantity": null,
                            "maxQuantity": null,
                            "paxCount": 1,
                            "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                        }
                    }
                ]
            }
        ]
    },
    "optionId": "DEFAULT",
    "option": {
        "id": "DEFAULT",
        "default": true,
        "internalName": "Stanard Tour 10:00",
        "reference": null,
        "availabilityLocalStartTimes": [
            "10:00"
        ],
        "cancellationCutoff": "24 hours",
        "cancellationCutoffAmount": 24,
        "cancellationCutoffUnit": "hour",
        "requiredContactFields": [],
        "restrictions": {
            "minUnits": 0,
            "maxUnits": null
        },
        "units": [
            {
                "id": "adults_0e064227-c793-426b-857c-2d1fcba62582",
                "internalName": "adult", 
                "reference": "adult",
                "type": "ADULT",
                "requiredContactFields": [],
                "restrictions": {
                    "minAge": 18,
                    "maxAge": 100,
                    "idRequired": false,
                    "minQuantity": null,
                    "maxQuantity": null,
                    "paxCount": 1,
                    "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                }
            }
        ]
    },
    "cancellable": true,
    "cancellation": null, 
    "freesale": false,
    "availabilityId": "2021-07-05T10:00:00-07:00", 
    "availability": {
        "id": "2021-07-05T10:00:00-07:00",
        "localDateTimeStart": "2021-07-05T10:00:00-07:00",
        "localDateTimeEnd": "",
        "allDay": true,
        "openingHours": [
            {
                "from": "10:00",
                "to": "17:00",
            }
        ]
    },
    "contact": {
        "fullName": null,
        "firstName": null,
        "lastName": null,
        "emailAddress": null,
        "phoneNumber": null,
        "locales": [],
        "country": null,
        "notes": null
    },
    "notes": null,
    "deliveryMethods": ["VOUCHER"],
    "voucher": {
            "redemptionMethod": "DIGITAL",
            "deliveryOptions": [
                "deliveryFormat": "PDF_URL",
                "deliveryValue": "https://api.zauimock.com/octo/pdf?booking=40472"
            ],
            "utcRedeemedAt": null
    },
    "unitItems": [
        {
            "uuid": "83af6d2c-1c35-4728-ac03-3418a75c5579",
            "unitId": "adults_0e064227-c793-426b-857c-2d1fcba62582",
            "resellerReference": null,
            "supplierReference": "",
            "unit": {
                "id": "adults_0e064227-c793-426b-857c-2d1fcba62582", 
                "internalName": "adult",
                "reference": "adult",
                "type": "ADULT",
                "requiredContactFields": [],
                "restrictions": {
                    "minAge": 18,
                    "maxAge": 100, 
                    "idRequired": false,
                    "minQuantity": null,
                    "maxQuantity": null,
                    "paxCount": 1,
                    "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                }
            },
            "status": "CONFIRMED",
            "utcRedeemedAt": null,
            "contact": {
                "fullName": null,
                "firstName": null,
                "lastName": null,
                "emailAddress": null,
                "phoneNumber": null,
                "locales": [],
                "country": null,
                "notes": null
            },
            "ticket": {
                "deliveryOptions": [
                    "deliveryFormat": "PDF_URL",
                    "deliveryValue": "https://api.zauimock.com/octo/pdf?booking=40472"
                ],
                "redemptionMethod": "DIGITAL",
                "utcRedeemedAt": null
            }
        }
    ]   
}
```

{% endtab %}

{% tab title="400: Bad Request Bad request" %}

```javascript
{
    "error": "INVALID_BOOKING_UUID",
    "errorMessage": "Invalid booking UUID passed",
    "bookingId": ""
}
```

{% endtab %}
{% endtabs %}

## List Bookings

<mark style="color:blue;">`GET`</mark> `https://api.zaui.io/octo/bookings/`

This endpoint will fetch the bookings you have made for the given filters. You must use one of the below query parameters. Note, localDateStart + localDateEnd must be used as a pair.

#### Query Parameters

| Name              | Type   | Description                                                            |
| ----------------- | ------ | ---------------------------------------------------------------------- |
| resellerReference | String | Reseller reference on the booking                                      |
| supplierReference | String | Reference number from the supplier                                     |
| localDate         | String | <p>All bookings made for a specific date</p><p>(format yyyy-mm-dd)</p> |
| localDateStart    | String | First date of a date range search (format yyyy-mm-dd)                  |
| localDateEnd      | String | <p>Last date of a date range search</p><p>(format yyyy-mm-dd)</p>      |

{% tabs %}
{% tab title="400: Bad Request " %}

```javascript
{
    "error": "BAD_REQUEST",
    "errorMessage": "One or more required parameters are missing"
}
```

{% endtab %}

{% tab title="200: OK " %}

```javascript
[
  {
    "id": "e9f0e272-a966-4f74-bea2-c290218d4f83",
    "uuid": "e9f0e272-a966-4f74-bea2-c290218d4f83",
    "testMode": true,
    "supplierReference": "X4CJGE6",
    "status": "CONFIRMED",
    "resellerReference": null,
    "utcCreatedAt": "2021-04-14T13:42:27-07:00",
    "utcUpdatedAt": "2021-04-14T13:42:27-07:00",
    "utcExpiresAt": "2021-04-14T13:47:27-07:00",
    "utcRedeemedAt": null,
    "utcConfirmedAt": null,
    "productId": "846c36a4-8cb7-4abb-afff-944be62aa312",
    "product": {
        "id": "846c36a4-8cb7-4abb-afff-944be62aa312",
        "internalName": "Wilderness Tour",
        "reference": null,
        "locale": "en", 
        "timeZone": "America/Vancouver",
        "allowFreesale": false,
        "instantConfirmation": true,
        "instantDelivery": true,
        "availabilityRequired": true,
        "availabilityType": "OPENING_HOURS",
        "deliveryFormats": [
            "PDF_URL",
            "QRCODE"
        ],
        "deliveryMethods": [
            "TICKET",
            "VOUCHER"
        ],
        "redemptionMethod": "DIGITAL",
        "options": [
            {
                "id": "DEFAULT",
                "default": true,
                "internalName": "Stanard Tour 10:00",
                "reference": null,
                "availabilityLocalStartTimes": [
                    "10:00"
                ],
                "cancellationCutoff": "24 hours",
                "cancellationCutoffAmount": 24,
                "cancellationCutoffUnit": "hour",
                "requiredContactFields": [],
                "restrictions": {
                    "minUnits": 0,
                    "maxUnits": null
                },
                "units": [
                    {
                        "id": "adults_0e064227-c793-426b-857c-2d1fcba62582",
                        "internalName": "adult", 
                        "reference": "adult",
                        "type": "ADULT",
                        "requiredContactFields": [],
                        "restrictions": {
                            "minAge": 18,
                            "maxAge": 100,
                            "idRequired": false,
                            "minQuantity": null,
                            "maxQuantity": null,
                            "paxCount": 1,
                            "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                        }
                    }
                ]
            }
        ]
    },
    "optionId": "DEFAULT",
    "option": {
        "id": "DEFAULT",
        "default": true,
        "internalName": "Stanard Tour 10:00",
        "reference": null,
        "availabilityLocalStartTimes": [
            "10:00"
        ],
        "cancellationCutoff": "24 hours",
        "cancellationCutoffAmount": 24,
        "cancellationCutoffUnit": "hour",
        "requiredContactFields": [],
        "restrictions": {
            "minUnits": 0,
            "maxUnits": null
        },
        "units": [
            {
                "id": "adults_0e064227-c793-426b-857c-2d1fcba62582",
                "internalName": "adult", 
                "reference": "adult",
                "type": "ADULT",
                "requiredContactFields": [],
                "restrictions": {
                    "minAge": 18,
                    "maxAge": 100,
                    "idRequired": false,
                    "minQuantity": null,
                    "maxQuantity": null,
                    "paxCount": 1,
                    "accompaniedBy": [ "adults_0e064227-c793-426b-857c-2d1fcba62582" ]
                }
            }
        ]
    },
    "cancellable": true,
    "cancellation": null,  
    "freesale": false,
    "availabilityId": "2021-07-05T10:00:00-07:00",
    "availability": {
        "id": "2021-07-05T10:00:00-07:00",
        "localDateTimeStart": "2021-07-05T10:00:00-07:00",
        "localDateTimeEnd": "",
        "allDay": true,
        "openingHours": [
            {
                "from": "10:00",
                "to": "17:00"
            }
        ]
    },
    "contact": {
        "fullName": "Yuri Belcher",
        "firstName": "Yuri",
        "lastName": "Belcher",
        "emailAddress": "info@zaui.com",
        "phoneNumber": "",
        "locales": [],
        "country": null,
        "notes": null
    },
    "notes": null,
    "deliveryMethods": [
        "TICKET",
        "VOUCHER"
    ],
    "voucher": {
        "redemptionMethod": "DIGITAL",
        "deliveryOptions": [
            {
                "deliveryFormat": "QRCODE",
                "deliveryValue": "%^5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb^58902_A2829|2022-04-30|10:00:00|^%"
            }
        ],
        "utcRedeemedAt": null
    },
    "unitItems": [
        {
            "uuid": "83af6d2c-1c35-4728-ac03-3418a75c5579",
            "unitId": "adults_0e064227-c793-426b-857c-2d1fcba62582",
            "resellerReference": null,
            "supplierReference": null,
            "unit": {
                "id": "adults_0e064227-c793-426b-857c-2d1fcba62582", 
                "internalName": "adult",
                "reference": "adult",
                "type": "ADULT",
                "requiredContactFields": [],
                "restrictions": {
                    "minAge": 18,
                    "maxAge": 100, 
                    "idRequired": false,
                    "minQuantity": null,
                    "maxQuantity": null,
                    "paxCount": 1,
                    "accompaniedBy": []
                }
            },
            "status": "CONFIRMED",
            "utcRedeemedAt": null,
            "contact": {
                "fullName": "Marlon Brando",
                "firstName": "Marlon",
                "lastName": "Brando",
                "emailAddress": "test@zaui.com",
                "phoneNumber": null,
                "locales": [],
                "country": null,
                "notes": null
            },
            "ticket": {
                "deliveryOptions": [
                    {
                        "deliveryFormat": "QRCODE",
                        "deliveryValue": "%^5bdcd3c0d4d24ae3e71b3b452a024c6324c7e4bb^58902_A2829|2022-04-30|10:00:00|^%"
                    }
                ],
                "redemptionMethod": "DIGITAL",
                "utcRedeemedAt": null
            }
        }
    ] 
}
//... additional bookings returned here
]
```

{% endtab %}
{% endtabs %}

When using this endpoint you **must include one of the following** parameters:

* `resellerReference` - The reference number from your platform
* `supplierReference` - The booking reference number from the supplier
* `localDate` - Local travel date
* `localDateStart` and `localDateEnd` - local travel start/end dates

Additional **optional parameters** for further filtering include:

* `productId` - a single product ID booked
* `optionId` - a single optionId as part of the booking


---

# 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:

```
GET https://docs.zaui.com/octo/basic-workflow/booking.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.
