Examples of rates

A rate for one or two adult guests, available on any dates from May 1 to October 1
{
    "conditions": {
        "dates": [
            {
                "min": "2022-05-01",
                "max": "2022-10-01"
            }
        ],
        "occupancy": {
            "adults": {
                "max": 2
            }
        }
    },
    "rate": {
        "amount": "1000",
        "currency": "RUB"
    }
}

With a search for a date range from June 1 to July 1, the cost will be 30 * 1000 = RUB 30,000.

A rate for two adult guests with check-in only on May 1 and check-out only on May 2
{
  "conditions": {
    "dates": [
      {
        "min": "2022-05-01",
        "max": "2022-05-01"
      }
    ],
    "occupancy": {
      "adults": {
        "min": 2,
        "max": 2
      }
    },
    "days": {
      "min": 1,
      "max": 1
    }
  },
  "rate": {
    "amount": "1000",
    "currency": "RUB"
  }
}
A rate for two adult guests with check-in on May 1 and check-out on May 3
{
    "conditions": {
        "dates": [
            {
                "min": "2022-05-01",
                "max": "2022-05-02"
            }
        ],
        "occupancy": {
            "adults": {
                "min": 2,
                "max": 2
            }
        }
    },
    "rate": {
        "amount": "1000",
        "currency": "RUB"
    }
}

The cost will be 2 * 1000 = RUB 2000. For check-out on May 3, "max": "2022-05-02" should be specified, because the day of check-out isn't included in the stay.

A rate for two adults and two children who are three and four years old, with a stay of up to three weekdays
{
    "conditions": {
        "dates": [
            {
                "min": "2022-05-01",
                "max": "2022-10-01"
            }
        ],
        "occupancy": {
            "adults": {
                "min": 2,
                "max": 2
            },
            "childrenAges": [
                {"max": 3},
                {"max": 7}
            ]
        },
        "days": {
            "max": 3
        },
        "weekdays": [
            "mon",
            "tue",
            "wed",
            "thu",
            "fri"
        ]
    },
    "rate": {
        "amount": "1000",
        "currency": "RUB"
    }
}

With a search for a date range from June 1 to June 4, the cost will be 3 * 1000 = RUB 3000. After this room is booked from June 1 until June 4, exclude this period from the list of available date ranges:

{
    "conditions": {
        "dates": [
            {
                "min": "2022-05-01",
                "max": "2022-05-31"
            },
            {
                "min": "2022-06-04",
                "max": "2022-10-01"
            }
        ],
        "occupancy": {
            "adults": {
                "min": 2,
                "max": 2
            },
            "childrenAges": [
                {"max": 3},
                {"max": 7}
            ]
        },
        "days": {
            "max": 3
        },
        "weekdays": [
            "mon",
            "tue",
            "wed",
            "thu",
            "fri"
        ]
    },
    "rate": {
        "amount": "1000",
        "currency": "RUB"
    }
}
An example of parameters in a booking link
?token=123e4567e89b12d3a456426614174000&checkIn=2022-08-29&checkOut=2022-09-03&adults=2&tariffs.id=season_tariff&tariffs.id=off_season_tariff&tariffs.switchDate=2022-09-01



You can also go to

Useful tools