Rental Planner Public API

Three endpoints: read the dates a unit is already taken, write a booking into the owner's calendar, and cancel one you created.

Base URL
issued with your token
Auth
Authorization: Bearer <token>
Format
application/json · UTF-8
Rate limit
60 req/min per token

Getting started

  1. Get your token and base URL. Both are issued by the Rental Planner team. One token belongs to one account — every unit and booking you can reach through the API belongs to that account.

  2. Check what is already taken. Use your external id for the unit.

    curl "$BASE/getFutureUnavailableDates?unitId=UNIT_ID" \
      -H "Authorization: Bearer $TOKEN"
  3. Create a booking. The minimum is a unit, your booking id, the dates, a guest name and a price.

    curl -X POST "$BASE/bookings" \
      -H "Authorization: Bearer $TOKEN" \
      -H 'Content-Type: application/json' \
      -d '{"unitId":"UNIT_ID","externalBookingId":"RES-90210",
           "start":"2026-12-01","end":"2026-12-05",
           "clientName":"John Ternus","fullPrice":400}'

Authorization

Every request carries a bearer token. Tokens are scoped, and the scope is hierarchical: a write token can also read, so one token is enough for both endpoints.

ScopeGrants
readReading availability
writeEverything a read token can do, plus creating bookings

A token without the scope an endpoint needs gets 403 with "Forbidden: write scope required".

Rate limits

60 requests per minute per token. Above that you get 429; sustained abuse (300 requests per minute) temporarily blocks the token and answers 403 Forbidden. Back off and retry rather than hammering.

How dates work

All dates are calendar days in YYYY-MM-DD, in the property's own calendar. No timezone, no time-of-day.

end is the check-out date. It is not occupied — the next guest can arrive that same day. A booking from the 1st to the 5th of December covers four nights and leaves the 5th open.

Mon
30
Tue
1
Wed
2
Thu
3
Fri
4
Sat
5
Nights occupied by start: 2026-12-01 … end: 2026-12-05 Check-out day — free for the next arrival

The same rule applies to the ranges returned by the availability endpoint: a range's end is a check-out day, so you may book a stay that starts on it.

Read availability

GET /getFutureUnavailableDates?unitId=<unitId> scope read

Returns the dates a unit is already taken, from today onwards. Past stays are never returned.

Query parameters

NameRequiredNotes
unitIdyesYour external id for the unit, up to 64 characters

Response · 200

{
  "success": true,
  "unitId": "UNIT_ID",
  "unavailable": [
    { "start": "2026-12-01", "end": "2026-12-05" },
    { "start": "2026-12-20", "end": "2027-01-08" }
  ]
}

Ranges are merged: two stays that touch or overlap come back as one range. Sorted by start date.

Caching

Answers are cached for up to 60 seconds. Bookings you create through this API drop that cache immediately, so your own writes are visible on the next call.

Errors

CodeBodyMeaning
404{"success": false, "error": "Unit not found"}No unit with that id on your account
401{"success": false, "error": "Unauthorized"}Missing or unknown token

Create a booking

POST /bookings scope write

Writes a booking into the owner's calendar. It appears in the Rental Planner app exactly like one entered by hand: guest, dates, payment schedule, deposit. Body up to 100 KB, Content-Type: application/json.

Unknown top-level fields are ignored, so you can send extra keys without breaking the call.

Request body

FieldRequiredType / limitsNotes
unitIdyesstring, ≤ 64Your external id for the unit
externalBookingIdyesstring, 1–128Your booking id. Idempotency key — see below
startyesYYYY-MM-DDCheck-in day
endyesYYYY-MM-DDCheck-out day, after start, stay ≤ 730 days
clientNameyesstring, 1–200Guest name
fullPriceprice*number ≥ 0Total for the whole stay
unitPriceprice*number ≥ 0Per night or per month; send together with unitType
unitTypeprice*night | monthSend together with unitPrice
localeno2-letter codeLanguage of generated payment titles. Defaults to en
adultsCountnointeger 1–50Defaults to 1
childrenCountnointeger 0–50
phonenostring, ≤ 50Also used to match an existing guest
additionalContactsnostring, ≤ 1000Email, messenger, anything else
notesnostring, ≤ 5000Free-form note for the owner
sellChannelnostring, ≤ 100Name of an existing sales channel
checkInTimeno"HH:mm"Shown on the owner's calendar
checkOutTimeno"HH:mm"
prePaymentnoobject{"price": 100} or {"percentage": 20}, plus optional "paid"
pledgenonumber or objectRefundable deposit
isStrictnobooleanRefuse on overlap. Defaults to true

* price — see the rules below; it may be omitted entirely if the unit has a default price.

Full example

{
  "unitId": "UNIT_ID",
  "externalBookingId": "RES-90210",
  "start": "2026-12-01",
  "end": "2026-12-05",
  "clientName": "John Ternus",
  "phone": "+1 555 0142",
  "fullPrice": 400,
  "locale": "en",
  "adultsCount": 2,
  "prePayment": { "percentage": 20, "paid": true },
  "pledge": 100,
  "checkInTime": "14:00",
  "checkOutTime": "11:00",
  "sellChannel": "Booking.com",
  "notes": "Late arrival, approx. 23:00"
}

Response · 201

{
  "success": true,
  "externalBookingId": "RES-90210",
  "unitId": "UNIT_ID",
  "start": "2026-12-01",
  "end": "2026-12-05",
  "fullPrice": 400,
  "warnings": []
}

fullPrice is the total the system computed. warnings is always an array and usually empty — see Guest & channel.

Price rules

Send the price in one of three ways. They are checked in this order:

  1. unitPrice + unitType — the total is calculated from the stay. Add fullPrice as well to override that total, for example for a negotiated discount.
  2. fullPrice alone — treated as a nightly stay; the per-night rate is derived from it.
  3. Nothing — the unit's own default price is used, if the owner set one.

If none of the three applies, the answer is 400 with "field": "price".

Prepayment & deposit

prePayment takes either a fixed price or a percentage of the stay — never both. paid marks it as already received and defaults to false. Omit prePayment and the unit's own default prepayment applies, if the owner set one. A prepayment larger than the stay total is rejected.

pledge records a refundable deposit: a number, or {"price": 100}.

Both appear in the app as payment entries, with titles written in the body's locale. Supported: en, ru, th, ar, de, es, fr, he, pt, tr. An unknown locale quietly falls back to en — never an error.

Guest & channel

The booking is linked to an existing guest of the account: by phone digits when you send a phone, otherwise by name. Nothing is created if no guest matches — the booking simply carries the name and phone you sent.

sellChannel is matched by name against the owner's existing channels, ignoring case, spacing and punctuation, so "booking com" matches "Booking.com". If nothing matches, the booking is still created and the response carries a warning:

{
  "code": "sell_channel_not_found",
  "field": "sellChannel",
  "message": "No sell channel named \"NoSuchChannel\" exists for this account; the booking was saved without a sell channel."
}

Conflicts

By default (isStrict: true) a booking that overlaps an existing one is refused with 409. Arrival on another guest's check-out day is not an overlap and is always allowed.

Send isStrict: false to record the booking anyway — use it when your own system is the source of truth and handles double bookings itself.

Blocked dates without a guest

Send type: "unavailable" to close dates for maintenance, an owner stay or a hold. The body shrinks to five fields:

{
  "type": "unavailable",
  "unitId": "UNIT_ID",
  "externalBookingId": "BLOCK-7",
  "start": "2026-12-20",
  "end": "2026-12-24",
  // optional: notes, isStrict
}

Booking-only fields — guest name, any price or payment field, guest counts, times, sellChannel — are rejected with 400 naming the field, rather than silently dropped.

Idempotency

externalBookingId is the idempotency key, scoped to your account. Repeating a request with an id that already exists never creates a second booking and never changes the first one — it answers 200:

{ "success": true, "externalBookingId": "RES-90210", "idempotent": true }

So retrying after a timeout is always safe. There is no way to edit a booking in this version — cancel it and create a new one with a new id.

Cancel a booking

DELETE /bookings/<externalBookingId> scope write

Removes a booking you created through this API from the owner's calendar, freeing the dates. Address it by your own id — the same one you sent when creating it.

curl -X DELETE "$BASE/bookings/RES-90210" \
  -H "Authorization: Bearer $TOKEN"

Response · 200

Two shapes, both with HTTP 200:

BodyMeaning
{"success": true, "deleted": true} The booking existed and is now gone; its dates are free
{"success": true, "deleted": false, "alreadyDeleted": true} Nothing to delete — no such booking on your account, or it was already cancelled
Also safe to retry

There is no 404 here on purpose: we cannot tell "never existed" apart from "already cancelled", and for a retry after a timeout the distinction does not matter. Send the request again and treat either answer as success.

What it will not delete

Only bookings created through this API, and only on your own account. Anything the owner entered by hand or that arrived from a calendar sync stays untouched and answers alreadyDeleted. Cancelling is final — there is no undo, so create the booking again if the guest returns.

The availability cache is dropped immediately, so the freed dates show up on your next read.

Errors

Every failure returns JSON with "success": false and an error string. Validation failures add field, naming the offending field — for example "prePayment.percentage".

CodeWhenWhat to do
400Validation failed, or malformed JSONRead field, fix the value. Do not retry unchanged
401Missing or unknown tokenCheck the Authorization header
403Read-only token on a write call, or the token is temporarily blocked for rate-limit abuse"Forbidden: write scope required" means ask for a write token; plain "Forbidden" means back off
404Unit not on your accountCheck unitId
405Wrong HTTP method for the pathFix the method
409Dates overlap an existing booking while isStrict is onRead availability, pick other dates, or send isStrict: false
429Rate limit exceededBack off, then retry
500Something broke on our sideRetry with backoff; the write is idempotent, so a retry is safe
Safe to retry

Because externalBookingId is an idempotency key, retrying a booking request after a timeout or a 500 cannot create a duplicate. Retry with backoff rather than giving up.

Integration checklist

  • Store our unitId next to each of your listings — every call needs it.
  • Use your own booking reference as externalBookingId; keep it stable across retries.
  • Treat end as the check-out day on both sides, so a same-day turnover is not read as a conflict.
  • Read availability before offering dates, and handle 409 as a normal outcome rather than an error.
  • Send locale so the owner sees payment titles in their language.
  • Cancel on our side too when a guest cancels on yours, or the dates stay blocked for the owner.
  • Log the warnings array — an unmatched sales channel is reported there, not as a failure.
  • Respect the rate limit: back off on 429 instead of retrying immediately.