Documentation Index
Fetch the complete documentation index at: https://developers.safarapi.com/llms.txt
Use this file to discover all available pages before exploring further.
The sandbox is a fully production‑like environment running on the same infrastructure as production. It is isolated from real data by the key prefix: sk_test_* keys only touch sandbox data; sk_live_* keys only touch production.
How to get a sandbox key
Self‑service signup at console.safarapi.com/signup. Magic link in your inbox within 30 seconds. Sandbox key visible once on the activation page — copy it then.
What’s in the sandbox
| Resource | Count | Notes |
|---|
| Adventures | 10 | All slugs prefixed DEMO-, mix of experiences and trips |
| Rate packs | 30+ | Each adventure has 2‑3 rate packs |
| Agencies | 3 | Fictitious — “Atlas Demo Tours”, “Sahara Demo Trekking”, “Médina Demo Walks” |
| Categories | 5 | desert, mountain, beach, culture, urban |
Pre-defined test travellers
The sandbox simulates real payment behaviours based on the traveler email you pass on POST /bookings:
| Email | Behaviour |
|---|
test.success@bank.example | Booking confirmed, voucher generated, email sent to sandbox sink |
test.cancellation@bank.example | Booking confirmed, but cancellation API behaves with tier 1 refund |
test.insufficient_credit@bank.example | POST /bookings returns 403 partner.credit.limit.exceeded |
test.amount_mismatch@bank.example | POST /bookings returns 422 payment.amount.mismatch |
test.duplicate_ref@bank.example | Second POST /bookings with same partner_reference returns 409 |
Any other email behaves like test.success@bank.example. Real email addresses are accepted but no email is ever sent in sandbox — all messages route to sandbox-sink@safariat.ma.
Rate limits in sandbox
100 requests per minute per key. Sufficient for integration testing; if you need more for load testing, contact us.
Resetting your sandbox
The console exposes a “Reset sandbox data” button under Settings. Clicking it erases all bookings, quotes, and idempotency keys created with your test key in the last 30 days. Real adventures and rate packs remain untouched.
What’s different from production
| Aspect | Sandbox | Production |
|---|
| Settlement invoices | Not generated | Generated monthly |
| Email to traveller | Sink (sandbox-sink@safariat.ma) | Real recipient |
| Webhook payload | event.test = true | event.test = false |
| Rate limit | 100 req/min | 600 req/min (negotiable) |
| Credit limit | 50 000 MAD default | Per‑contract value |
| Pricing rules | Zero margin (passthrough) | Your negotiated rules |
Time‑limited sandbox keys
A sandbox key is active for 30 days of inactivity. If you don’t make any request for 30 days, the key is auto‑disabled. Re‑activate it with a single click from the console.
There’s no calendar expiration — as long as you keep using it, your sandbox key works indefinitely.