> ## Documentation Index
> Fetch the complete documentation index at: https://docs.elivaas.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Inventories - Bulk Fetch

## Overview

Fetches inventory availability for multiple specific properties in a single request. More efficient than calling the single-property endpoint multiple times when you need to check availability for a known set of properties.

***

## Request

```
POST /v1/inventories
```

### Headers

| Header         | Type   | Required | Description                           |
| -------------- | ------ | -------- | ------------------------------------- |
| `Api-Key`      | string | Yes      | Your API key for authentication.      |
| `Channel-Id`   | string | Yes      | Your distribution channel identifier. |
| `Content-Type` | string | Yes      | Must be `application/json`.           |

### Request Body

| Field         | Type            | Required | Description                                                      |
| ------------- | --------------- | -------- | ---------------------------------------------------------------- |
| `fromDate`    | string (date)   | Yes      | Start date in `YYYY-MM-DD` format.                               |
| `toDate`      | string (date)   | Yes      | End date in `YYYY-MM-DD` format. Must be on or after `fromDate`. |
| `propertyIds` | array of string | Yes      | List of property IDs to fetch inventories for.                   |

### Example Request

```bash theme={null}
curl -X POST "https://sandbox.elivaas.com/v1/inventories" \
  -H "Api-Key: YOUR_API_KEY" \
  -H "Channel-Id: YOUR_CHANNEL_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "fromDate": "2025-08-01",
    "toDate": "2025-08-07",
    "propertyIds": ["prop_456", "prop_789"]
  }'
```

***

## Response — `200 OK`

Returns an array of [InventoryResponse](/api-reference/inventories/inventories-list#inventory-response-object) objects, one per requested property.

| Field         | Type                                                                                        | Description                        |
| ------------- | ------------------------------------------------------------------------------------------- | ---------------------------------- |
| `propertyId`  | string                                                                                      | Unique identifier of the property. |
| `inventories` | array of [DateInventory](/api-reference/inventories/inventories-list#date-inventory-object) | Daily inventory entries.           |

Each `DateInventory` entry contains:

| Field         | Type          | Description                              |
| ------------- | ------------- | ---------------------------------------- |
| `date`        | string (date) | The calendar date.                       |
| `quantity`    | integer       | Available units. `0` means fully booked. |
| `stopSell`    | boolean       | `true` if blocked from sale.             |
| `minimumStay` | integer       | Minimum nights required.                 |
| `maximumStay` | integer       | Maximum nights allowed.                  |

### Example Response

```json theme={null}
[
  {
    "propertyId": "prop_456",
    "inventories": [
      {
        "date": "2025-08-01",
        "quantity": 3,
        "stopSell": false,
        "minimumStay": 2,
        "maximumStay": 7
      },
      {
        "date": "2025-08-02",
        "quantity": 3,
        "stopSell": false,
        "minimumStay": 2,
        "maximumStay": 7
      }
    ]
  },
  {
    "propertyId": "prop_789",
    "inventories": [
      {
        "date": "2025-08-01",
        "quantity": 1,
        "stopSell": false,
        "minimumStay": 1,
        "maximumStay": 14
      },
      {
        "date": "2025-08-02",
        "quantity": 0,
        "stopSell": true,
        "minimumStay": 1,
        "maximumStay": 14
      }
    ]
  }
]
```

### Endpoint Comparison

| Use Case                     | Endpoint                                      |
| ---------------------------- | --------------------------------------------- |
| Single property availability | `GET /v1/properties/{propertyId}/inventories` |
| Multiple specific properties | `POST /v1/inventories`                        |
| All channel properties       | `GET /v1/properties/inventories`              |

***

## Error Handling

| Status | Meaning               | Description                                   |
| ------ | --------------------- | --------------------------------------------- |
| `200`  | Success               | Inventories returned.                         |
| `400`  | Bad Request           | Missing or invalid fields in request body.    |
| `401`  | Unauthorized          | Missing or invalid `Api-Key` or `Channel-Id`. |
| `500`  | Internal Server Error | Unexpected error.                             |
