Dates, money, pagination and idempotency

Nights and date ranges, amounts in minor units per currency, cursors, and repeating a write safely with Idempotency-Key.

Dates and nights

  • Dates are YYYY-MM-DD, in the property's time zone. Times are ISO 8601 in UTC.
  • A range of nights (from, to) includes both ends. A booking's departureDate is the morning the guest leaves: it is not a night of the stay. A block's lastNight is included.
  • Weekdays you send are 1 (Monday) to 7 (Sunday), as in the CLI and the MCP tools; 0 is still read as Sunday. In answers, a season's weekdays count 0 (Sunday) to 6 (Saturday); checkInWeekdays / checkOutWeekdays are seven switches, Monday first.

Money in minor units

Every amount ending in Minor is an integer in the smallest unit of its currency (ISO 4217), and the currency is on the same record or its property. Send amounts the same way, as integers.

CurrencyDecimalsExample
EUR212345 = €123.45
HUF24500000 = 45,000 Ft
JPY015000 = ¥15,000
KWD310500 = KWD 10.500

The decimals per currency are ISO 4217's; the server's table and every copy in the apps are held to each other by a test. The MCP host tools are the exception: they take { amount: "123.45", currency: "EUR" }.

Pagination

A list that pages takes take (the page size; the maximum, 100 or 200, is in the OpenAPI document) and cursor, and answers the next cursor, which is null on the last page. Lists that are small by nature (properties, listings) do not page.

curl -s "$API/threads?take=50" -H "Authorization: $HOSTEMI_KEY"                 # { "threads": [ … ], "cursor": "…" }
curl -s "$API/threads?take=50&cursor=…" -H "Authorization: $HOSTEMI_KEY"

Idempotency

Writes accept an Idempotency-Key header (any unique string you choose). Repeating the same call with the same key within 24 hours returns the first answer instead of writing twice.

CaseAnswer
Same key, same request, doneThe first answer, again.
Same key, first call still running409 "… still being processed. Wait, then retry the same key."
Same key, different request409 "This Idempotency-Key was already used for a different request. Use a new key; keys last 24 hours."

A change stored for the host keeps its key, so the approved replay does not run twice either.

Ids

Ids are opaque strings (cmwhux6y60026somfhixjmcm8); never parse them. A listing is a unit in the API, a booking a reservation, a connected platform a connection, a conversation a thread.

Something missing from this page? Write to [email protected], or use the form on the Help page.