> For the complete documentation index, see [llms.txt](https://docs.zaui.com/zapi/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/zapi/zapi-calls/booking/booking-search/search-bookings.md).

# Search Bookings

## zapiSearchBookings

<mark style="color:blue;">`GET`</mark> `https://{yourdomainname}.zaui.net/zapi/`

#### Request Body

| Name                                            | Type    | Description                                                                     |
| ----------------------------------------------- | ------- | ------------------------------------------------------------------------------- |
| zapiToken<mark style="color:red;">\*</mark>     | integer | Token that must be used for a reseller to communicate with the supplier system. |
| bookedByUserId                                  | integer | System user who made the booking.                                               |
| methodName<mark style="color:red;">\*</mark>    | string  | The method being called.                                                        |
| zapiUserId<mark style="color:red;">\*</mark>    | integer | Generated by the supplier system when a new contact is created.                 |
| zapiAccountId<mark style="color:red;">\*</mark> | integer | Generated by the supplier system.                                               |
| verboseMode                                     | string  | True or False. Default is False.                                                |
| includeCancelled                                | string  | True or False. Default is False.                                                |
| searchType<mark style="color:red;">\*</mark>    | integer | 101, 102,103 or 104. See below for definitions.                                 |
| searchText<mark style="color:red;">\*</mark>    | string  | Based on searchType. See below for more info.                                   |

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

```xml
<?xml version="1.0" encoding="utf-8"?>
<response>
    <zapiVersion>2.1</zapiVersion>
    <error>0</error>
    <message>OK</message>
    <methodResponse>
        <methodName>zapiSearchBookings</methodName>
        <methodErrorCode>0</methodErrorCode>
        <methodErrorMessage/>
        <searchType>103</searchType>
        <verboseResponse>true</verboseResponse>
        <totalSearchResults>1</totalSearchResults>
        <bookedByUserId/>
        <requestedSearchResults>1</requestedSearchResults>
        <allBookings>
            <booking>
                <bookingNumber>40234</bookingNumber>
                <bookingReference>27J76MT</bookingReference>
                <guestID>1236</guestID>
                <guestHashKey>e6fa81dfeb911f56a94cc079fd2b9f9603f05117</guestHashKey>
                <lastName>
                    <![CDATA[Depp]]>
                </lastName>
                <firstName>
                    <![CDATA[Johnny]]>
                </firstName>
                <email>
                    <![CDATA[nadine.dauberman@zaui.com]]>
                </email>
                <mobilePrefix>
                    <![CDATA[]]>
                </mobilePrefix>
                <mobilePhone>
                    <![CDATA[6045669284]]>
                </mobilePhone>
                <isCancelled>0</isCancelled>
                <outstandingBalance>$105.00</outstandingBalance>
                <bookingBalance>
                    <hasOutstandingBalance>false</hasOutstandingBalance>
                    <balance>0</balance>
                    <balanceFormated>$0.00</balanceFormated>
                </bookingBalance>
                <subTotal>$100.00</subTotal>
                <tax>$5.00</tax>
                <activitySurplusFees>$0.00</activitySurplusFees>
                <total>$105.00</total>
                <reservationist>
                    <![CDATA[Zaui Support]]>
                </reservationist>
                <activities>
                    <activity>
                        <attributeId>71718</attributeId>
                        <activityName>
                            <![CDATA[Electric Bike Rentals]]>
                        </activityName>
                        <activityId>128</activityId>
                        <activityType>505</activityType>
                        <packageId>0</packageId>
                        <packageName/>
                        <activityDate>2021-11-18</activityDate>
                        <activityTime>09:00:00</activityTime>
                        <supplierConfirmation/>
                        <activityDateTime>Thu, Nov 18 2021 9:00 AM</activityDateTime>
                        <pickupLocationId>0</pickupLocationId>
                        <pickupTime>
                            <![CDATA[]]>
                        </pickupTime>
                        <pickupName>
                            <![CDATA[]]>
                        </pickupName>
                        <pickupLocationAddress>
                            <![CDATA[]]>
                        </pickupLocationAddress>
                        <pickupLocationTimeString>
                            <![CDATA[ ]]>
                        </pickupLocationTimeString>
                        <dropOffLocationId>0</dropOffLocationId>
                        <dropoffTime>
                            <![CDATA[]]>
                        </dropoffTime>
                        <dropoffName>
                            <![CDATA[]]>
                        </dropoffName>
                        <dropOffLocationAddress>
                            <![CDATA[]]>
                        </dropOffLocationAddress>
                        <dropOffLocationTimeString>
                            <![CDATA[ ]]>
                        </dropOffLocationTimeString>
                        <commissionAgentId>5</commissionAgentId>
                        <commissionAgentName>
                            <![CDATA[Zaui Support]]>
                        </commissionAgentName>
                        <commissionAgentCompany>
                            <![CDATA[Supplier Test System]]>
                        </commissionAgentCompany>
                        <rentalStartTime>09:00:00</rentalStartTime>
                        <rentalEndTime>13:00:00</rentalEndTime>
                        <rentalEndDate>2021-11-18</rentalEndDate>
                        <tag/>
                        <notes>
                            <![CDATA[]]>
                        </notes>
                        <passengers>
                            <seniors>0</seniors>
                            <adults>2</adults>
                            <students>0</students>
                            <children>0</children>
                            <infants>0</infants>
                            <passengersAsString>
                                <![CDATA[2 (ad)]]>
                            </passengersAsString>
                        </passengers>
                        <passengersAsString>
                            <![CDATA[2 (ad) ]]>
                        </passengersAsString>
                        <equipment>
                            <equipmentCategory>
                                <equipmentCategoryId>1</equipmentCategoryId>
                                <equipmentCategoryName>Adult Bikes</equipmentCategoryName>
                                <bookedEquipment>
                                    <equipmentItem>
                                        <equipmentId>580</equipmentId>
                                        <equipmentName>Adult Bikes 1</equipmentName>
                                    </equipmentItem>
                                    <equipmentItem>
                                        <equipmentId>581</equipmentId>
                                        <equipmentName>Adult Bikes 2</equipmentName>
                                    </equipmentItem>
                                </bookedEquipment>
                            </equipmentCategory>
                        </equipment>
                        <totalCost>$100.00</totalCost>
                        <pricingOptions/>
                        <checkedInStatus>Not Checked In</checkedInStatus>
                        <onStandby>false</onStandby>
                        <onWaitList>false</onWaitList>
                        <waitListId>0</waitListId>
                        <Airlines/>
                        <guides/>
                    </activity>
                </activities>
                <products/>
                <transactions/>
            </booking>
        </allBookings>
    </methodResponse>
</response>
```

{% endtab %}
{% endtabs %}

searchTypes:&#x20;

* Guest Name: 101
* Mobile Number: 102
* Booking ID: 103
* Voucher Number: 104

searchText is based on the option selected for searchType. For example, if you opt to search by 103 (Booking ID) then you would need to input the confirmation number attached to the booking.&#x20;

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

```xml
<request>
   <zapiToken></zapiToken>
   <zapiAccountId></zapiAccountId>
   <zapiUserId></zapiUserId>
   <zapiMethod>
        <methodName>zapiSearchBookings</methodName>
        <bookedByUserId></bookedByUserId>
        <verboseMode></verboseMode>
        <includeCancelled></includeCancelled>
        <searchType></searchType>
        <searchText></searchText>
    </zapiMethod>
</request>
```

{% endtab %}

{% tab title="Response" %}

```xml
<?xml version="1.0" encoding="utf-8"?>
<response>
    <zapiVersion>2.1</zapiVersion>
    <error>0</error>
    <message>OK</message>
    <methodResponse>
        <methodName>zapiSearchBookings</methodName>
        <methodErrorCode></methodErrorCode>
        <methodErrorMessage/>
        <searchType>103</searchType>
        <verboseResponse></verboseResponse>
        <totalSearchResults></totalSearchResults>
        <bookedByUserId></bookedByUserId>
        <requestedSearchResults></requestedSearchResults>
        <allBookings/>
    </methodResponse>
</response>
```

{% endtab %}
{% endtabs %}
