SAAM Documentation English
مرجع واجهة البرمجة
هذه المقالة غير مترجمة بعد، وتظهر بالإنجليزية.

Errors and limits

Status codes

Every error comes back as JSON with a message you can show to the user as it is.

Status Meaning
200 Done
400 A write was refused; message says why. Nothing was saved.
401 No token, or the token has expired. Refresh it, or ask the user to connect again.
403 The login that connected doesn't have the role for this endpoint. See Authentication.
409 The hotel can't take this now; for a payment, there is no open Front Desk till.
500 Something failed on our side. It is logged; tell the Support Center if it repeats.

How many rows

Endpoint Rows
check-ins The newest 25
Every other list The newest 100

Lists come newest first and mark nothing as read. Calling them twice gives the same answer. To see each row once, keep the ids you have handled and act only on new ones. This is how Zapier's polling works. Poll often enough that fewer than 100 new rows (25 check-ins) arrive between two calls; every few minutes is plenty for one hotel.

Dates and times

  • Dates (check_in, due_date and so on) are YYYY-MM-DD.
  • Times (added_at, date on payments and so on) are ISO 8601, in the hotel's own time zone, with its offset.

Money

Amounts are numbers. Each comes with its currency, and most also come with the base-currency amount (base_amount, base_currency), so totals can be added up across currencies.