Files
descrybe/docs/public-api-reference.md
T

72 lines
3.9 KiB
Markdown
Raw Normal View History

2026-10-15 21:22:43 +02:00
# Descrybe public API
Production API: `https://api.descrybe.io/api/v1`
Interactive reference: `https://descrybe.io/docs`
OpenAPI YAML: `https://api.descrybe.io/api/v1/openapi.yaml`
## Authentication
Use a company API key from Settings → API keys. Team members with API Keys management permission can create keys. Send `Authorization: Bearer dk_...` (preferred) or `X-API-Key: dk_...`. Treat the secret as confidential; the full key is shown only when created. These are company-scoped public API endpoints, not dashboard session endpoints.
## Example requests
```bash
curl -H 'Authorization: Bearer dk_YOUR_KEY' 'https://api.descrybe.io/api/v1/products?page=1&limit=25'
curl -H 'Authorization: Bearer dk_YOUR_KEY' 'https://api.descrybe.io/api/v1/feeds'
curl -X POST 'https://api.descrybe.io/api/v1/process' -H 'Authorization: Bearer dk_YOUR_KEY' -H 'Content-Type: application/json' -d '{"raw_product_ids":["YOUR_RAW_UUID"],"processing_type":"seo_meta"}'
```
For `POST /products/process`, supply `items[].ean` and expect HTTP 200 with a `data` envelope. For `POST /process`, supply existing `raw_product_ids` and expect HTTP 202 with flat processing job details. `processing_types` is informational; **`processing_type` controls the execution mode**. `seo_meta` processes SEO metadata while keeping existing enhanced titles/descriptions. Multiple selected content outputs use the `enhance` mode.
## URL feeds
Feeds support XML, CSV, and JSON. For a public create call use `POST /feeds` with `name`, `url`, `feed_type`, and optional `item_path`. JSON object wrappers and XML record names can usually be detected during schema extraction; specify an item path if automatic detection does not find the right array. For protected URL sources or custom authorization headers, use the authenticated company dashboard feed configuration, which securely saves the secrets. The public feed-create JSON contract does not accept arbitrary secret headers.
Export feeds support XML, CSV and JSON, with a URL extension matching the saved format. For exports, create a template with `POST /export-feeds` and generate with `POST /export-feeds/{id}/generate`. The public download token must be handled like a secret.
## Registered endpoints
All paths below are relative to `/api/v1`, and are checked against the API router.
- `GET, POST /attributes`
- `POST /attributes/create`
- `PATCH, DELETE /attributes/{id}`
- `GET /campaigns`
- `POST /campaigns/prepare`
- `GET, POST /categories`
- `POST /categories/create`
- `GET, PATCH, DELETE /categories/{id}`
- `GET, POST /export-feeds`
- `GET, PATCH, DELETE /export-feeds/{id}`
- `POST /export-feeds/{id}/export-products`
- `POST /export-feeds/{id}/generate`
- `POST /export-feeds/{id}/rotate-token`
- `PUT /export-feeds/{id}/template`
- `GET, POST /feeds`
- `GET, PATCH, DELETE /feeds/{id}`
- `POST /feeds/{id}/extract-schema`
- `GET, PUT /feeds/{id}/mappings`
- `POST /feeds/{id}/sync`
- `POST /feeds/{id}/sync-process-sample`
- `GET /health`
- `GET /marketing/calendar`
- `POST /marketing/calendar/prepare`
- `GET /openapi.yaml`
- `POST, GET /process`
- `GET /process/{id}`
- `POST /process/{id}/cancel`
- `POST /process/{id}/retry`
- `POST /process/{id}/terminate`
- `GET /products`
- `POST /products/process`
- `GET /products/process/{id}`
- `GET /products/quality`
- `POST /products/reset`
- `GET, PATCH /products/{id}`
## Response handling
Public catalog and feed list/create routes generally use `data` (and `meta` for paginated lists). Processing jobs under `/process` use a flat job response instead. Do not interchange processed product `id` and `raw_product_id` for job starts. Handle 401 for invalid/revoked keys, 402 for plan/credit gates, 429 with `Retry-After` for throttled operations, and validation errors as documented per operation.
2026-10-16 00:34:06 +02:00
This reference documents only public `/api/v1` endpoints authorized with company API keys. Internal dashboard and platform administration interfaces are intentionally not published.
2026-10-15 21:22:43 +02:00