REST API reference for travel request orchestration, policy enforcement, tenant management, and Stripe-powered booking execution.
# Base URL https://zim.global # Required header X-Api-Key: YOUR_API_KEY # Create a travel request from natural language curl -X POST https://zim.global/v1/requests \ -H "Content-Type: application/json" \ -H "X-Api-Key: YOUR_API_KEY" \ -d '{ "tenant_id": "default", "traveler_id": "default", "raw_message": "Book me a business trip from London to Dubai next Friday", "auto_search": true, "metadata": {"source": "agent"} }'
Zim gives your agent one REST layer for travel intent capture, search orchestration, option selection, traveler collection, approval workflows, Stripe-backed execution, fulfillment updates, and admin management.
X-Api-Key header on authenticated calls.https://zim.global and append the versioned path, such as /v1/requests.Content-Type: application/json for POST and PUT payloads.curl https://zim.global/v1/health \ -H "X-Api-Key: YOUR_API_KEY"
Zim models booking as a request state machine. You can start from structured intent or a raw natural-language message, then progress through search, selection, traveler collection, approval, execution, payment, and fulfillment.
/v1/requestsCreate a new travel request from structured intent or a raw natural-language prompt. If auto_search is true, Zim searches immediately.
curl -X POST https://zim.global/v1/requests \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_API_KEY" \
-d '{
"tenant_id": "default",
"traveler_id": "default",
"intent": {
"origin": "LHR",
"destination": "DXB",
"departure_date": "2026-04-24",
"travelers": 1,
"cabin_class": "business"
},
"auto_search": true
}'/v1/requestsList requests with optional filters: tenant_id, traveler_id, state, limit, offset.
/v1/requests/{request_id}Fetch the full state of a specific travel request including current status, options, selection state, payment state, and fulfillment details.
/searchTrigger search on a request created with auto_search=false. Valid from intent_received.
/selectSelect flight_index, hotel_index, and car_index from prepared search results.
/traveler-infoSubmit traveler fields such as name, DOB, passport details, email, phone, and frequent flyer info.
/approveSubmit approval decision with decision and optional notes.
/executeTrigger booking execution. Zim creates a Stripe checkout session and runs the executor flow.
/cancelCancel a request that should not continue to booking.
/retryRe-search a request from options_ready or failed. Zim resets state and starts a new search pass.
/payment-statusReturn payment state and Stripe session details for the current request.
/v1/tripsList completed trips with filters: tenant_id, traveler_id, created_after, created_before, limit, and offset.
/v1/trips/{trip_id}Fetch the full details of a completed trip record.
/v1/healthSimple health check endpoint for uptime monitoring and integration verification.
Zim includes admin endpoints for multi-tenant configuration, policy management, traveler directory records, and dashboard metrics.
name, domain, and settings.include_deleted, limit, offset.tenant_id, name, is_default, and policy object.tenant_id.tenant_id, name, email, phone, preferences, frequent_flyer, and passport_info.GET /v1/admin/stats returns aggregate stats for the admin dashboard and can be filtered by tenant_id.
curl https://zim.global/v1/admin/stats?tenant_id=default \ -H "X-Api-Key: YOUR_API_KEY"
| Area | Create body fields | Notes |
|---|---|---|
| Tenant | name, domain, settings | Multi-tenant partition root. |
| Policy | tenant_id, name, is_default, policy | Stores approval, budget, or vendor rules as an object. |
| Traveler | tenant_id, name, email, phone, preferences, frequent_flyer, passport_info | Directory and preference memory for booking flows. |
/v1/webhooks/stripeZim handles Stripe webhook events and updates payment state. When STRIPE_WEBHOOK_SECRET is configured, the Stripe-Signature header is verified.
{
"tenant_id": "default",
"traveler_id": "default",
"intent": {
"origin": "LHR",
"destination": "DXB",
"departure_date": "2026-04-24",
"return_date": "2026-04-27",
"travelers": 1,
"cabin_class": "business",
"hotel_destination": "Dubai",
"check_in": "2026-04-24",
"check_out": "2026-04-27",
"car_location": "DXB"
},
"raw_message": "Book me a business trip to Dubai next Friday",
"auto_search": true,
"metadata": {"source": "agent"}
}{
"flight_index": 0,
"hotel_index": 1,
"car_index": 0
}{
"decision": "approve",
"notes": "Within policy"
}{
"first_name": "Robin",
"last_name": "Zieme",
"date_of_birth": "1980-01-01",
"gender": "male",
"passport_number": "123456789",
"passport_expiry": "2030-01-01",
"passport_country": "SE",
"email": "robin@example.com",
"phone": "+971...",
"frequent_flyer": {"EK": "12345"}
}{
"fulfillment_state": "ticketed",
"details": {
"pnr": "ABC123",
"provider": "amadeus"
}
}| Schema | Important fields | Description |
|---|---|---|
| StructuredIntent | origin, destination, departure_date, return_date, travelers, cabin_class, hotel_destination, check_in, check_out, car_location | Normalized travel intent used to drive search. |
| CreateTenantBody | name, domain, settings | Create a tenant namespace. |
| CreatePolicyBody | tenant_id, name, is_default, policy | Create policy objects for budget, approval, and routing rules. |
| CreateTravelerBody | tenant_id, name, email, phone, preferences, frequent_flyer, passport_info | Create traveler directory records. |