Consultar las proformas de una reserva

Reservas

get/api/v2/bookings/{pcode}/proformas/{bookingId}x-api-key

Devuelve las proformas emitidas de una reserva. Una proforma es un presupuesto con forma de factura: se manda al huésped o a la empresa antes de la estancia para decir cuánto va a costar, y no tiene valor contable, no usa la numeración de facturas y no salda nada. El documento real es la factura (/invoices), que puede emitirse después por un importe distinto si la estancia cambió. Si la reserva forma parte de un grupo, llegan también las proformas de todas las reservas del grupo en el mismo establecimiento. Cada entrada lleva su serie y número, fecha, total, líneas y el cliente o empresa al que iba dirigida. Los importes van en la moneda en que se emitió la proforma, que coin da tal como se guardó.

Consola

Llama a la API desde tu navegador, con la misma petición que enviará tu servidor.

Entorno

Producción

https://uni-api.hotelgest.com

Las llamadas van contra datos reales con tu propia clave. Un POST, PUT, PATCH o DELETE aquí modifica un establecimiento de verdad.

Credenciales

La clave de API, en cada petición. La crea un administrador del establecimiento en el PMS, en Configuración → Claves de API; un partner recibe una por establecimiento cuando este activa su integración. Solo funciona con el establecimiento para el que se emitió y con los endpoints que tiene concedidos.

Este endpoint necesita una credencial. Sin ella recibirás un 401.

Se guarda solo en este navegador. No se envía a ningún sitio que no sea el host de la API de arriba.

Parámetros de ruta

gethttps://uni-api.hotelgest.com/api/v2/bookings/123456/proformas/789

Envía la petición y aquí verás la respuesta real.

No hay nada simulado. Lo que aparezca es lo que devolvió la API.

Las peticiones salen directamente de tu navegador al host de la API de arriba: esta web no hace de intermediaria.

Parámetros de ruta

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.

Respuestas

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

coin
string

Currency of the proforma as it was stored when it was issued: the symbol for most properties (€, $, S./), an ISO 4217 code for some others (COP, MAD, PHP). Not normalised; null on a few old proformas that stored none

date
string

Proforma issue date (YYYY-MM-DD)

id
number

Unique ID of the proforma

prefix
string

Proforma series prefix (e.g. PRO) as configured in the property settings

reference
string

Number of the proforma within its series, as text. The series is in prefix: the printed reference is the two together

total
number

Total amount of the proforma (including taxes)

isCredit
boolean

Always false: proformas have no credit flag. Kept so that the shape matches the invoices one

proformaWasSent
string

Day the proforma was emailed (YYYY-MM-DD). Absent when it was never sent

bookingsIds
number[]

List of booking IDs included in this proforma

items
object

Line items breakdown. Keyed by item ID, each entry shows the booking it belongs to, tax percentage, and total amount

CustomerType

Billing customer type: particular, company, or agency

name
string

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

surname
string

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

DocumentType

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

documentNumber
string

Billing customer document number. Absent when it was not recorded

phone
string

Billing customer phone number. Absent when empty

address
string

Billing address. Absent when empty

postalCode
string

Billing postal code. Absent when empty

city
string

Billing city. Absent when empty

country
string

Billing country code as stored: almost always ISO 3166-1 alpha-3, a two-letter code on a few older documents. Absent when empty

province
string

Billing province or state. Absent when empty

observations
string

Additional notes or observations on the proforma. Absent when empty

countryName
string

Country name of the billing customer as it was typed (for example "france"), the text the proforma prints. Absent when empty

Respuesta de ejemplo
1[
2 {
3 "coin": "€",
4 "date": "2025-02-10",
5 "id": 50,
6 "prefix": "PRO",
7 "reference": "45",
8 "total": 325,
9 "isCredit": false,
10 "proformaWasSent": "2025-02-10",
11 "bookingsIds": [
12 1001,
13 1005
14 ],
15 "items": {
16 "1": {
17 "bookingId": 1001,
18 "tax": 10,
19 "total": 150
20 },
21 "2": {
22 "bookingId": 1005,
23 "tax": 10,
24 "total": 175
25 }
26 },
27 "customerType": "particular",
28 "name": "John",
29 "surname": "Doe",
30 "documentType": "D",
31 "documentNumber": "X9876543",
32 "phone": "+34 600 123 456",
33 "address": "Main Street 123",
34 "postalCode": "08001",
35 "city": "Barcelona",
36 "country": "ESP",
37 "province": "Barcelona",
38 "observations": "Client requested summary breakdown.",
39 "countryName": "france"
40 }
41]

¿Qué es un pcode?

El código de propiedad. Cada endpoint está limitado a un establecimiento, y tu clave de API solo funciona con el establecimiento para el que se emitió.

Límites de uso

100 peticiones por minuto por IP de origen, 120 por clave de API y 300 por establecimiento, cada una contada entre todos los endpoints a la vez, no por endpoint. Al pasarte de cualquiera recibes un 429 con los segundos de espera en Retry-After-<límite> (apikey-ip, apikey o apikey-pcode): para y espera. Cada reincidencia en una clave o un establecimiento se bloquea más tiempo, hasta 7 días.