Capture a booking-pace snapshot on demand
const url = 'https://api.aerandil.com/v1/analytics/booking-pace/capture';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"as_of":"2026-04-15","property_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
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/analytics/booking-pace/capture \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "as_of": "2026-04-15", "property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Take the current business day’s booking-pace snapshot for one property now, instead of waiting for the nightly property-local cutoff sweep.
Which business day. Inside the post-cutoff grace window this captures the just-ended business day — the exact unit the sweep would take, just sooner. Past the grace window it captures the in-progress business day early; captured_at on the fact rows records the true moment, so an early curve point is honest about when it was frozen. Lapsed windows are never backfilled — live tables cannot reconstruct end-of-day state after the fact.
as_of. A house whose business time is not the clock’s — a replayed or simulated booking log — names the business day it is closing instead. It is admitted only while no reservation of the property was booked or cancelled on a later day, which is exactly when the live tables still are that day’s end-of-day book; a live house, which books every day, cannot use it to backfill.
At most one snapshot per business day. Snapshot rows are immutable once written: a repeat capture, or the nightly sweep arriving later, is a no-op (200 with captured: false).
Accepts an Idempotency-Key header for retry-safe automation, though the once-per-business-day claim already makes the operation naturally idempotent.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The property-local business day to capture, for a house whose business time is not the clock’s — a replayed or simulated booking log captured at each day’s close. Refused (422) in the future, and refused once any reservation of the property was booked or cancelled on a later day: the live tables are that day’s end-of-day book only until then. Absent, the clock picks the day as described above.
Property whose current business day to snapshot.
Examplegenerated
{ "as_of": "2026-04-15", "property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”That business day’s snapshot already existed (captured: false); nothing was written.
object
False when that day’s snapshot already existed — snapshot rows are immutable, so nothing was written.
The property-local business day the capture targeted.
Examplegenerated
{ "captured": true, "property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "snapshot_date_local": "2026-04-15"}Snapshot captured — one row per stay date in the lookahead horizon was written.
object
False when that day’s snapshot already existed — snapshot rows are immutable, so nothing was written.
The property-local business day the capture targeted.
Examplegenerated
{ "captured": true, "property_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "snapshot_date_local": "2026-04-15"}Token lacks the analytics:write scope.
Structured error wrapper. Every non-2xx response from any Aerandil endpoint serialises to this shape; the HTTP status carries the failure class (4xx/5xx), the body adds a stable code for programmatic dispatch plus a human-readable message.
object
object
Stable, programmatic error code (e.g. unauthorized, forbidden, not_found, invalid_body, invalid_url, precondition_failed, no_secondary_key). Clients dispatch on code, not on the message (which may be localised or contextualised in future versions).
Request-id correlation handle echoed on the request-id response header — support teams correlate without scraping logs.
Human-readable explanation of the failure.
Per-error structured detail. The shape varies by code (e.g. forbidden_action carries {"action": "..."}; precondition_failed carries {"current_version": N}).
Examplegenerated
{ "error": { "code": "example", "instance_id": "example", "message": "example", "parameters": "example" }}No such property in this tenant.
Structured error wrapper. Every non-2xx response from any Aerandil endpoint serialises to this shape; the HTTP status carries the failure class (4xx/5xx), the body adds a stable code for programmatic dispatch plus a human-readable message.
object
object
Stable, programmatic error code (e.g. unauthorized, forbidden, not_found, invalid_body, invalid_url, precondition_failed, no_secondary_key). Clients dispatch on code, not on the message (which may be localised or contextualised in future versions).
Request-id correlation handle echoed on the request-id response header — support teams correlate without scraping logs.
Human-readable explanation of the failure.
Per-error structured detail. The shape varies by code (e.g. forbidden_action carries {"action": "..."}; precondition_failed carries {"current_version": N}).
Examplegenerated
{ "error": { "code": "example", "instance_id": "example", "message": "example", "parameters": "example" }}as_of names a day the property cannot give: in the future, or one its book has moved past (booking_pace_as_of_refused).
Structured error wrapper. Every non-2xx response from any Aerandil endpoint serialises to this shape; the HTTP status carries the failure class (4xx/5xx), the body adds a stable code for programmatic dispatch plus a human-readable message.
object
object
Stable, programmatic error code (e.g. unauthorized, forbidden, not_found, invalid_body, invalid_url, precondition_failed, no_secondary_key). Clients dispatch on code, not on the message (which may be localised or contextualised in future versions).
Request-id correlation handle echoed on the request-id response header — support teams correlate without scraping logs.
Human-readable explanation of the failure.
Per-error structured detail. The shape varies by code (e.g. forbidden_action carries {"action": "..."}; precondition_failed carries {"current_version": N}).
Examplegenerated
{ "error": { "code": "example", "instance_id": "example", "message": "example", "parameters": "example" }}