{
  "openapi": "3.1.0",
  "info": {
    "title": "Moja Ride Public & Agent Discovery API",
    "version": "1.0.0",
    "description": "OpenAPI 3.1.0 specification for Moja Ride's intercity bus search, corridor route discovery, AI agent metadata endpoints, and carrier B2B transit operations across Côte d'Ivoire.",
    "contact": {
      "name": "Moja Ride Engineering & Transit Operations",
      "url": "https://mojaride.net/contact",
      "email": "support@mojaride.net"
    },
    "license": {
      "name": "Proprietary",
      "url": "https://mojaride.net/terms"
    }
  },
  "servers": [
    {
      "url": "https://mojaride.net",
      "description": "Moja Ride Production Server"
    },
    {
      "url": "http://localhost:3000",
      "description": "Local Development Server"
    }
  ],
  "paths": {
    "/fr/search": {
      "get": {
        "operationId": "search_intercity_buses",
        "summary": "Search intercity bus schedules and fares",
        "description": "Search real-time intercity bus schedules, fares in FCFA (XOF), and seat availability across Côte d'Ivoire corridors.",
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "required": true,
            "description": "Origin city slug or identifier (e.g. abidjan)",
            "schema": { "type": "string" }
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "description": "Destination city slug or identifier (e.g. bouake, yamoussoukro)",
            "schema": { "type": "string" }
          },
          {
            "name": "date",
            "in": "query",
            "required": false,
            "description": "Departure date in YYYY-MM-DD format",
            "schema": { "type": "string", "format": "date" }
          }
        ],
        "responses": {
          "200": {
            "description": "HTML or RSC search results for matching intercity departures"
          }
        }
      }
    },
    "/fr/trajets/{slug}": {
      "get": {
        "operationId": "get_corridor_details",
        "summary": "Retrieve intercity corridor schedule and operator details",
        "description": "Retrieve verified bus operators, boarding terminals, and starting ticket prices for a specific intercity route.",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "description": "Corridor route slug (e.g. abidjan-a-bouake)",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Corridor details page with structured BusTrip, Product, and FAQPage JSON-LD"
          }
        }
      }
    },
    "/ai/summary.json": {
      "get": {
        "operationId": "get_ai_summary",
        "summary": "Retrieve AI discovery summary and WebMCP tool manifest",
        "responses": {
          "200": {
            "description": "JSON summary with major hubs, top routes, and WebMCP tool definitions",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": ["name", "description", "webmcp"],
                  "properties": {
                    "name": { "type": "string" },
                    "description": { "type": "string" },
                    "url": { "type": "string", "format": "uri" },
                    "currency": { "type": "string" },
                    "webmcp": {
                      "type": "object",
                      "required": ["available", "tools"],
                      "properties": {
                        "available": { "type": "boolean" },
                        "version": { "type": "string" },
                        "tools": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "required": ["name", "description"],
                            "properties": {
                              "name": { "type": "string" },
                              "description": { "type": "string" },
                              "endpoint": { "type": "string" },
                              "method": { "type": "string" },
                              "parameters": {
                                "type": "array",
                                "items": { "type": "string" }
                              }
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/ai/service.json": {
      "get": {
        "operationId": "get_ai_service",
        "summary": "Retrieve platform capabilities and service endpoints",
        "responses": {
          "200": {
            "description": "JSON service descriptor with platform capabilities and contact metadata"
          }
        }
      }
    },
    "/ai/faq.json": {
      "get": {
        "operationId": "get_ai_faq",
        "summary": "Retrieve structured frequently asked questions for AI citation",
        "responses": {
          "200": {
            "description": "JSON array of verified Q&A entries"
          }
        }
      }
    },
    "/llms.txt": {
      "get": {
        "operationId": "get_llms_txt",
        "summary": "Retrieve llms.txt markdown index for AI crawlers",
        "responses": {
          "200": {
            "description": "Markdown index of Moja Ride routes, stations, and documentation"
          }
        }
      }
    }
  }
}
