Charge a POS ticket to a booking

Bookings

post/api/integrations/{pcode}/pos/tickets/{bookingId}x-api-key

Posts a restaurant or bar ticket paid as a room charge. Each line becomes a charge of the booking, billed with the rest of the stay at check-out, and shows up in the booking products like any other charge. Send prices with taxes included and the tax rate as a percentage; consumedAt dates the charge on that day in the property time zone. ticketId makes it safe to retry: sending a ticket that is already on the booking writes nothing and answers 200 with what is stored and replayed: true — the line names as stored (an apostrophe ' is stored as ´) and each unit price worked back from the stored net price, which can differ from what you sent by a cent; the same ticketId with a different total answers 409 posTicketIdReused. Find the guests staying now with GET /api/integrations/{pcode}/pos/in-house. Answers 409 posTicketBookingCheckedOut once the booking is checked out, 409 posTicketBookingNotActive for a cancelled booking, a no-show or a block, and 409 posTicketInProgress while another ticket for the same booking is being written — retry in a moment. Partner keys only, with this endpoint granted to the connection.

Console

Runs against the API from your browser, with the same request your server will send.

Environment

Production

https://uni-api.hotelgest.com

Calls hit live data with your own API key. A POST, PUT, PATCH or DELETE here changes a real property.

Credentials

The API key, sent on every request. A property admin creates it in the PMS under Settings → API keys; a partner receives one per property when the property activates its integration. It works only for the property it was issued for, and only on the endpoints granted to it.

This endpoint needs a credential. Without it you will get a 401.

Stored in this browser only. Never sent anywhere but the API host above.

Path parameters

Body

Arm production

Writing methods are locked until you arm them. This is live hotel data.

POST is locked on production. Arm it above if you mean it.

posthttps://uni-api.hotelgest.com/api/integrations/123456/pos/tickets/789

Send the request to see the real response here.

Nothing is mocked. What comes back is what the API returned.

Requests go straight from your browser to the API host above — nothing is proxied through this site.

Path parameters

pcode
number

Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for.

bookingId
number

Booking ID. Obtained from the search endpoints (GET /api/v2/bookings/{pcode}/search) or returned by the booking creation endpoint.

Request body

ticketId
string

The POS's own id for the ticket, 1 to 22 characters: letters, digits, ., _, / or -. Sending the same ticket again never charges it twice.

consumedAt
string

When the ticket was closed, ISO 8601 with its offset. The charge is dated on that day, in the property time zone

PosTicketLineDto[]

The lines of the ticket, 1 to 200

Example
1{
2 "ticketId": "T-2026-000123",
3 "consumedAt": "2026-10-07T21:34:00+02:00",
4 "lines": [
5 {
6 "name": "Menú del día",
7 "quantity": 2,
8 "unitPrice": 18.5,
9 "taxRate": 10
10 }
11 ]
12}

Responses

Ok. If your API key answers encrypted — every key issued now does, and every partner credential — this body arrives as the encryption envelope ({ crypto, protected, wrappedKey, iv, payload, tag }, a compact JWE), and the schema below is what its payload decrypts to. See https://public-api.hotelgest.com/public/guides/encryption

ticketId
string

The POS’s own id for the ticket, as it was sent

replayed
boolean

True when the ticket was already on the booking and nothing was written this time: a resend of the same ticket

total
number

Sum of the lines, taxes included

AddPosTicketItemDto[]

One charge per line of the ticket

Example response
1{
2 "ticketId": "T-2026-000123",
3 "replayed": false,
4 "total": 37,
5 "items": [
6 {
7 "id": 22898324,
8 "name": "Menú del día",
9 "quantity": 2,
10 "unitPrice": 18.5,
11 "taxRate": 10
12 }
13 ]
14}

What is a pcode?

The property code. Every endpoint is scoped to one property, and your API key only works for the property it was issued for.

Rate limits

100 requests per minute per source IP, 120 per API key and 300 per property, each counted across every endpoint together — not per endpoint. Over any of them you get a 429 with the seconds to wait in Retry-After-<limit> (apikey-ip, apikey or apikey-pcode): stop and wait it out. Repeat offences on a key or a property are blocked for longer each time, up to 7 days.