{"success":true,"environment":"sandbox","name":"Zipline Maldives Partner API Sandbox","version":"1.0.0","description":"Use this API to check Zipline availability, create partner bookings, fetch booking status, and cancel eligible partner bookings.","baseUrl":"https://sandbox-api.zipline.mv/api/partners","productionBaseUrl":"https://zipline.mv/api/partners","betaBaseUrl":"https://ziplinemv-beta.vercel.app/api/partners","authentication":{"type":"Bearer token","header":"Authorization: Bearer PARTNER_API_KEY","keyPrefix":"zpa_test_","note":"Sandbox accepts test keys only. Sandbox records, inventory, and references are isolated from production."},"recommendedFlow":["Call GET /services to read active service, pricing, add-ons, and cancellation policy.","Call GET /availability with date and rider count.","Use an available slotId from availability to call POST /bookings.","Store both bookingReference and partnerReference for later lookup or cancellation."],"requiredCustomerFields":["customer.name","customer.whatsapp","customer.email","customer.country"],"endpoints":[{"name":"Service and pricing","method":"GET","path":"/services","curl":"curl -H 'Authorization: Bearer PARTNER_API_KEY' https://sandbox-api.zipline.mv/api/partners/services"},{"name":"Availability","method":"GET","path":"/availability","query":{"date":"Required. YYYY-MM-DD.","riders":"Optional. Defaults to 1.","service":"Optional. Defaults to zipline.","includeUnavailable":"Optional. true or false."},"curl":"curl -H 'Authorization: Bearer PARTNER_API_KEY' 'https://sandbox-api.zipline.mv/api/partners/availability?date=2026-07-10&riders=2'"},{"name":"Create booking","method":"POST","path":"/bookings","idempotency":"partnerReference must be unique per agent. Retrying the same request with the same partnerReference returns the existing booking.","requestExample":{"service":"zipline","date":"2026-07-10","slotId":"slot_id_from_availability","customerType":"tourist","customer":{"name":"Ahmed Ali","whatsapp":"7814141","whatsappCountry":"MV","email":"guest@example.com","country":"Maldives"},"riders":[{"name":"Ahmed Ali","age":28,"nationality":"Maldives"}],"addons":[],"payment":{"status":"paid_to_agent","method":"online","currency":"USD","amount":100},"partnerReference":"PARTNER-BOOKING-1001","notes":"Optional booking notes"}},{"name":"Get booking by Zipline reference","method":"GET","path":"/bookings/{bookingReference}"},{"name":"Get booking by partner reference","method":"GET","path":"/bookings/by-partner-reference/{partnerReference}"},{"name":"Cancel booking","method":"POST","path":"/bookings/{bookingReference}/cancel","requestExample":{"reason":"Customer requested cancellation"},"note":"Cancellation is allowed only before check-in and before ride activity starts."},{"name":"OpenAPI specification","method":"GET","path":"/openapi"}],"paymentStatuses":{"paid_to_agent":"Guest paid the partner agent. Settlement follows the agent settlement mode.","paid_to_zipline":"Guest paid Zipline directly.","pay_on_arrival":"Guest will pay at arrival. Booking is not treated as paid yet.","complimentary":"Complimentary booking."},"settlementNotes":["Dashboard revenue remains gross sales.","Net settlement agents pay gross amount minus commission.","Gross settlement agents pay gross amount first; commission is paid later."],"errorFormat":{"success":false,"error":{"code":"invalid_request","message":"Human-readable error message."}}}