{
  "name": "Romania Company Scraper API",
  "version": "1.0.0",
  "endpoints": {
    "POST /api/company": {
      "description": "Obține date financiare firmă pe baza CIF",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN",
        "Content-Type": "application/json"
      },
      "body": {
        "cif": "18154088"
      },
      "example": "curl -X POST https://YOUR_WORKER.workers.dev/api/company -H \"Authorization: Bearer YOUR_TOKEN\" -H \"Content-Type: application/json\" -d '{\"cif\":\"18154088\"}'"
    },
    "POST /api/notion-company": {
      "description": "Endpoint special pentru Notion automation - extrage automat CIF din payload",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN",
        "Content-Type": "application/json"
      },
      "body": {
        "data": {
          "properties": {
            "CIF": {
              "rich_text": [
                {
                  "text": {
                    "content": "18154088"
                  }
                }
              ]
            }
          }
        }
      },
      "note": "Extrage CIF din data.properties.CIF.rich_text[0].text.content",
      "example": "curl -X POST https://YOUR_WORKER.workers.dev/api/notion-company -H \"Authorization: Bearer YOUR_TOKEN\" -H \"Content-Type: application/json\" -d @notion-payload.json"
    },
    "GET /api/company/:cif": {
      "description": "Obține date financiare firmă (GET)",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      },
      "example": "curl https://YOUR_WORKER.workers.dev/api/company/18154088 -H \"Authorization: Bearer YOUR_TOKEN\""
    },
    "GET /api/debug/:cif": {
      "description": "Debug endpoint - verifică ce date sunt extrase din HTML",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      },
      "example": "curl https://YOUR_WORKER.workers.dev/api/debug/18154088 -H \"Authorization: Bearer YOUR_TOKEN\""
    }
  }
}