Booking detail
Read a booked hotel from the platform's stored data, without a call to the supplier. Use it to poll bookings that are on request and to read back your own order id.
Poll a booking on request
When Book returns RQ or PENDING_BOOK, the platform keeps checking with the supplier and updates the stored booking. Booking detail shows you that update without a supplier call of your own. Read both levels: status for the booking and accommodation.status for the hotel.
- We recommend polling every 5 to 15 minutes, together with the
MODIFIEDandCANCELEDwebhooks. - Set a limit, for example 24 to 48 hours. After it, your operations team contacts your Nava account manager or the hotel.
- Keep the guest on "Pending confirmation" until the status changes. Show "Confirmed" only for
BOOKED.
Read back your order id
The externalReference you sent to Book is stored on the booking and returned here under that name. The trip returned by getBookings carries the same value as agencyBookingReference. Either works when you reconcile a Book call that timed out. See If Book times out.
If you start from getBookings, use hotelservice[].id as the accommodationBookingReference for this path: it is the value Book returned as accommodation.bookingReference. The supplier's hotelservice[].bookingReference works too.
Errors
The spec documents no error schema and no status codes. Treat any non-2xx response as a failure, and keep the raw body, the trace id and the x-request-id header. A 404 body carries auditData with the trace id; this GET sends no Travelc-Trace-Id header.
| Status | Meaning | What to do |
|---|---|---|
404 | Booking reference not found: the reference doesn't exist in this microsite. It is not an outage. A fake booking always returns 404 here, because it is never saved. | Check both references and the credentials' microsite. |
401 / 403 | Token rejected. | Re-authenticate once, then alert. |
5xx, 429, timeout | Temporary failure. | Retry with backoff. Safe here because the call changes nothing. |
Gotchas
- Bookings made with
fakeBookingare not saved, so booking detail on one will probably fail. Test post-booking calls on real bookings in your test account. - Every response echoes your live token in
auditData.authToken. Redact it before you log or store the payload. - A booking can close
RQeven whenonRequestwasfalsethroughout the flow, so poll every non-final status, not only the ones you expected.
Related
- Book: the response shape and every field
- Refresh: ask the supplier for the latest state (not for routine polling)
- Booking statuses: the two status levels
- Webhooks: react to changes instead of polling
Book
Close the booking with the supplier, using the key from Prebook. The status in the response tells you whether the room is confirmed. A 200 response on its own does not.
Refresh
Ask the supplier for the current state of a booked hotel and return the updated booking. Use it to resolve a booking on request or to detect a cancellation made on the supplier's side, not for routine polling.