DEVELOPER DOCUMENTATION · SANDBOX
Test a transfer reservation
from quote to cancellation.
A synthetic test environment for integration development. Authentication, validation, quote expiry, reservation lookup and cancellation are enforced.
Access
Use the host on which your test key was issued. Base path: /api/reseller/sandbox. Request a dedicated key from dev@7transfers.com. Keys expire and are restricted to this sandbox and the issuing tenant. Keep keys on your server.
Accept: application/json
Content-Type: application/json
Authorization: Bearer {sandbox_api_key}
X-Api-Key: {sandbox_api_key} is also supported. Usernames and passwords are not used. The sandbox accepts only keys prefixed rsb_; these keys are rejected by the production Reseller API.
All successful responses include "sandbox": true and the header X-7Transfers-Environment: sandbox. Limit: 60 requests per minute per IP, also subject to the host's API limit. HTTP 429 responses provide a Retry-After header.
1. Request a quote
POST /api/reseller/sandbox/quote
{
"pickup_address": "Malaga Airport",
"dropoff_address": "Marbella",
"date": "2026-12-15",
"time": "10:30",
"timezone": "Europe/Madrid",
"passengers": 4
}
Required: pickup and dropoff strings (max 500 characters), date (YYYY-MM-DD) and time (HH:mm). Optional: passengers (integer, 1-50) and IANA timezone (defaults to UTC). The sample date is illustrative; choose your own future test date.
HTTP 200 returns the submitted trip, quote_id, expires_at, currency EUR and a vehicles array. Save the returned quote ID. Quotes expire after 15 minutes.
| ID | Test vehicle | Passengers | Luggage | Fixture price |
|---|---|---|---|---|
| 1 | Standard | 4 | 3 | EUR 85.00 |
| 2 | Minivan | 8 | 8 | EUR 120.00 |
All addresses receive these same synthetic prices; this does not imply route coverage. Vehicles are filtered by passenger count. More than 8 passengers returns an empty array. No external geocoding or pricing service is called. Vehicle images are empty strings. Other capacity fields are zero.
2. Create a test reservation
POST /api/reseller/sandbox/bookings
{
"external_id": "MOZIO-TEST-001",
"quote_id": "{quote_id from step 1}",
"vehicle_id": 1
}
All three fields are required. external_id is your unique reference (max 120 characters). The vehicle must be present in your own unexpired quote. Prices cannot be overridden.
HTTP 201 creates the reservation. The response includes id (UUID), external_id, quote_id, status: "confirmed", the trip, selected vehicle, price, currency and cancellation_fee: 0. Passenger name is always Sandbox Passenger.
Safe retries: repeat the same reference, quote ID and vehicle ID to retrieve the same reservation with HTTP 200. This also works after quote expiry and cancellation. Reusing a reference with different details returns HTTP 409. References are isolated per test client.
To test the production request shape, optionally add "passenger": {"name": "Sandbox Passenger", "phone": "+12025550100", "email": "sandbox@example.com"}. Only this fictitious identity is accepted. Optional luggage and hand_luggage counts must fit the vehicle; its hand-luggage fixture capacity is zero. Top-level email/phone, payment details and price overrides are rejected. Use only synthetic addresses and external references.
3. Retrieve a reservation
GET /api/reseller/sandbox/bookings/{id}
Use the UUID returned by step 2, not your external reference. HTTP 200 returns the reservation and current status. Reservations and quotes belonging to other clients return HTTP 404.
4. Cancel a test reservation
POST /api/reseller/sandbox/bookings/{id}/cancel
{}
More than 24 hours before pickup: HTTP 200 returns status: "canceled" and cancellation_fee: 0. At 24 hours or less: status: "paid_cancellation" with a fee of 100% of the fixture fare. The pickup timezone is used. No money is collected. Repeating a cancellation returns its original result.
5. Simulate live driver tracking
GET /api/reseller/sandbox/bookings/{id}/tracking with your existing sandbox key.
Create a new test reservation, then poll this endpoint every 5 seconds. It returns the production tracking response structure with sandbox: true and simulated: true. A marker moves along a fictitious Malaga Airport to Marbella route, regardless of the addresses entered in your test quote.
| Seconds since test reservation creation | Simulated state | Position |
|---|---|---|
| 0-59 | onroute | Approaching pickup |
| 60-89 | arrived | Waiting at pickup |
| 90-209 | onboard | Moving toward the destination |
| 210+ | completed | Hidden; tracking.available is false |
For deterministic tests, add ?elapsed_seconds=0, 60, 90, 150 or 210. This optional integer accepts 0-3600 and is available only in the sandbox. Without it, the simulation advances with real elapsed time, in 5-second steps.
Simulation is read-only: the booking detail endpoint still shows its stored test status, normally confirmed, while the tracking endpoint reports the simulated state. Canceling the reservation immediately stops simulation and returns a null position. Only the authenticated client's test reservations can be tracked. No real GPS, driver, dispatcher, payment or outgoing Mozio webhook is involved.
Error responses
Errors are JSON with a message. Validation errors also include an errors object.
| HTTP | Meaning |
|---|---|
| 401 | Missing, invalid, expired, inactive or wrong-environment key. |
| 404 | Quote or reservation does not exist for this client, or invalid reservation URL. |
| 409 | External reference already used with different reservation details. |
| 410 | Quote has expired. Request a new one for a new reservation. |
| 422 | Invalid request, past pickup, capacity exceeded, non-fixture identity, prohibited payment fields or vehicle missing from the quote. |
| 429 | Request limit exceeded. Respect Retry-After. |
Integration certification before production
Certification is required before 7Transfers enables production reservation access. The integrating agency runs the following checks using its own application against this sandbox. Our internal API tests do not certify the agency integration.
- Quote and reserve: request a future trip, select a returned vehicle, create a reservation and retrieve its UUID. The reserved price and currency must match the selected quote.
- Safe retries: repeat the same creation request with the same external reference. Expect the same reservation UUID and no duplicate. Reuse that reference with different details and handle HTTP 409.
- Free cancellation: create a separate trip more than 24 hours ahead. Cancel it and verify canceled status and a zero cancellation fee. Repeat cancellation and verify the same result.
- Late cancellation: create a separate trip less than 24 hours ahead. Verify paid_cancellation status and a fee equal to 100% of the quoted fare. Your integration must apply the documented boundary: exactly 24 hours is also chargeable. Sandbox fees never collect money.
- Tracking: on an uncanceled test reservation, check elapsed_seconds 0, 5, 60, 90, 150 and 210. Verify moving coordinates, onroute, arrived, onboard and completed states, and hide the marker when tracking.available is false. Cancel and verify position is null. Poll no faster than every 5 seconds.
- Failures and recovery: handle invalid authentication (401), an unknown reservation UUID (404), invalid input (422) and an expired quote (410, after its 15-minute lifetime). Respect Retry-After on 429 and use the same external reference when retrying an uncertain booking request. Do not intentionally flood the API.
Evidence: send a results checklist to dev@7transfers.com with your company, integration version, UTC test times, synthetic external references, reservation UUIDs, expected/actual HTTP statuses and redacted request/response examples. Include screenshots or logs showing tracking state handling and retry behavior. Never include API keys, Authorization headers, real passenger details or payment data.
Approval: 7Transfers reviews the evidence, requests corrections where necessary and confirms technical approval in writing. All required checks must pass; a change affecting a certified flow requires that flow to be checked again. Production credentials and reservation permission are enabled separately after technical approval and commercial onboarding. Completing the sandbox tests alone does not enable real reservations.
This certification covers our polling API. Mozio-specific outbound tracking webhooks and driver/vehicle registration require a separate integration and validation; passing these tests does not certify those services.
Production scope
This sandbox uses dedicated storage and keys. Production uses /api/reseller and requires separate partner activation. See the production reservation contract for required passenger information, settlement and real GPS polling. This sandbox does not push updates to Mozio. Driver/vehicle registration, modifications and outbound Mozio tracking webhooks remain separate work.
Sandbox data remains until an operator removes it. Keys expire after the agreed access period; request an extension before expiry if needed. Integration questions: dev@7transfers.com.
7Transfers · Reseller sandbox · Version 1.2 · 23 October 2026