Skip to main content

Overview

The Bulk Inventories API allows you to fetch inventory availability for multiple properties in a single request. This is more efficient than calling the single-property inventory endpoint multiple times when you need to check availability across several properties.

Fetching Bulk Inventories

POST /v1/inventories

Request Body

FieldTypeRequiredDescription
fromDatestring (YYYY-MM-DD)YesStart date for the inventory query
toDatestring (YYYY-MM-DD)YesEnd date for the inventory query
propertyIdsarray of stringsYesList of property IDs to fetch inventories for

Example Request

curl -X POST "https://api.elivaas.com/api/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"]
  }'

Example Response

[
  {
    "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
      }
    ]
  }
]

Response Fields

FieldTypeDescription
propertyIdstringIdentifier of the property
inventoriesarrayList of daily inventory details
inventories[].datestring (date)Date for the inventory entry
inventories[].quantityintegerNumber of units available
inventories[].stopSellbooleanIf true, property is not available for sale on this date
inventories[].minimumStayintegerMinimum nights required
inventories[].maximumStayintegerMaximum nights allowed

When to Use Bulk vs Single Fetch

ScenarioRecommended Endpoint
Check availability for a single propertyGET /v1/properties/{propertyId}/inventories
Check availability across multiple propertiesPOST /v1/inventories
Get availability for all propertiesGET /v1/properties/inventories

Authentication

All requests must include the following headers:
  • Api-Key: Your API key for authentication
  • Channel-Id: Identifier for the channel making the request

Error Handling

The API returns standard HTTP status codes:
  • 200: Success
  • 400: Bad Request - missing or invalid fields
  • 401: Unauthorized
  • 500: Internal Server Error