{
  "openapi": "3.1.0",
  "info": {
    "title": "NJoy Consulting public API",
    "version": "1.0.0",
    "description": "Public, read-only discovery endpoints and the travel AI website readiness scanner.",
    "contact": {
      "name": "NJoy Consulting",
      "email": "hello@njoy.consulting",
      "url": "https://njoy.consulting/contact"
    }
  },
  "servers": [
    {
      "url": "https://njoy.consulting"
    }
  ],
  "paths": {
    "/api/ai-scan": {
      "post": {
        "operationId": "scanTravelWebsite",
        "summary": "Scan a public travel website for AI-readiness foundations",
        "description": "Fetches a bounded set of public same-origin pages and returns deterministic checks. It does not measure rankings or guarantee AI citations.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ScanRequest"
              },
              "examples": {
                "hotel": {
                  "value": {
                    "url": "https://example.com",
                    "businessType": "hotel"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Scan completed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "result"
                  ],
                  "properties": {
                    "result": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/pricing.md": {
      "get": {
        "operationId": "getPricing",
        "summary": "Get machine-readable pricing",
        "responses": {
          "200": {
            "description": "Markdown pricing document",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/agent-skills/index.json": {
      "get": {
        "operationId": "listAgentSkills",
        "summary": "List agent-facing capabilities",
        "responses": {
          "200": {
            "description": "Agent Skills index",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      }
    },
    "/.well-known/mcp": {
      "get": {
        "operationId": "discoverMcpServer",
        "summary": "Discover the NJoy Consulting MCP server",
        "responses": {
          "200": {
            "description": "MCP server card"
          }
        }
      },
      "post": {
        "operationId": "callMcpServer",
        "summary": "Call the stateless MCP Streamable HTTP endpoint",
        "responses": {
          "200": {
            "description": "MCP JSON-RPC response"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "ScanRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048
          },
          "businessType": {
            "type": "string",
            "enum": [
              "hotel",
              "tour-operator",
              "dmo",
              "travel-technology",
              "content-creator",
              "other"
            ],
            "default": "other"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      }
    },
    "responses": {
      "Error": {
        "description": "Request error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}