Skip to main content

Sandbox Mode

Use a test API key (pms_test_ prefix) to validate your integration without writing any data to the hotel’s system. When the hotel admin generates an API key, they receive both a live key and a test key as a pair — just like Stripe. Ask the hotel admin for the test key to start development. Test keys run the exact same validation as live keys — the only difference is that no data is persisted.

Test Response Example

The _sandbox: true flag confirms you’re in test mode and no data was written. This flag is never present in live responses.

What to Test

Use sandbox mode to verify:
  1. Payload format — Confirm all your field formats are correct (dates, phone numbers, etc.)
  2. Error handling — Send intentionally invalid data to test your error handling code
  3. Idempotency — Verify that duplicate requests return cached responses
  4. Rate limit handling — Confirm your code handles 429 responses gracefully
Recommended workflow: Develop and test with a pms_test_ key first. Once your integration passes all test cases, switch to the pms_live_ key for production. The only change needed is the API key — all endpoints and request formats are identical.

Idempotency

All POST endpoints require an Idempotency-Key header. This prevents duplicate operations when network issues cause retries — for example, if your system sends a check-in request but doesn’t receive the response due to a timeout, you can safely resend the same request.

How It Works

  1. You include an Idempotency-Key header with every POST request
  2. RecepAI processes the request and stores the response, keyed to your idempotency key
  3. If you send another request with the same key within 24 hours, RecepAI returns the cached response without re-processing

Rules

Use a structured format that’s unique per operation:
Examples:

Duplicate Response

When a cached response is returned, it includes an _idempotent flag:
The _idempotent: true flag tells you this is a cached replay, not a new operation. The response body, HTTP status, and requestId are all identical to the original response.

Important: Failed Requests Don’t Consume Keys

If your request returns a 4xx error (validation failure, room conflict, etc.), the idempotency key is not consumed. This means you can fix the issue and retry with the same key:

Rate Limits

Each endpoint has its own rate limit. Limits are per hotel (not per IP).

Limits by Endpoint

Response Headers

Every response includes rate limit headers:

Rate Limited Response (429)

When you exceed the limit:

Handling Rate Limits

Implement exponential backoff in your integration:
For the sync endpoint (10/hour): Schedule your daily sync at a fixed time (e.g., 08:00). One sync per day is sufficient. For real-time updates throughout the day, use the individual check-in, update, and checkout endpoints which have much higher limits (60/minute).

Request Logging

Every API request is logged — including test mode requests. Logs include:
  • Full request payload
  • Response status and body
  • IP address and User-Agent
  • Processing duration
  • Idempotency key (if provided)
Logs are retained for 90 days and are accessible to RecepAI support for debugging. When contacting support, always include the requestId from the response.

Security Notes

  • All API traffic is encrypted via HTTPS (TLS 1.2+). HTTP requests are rejected.
  • API keys are stored as SHA-256 hashes — the full key is never stored on our servers.
  • PMS API paths are exempt from CSRF middleware (machine-to-machine authentication, no browser cookies).
  • All guest changes from the PMS are recorded in an activity log with the actor type pms, visible alongside staff actions on the Front Desk.