The booking engine public endpoints are the same ones the /reservar page and the @valinor/booking package use. This reference is generated from the OpenAPI specification versioned with the API code, so it follows every contract change.
- Address:
https://valinorcrm.com
- OpenAPI specification:
/api/public/booking-engines/openapi.json
- Authentication: none. Requests go without cookies or tokens.
- CORS: any origin can read the engine, the calendar and availability. A day use purchase is accepted only from the domains listed in Domínios do site (see the embedding guide).
- Ids: numeric ids travel as text (
"1234567890"), so JavaScript doesn’t lose precision.
Errors answer with { "error": "<code>", "message": "<text>" }. The message is in Portuguese and can be shown to the visitor.
| Status |
Code |
When |
403 |
forbidden_origin |
The day use purchase came from a site outside the engine’s domains. |
403 |
challenge_failed |
The anti-bot challenge (Turnstile) failed. |
409 |
day_use_unavailable |
The date ran out of spots for the requested quantities. |
429 |
too_many_availability_searches |
Too many searches in a row from the same address. Wait a moment and try again. |
GET/api/public/booking-engines/{publicId}
The booking engine: name, policies, minimum and maximum advance, hold minutes and the day uses on sale, with ticket types and extras.
Parameters| Name | In | Type |
|---|
publicIdrequired | path | string |
GET/api/public/booking-engines/{publicId}/availability
Room availability and rates for a stay period.
Parameters| Name | In | Type |
|---|
publicIdrequired | path | string |
checkInrequired | query | string (date) |
checkOutrequired | query | string (date) |
adultsoptional | query | integer |
childAgesoptional | query | integer[] |
promoCodeoptional | query | string |
POST/api/public/booking-engines/{publicId}/checkout
Creates the stay reservation and returns the payment page link.
Parameters| Name | In | Type |
|---|
publicIdrequired | path | string |
POST/api/public/booking-engines/{publicId}/day-use/checkout
Day use purchase: holds the spots for the date, creates the deal in the CRM (with the UTMs, when sent) and returns the payment page link. Accepted only from the domains registered in the engine.
Parameters| Name | In | Type |
|---|
publicIdrequired | path | string |
GET/api/public/booking-engines/{publicId}/day-use/{productId}/calendar
Calendar of a day use between two dates: remaining spots, closed or sold-out days and the price of each ticket type per day.
Parameters| Name | In | Type |
|---|
publicIdrequired | path | string |
productIdrequired | path | string |
fromrequired | query | string (date) |
torequired | query | string (date) |
Schemas
| Field | Type |
|---|
extraIdrequired | string |
quantityrequired | integer |
DayUseTicketQuantity
| Field | Type |
|---|
quantityrequired | integer |
ticketTypeIdrequired | string |
PublicBookingEngineResponse
| Field | Type |
|---|
dayUserequired | PublicDayUseProduct[] |
holdMinutesrequired | integer |
logoUrloptional | string | null |
maxAdvanceDaysrequired | integer |
minAdvanceDaysrequired | integer |
namerequired | string |
policiesoptional | string | null |
siteUrloptional | string | null |
turnstileSiteKeyoptional | string | null |
PublicCategoryAvailability
| Field | Type |
|---|
amenitiesrequired | string[] |
capacityrequired | integer |
categoryIdrequired | string |
descriptionoptional | string | null |
lowestPriceoptional | number | null |
namerequired | string |
offersrequired | PublicRateOffer[] |
photoUrlsrequired | string[] |
PublicCheckoutGuest
| Field | Type |
|---|
documentrequired | string |
emailrequired | string |
namerequired | string |
phonerequired | string |
PublicCheckoutRequest
| Field | Type |
|---|
acceptPoliciesrequired | boolean |
adultsrequired | integer |
categoryIdrequired | string |
checkInrequired | string (date) |
checkOutrequired | string (date) |
childAgesrequired | integer[] |
extraIdsrequired | string[] |
guestrequired | PublicCheckoutGuest |
promoCodeoptional | string | null |
ratePlanIdrequired | string |
turnstileTokenoptional | string | null |
PublicCheckoutResponse
| Field | Type |
|---|
expiresAtrequired | string (date-time) |
payUrlrequired | string |
PublicCheckoutUtm
| Field | Type |
|---|
campaignoptional | string | null |
contentoptional | string | null |
mediumoptional | string | null |
sourceoptional | string | null |
termoptional | string | null |
PublicDayUseCalendarResponse
PublicDayUseCheckoutRequest
PublicDayUseDay
| Field | Type |
|---|
availablerequired | boolean |
closedrequired | boolean |
daterequired | string (date) |
pricesrequired | PublicDayUsePrice[] |
remainingrequired | integer |
| Field | Type |
|---|
descriptionoptional | string | null |
idrequired | string |
namerequired | string |
pricerequired | number |
PublicDayUsePrice
| Field | Type |
|---|
pricerequired | number |
ticketTypeIdrequired | string |
PublicDayUseTicketType
| Field | Type |
|---|
countsTowardCapacityrequired | boolean |
idrequired | string |
kindrequired | ADULT | CHILD | SPECIAL |
maxAgeoptional | integer | null |
minAgeoptional | integer | null |
namerequired | string |
| Field | Type |
|---|
amountrequired | number |
idrequired | string |
includedrequired | boolean |
namerequired | string |
PublicRateFee
| Field | Type |
|---|
amountrequired | number |
includedrequired | boolean |
namerequired | string |
QuotedLongStayDiscount
| Field | Type |
|---|
amountrequired | number |
minNightsrequired | integer |
percentrequired | number |
RatePlanConditionsSummary
| Field | Type |
|---|
cancellationrequired | string |
longStayoptional | string | null |
mealrequired | string |
noShowrequired | string |
paymentrequired | string |
StayPeriod
| Field | Type |
|---|
checkInrequired | string (date) |
checkOutrequired | string (date) |
lastNightrequired | string (date) |
nightsrequired | integer |
StayViolation
| Field | Type |
|---|
coderequired | OVER_CAPACITY | UNDER_MIN_OCCUPANCY | STOP_SELL | CLOSED_TO_ARRIVAL | CLOSED_TO_DEPARTURE | MIN_NIGHTS | MAX_NIGHTS | MIN_ADVANCE | MAX_ADVANCE | SAME_DAY_CUTOFF | PACKAGE_PERIOD | SALES_CAP | EXTRA_SOLD_OUT | NO_RATE |
messagerequired | string |