# Response

The AvailabilityResponse will indicate if there is sufficient space for the requested passenger mix as well as the total cost if the traveler proceeds to the checkout.

{% tabs %}
{% tab title="Example - Single Date Response" %}

```markup
<?xml version="1.0" encoding="UTF-8"?>
<CheckAvailabilityResponse xmlns="https://api.zaui.io/api/01">
	<ApiKey>xxxxxxxxxxxxxxxxxxxxxxx</ApiKey>     
	<ResellerId>2005</ResellerId>    
	<SupplierId>200</SupplierId>       
	<Timestamp>1577121674745</Timestamp>
	<RequestStatus>
		<Status>SUCCESS</Status>
	</RequestStatus>
	<SupplierProductCode>ACT_1765</SupplierProductCode>
	<TourAvailability>
		<Date>2020-10-31</Date>
		<TourOptions>
			<SupplierOptionCode>09:00:00</SupplierOptionCode>
			<SupplierOptionName>Zipline Tour</SupplierOptionName>
			<TourDepartureTime>09:00:00</TourDepartureTime>
		</TourOptions>
		<AvailabilityStatus>
			<Status>AVAILABLE</Status>
			<RemainingInventory>100</RemainingInventory>
		</AvailabilityStatus>
		<TourPricing>
    	<SubTotal>$481,00</SubTotal>
			<Fees>$3.00</Fees>
			<Tax>$24.20></Tax>
			<Currency>USD</Currency>
			<TaxDetails>
				<TaxDetail>
					<TaxName><![CDATA[GST]]></TaxName>
					<TaxAmount>$24.20</TaxAmount>
				</TaxDetail>
			</TaxDetails>
			<Total>$508.20</Total>
		</TourPricing>
	</TourAvailability>
</CheckAvailabilityResponse>
```

{% endtab %}

{% tab title="Example - Date Range Response" %}

```markup
<?xml version="1.0" encoding="UTF-8"?>
<CheckAvailabilityResponse xmlns="https://api.zaui.io/api/01">
	<ApiKey>xxxxxxxxxxxxxxxxxxxxxxx</ApiKey>     
	<ResellerId>2005</ResellerId>    
	<SupplierId>200</SupplierId>       
	<Timestamp>1577121674745</Timestamp>	<RequestStatus>
		<Status>SUCCESS</Status>
	</RequestStatus>
	<SupplierProductCode>ACT_1765</SupplierProductCode>
	<TourAvailability>
		<Date>2020-10-30</Date>
		<TourOptions>
			<SupplierOptionCode>09:00:00</SupplierOptionCode>
			<SupplierOptionName>Zipline Tour</SupplierOptionName>
			<TourDepartureTime>09:00:00</TourDepartureTime>
		</TourOptions>
		<AvailabilityStatus>
			<Status>AVAILABLE</Status>
			<RemainingInventory>100</RemainingInventory>
		</AvailabilityStatus>
		<TourPricing>
    	<SubTotal>$481.00</SubTotal>
			<Fees>$3.00</Fees>
			<Tax>$24.20></Tax>
			<Currency>USD</Currency>
			<TaxDetails>
				<TaxDetail>
					<TaxName><![CDATA[GST]]></TaxName>
					<TaxAmount>$24.20</TaxAmount>
				</TaxDetail>
			</TaxDetails>
			<Total>$508.20</Total>
		</TourPricing>
	</TourAvailability>
	<TourAvailability>
		<Date>2020-10-31</Date>
		<TourOptions>
			<SupplierOptionCode>09:00:00</SupplierOptionCode>
			<SupplierOptionName>Zipline Tour</SupplierOptionName>
			<TourDepartureTime>09:00:00</TourDepartureTime>
		</TourOptions>
		<AvailabilityStatus>
			<Status>UNAVAILABLE</Status>
			<UnavailabilityReason>SOLD_OUT</UnavailabilityReason>
			<RemainingInventory>0</RemainingInventory>
		</AvailabilityStatus>
		<TourPricing>
    	<SubTotal>$481.00</SubTotal>
			<Fees>$3.00</Fees>
			<Tax>$24.20></Tax>
			<Currency>USD</Currency>
			<TaxDetails>
				<TaxDetail>
					<TaxName><![CDATA[GST]]></TaxName>
					<TaxAmount>$24.20</TaxAmount>
				</TaxDetail>
			</TaxDetails>
			<Total>$508.20</Total>
		</TourPricing>
	</TourAvailability>
</CheckAvailabilityResponse>
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
You must store in your database SupplierProductCode and at least 1 TourOptions value for inventory lookup.

You will also want to cache locally the returned inventory.  Relying solely on our API, with throttle rate limits, you may see error coddes 503 returned from our system.  If you do, you have exceed the allowed API calls.  Please refer to the ["Getting Started - API Throttle"](https://docs.zaui.com/io/getting-started/getting-started/api-throttle) section on how to gracefully handle 503 errors.&#x20;

[***Handling 503 errors and working with a API throttle***](https://docs.zaui.com/io/getting-started/getting-started/implementing-exponential-back-off)
{% endhint %}

### Response Fields:

| XML Node                    | Parent Node                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| --------------------------- | --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `CheckAvailabilityResponse` | N/A                         | Root XML node                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `ApiKey`                    | `CheckAvailabilityResponse` | Your unique API key                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `ResellerId`                | `CheckAvailabilityResponse` | Your unique reseller Id                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `SupplierId`                | `CheckAvailabilityResponse` | String representing the unique supplier ID within the Zaui Marketplace                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `ExternalReference`         | `CheckAvailabilityResponse` | String representing a unique transaction ID. Used to identify your original request                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| `TimeStamp`                 | `CheckAvailabilityResponse` | <p>Time of creation of request </p><p>• yyyy-MMddTHH:mm:ss.SSSZ(in UTC time)</p><p> or </p><p>• yyyy-MMddTHH:mm:ss.SSS\[+/- ]hh:mm </p><p>Example: </p><p>2020-04- 28T13:10:12.123Z (UTC time) </p><p>2020-04- 28T13:10:12.123+10:00</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `RequestStatus`             | `CheckAvailabilityResponse` | Request status root XML element                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `Status`                    | `RequestStatus`             | <p>Status value for the request. Values are:</p><p>• <strong><code>SUCCESS</code></strong></p><p>• <strong><code>ERROR</code></strong></p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `Error`                     | `RequestStatus`             | Root node for the error details on a non- successful request                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `ErrorCode`                 | `Error`                     | String with the error code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `ErrorMessage`              | `Error`                     | String with the error message                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `ErrorDetails`              | `Error`                     | String with additional details, and recommendation on the error                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `SupplierProductCode`       | `CheckAvailabilityResponse` | Unique supplier product code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `TourAvailability`          | `CheckAvailabilityResponse` | Root node with the tour availability                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `Date`                      | `TourAvailability`          | Date the tour is available on, in the format YYYY-MM-DD                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `TourOptions`               | `TourAvailability`          | Tour options root node                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| `SupplierOptionCode`        | `TourOptions`               | String containing the unique supplier option code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `SupplierOptionName`        | `TourOptions`               | String containing the supplier option name                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
| `TourDepartureTime`         | `TourOptions`               | Time of the tour departure, in the format HH:MM:SS                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `AvailbilityStatus`         | `CheckAvailabilityResponse` | Root element for the availability status                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| `Status`                    | `AvailabilityStatus`        | <p>Status of the availability request. Values can be:</p><p>• <strong>Available</strong> - when available for the given date and traveller mix</p><p>• <strong>Unavailable</strong> - when not available for the given date and traveller mix</p>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `UnavailabilityReason`      | `AvailabilityStatus`        | <p>Reason why the requested activity is NOT available. Valid values:</p><p>• <strong>SOLD\_OUT</strong></p><p>• <strong>BLOCKED\_OUT</strong> - when the product (tour)/product option (tour option) has been blocked out (not taking place on this date)</p><p>• <strong>INACTIVE</strong> - when the product (tour)/product option (tour option) is no longer active. Recommend to run an ActivityListRequest to refresh the supplier product codes to obtain the latest product (tour)/ product option (tour option) that is shared</p><p>• <strong>PAST\_CUTOFF\_DATE</strong> - when the booking cut-off date has been reached for this product (tour)/product option (tour option)</p><p>• <strong>TRAVELLER\_MISMATCH</strong> - when the required combination of travelers for this product (tour)/product option (tour option) is not met OR when the number of requested passengers cannot be fulfilled, but a lower number can.  For example, <code>Status.AvailabilityStatus</code>  for 3 people is <strong>Unavailable</strong> but <code>Status.AvailabilityStatus</code> for 2 is <strong>Available.</strong> </p> |
| `RemainingInventory`        | `AvailabilityStatus`        | Number of spots remaining for the product                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `TourPricing`               | `CheckAvailabilityResponse` | Root element for pricing data                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| `Subtotal`                  | `TourPricing`               | Formatted string with currency for sub-total based on the request                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `Fees`                      | `TourPricing`               | Formatted string with currency for all fees                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `Tax`                       | `TourPricing`               | Formatted string with currency for all taxes                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| `Total`                     | `TourPricing`               | Formatted string with currency for total cost if the booking was to be created                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `Currency`                  | `TourPricing`               | The ISO currency code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `TaxDetails`                | `TourPricing`               | Root Node                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| `TaxDetail`                 | `TaxDetails`                | Single Tax node                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `TaxName`                   | `TaxDetail`                 | The name of the tax applied                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| `TaxAmount`                 | `TaxDetail`                 | The amount of the tax formatted                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |


---

# 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://docs.zaui.com/io/api-function-definitions/checking-availability/check-availability-response.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.
