Find booking
const url = 'https://api.aerandil.com/v1/functions/hospitality.function.find_booking/invoke';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"params":{"confirmation_number":"example"},"target":{"id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","object_type":"hospitality.property"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.aerandil.com/v1/functions/hospitality.function.find_booking/invoke \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "params": { "confirmation_number": "example" }, "target": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "object_type": "hospitality.property" } }'One booking at a house by its confirmation number, whatever its status: arriving, in house, departed or cancelled. An exact match, so an unknown number returns no bookings and is not an error. Each booking is the row arrivals_board shows: the reservation, its status, the guest (guest_id, guest_name), the stay’s dates and party, deposits, has_special_request, and in rooms each live leg with its id and any assigned room. readiness is present only for a stay still on the board. It carries no contact details. The number and the guest’s name are personal data: a reader not cleared for them finds nothing, however exact the number. Read-only.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
object
Responses
Section titled “Responses”Function invoked. The body carries the typed return_value shaped by the function’s declared return_type.
Envelope returned by the Aerandil function engine. correlation_id is the per-invocation id for trace stitching; return_value is the typed value the function computed (shape declared by the function’s return_type).
object
Per-invocation correlation id; appears on log/trace records this function emitted.
object
object
object
object
object
Example
{ "return_value": { "bookings": [ { "readiness": "unassigned", "rooms": [ { "block": "out_of_order" } ] } ] }}Headers
Section titled “Headers”Always no-store — function results are time-sensitive and never cacheable.
Function or target object not found.
Parameter validation or domain-rule violation.