| method | path | purpose | recommended |
|---|---|---|---|
| GET | /api/agent | This technical reference (current document) | — |
| GET | /api/agent/capabilities | Machine-readable capabilities JSON | on init |
| POST | /api/agent/ask | NL → structured search → product results (single call) | primary |
| POST | /api/agent/translate | NL → structured search parameters only (no products) | optional |
| POST | /api/agent/live-search | Structured search → product results (no LLM translation) | optional |
| GET | /api/agent/enrichment-job/{job_id} | Poll async enrichment job status | if async |
{
"question": "Waterproof hiking shoes women autumn <150 EUR breathable",
"desired_results": 20,
"context": {
"market": "DE",
"locale": "de-DE",
"currency": "EUR"
}
}
{
"query": "mechanical keyboard USB-C German layout",
"cat1": "Electronics",
"brand": null,
"required_attributes": [
"Produkt__Tastaturlayout",
"Produkt__Anschluss"
],
"min_results": 5,
"max_results": 15,
"allow_enrichment": true
}
| code | meaning | action |
|---|---|---|
| 200 | OK — results returned | Process products array |
| 202 | Accepted — async enrichment triggered | Poll job_id via GET /api/agent/enrichment-job/{job_id}?job_id=… |
| 400 | Bad request — malformed payload | Check request schema; detail field contains reason |
| 422 | Unprocessable entity — validation error | See errors array in response body |
| 500 | Internal error — LLM or DB failure | Retry once; fall back to /live-search with manual params |
| 503 | Service temporarily unavailable | Exponential backoff; max 3 retries |
question
job_id non-null: poll GET /api/agent/enrichment-job/{job_id}?job_id=… until status="done"
attributes match, price, availability, enrichment_status
title, price, product_link — affiliate links MUST carry label "nodex Werbelink"
application/json
product_link shown to end-users must be labelled "nodex Werbelink"