Skip to main content

Overview

The Inventories Retrieve API allows you to get inventory availability for a specific property within a date range. This is useful for checking availability before initiating a booking.

Retrieving Property Inventory

GET /v1/properties/{propertyId}/inventories

Path Parameters

ParameterTypeRequiredDescription
propertyIdstringYesUnique identifier of the property

Query Parameters

ParameterTypeRequiredDescription
fromDatestring (YYYY-MM-DD)YesStart date for the inventory query
toDatestring (YYYY-MM-DD)YesEnd date for the inventory query

Example Request

curl -X GET "https://api.elivaas.com/api/v1/properties/prop_456/inventories?fromDate=2025-08-01&toDate=2025-08-07" \
  -H "Api-Key: YOUR_API_KEY" \
  -H "Channel-Id: YOUR_CHANNEL_ID"

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
    },
    {
      "date": "2025-08-03",
      "quantity": 1,
      "stopSell": false,
      "minimumStay": 2,
      "maximumStay": 7
    },
    {
      "date": "2025-08-04",
      "quantity": 0,
      "stopSell": true,
      "minimumStay": 2,
      "maximumStay": 7
    }
  ]
}

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 on this date
inventories[].stopSellbooleanIf true, the property is not available for sale on this date
inventories[].minimumStayintegerMinimum nights required for bookings including this date
inventories[].maximumStayintegerMaximum nights allowed for bookings including this date

Availability Check Logic

To determine if a property is bookable for a date range:
  1. Ensure quantity > 0 for all dates in the range
  2. Ensure stopSell is false for all dates in the range
  3. Ensure the total stay length meets the minimumStay requirement
  4. Ensure the total stay length does not exceed the maximumStay limit

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 parameters
  • 401: Unauthorized
  • 404: Property not found
  • 500: Internal Server Error