Skip to main content

Error Response Format

Every error response follows the same structure:
Always use the code field for error handling in your code, not message. The message text may be updated to be more helpful — the code will remain stable.

Error Codes

Validation Rules

Every field is validated on the server. One error is returned at a time — the first problem found. Fix it and resend to see the next, if there is one. Here are the rules for each field:

Date Format

Strict ISO 8601. No exceptions. When a date fails validation, the error message includes what you sent and what’s expected:
Many property management systems store or display dates as DD.MM.YYYY. Convert to YYYY-MM-DD before sending to RecepAI.

Phone Number Format

E.164 format required. Starts with +, followed by country code and number. No spaces, dashes, or parentheses.
Every phone number in these pages is drawn from the range reserved for documentation and fiction, so an example copied into a live test cannot reach a real person. A live check-in with a phone number can send that guest a welcome message — use your own number, or a reserved one, never a plausible-looking invented one.

Common Mistakes

This is the most common error in the first days of an integration, and it comes from sending a date in the format the source system displays rather than converting it first.Fix: Convert all dates to YYYY-MM-DD before sending. For example, 18.02.2026 → 2026-02-18.
Sending 2025550143 instead of +12025550143. The phone field requires the full international number with country code.Fix: Prepend the country code with + — +90 for Turkey, +49 for Germany, +44 for the United Kingdom.
Sending {"roomNumber": 301} instead of {"roomNumber": "301"}. Room numbers are strings because they can contain letters (e.g., "301A", "P2-105").Fix: Always send room numbers as strings: "301", not 301.
All POST endpoints require an Idempotency-Key header. Without it, you’ll receive a 400 error.Fix: Include Idempotency-Key: your_unique_key in every POST request. See Idempotency for key format recommendations.
Each unique operation needs its own key. If you use the same key for two different guests on the same endpoint, the second request will return the first guest’s cached response.Fix: Use a key format like {operation}_{pmsGuestId}_{date}. Example: checkin_RES2026001_20260218.
If Room 301 still has an active guest and you try to check in a new guest to Room 301, you’ll get a 409 ROOM_OCCUPIED error.Fix: Always send a checkout for the departing guest before checking in the new guest. Or use the Full Sync endpoint which handles this automatically.

Handling Errors in Your Code

Here’s a recommended error handling pattern:

Which errors to retry

Do not decide this from the status code. Three 409 responses are transient and are meant to be retried, and one 403 can never succeed no matter how many times you send it. Branch on code.
A retry is only safe because of the Idempotency-Key header. Always resend with the same key — a retry that mints a new key is a second operation, not a retry. See Idempotency.