{
 "openapi": "3.1.0",
 "info": {
  "title": "Madar Transport (مدار للنقل) quote requests",
  "version": "1.0.0",
  "description": "Send a group-transport quote or booking request to Madar Transport, Egypt, on a traveller's behalf and with their permission. Madar publishes no prices: it replies with a written quote on WhatsApp within the day. Nothing is booked or charged by this call. The full site, a vehicle recommender and search are on the MCP server at /mcp; plain-text content at /llms-full.txt."
 },
 "servers": [
  {
   "url": "https://www.madar-transport.com"
  }
 ],
 "paths": {
  "/api/quote": {
   "post": {
    "operationId": "request_quote",
    "summary": "Send a quote or booking request to Madar",
    "description": "Sends the traveller's trip to Madar Transport as a quote request (or a booking request with ready_to_book), with the traveller's own name and WhatsApp/phone — only with their permission. The request goes straight to Madar and their team is notified at once; nothing is booked or charged. It returns a reference to give the traveller, and an optional WhatsApp link if they want to add details; Madar replies with a written price within the day, by WhatsApp or phone. Ask for the day-by-day programme with start and end times for any trip longer than one day. Use dry_run to test without sending.",
    "requestBody": {
     "required": true,
     "content": {
      "application/json": {
       "schema": {
        "type": "object",
        "properties": {
         "traveller_name": {
          "type": "string",
          "maxLength": 120,
          "description": "The traveller's or group leader's name"
         },
         "whatsapp_or_phone": {
          "type": "string",
          "maxLength": 40,
          "description": "Their WhatsApp or phone number, with country code if outside Egypt"
         },
         "email": {
          "type": "string",
          "maxLength": 120
         },
         "pickup": {
          "type": "string",
          "maxLength": 300,
          "description": "Exact pick-up place (hotel, address, airport and terminal)"
         },
         "dropoff": {
          "type": "string",
          "maxLength": 300,
          "description": "Exact destination"
         },
         "stops": {
          "type": "string",
          "maxLength": 500,
          "description": "Stops on the way, if any"
         },
         "date": {
          "type": "string",
          "maxLength": 60,
          "description": "Travel date (e.g. 2026-12-04)"
         },
         "time": {
          "type": "string",
          "maxLength": 40,
          "description": "Departure time"
         },
         "trip_type": {
          "type": "string",
          "enum": [
           "one_way",
           "return_same_day",
           "return_another_day",
           "vehicle_stays_several_days",
           "full_day_in_one_city",
           "monthly_contract"
          ]
         },
         "return_date": {
          "type": "string",
          "maxLength": 60,
          "description": "Return date and time, if returning on another day"
         },
         "days": {
          "type": "integer",
          "minimum": 1,
          "maximum": 365,
          "description": "Number of days the vehicle is needed"
         },
         "people": {
          "type": "integer",
          "minimum": 1,
          "maximum": 2000,
          "description": "Everyone travelling, children included"
         },
         "children": {
          "type": "integer",
          "minimum": 0
         },
         "bags": {
          "type": "integer",
          "minimum": 0,
          "description": "Number of bags"
         },
         "programme": {
          "type": "string",
          "maxLength": 4000,
          "description": "Day-by-day programme: places, and start and end time of each day"
         },
         "flight_number": {
          "type": "string",
          "maxLength": 40,
          "description": "For airport pick-ups"
         },
         "service": {
          "type": "string",
          "maxLength": 120,
          "description": "e.g. conference transport, airport transfer, day trip"
         },
         "vehicle_preference": {
          "type": "string",
          "maxLength": 120
         },
         "foreign_group": {
          "type": "boolean"
         },
         "nationality": {
          "type": "string",
          "maxLength": 60
         },
         "driver_overnight": {
          "type": "string",
          "maxLength": 200,
          "description": "For multi-day trips: who covers the driver's accommodation and meals"
         },
         "notes": {
          "type": "string",
          "maxLength": 2000
         },
         "language": {
          "type": "string",
          "enum": [
           "ar",
           "en"
          ],
          "description": "Language of the WhatsApp message (default en)"
         },
         "ready_to_book": {
          "type": "boolean",
          "description": "True if the traveller wants to book once the price is confirmed"
         },
         "assistant": {
          "type": "string",
          "maxLength": 80,
          "description": "Your name, e.g. ChatGPT, Claude, Gemini"
         },
         "dry_run": {
          "type": "boolean",
          "description": "Validate and preview without sending anything"
         }
        },
        "required": [
         "traveller_name",
         "whatsapp_or_phone",
         "pickup",
         "dropoff",
         "date",
         "people"
        ],
        "additionalProperties": false
       }
      }
     }
    },
    "responses": {
     "200": {
      "description": "Received: the request is with Madar and their team has been notified. Give the traveller the reference.",
      "content": {
       "application/json": {
        "schema": {
         "type": "object",
         "properties": {
          "reference": {
           "type": "string"
          },
          "received": {
           "type": "boolean"
          },
          "delivered_to_madar": {
           "type": "boolean"
          },
          "whatsapp_link": {
           "type": "string"
          },
          "message_text": {
           "type": "string"
          },
          "next_steps": {
           "type": "string"
          }
         }
        }
       }
      }
     },
     "400": {
      "description": "A field is missing or invalid; the message says which."
     }
    }
   }
  }
 }
}