Get booking invoices
Bookings
Retrieve the invoices issued for a booking and, when it is part of a group, for every booking of the group in the same property; batch invoices that bill a line of any of them come too. These are the final, legally numbered documents: once issued they are not edited, and a correction is made by issuing a credit note against them. Credit notes come back in the same list, with type: refund and the invoice they correct pointing at them through refundId — so the amount actually invoiced is the sum of the invoices minus the sum of the credit notes, not the sum of everything. Each entry carries its series and number, date, total, the line items it bills with the tax rate of each, and the customer or company it was billed to; tax bases and tax amounts are not broken out. Amounts are in the currency the invoice was issued in, given in coin as it was stored. A booking may have no invoices yet, several, or one per guest when the bill was split. Quotes sent before invoicing are a different document: see /proformas.
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
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
Property code. Identifies the property (hotel, apartment building, hostel) the request applies to. It must match the property your API key was issued for.
Booking ID. Obtained from the search endpoints (GET /api/v2/bookings/{pcode}/search) or returned by the booking creation endpoint.
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
Unique ID of the invoice
Property code this invoice belongs to
Currency of the invoice as it was stored when it was issued: the symbol for most properties (€), an ISO 4217 code for some others (COP, MAD). Not normalised
Invoice issue date (YYYY-MM-DD)
Invoice series prefix (e.g. INV, F, RE) as configured in the property settings
Additional numeric prefix for sub-series. Absent when the invoice has none
Sequential number of the invoice within its series, as a number. The series is in prefix (and prefixAdditional): the printed reference is the two together
Total amount of the invoice (including taxes)
ID of the credit note that refunds this invoice. Absent when it was not refunded
List of payment IDs linked to this invoice
Total amount already paid towards this invoice
Whether the invoice was issued on credit, to be paid later. It does not mark a credit note: a credit note is type: refund
Day the invoice was emailed (YYYY-MM-DD). Absent when it was never sent
Invoice type: invoice, refund (a credit note) or deposit. Invoices and credit notes of the services module (POS) also come as invoice and refund; servicesDocument tells them apart. The value service is listed by the enum but never returned here
List of booking IDs included in this invoice (an invoice can cover multiple bookings)
Line items breakdown. Keyed by item ID, each entry shows the booking it belongs to, tax percentage, and total amount; type is the kind of line as stored — an open set: main for the stay, tax for the tourist tax, and others such as prePay, refund, tax2 or the type of a POS integration; absent when the line has none — and start/end the first and last night it covers (YYYY-MM-DD) when it has them. Taxes come only as a rate per line: the invoice carries no tax bases or tax amounts
Billing customer type: particular, company, or agency
Billing customer first name. For a particular it is every word of the billing name but the last; for a company or an agency it is the whole billing name
Billing customer last name: the last word of the billing name for a particular (empty when the name is one word), and always empty for a company or an agency
Billing customer document type: P (passport), D (DNI), C (driving license), I (identity card), N (Spanish residence permit), X (foreign residence permit), MI (minor undocumented), E (other), IDX (foreigner ID), ID (identity card, legacy code), 50 (foreign tax ID). P when the stored type is missing or not one of these
Billing customer document number. Absent when it was not recorded
Billing customer phone number. Absent when empty
Billing address. Absent when empty
Billing postal code. Absent when empty
Billing city. Absent when empty
Billing country code as stored: almost always ISO 3166-1 alpha-3, a two-letter code on a few older invoices. Absent when empty
Billing province or state. Absent when empty
Additional notes or observations on the invoice. Absent when empty
Whether the invoice carries the verification URL of a fiscal digital signature (TicketBAI or Veri*factu): see fiscalUrl
Verification URL of the fiscal digital signature (TicketBAI or Veri*factu) the invoice was signed with. Absent when it is not signed
Why the fiscal digital signature failed, on an invoice that is not signed. Absent on a signed invoice and when nothing failed
Signature provider that reported error. Absent when there is no error
One of:ticketbaiverifactu
The provider's own code for error (for example B4_1000002). Absent when the provider gave none
Where an asynchronous signature of an unsigned invoice stands: processing, signed or error. Absent when no signature is in flight
ID of the billing customer record (company, agency or particular) the invoice was issued to
Country name of the billing customer as it was typed (for example "france"), the text the invoice prints. Absent when empty
Withholding tax rate (IRPF) of the invoice, in percent. 0 when there is none
true on the invoices and credit notes of the services module (POS sales billed on their own series). Absent on every other invoice
Only on an invoice that bills bookings outside the group of the one asked for (a batch invoice): what this booking owes on it. total keeps meaning the whole invoice
Only on a batch invoice, with bookingTotal: what has been paid for this booking on it. totalPaid keeps meaning the whole invoice
What is a pcode?
Rate limits