Skip to main content

Overview

The Fetch Rates API allows you to retrieve daily rate breakdowns for multiple properties within a specified date range. Unlike the Booking Engine’s GET /v1/properties/rates which returns quote-based pricing, this endpoint returns raw daily rates per property, useful for rate management and synchronization.

Fetching Property Rates

POST /v1/properties/rates

Request Body

FieldTypeRequiredValidationDescription
propertyIdsarray of stringsYesMust not be emptyList of property IDs to fetch rates for
fromDatestring (YYYY-MM-DD)YesMust be today or in the futureStart date for the rate query
toDatestring (YYYY-MM-DD)YesMust be today or in the futureEnd date for the rate query

Example Request

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

Example Response

{
  "prop_456": [
    {
      "propertyId": "prop_456",
      "date": "2025-08-01",
      "rate": 1500
    },
    {
      "propertyId": "prop_456",
      "date": "2025-08-02",
      "rate": 1800
    },
    {
      "propertyId": "prop_456",
      "date": "2025-08-03",
      "rate": 1800
    },
    {
      "propertyId": "prop_456",
      "date": "2025-08-04",
      "rate": 1500
    }
  ],
  "prop_789": [
    {
      "propertyId": "prop_789",
      "date": "2025-08-01",
      "rate": 2500
    },
    {
      "propertyId": "prop_789",
      "date": "2025-08-02",
      "rate": 3000
    }
  ]
}

Response Format

The response is a JSON object where:
  • Keys are property ID strings
  • Values are arrays of daily rate objects

Rate Object Fields

FieldTypeDescription
propertyIdstringIdentifier of the property
datestring (date)Date for the rate
rateintegerRate amount for this date (in the property’s currency)

Validation Errors

If the request body fails validation, the API returns a 400 Bad Request:
ValidationError Message
Empty propertyIds”propertyIds must not be empty”
Missing fromDate”fromDate is required”
Past fromDate”fromDate must be today or in the future”
Missing toDate”toDate is required”
Past toDate”toDate must be today or in the future”

Use Cases

  • Rate synchronization: Keep your platform’s rates in sync with the source system
  • Rate comparison: Compare rates across multiple properties for a date range
  • Calendar views: Build rate calendars showing daily prices per property
  • Revenue management: Analyze pricing patterns across your portfolio

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 - validation errors
  • 401: Unauthorized
  • 500: Internal Server Error