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

## Overview

Retrieves daily inventory availability for all properties accessible to your distribution channel within a specified date range. Each entry includes available units, stop-sell flags, and stay length restrictions.

***

## Request

```
GET /v1/properties/inventories
```

### Headers

| Header       | Type   | Required | Description                           |
| ------------ | ------ | -------- | ------------------------------------- |
| `Api-Key`    | string | Yes      | Your API key for authentication.      |
| `Channel-Id` | string | Yes      | Your distribution channel identifier. |

### Query Parameters

| Parameter  | 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`. |

### Example Request

```bash theme={null}
curl -X GET "https://sandbox.elivaas.com/v1/properties/inventories?fromDate=2025-08-01&toDate=2025-08-07" \
  -H "Api-Key: YOUR_API_KEY" \
  -H "Channel-Id: YOUR_CHANNEL_ID"
```

***

## Response — `200 OK`

Returns an array of [InventoryResponse](#inventory-response-object) objects, one per property.

### Inventory Response Object

| Field         | Type                                             | Description                                           |
| ------------- | ------------------------------------------------ | ----------------------------------------------------- |
| `propertyId`  | string                                           | Unique identifier of the property.                    |
| `inventories` | array of [DateInventory](#date-inventory-object) | Daily inventory entries for the requested date range. |

### Date Inventory Object

| Field         | Type          | Description                                                                       |
| ------------- | ------------- | --------------------------------------------------------------------------------- |
| `date`        | string (date) | The calendar date this entry represents.                                          |
| `quantity`    | integer       | Number of units available on this date. `0` means fully booked.                   |
| `stopSell`    | boolean       | `true` if the property is blocked from sale on this date, regardless of quantity. |
| `minimumStay` | integer       | Minimum number of nights required for a booking that includes this date.          |
| `maximumStay` | integer       | Maximum number of nights allowed for a booking that includes this date.           |

### 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
      },
      {
        "date": "2025-08-03",
        "quantity": 0,
        "stopSell": true,
        "minimumStay": 2,
        "maximumStay": 7
      }
    ]
  },
  {
    "propertyId": "prop_789",
    "inventories": [
      {
        "date": "2025-08-01",
        "quantity": 1,
        "stopSell": false,
        "minimumStay": 1,
        "maximumStay": 14
      }
    ]
  }
]
```

### Availability Logic

A property is bookable for a date range when **all** of the following are true for every date in the range:

| Condition           | Rule                         |
| ------------------- | ---------------------------- |
| Units available     | `quantity > 0`               |
| Not blocked         | `stopSell == false`          |
| Meets minimum stay  | `totalNights >= minimumStay` |
| Within maximum stay | `totalNights <= maximumStay` |

***

## Error Handling

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