API Route Documentation
This page lists all available API endpoints in the application. Use the "Test AI" button to verify the connection to the generative model.
Method | Path | Description | Action |
---|---|---|---|
GET | /api/analytics/extraction-stats | Returns aggregated statistics about the performance of each extraction method. | Open |
GET | /api/analytics/test | A health-check endpoint to verify the analytics service is logging data to Firestore. | Open |
POST | /api/enrich-product | Triggers the multi-strategy extraction orchestrator for a given product URL or details. | N/A (POST) |
POST | /api/extract-pdf | Extracts product data from a Base64-encoded PDF file. | N/A (POST) |
POST | /api/extract-text | Extracts product data from a block of unstructured plain text. | N/A (POST) |
POST | /api/extract-url | Extracts product data from a public product page URL. | N/A (POST) |
GET | /api/fetch-html | A server-side proxy to fetch HTML content from external URLs, bypassing CORS. Requires a `?url=` query parameter. | Open |
POST | /api/generate-marketing-copy | Regenerates the marketing description for a product based on its current data. | N/A (POST) |
GET | /api/image-proxy | A server-side proxy to fetch external images and return them as a data URI. Requires a `?url=` query parameter. | Open |
POST | /api/product-list-status | Updates the status and data for an item in the AI Product List. | N/A (POST) |
POST | /api/test-ai | A simple endpoint to test the AI connection. Requires a POST with JSON: { "prompt": "Your test prompt" } |