Errors & Validation
How RezLive returns errors, how to detect them programmatically, and how to recover from common failure modes.
Anatomy of an error response
From v4.8 onwards, every error response includes a stable error code in addition to the human-readable message:
XML
<HotelFindResponse>
<error>
<code>RZL-AUTH-001</code>
<message>The API key you provided is invalid or your IP is not whitelisted.</message>
<docs>https://docs.rezlive.com/errors/auth-001</docs>
</error>
</HotelFindResponse>
Error code naming convention
All error codes follow a stable three-part format:
Format
RZL-<DOMAIN>-<NUMBER>
Where DOMAIN is one of:
| Domain | Meaning | Example |
|---|---|---|
AUTH | Authentication, API key, IP whitelist | RZL-AUTH-001 — Invalid key |
VAL | Request validation (missing field, bad date) | RZL-VAL-014 — Past arrival date |
SES | Session/token expiry | RZL-SES-001 — SearchSessionId expired |
RATE | Rate-limit and quota | RZL-RATE-001 — Limit exceeded |
AVAIL | Availability or pricing changed | RZL-AVAIL-001 — Price changed |
BOOK | Booking-state errors | RZL-BOOK-007 — Already cancelled |
SYS | RezLive system errors | RZL-SYS-001 — Internal error |
SUP | Upstream supplier errors | RZL-SUP-001 — Supplier timeout |
How to detect errors in your client
⚠
Match on
<code>, not on the message textCodes are stable; messages can be reworded, translated, or improved without notice. String-matching the message is a brittle pattern that will silently break.
Recommended detection pattern:
- Parse the response body.
- If an
<error>element is present, the request failed regardless of HTTP status. - Read
<code>. Switch on the prefix (RZL-AUTH,RZL-VAL, etc.) for category-level handling. - Use
<message>for logging and surface to support; never for programmatic decisions. - Use
<docs>URL when escalating to RezLive support.
Common validation errors
| Code | Trigger | How to fix |
|---|---|---|
RZL-VAL-001 | Missing or empty Authentication block | Send AgentCode and UserName in body |
RZL-VAL-002 | Missing CountryCode (or not UPPERCASE) | Send 2-letter ISO UPPERCASE |
RZL-VAL-014 | ArrivalDate is today or in the past | ArrivalDate must be > current date |
RZL-VAL-015 | DepartureDate not after ArrivalDate | DepartureDate must be > ArrivalDate |
RZL-VAL-020 | More than 8 rooms in one Booking | Max 8 rooms per booking; split into multiple |
RZL-VAL-022 | ChildrenAges count does not match NoOfChilds | One ChildAge per child; pass 0 if 0 children |
RZL-VAL-030 | Multi-room: pipe-separated count mismatch | All four pipe-separated tags must match TotalRooms |