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

Billing

Reading payments and expenses, and recording a payment or a charge on a guest's room. Roles: Front Desk or Finance (and Hotel Admin).

Payments

GET https://api.saampms.com/zapier/v2/income

The newest 100 payments, newest first. Processing fees are included as their own rows.

Field Meaning
id The payment's id
kind Accommodation, Food and beverage, Product, Other or Processing fee (older rows may say Service)
amount, currency What was paid, in the currency it was paid in
exchange_rate The rate the payment was taken at, in base currency per 1 unit of currency
base_amount, base_currency The amount in the hotel's base currency
method Cash, Card, Wallet or Bank Transfer
reference The card slip, wallet id or transfer reference
outlet Where it was taken: the Front Desk till, Room Service, Reservations and so on
comment The note on the payment
date When it was taken, in the hotel's time zone
guest, booking_no, room_no The guest it was for (room_no only while they have a room)
fee_of For a processing fee: the id of the payment it was charged on
by Who took it: the employee's name, or Zapier for a payment recorded through Zapier

Expenses

GET https://api.saampms.com/zapier/v2/expenses

The newest 100 expenses (money paid out), newest first.

Field Meaning
id, kind, amount, currency, base_amount, base_currency, method, reference, outlet, comment, date As for payments
supplier The supplier paid, or null
guest, room_no The guest, for a refund
refund_of For a refund: the id of the payment it refunds
void true when the expense was voided

Rooms and currencies

These two endpoints fill dropdowns for the two actions below.

  • GET https://api.saampms.com/zapier/v2/rooms: rooms with a guest in house, as {"id": 101, "name": "101 - Omar Khaled"}.
  • GET https://api.saampms.com/zapier/v2/currencies: the hotel's currencies, base currency first, as {"id": "EGP", "name": "EGP"}.

Record a payment

POST https://api.saampms.com/zapier/v2/add-income

Records a payment from an in-house guest into the open Front Desk till, with the same checks as SAAM's own Add Income form. Send JSON:

Field Required Meaning
Room Yes The room number. It must have a guest in house.
Transaction Yes Accommodation, Food and beverage or Other
Amount Yes Above 0
Currency Yes One of the hotel's currencies
Method Yes Cash, Card or Wallet
Reference For Card and Wallet The card slip or wallet reference
Comment For Other What the payment is for
ExchangeRate No The rate you dealt at, in base currency per 1 unit of Currency. Left out, SAAM uses its exchange-rate table.
AddFee No no to skip the processing fee. By default the fee is added, as on SAAM's form.
curl -X POST "https://api.saampms.com/zapier/v2/add-income" \
  -H "Authorization: Bearer <access token>" \
  -H "Content-Type: application/json" \
  -d '{"Room": "101", "Transaction": "Other", "Amount": "50", "Currency": "EGP",
       "Method": "Cash", "Comment": "Airport taxi"}'
{"id": 181, "message": "success", "fee": null, "fee_id": null}

fee and fee_id describe the processing fee, when one was added. In SAAM, the payment shows Zapier where the employee's name would be.

Record a charge

POST https://api.saampms.com/zapier/v2/add-debt

Adds a charge to an in-house guest's bill, due at check-out. Finance and Front Desk are notified. Send JSON:

Field Required Meaning
Room Yes The room number. It must have a guest in house.
Debt Yes Food and beverage or Other. Room charges come from the booking price, so Accommodation isn't accepted.
Amount Yes Above 0
Currency Yes One of the hotel's currencies
Comment No What the charge is for
ExchangeRate No As for payments
{"id": 147, "message": "success"}

When a write is refused

Nothing is saved, and the answer says why:

Status When Example message
400 Something sent isn't accepted "Room 101 has no guest in house." / "Not saved. Reference: Enter the card reference."
409 There is no open Front Desk till (payments only) "There is no open Front Desk till."