Switch theme
Room-service orders
A room-service app does not issue documents through the API. It sends an order (porudžbina), and the venue accepts or refuses it on the POS (in Nalozi), prepares it and closes it:
- Pošalji na sobu — charged to the guest's room through the hotel system;
- Naplati — a fiscal receipt paid in cash or by card.
Nothing is fiscalized when the order arrives.
The key needs the scopes tickets:create and tickets:read (in Settings, API ključevi). They are independent of the scopes for issuing documents.
Sending an order
http
POST /api/v1/external/tickets
Content-Type: application/json
{
"external_reference": "RS-2026-0042",
"room": "214",
"guest": "Marko Petrović",
"note": "no onion",
"items": [
{ "product_id": 12, "quantity": 2, "note": "well done" },
{ "code": "102", "quantity": 1 }
]
}roomis required;guestandnoteare optional.- An item names its product by exactly one of
product_id,code,barcode,gtin. - Prices are the venue's catalogue prices. The request has no price fields.
- On the POS the order shows with the note "Soba 214 · Marko Petrović — no onion".
201 answers the order with status received. A used external_reference (letter case ignored) is refused with 409 DUPLICATE_REFERENCE, the order in details.ticket. An unknown or unsold product: 422 PRODUCT_NOT_FOUND, nothing stored.
Once sent, an order cannot be changed or withdrawn through the API; the venue can refuse it.
Following an order
GET /api/v1/external/tickets/{reference} returns the order and its status:
| Status | Meaning |
|---|---|
received | Waiting for the venue |
accepted | Accepted, being prepared |
ready | Prepared |
sent_to_room | Closed, charged to the room |
paid | Closed with a receipt |
rejected | Refused by the venue; the reason is in reject_reason |
A closed order also has document: the fiscal receipt, or the room charged. Unknown reference: 404 TICKET_NOT_FOUND.
Every field and example is in the reference.