{
  "openapi": "3.1.0",
  "info": {
    "title": "Pedro Henrique Quadro public API",
    "version": "1.0.0",
    "summary": "Read-only facts about Pedro Henrique Quadro, AI engineer, and the services he offers.",
    "description": "Read-only JSON API that exposes the same content as the website. No authentication, open CORS, no client data. Every endpoint accepts ?lang=pt|en (default pt). Human-readable pages live at https://pedroquadro.com. Summary for language models: https://pedroquadro.com/llms.txt.",
    "contact": {
      "name": "Pedro Henrique Quadro",
      "url": "https://pedroquadro.com",
      "email": "pluspedrohenrique@gmail.com"
    }
  },
  "servers": [
    {
      "url": "https://pedroquadro.com"
    }
  ],
  "paths": {
    "/api/v1/perfil": {
      "get": {
        "operationId": "getProfile",
        "summary": "Who he is, where he works, languages, services and contact",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Response language. Defaults to pt.",
            "schema": {
              "type": "string",
              "enum": [
                "pt",
                "en"
              ],
              "default": "pt"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Profile",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "Always \"*\".",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Profile"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/servicos": {
      "get": {
        "operationId": "listServices",
        "summary": "Services, who they are for, typical timeline and FAQ",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Response language. Defaults to pt.",
            "schema": {
              "type": "string",
              "enum": [
                "pt",
                "en"
              ],
              "default": "pt"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of services",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "Always \"*\".",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ServiceList"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/casos": {
      "get": {
        "operationId": "listCases",
        "summary": "Anonymized case studies with results",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Response language. Defaults to pt.",
            "schema": {
              "type": "string",
              "enum": [
                "pt",
                "en"
              ],
              "default": "pt"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of case studies",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "Always \"*\".",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CaseList"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/disponibilidade": {
      "get": {
        "operationId": "getAvailability",
        "summary": "Whether he is taking on projects now",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Response language. Defaults to pt.",
            "schema": {
              "type": "string",
              "enum": [
                "pt",
                "en"
              ],
              "default": "pt"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Availability",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "Always \"*\".",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Availability"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/encaixe": {
      "get": {
        "operationId": "findFit",
        "summary": "Services and cases for a sector and a generic need",
        "description": "Both filters are optional and are provided on purpose by the caller. Without any filter, everything is returned with a note. Send only a sector and a generic need; do not send personal or confidential data about your user.",
        "parameters": [
          {
            "name": "lang",
            "in": "query",
            "required": false,
            "description": "Response language. Defaults to pt.",
            "schema": {
              "type": "string",
              "enum": [
                "pt",
                "en"
              ],
              "default": "pt"
            }
          },
          {
            "name": "setor",
            "in": "query",
            "required": false,
            "description": "Sector, for example \"advocacia\" or \"law firm\". Matched ignoring case and accents.",
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          },
          {
            "name": "necessidade",
            "in": "query",
            "required": false,
            "description": "Generic need, for example \"atendimento no WhatsApp\". Used to rank services.",
            "schema": {
              "type": "string",
              "maxLength": 120
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching services and cases",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "Always \"*\".",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Fit"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/openapi.json": {
      "get": {
        "operationId": "getOpenApi",
        "summary": "This document",
        "responses": {
          "200": {
            "description": "OpenAPI 3.1 document",
            "headers": {
              "Access-Control-Allow-Origin": {
                "description": "Always \"*\".",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Contact": {
        "type": "object",
        "properties": {
          "whatsapp": {
            "type": "string",
            "format": "uri"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "linkedin": {
            "type": "string",
            "format": "uri"
          },
          "github": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "Profile": {
        "type": "object",
        "properties": {
          "lang": {
            "type": "string",
            "enum": [
              "pt",
              "en"
            ]
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": [
              "string",
              "null"
            ]
          },
          "summary": {
            "type": [
              "string",
              "null"
            ]
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "languages": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "language_note": {
            "type": [
              "string",
              "null"
            ]
          },
          "approach": {
            "type": [
              "string",
              "null"
            ]
          },
          "sectors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "numbers": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                }
              }
            }
          },
          "results": {
            "type": "array",
            "description": "Results measured in client projects. Clients are identified by sector only.",
            "items": {
              "type": "object",
              "properties": {
                "value": {
                  "type": "string"
                },
                "label": {
                  "type": "string"
                },
                "context": {
                  "type": "string"
                }
              }
            }
          },
          "proofs": {
            "type": "array",
            "description": "Public links anyone can check: merged open source contributions and own public projects.",
            "items": {
              "type": "object",
              "properties": {
                "title": {
                  "type": "string"
                },
                "where": {
                  "type": "string"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                },
                "date": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date"
                }
              }
            }
          },
          "trajectory": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "period": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                }
              }
            }
          },
          "stack": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string"
                },
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "services": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "how_to_hire": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "availability": {
            "type": "object",
            "properties": {
              "accepting": {
                "type": "boolean"
              },
              "note": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "contact": {
            "$ref": "#/components/schemas/Contact"
          },
          "pages": {
            "type": "object",
            "properties": {
              "home": {
                "type": "string",
                "format": "uri"
              },
              "facts": {
                "type": "string",
                "format": "uri"
              },
              "blog": {
                "type": "string",
                "format": "uri"
              }
            }
          },
          "updated": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "Service": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "audience": {
            "type": "string"
          },
          "problems": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "includes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "how_it_works": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "typical_timeline": {
            "type": [
              "string",
              "null"
            ]
          },
          "sectors": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "case_ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "faq": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "question": {
                  "type": "string"
                },
                "answer": {
                  "type": "string"
                }
              }
            }
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "match": {
            "type": "string",
            "enum": [
              "all",
              "sector",
              "general",
              "need"
            ],
            "description": "Only in /encaixe: why the service was returned."
          }
        }
      },
      "Case": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "sector": {
            "type": "string"
          },
          "context": {
            "type": "string"
          },
          "problem": {
            "type": "string"
          },
          "solution": {
            "type": "string"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "stack": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "ServiceList": {
        "type": "object",
        "properties": {
          "lang": {
            "type": "string",
            "enum": [
              "pt",
              "en"
            ]
          },
          "count": {
            "type": "integer"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Service"
            }
          },
          "updated": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "CaseList": {
        "type": "object",
        "properties": {
          "lang": {
            "type": "string",
            "enum": [
              "pt",
              "en"
            ]
          },
          "count": {
            "type": "integer"
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Case"
            }
          },
          "updated": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "Availability": {
        "type": "object",
        "properties": {
          "lang": {
            "type": "string",
            "enum": [
              "pt",
              "en"
            ]
          },
          "accepting_projects": {
            "type": "boolean"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "contact": {
            "$ref": "#/components/schemas/Contact"
          },
          "updated": {
            "type": "string",
            "format": "date"
          }
        }
      },
      "Fit": {
        "type": "object",
        "properties": {
          "lang": {
            "type": "string",
            "enum": [
              "pt",
              "en"
            ]
          },
          "query": {
            "type": "object",
            "properties": {
              "sector": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "need": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "note": {
            "type": "string"
          },
          "services": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Service"
            }
          },
          "cases": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Case"
            }
          }
        }
      }
    }
  }
}
