Skip to main content
POST
Create a reservation

Autorizzazioni

Authorization
string
header
obbligatorio

An integration token, sent as Authorization: Bearer <token>.

A token belongs to one installation of an app. Someone at the property who may manage its integrations installs the app in Gridbeds, under Settings → Integrations, and issues the token there, granting the scopes the app requested or a subset of them. The token is shown once; issuing a new one revokes the previous one.

Every request reads and writes the data of the organization that installed the app, and nothing else. Each operation names the scope it requires. A token without that scope, and the token of an installation that is disabled or in error, are refused with 403; a token that is missing, unknown or revoked, and a user's own sign-in token, are refused with 401.

Intestazioni

Idempotency-Key
string

A key of your choosing, such as a UUID, that makes a retry safe: for at least 24 hours the same key with the same body answers with the first response instead of repeating the write. Only a successful response is remembered; after a failure the same key may be tried again.

Maximum string length: 255

Corpo

application/json

A reservation to create. It is made pending.

property_id
string<uuid>
obbligatorio

The property the stay is at. It must belong to the organization.

room_type_id
string<uuid>
obbligatorio

The room type being booked. It must belong to property_id, and have a room free for every night of the stay.

guest_id
string<uuid>
obbligatorio

The guest the reservation is for: an id from listGuests, or from createGuest for a guest not yet known.

check_in
string<date>
obbligatorio

The arrival date, as YYYY-MM-DD. Not before today.

check_out
string<date>
obbligatorio

The departure date, as YYYY-MM-DD. After check_in, and at most 365 nights later.

adults
integer
obbligatorio

How many adults are staying.

Intervallo richiesto: x >= 1
base_price
number
obbligatorio

The price of the stay before fees, taxes and discounts. Not negative. Prices are recorded as sent: the API does not price the stay.

Intervallo richiesto: x >= 0
total_price
number
obbligatorio

The total price of the stay, in currency. Not negative. Recorded as sent.

Intervallo richiesto: x >= 0
rate_plan_id
string<uuid> | null

The rate plan the stay is sold under, recorded on the reservation. It must belong to property_id. The plan's restrictions, such as a minimum stay, are not checked.

channel_id
string<uuid> | null

The booking channel the reservation came through, when it came through one.

children
integer

How many children are staying. Omit it for none.

Intervallo richiesto: x >= 0
infants
integer

How many infants are staying. Omit it for none.

Intervallo richiesto: x >= 0
currency
string

The three-letter ISO 4217 code of the amounts below. Omit it for the property's currency.

cleaning_fee
number

The cleaning fee, recorded as sent. Not negative. Omit it for none.

service_fee
number

The service fee, recorded as sent. Not negative. Omit it for none.

taxes
number

The taxes on the stay, recorded as sent. Not negative. Omit it for none.

discounts
number

The discount given on the stay, recorded as sent. Not negative. Omit it for none.

special_requests
string | null

What the guest asked for, in their words.

internal_notes
string | null

Notes for the property's staff.

expected_arrival_time
string | null

When the guest expects to arrive, as HH:MM on the property's clock.

arrival_transport_mode
enum<string> | null

How the guest is travelling to the property.

Opzioni disponibili:
flight,
train,
car,
other
arrival_transport_number
string | null

The flight or train number, for arrival_transport_mode. Letters, digits, spaces and -, / or ..

Maximum string length: 20
Pattern: ^[\pL\pN][\pL\pN \-\/.]*$

Risposta

The reservation, as getReservation returns it. It is pending.

data
Reservation · object
obbligatorio
meta
object
obbligatorio