English
English
Appearance
English
English
Appearance
Metty exposes two public APIs. Each runs on its own hostname and uses its own type of key:
| API | hostname | purpose | authentication |
|---|---|---|---|
| Search API | https://search.api.metty.eu | search and autocomplete for your own UI | pk_ in the key query parameter |
| Catalog API | https://catalog.api.metty.eu | catalog synchronisation without a feed | sk_ in the Authorization header |
If you use the widget, you call neither — the widget handles the communication itself.
| key | format | endpoints | transport |
|---|---|---|---|
| public | pk_ + 32 hexadecimal characters | Search API | key query parameter |
| secret | sk_ + 64 hexadecimal characters | Catalog API | Authorization: Bearer <SECRET_API_KEY> header |
The public key is meant for reading and may be part of the page source. The secret key allows writing to the catalog and therefore does not belong in a frontend — its place is server configuration, ideally an environment variable.
The Authorization header is never logged. A request over plain HTTP is rejected rather than redirected, because by then the key has already travelled over the network.
An e-shop is always in one of two modes: feed (we import the catalog from XML) or content_api (you send the catalog through the API). The modes are not combined — an older feed snapshot would overwrite newer changes sent through the API.
Writing to an e-shop in feed mode returns 409 catalog_mode_conflict; switching modes is done by Metty. Reads are not affected by this safeguard: both the catalog export and the Search API work in either mode.
| operation | endpoint |
|---|---|
| search | GET /search |
| autocomplete | GET /suggest |
| catalog writes | PUT / PATCH / DELETE /catalog/products |
| safe full snapshot | POST /catalog/syncs |
| catalog export | GET /catalog/products |
Campaigns and result pinning, analytics, personalisation, geographic ranking, nested objects, and objects of type category, brand or article.
If you send a parameter that would affect the result and we cannot handle it, we return an error naming it. A filter that silently fails to apply is a worse outcome than an explicit error.