Developer quickstart (sandbox)
Render one family price on your test site, toggle transfers, then trigger a changed quote. All sandbox data is synthetic.
1. Base URLs
| Environment | REST base | MCP (Streamable HTTP) |
|---|---|---|
| Sandbox (live, synthetic data) | https://travel.emidox.com/sandbox/api/v1 | https://travel.emidox.com/sandbox/mcp |
| Production (proposed, not deployed) | https://travel.emidox.com/api/v1 | https://travel.emidox.com/mcp |
| Local fixture mode | http://127.0.0.1:8787/sandbox/api/v1 | http://127.0.0.1:8787/sandbox/mcp |
Call from your server only. Keep EMIDOX_TRAVEL_SANDBOX_TOKEN in your backend’s environment. Browser code calls your own backend, never Emidox Travel directly. web/sample-backend/server.mjs is a dependency-free Node example of this pattern.
2. Save search.json
{
"destination_id": "city:JP-TYO",
"start_date": "2027-04-06",
"end_date": "2027-04-11",
"rooms": [{"adults": 2, "child_ages": [6, 9]}],
"required_inclusions": ["breakfast", "return_airport_transfers"],
"flights": "excluded",
"budget": {"currency": "AUD", "amount_minor": 210000},
"sort": "best_fit",
"page_size": 10
}
3. First API call
curl --request POST 'https://travel.emidox.com/sandbox/api/v1/searches' \
--header "Authorization: Bearer $EMIDOX_TRAVEL_SANDBOX_TOKEN" \
--header 'Content-Type: application/json' \
--data-binary @search.json
Each card carries a whole-party total (integer amount_minor, AUD), price_state (indexed, live, indicative or expired), included/excluded, valid_until and an opaque selection_token. Remove return_airport_transfers from required_inclusions to see the transfers toggle change results. Debounce filter changes and ignore superseded responses.
4. Get a live quote
curl --request POST 'https://travel.emidox.com/sandbox/api/v1/quotes' \
--header "Authorization: Bearer $EMIDOX_TRAVEL_SANDBOX_TOKEN" \
--header 'Content-Type: application/json' \
--data '{"selection_token": "<selection_token from a search result>"}'
The fixture offer off_demo_tokyo_b deliberately returns "status": "changed": A$1,950 → A$1,990 (+A$40) with "requires_acceptance": true. Show the traveller the change and require acceptance before continuing. Other outcomes: confirmed, unavailable, on_request, incomplete. A quote checks price and availability; it does not reserve inventory.
5. Errors
One envelope: {"error":{"code":"invalid_criteria","field":"rooms[0].child_ages","retryable":false},"request_id":"req_demo_3"}
| HTTP | code | What to do |
|---|---|---|
| 400 | malformed_json | Fix the request body. |
| 401 | unauthenticated | Check the server token. |
| 403 | missing_scope | The token lacks the operation scope (offers:read, quotes:read, margins:read, handoffs:write). |
| 404 | not_found | Unknown resource, or one belonging to another agency. |
| 409 | stale_approval, idempotency_conflict, cursor_mismatch, token_mismatch | Restart the step with current data. |
| 410 | token_expired, cursor_expired | Search again. |
| 422 | invalid_criteria | See field. |
| 429 | rate_limited | Wait for Retry-After seconds. |
| 503 / 504 | dependency_unavailable, deadline_exceeded | Retry only if retryable is true. |
6. Quotas
Sandbox quotas are per partner token and still to be agreed (proposed: enough for 25 searches per second during the pilot benchmark). When exceeded you receive 429 rate_limited with a Retry-After header. Pagination: page_size defaults to 10, maximum 30; cursors are bound to your agency, criteria and sort and expire quickly.
7. MCP configuration
Emidox Travel serves two tools over authenticated Streamable HTTP: search_packages (same input as POST /searches) and get_live_quote (same input as POST /quotes). They return the same retail facts as REST. There is no booking or publishing tool in v1. Configure your server-side assistant host:
{
"mcpServers": {
"emidox-travel-sandbox": {
"type": "http",
"url": "https://travel.emidox.com/sandbox/mcp",
"headers": { "Authorization": "Bearer ${EMIDOX_TRAVEL_SANDBOX_TOKEN}" }
}
}
}
For local fixture mode use http://127.0.0.1:8787/sandbox/mcp.
8. Fixture destination and offer IDs
| ID | Meaning |
|---|---|
city:JP-TYO | Tokyo. Seeded with the family example (2 adults, children 6 and 9, 2027-04-06 to 2027-04-11). |
off_demo_tokyo_a | Hotel A: A$1,800 + A$220 required transfers = A$2,020. |
off_demo_tokyo_b | Hotel B: A$1,950 with transfers; a recheck returns A$1,990 (changed quote). |
off_demo_tokyo_tour | Ready-made tour alternative (visible to the Zedtrago tenant only). |
| Other destination IDs | Return an honest empty result unless seeded by benchmark fixtures. |
9. Run it locally
cargo run -p emidox-travel # Emidox Travel on 127.0.0.1:8787 (fixture mode)
cd web
npm install
npm run build
npm run sample-backend # Zedtrago sample backend on 127.0.0.1:8788
# then open http://127.0.0.1:8788/zedtrago-demo/