Base URLs
Use the API key created for the same environment in the
Unifystays portal.
Authentication and Headers
Every API request must include the API key inx-api-key.
Response Conventions
Most successful endpoints return a JSON envelope containing a success indicator, a human-readable message, and endpoint-specificdata.
status as its success indicator. Always use the operation-level
schema below each endpoint for its exact response contract. Record the returned
X-Request-Id so Unifystays support can trace a request.
Idempotent Booking
POST /hotels/book requires an Idempotency-Key. Generate one key for a single
customer booking attempt and persist it before making the request. If the
network times out or the client cannot read the response, retry with the same
key and the identical request body.
Never create a new key for an uncertain retry; a new key represents a new
booking attempt and can create another reservation.
Time-Sensitive Data
- Cache destination autocomplete results for 48 hours and nationalities for 30 days. See Caching Strategy.
- Refresh supplier-backed search prices and room options as the customer moves through checkout.
- Prebook immediately before booking to verify the selected room’s current availability and price.
- Poll booking status after booking or cancellation rather than assuming a supplier operation is final.