{"openapi":"3.1.0","info":{"title":"any.cab — Malta transfers","version":"1.0.0","description":"Private car transfers anywhere in Malta (not Gozo or Comino yet), run through a licensed Maltese transport operator selected by any.cab, whose network covers over 50 local transport suppliers including Uber and Bolt. Prices are fixed per trip: base_cost + distance_km × per_km, rounded to the cent, minimum €20.00 per trip, in EUR. Errors are {\"error\":{\"code\",\"message\",\"next_action\"}} with stable codes. Also available as an MCP server at https://any.cab/mcp."},"servers":[{"url":"https://any.cab"}],"paths":{"/api/v1/pricing":{"get":{"operationId":"getRates","summary":"Per-km rate card","description":"Retail rates per vehicle valid on a date. price = base_cost + distance_km × per_km, minimum €20.00 per trip. For an exact, bookable price use POST /api/v1/quotes.","parameters":[{"name":"date","in":"query","required":false,"schema":{"type":"string","format":"date"},"description":"Trip date (Malta). Defaults to today."}],"responses":{"200":{"description":"Rate card","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateCard"}}}},"422":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/api/v1/locations":{"get":{"operationId":"searchLocations","summary":"Find a place in Malta","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2},"example":"Hilton St Julians"}],"responses":{"200":{"description":"Matching places","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"$ref":"#/components/schemas/Place"}}}}}}},"422":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/api/v1/quotes":{"post":{"operationId":"getQuote","summary":"Price a transfer","description":"Fixed prices for every vehicle that fits the group. Each offer has a quote_id valid for 15 minutes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["from","to","pickup_at","pax"],"properties":{"from":{"description":"\"MLA\" for Malta International Airport, or a place from /api/v1/locations passed as is.","oneOf":[{"type":"string","enum":["MLA"]},{"$ref":"#/components/schemas/Place"}]},"to":{"description":"\"MLA\" for Malta International Airport, or a place from /api/v1/locations passed as is.","oneOf":[{"type":"string","enum":["MLA"]},{"$ref":"#/components/schemas/Place"}]},"pickup_at":{"type":"string","example":"2026-11-25T10:00","description":"Malta local time, or ISO 8601 with offset. At least 48 hours ahead."},"pax":{"type":"integer","minimum":1,"maximum":53}}}}}},"responses":{"201":{"description":"Offers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteSet"}}}},"400":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/api/v1/bookings":{"post":{"operationId":"createBooking","summary":"Book a quote","description":"Returns booking_id and payment_url. Nothing is charged until the traveller pays; the booking is confirmed only after payment.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":100}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["quote_id","passenger"],"properties":{"quote_id":{"type":"string"},"passenger":{"type":"object","required":["first_name","last_name","email","phone"],"properties":{"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string","example":"+35699123456"}}},"flight_number":{"type":"string","example":"FR1234"},"notes":{"type":"string","maxLength":500}}}}}},"responses":{"201":{"description":"Awaiting payment"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/api/v1/bookings/{booking_id}":{"get":{"operationId":"getBooking","summary":"Booking status","parameters":[{"name":"booking_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"awaiting_payment, paid, confirmed or expired"},"404":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}}},"components":{"schemas":{"Place":{"type":"object","required":["name","lat","lng"],"properties":{"name":{"type":"string"},"address":{"type":"string"},"town":{"type":"string"},"lat":{"type":"number"},"lng":{"type":"number"}}},"Rate":{"type":"object","properties":{"category_id":{"type":"integer"},"category":{"type":"string"},"currency":{"type":"string"},"base_cost":{"type":"number"},"per_km":{"type":"number"},"max_pax":{"type":"integer"},"luggage":{"type":"string"},"valid_from":{"type":"string","format":"date"},"valid_to":{"type":"string","format":"date"}}},"RateCard":{"type":"object","properties":{"date":{"type":"string","format":"date"},"unit":{"type":"string"},"formula":{"type":"string"},"rates":{"type":"array","items":{"$ref":"#/components/schemas/Rate"}}}},"Offer":{"type":"object","properties":{"quote_id":{"type":"string"},"category_id":{"type":"integer"},"category":{"type":"string"},"price":{"type":"number"},"currency":{"type":"string"},"max_pax":{"type":"integer"},"luggage":{"type":"string"},"breakdown":{"type":"object"},"expires_at":{"type":"string","format":"date-time"}}},"QuoteSet":{"type":"object","properties":{"expires_at":{"type":"string","format":"date-time"},"trip":{"type":"object"},"operator":{"type":"object"},"offers":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}}}}},"responses":{"Error":{"description":"Error with a stable code and a suggested next action","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"PICKUP_TOO_SOON"},"message":{"type":"string"},"next_action":{"type":"string"}}}}}}}}}}}