> 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/activity-calls/check-inventory.md).

# Check Inventory

## zapiCheckActivityInventoryByDate

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

#### Request Body

| Name                                            | Type    | Description                                                                                                                                                                                                                          |
| ----------------------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| activityId<mark style="color:red;">\*</mark>    | integer | ID of the activity.                                                                                                                                                                                                                  |
| activityDate                                    | integer | The travel date. If left blank, the current date will be used.  Format: YYYY-MM-DD.                                                                                                                                                  |
| activityTime                                    | integer | If left blank, the call will return details for each activity time configured for the activity and activity date. If you provide an activity time, then details for only the requested time slot will be returned. Format: HH:MM:SS. |
| requestedPassengers.seniors                     | integer | If left blank, this will be treated as 0. If you provide them, then inventories will be compared and filtered based on the requested passengers.                                                                                     |
| 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.                                                                                                                                                                                                    |
| zapiToken<mark style="color:red;">\*</mark>     | integer | Token that must be used for a reseller to communicate with the supplier system.                                                                                                                                                      |
| methodName<mark style="color:red;">\*</mark>    | string  | The method being called.                                                                                                                                                                                                             |

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

```html
<?xml version="1.0" encoding="utf-8"?>
<response>
    <zapiVersion>2.1</zapiVersion>
    <error>0</error>
    <message>OK</message>
    <methodResponse>
        <methodName>zapiCheckActivityInventoryByDate</methodName>
        <activityId>80</activityId>
        <activityDate>2022-11-23</activityDate>
        <activityName>
            <![CDATA[Canyon Icewalk ]]>
        </activityName>
        <activityType>500</activityType>
        <totalRequestedPassengers>0</totalRequestedPassengers>
        <activityTimes>
            <activityTime>
                <activityTimeStart>13:00:00</activityTimeStart>
                <activityTimeCancelled>false</activityTimeCancelled>
                <activityTimeAvailable>true</activityTimeAvailable>
                <activityTimeCancelledOnlineOnly>false</activityTimeCancelledOnlineOnly>
                <activityTimeAvailableMessage/>
                <inventoryCheckCode>0</inventoryCheckCode>
                <inventoryCheckMessage>OK</inventoryCheckMessage>
                <activityTimeSpotsRemaining>50</activityTimeSpotsRemaining>
                <numberOnStandby>0</numberOnStandby>
                <isStandbyAvailable>false</isStandbyAvailable>
                <status>AVAILABLE</status>
                <fixedDepartureOptions/>
            </activityTime>
        </activityTimes>
        <priceCodeId>400</priceCodeId>
        <allowedPassengers>
            <passengerType>
                <systemTypeId>10</systemTypeId>
                <systemTypeName>seniors</systemTypeName>
                <name>
                    <![CDATA[Seniors]]>
                </name>
                <defaultValue>0</defaultValue>
                <basePrice>$50.00</basePrice>
            </passengerType>
            <passengerType>
                <systemTypeId>11</systemTypeId>
                <systemTypeName>adults</systemTypeName>
                <name>
                    <![CDATA[Adults]]>
                </name>
                <defaultValue>2</defaultValue>
                <basePrice>$50.00</basePrice>
            </passengerType>
            <passengerType>
                <systemTypeId>12</systemTypeId>
                <systemTypeName>students</systemTypeName>
                <name>
                    <![CDATA[Students]]>
                </name>
                <defaultValue>0</defaultValue>
                <basePrice>$50.00</basePrice>
            </passengerType>
            <passengerType>
                <systemTypeId>13</systemTypeId>
                <systemTypeName>children</systemTypeName>
                <name>
                    <![CDATA[Children]]>
                </name>
                <defaultValue>0</defaultValue>
                <basePrice>$50.00</basePrice>
            </passengerType>
            <passengerType>
                <systemTypeId>14</systemTypeId>
                <systemTypeName>infants</systemTypeName>
                <name>
                    <![CDATA[Infants]]>
                </name>
                <defaultValue>0</defaultValue>
                <basePrice>$50.00</basePrice>
            </passengerType>
        </allowedPassengers>
    </methodResponse>
</response>
```

{% endtab %}
{% endtabs %}

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

```markup
<request>
   <zapiToken></zapiToken>
   <zapiAccountId></zapiAccountId>
   <zapiUserId></zapiUserId>
   <zapiMethod>
      <methodName>zapiCheckActivityInventoryByDate</methodName>
      <activityId></activityId>
      <activityDate></activityDate>
      <activityTime></activityTime>
      <requestedPassengers>
         <seniors></seniors>
         <adults></adults>
         <students></students>
         <children></children>
         <infants></infants>
      </requestedPassengers>
   </zapiMethod>
</request>
```

{% endtab %}

{% tab title="Response" %}

```xml
<?xml version="1.0" encoding="utf-8"?>
<response>
	<zapiVersion></zapiVersion>
	<error></error>
	<message></message>
	<methodResponse>
		<methodName>zapiCheckActivityInventoryByDate</methodName>
		<activityId></activityId>
		<activityDate></activityDate>
		<activityName></activityName>
		<activityType></activityType>
		<totalRequestedPassengers></totalRequestedPassengers>
		<activityTimes>
			<activityTime>
				<activityTimeStart></activityTimeStart>
				<activityTimeAvailable></activityTimeAvailable>
				<activityTimeAvailableMessage/>
				<inventoryCheckCode></inventoryCheckCode>
				<inventoryCheckMessage></inventoryCheckMessage>
				<activityTimeSpotsRemaining></activityTimeSpotsRemaining>
			</activityTime>
		</activityTimes>
	</methodResponse>
</response> 
```

{% endtab %}
{% endtabs %}
