Rates

  1. List rates
  2. Search rates
  3. Get a single rate

Parameters

Name Type Read/Write Description
id Integer Read Rate’s id.
currency String Read Rate’s currency code, list of codes described in enums section.
initial_nightly_rate Decimal Read Rate’s initial nightly rate.
initial_weekly_rate Decimal Read Rate’s initial weekly rate.
initial_monthly_rate Decimal Read Rate’s initial monthly rate.
final_nightly_rate Decimal Read Rate’s final nightly rate.
final_weekly_rate Decimal Read Rate’s final weekly rate.
final_monthly_rate Decimal Read Rate’s final monthly rate.
minimum_stay Integer Read Rate’s minimum stay in days.
created_at Time Read Rate’s create time.
updated_at Time Read Rate’s update time.
start_date Date Read Rate’s start date.
end_date Date Read Rate’s end date.

Definitions

Initial rate: Rate computed before any discount.
Final rate: Rate after discounts have been applied.

List rates

List all rates for a given account(s).

GET /rates

Response

{
  "links": {
    "rates.rental": "https://www.bookingsync.com/api/v3/rentals/{rates.rental}"
  },
  "rates": [
    {
      "id": 2,
      "currency": "EUR",
      "final_monthly_rate": "2500.0",
      "final_nightly_rate": "100.0",
      "final_weekly_rate": "650.0",
      "initial_monthly_rate": "3000.0",
      "initial_nightly_rate": "100.0",
      "initial_weekly_rate": "700.0",
      "minimum_stay": 7,
      "created_at": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z",
      "start_date": "2017-11-16",
      "end_date": "2018-07-23",
      "links": {
        "rental": 14
      }
    }
  ]
}

Search rates

Search parameters allow to filter rates by specified fields.

Example:

GET /rates?rental_id=1

Search Parameters

Name Type Default Description
rental_id String   List of comma separated IDs. Returns only rates for this rental(s)

Get a single rate

Returns a single rate identified by ID.

GET /rates/:rate_id

Response

{
  "links": {
    "rates.rental": "https://www.bookingsync.com/api/v3/rentals/{rates.rental}"
  },
  "rates": [
    {
      "id": 2,
      "currency": "EUR",
      "final_monthly_rate": "2500.0",
      "final_nightly_rate": "100.0",
      "final_weekly_rate": "650.0",
      "initial_monthly_rate": "3000.0",
      "initial_nightly_rate": "100.0",
      "initial_weekly_rate": "700.0",
      "minimum_stay": 7,
      "created_at": "2017-11-09T09:08:17Z",
      "updated_at": "2017-11-09T09:08:17Z",
      "start_date": "2017-11-16",
      "end_date": "2018-07-23",
      "links": {
        "rental": 14
      }
    }
  ]
}