For developers and agencies
Connect Sortyra to your own system
Sortyra has a REST API built on the same service layer as the app, an MCP server for AI assistants and HMAC-signed webhooks. Everything is included in the subscription, and the same permissions apply as in the app.
- OpenAPI 3.1machine-readable description of the REST API
- 3 scopesper key: read-only, read and edit, full management
- HMAC-SHA256signature on every webhook
REST API
The API runs at the app’s address under the /api/v1 path and responds in JSON. Authorisation uses the Authorization: Bearer <API key> header. The key is created by the owner or an administrator in the app under AI and integrations → API and webhooks and is shown only once. A key never has more rights than the user who created it, and when that user leaves the team, the key stops working.
- read-only (
read) – outputs, sources, products, rules - read and edit (
write) – additionally manual product edits, rules and triggering a recalculation - full management (
admin) – sources, outputs and settings; only the owner can create it - errors in a uniform format
{ "error": "…" }with status 401, 402, 403, 404, 422 or 429 - limit of 120 requests per minute from a single IP address; if exceeded, a 429 response with a
retry-afterheader
OpenAPI description
The full interface description is public at /api/v1/openapi.json in the app (OpenAPI 3.1, without any of your data). You can load it into Postman, Insomnia or a client generator. The list of endpoints below is loaded directly from this description.
Rule dry run
You can try out rules before saving them: the POST /api/v1/rules/dry-run endpoint returns how the proposed rules would change the output’s products, without changing any data. A manual product edit via PATCH /api/v1/products is saved as a lock that takes precedence over rules – just like an edit in the app.
MCP server for AI assistants
If you want to manage your catalogue from an AI assistant, use the MCP server. It connects via OAuth 2.1 sign-in (the assistant finds the authorisation server by itself) or with the same organisation API key. The scopes are read and write, and changes are written only after you confirm them in the assistant.
Alert webhook
In Settings → Alerts you add a channel of type Webhook with your https address. When a new alert occurs (for example a feed that failed to download, a blocked output or a price change), we send a POST with JSON in the form { "event": "alert", "alert": { … }, "organizationId": "…", "link": "…" }. Webhooks may only go to public addresses; internal addresses are blocked. Details are in the alerts guide.
Marketplace order webhook (beta)
When you connect a marketplace, you can enter your online shop’s address for orders. We send every new order as a POST with JSON { "event": "marketplace.order", "marketplace": "…", "connection": "…", "order": { … } }. When an order is cancelled (on the marketplace or in Sortyra), a marketplace.order.cancelled event with a cancellation block arrives at the same address. Without an address, you download orders as a CSV. Marketplace connections are still in beta – not yet verified with a real seller account.
How to verify a webhook signature
Every webhook carries the headers x-sortyra-timestamp (send time in seconds since 1970) and x-sortyra-signature in the form sha256=<hex>. The signature is an HMAC-SHA256 of the string <timestamp>.<request body> using the signing key that is shown once when the channel or connection is created.
- take the raw request body exactly as it arrived (before parsing the JSON)
- join it with the
x-sortyra-timestampvalue and a dot:<timestamp>.<body> - compute the HMAC-SHA256 with the signing key and compare the hex result with the part after
sha256=using a constant-time comparison - reject requests with an old timestamp, for example older than 5 minutes – this protects you against replay attacks
Shipment and cancellation webhook (incoming, beta)
Your online shop, ERP or carrier can notify Sortyra that a marketplace order has been shipped or cancelled, and Sortyra records it on the marketplace by itself. Send a POST to /api/marketplaces/shipments on the app’s domain with the headers x-sortyra-org (organisation ID), x-sortyra-timestamp (Unix time in seconds, maximum 5 minutes’ deviation) and x-sortyra-signature (sha256= + hex HMAC-SHA256 of the string <timestamp>.<body> using the signing key from the Marketplaces screen), and optionally idempotency-key. The body is a single event or { "events": [ … ] } with up to 100 events; an event contains order (the order number on the marketplace), event (shipped or cancelled), for a shipment carrier, trackingNumber and optionally trackingUrl, and for a cancellation optionally reason. The same event is processed only once, and the response contains the result of each event. The marketplace connection must have Shipment source set to Webhook. You can do the same in bulk by uploading a CSV in the app.
Order feed for inventory software (beta)
Your inventory or accounting software can download marketplace orders by itself from a secret address in the form /order-feeds/<token>.xml or .csv on the app’s domain – without signing in, so never publish the address, and if it leaks, change it in the app with the Change URL button. You can choose a format for POHODA (XML, Windows-1250), Money S3 (XML transfer Objednávky přijaté), generic XML in UTF-8 (ORDERS → ORDER with document number, customer, delivery address and items) and CSV in UTF-8 with a ; separator and one row per item. Every order has a permanent document number, so downloading it again never creates a duplicate. The address is limited to 60 downloads per 10 minutes.
REST API endpoints
| Method | Path | What it does |
|---|---|---|
| GET | /api/v1/projects | Výstupy (projekty) |
| POST | /api/v1/projects | Vytvoriť výstup |
| GET | /api/v1/projects/{id} | Detail výstupu s voľbami |
| PATCH | /api/v1/projects/{id} | Upraviť výstup |
| DELETE | /api/v1/projects/{id} | Zmazať výstup |
| GET | /api/v1/projects/{id}/options | Nastavenia výstupu |
| PATCH | /api/v1/projects/{id}/options | Zmeniť nastavenia výstupu |
| PUT | /api/v1/projects/{id}/mapping | Naparovanie polí výstupu |
| GET | /api/v1/projects/{id}/categories | Vlastné nastavenia kategórií výstupu |
| PUT | /api/v1/projects/{id}/categories/products | Kategória produktov len pre výstup |
| POST | /api/v1/projects/{id}/run | Spustiť prepočet a export |
| GET | /api/v1/projects/{id}/visuals | Automatické úpravy vizuálov výstupu |
| POST | /api/v1/projects/{id}/visuals | Nová automatická úprava |
| GET | /api/v1/visuals/templates | Šablóny a rámy vizuálov |
| PATCH | /api/v1/visuals/rules/{ruleId} | Upraviť alebo zapnúť/vypnúť automatickú úpravu |
| DELETE | /api/v1/visuals/rules/{ruleId} | Zmazať automatickú úpravu |
| GET | /api/v1/sources | Zdroje |
| POST | /api/v1/sources | Pridať zdroj |
| POST | /api/v1/sources/inspect | Náhľad feedu pred pridaním |
| GET | /api/v1/sources/{id} | Detail zdroja |
| PATCH | /api/v1/sources/{id} | Upraviť zdroj |
| DELETE | /api/v1/sources/{id} | Zmazať zdroj |
| POST | /api/v1/sources/{id}/fetch | Stiahnuť zdroj teraz |
| GET | /api/v1/sources/{id}/runs | História sťahovaní zdroja |
| GET | /api/v1/sources/{id}/input | Úpravy zdroja pri načítaní |
| PATCH | /api/v1/sources/{id}/input | Zmeniť úpravy zdroja pri načítaní |
| GET | /api/v1/products | Produkty výstupu po pravidlách |
| PATCH | /api/v1/products | Ručná úprava (zámok pred pravidlami) |
| GET | /api/v1/products/{id} | Detail produktu (vstup, výstup, úpravy, história, stopa) |
| GET | /api/v1/rules | Reťazec pravidiel |
| POST | /api/v1/rules | Vytvoriť pravidlo |
| PATCH | /api/v1/rules/{id} | Upraviť pravidlo |
| DELETE | /api/v1/rules/{id} | Zmazať pravidlo |
| PUT | /api/v1/rules/order | Poradie pravidiel |
| POST | /api/v1/rules/dry-run | Skúšobný beh navrhovaných pravidiel |
| GET | /api/v1/categories/tree | Strom kategórií e-shopu |
| PUT | /api/v1/categories/tree | Nahradiť strom kategórií |
| GET | /api/v1/categories/channel | Kategórie kanála pre výstup |
| PUT | /api/v1/categories/channel | Priradiť kategóriu kanála |
| GET | /api/v1/categories/supplier | Kategórie dodávateľov a ich mapovanie |
| PUT | /api/v1/categories/supplier | Mapovať kategóriu dodávateľa |
| GET | /api/v1/categories/scope | Vlastné nastavenia kategórií výstupov |
| GET | /api/v1/categories/channel/ai | Priebeh automatického mapovania na kanál |
| POST | /api/v1/categories/channel/ai | Spustiť automatické mapovanie na kanál |
| GET | /api/v1/categories/taxonomy | Hľadať v taxonómii kanála |
| GET | /api/v1/categories/proposals | Návrhy kategórií podľa kategórií dodávateľa |
| POST | /api/v1/categories/proposals | Zaradiť kategóriu dodávateľa |
Frequently asked questions
Is the API included in the subscription?
Yes, the REST API and MCP are part of the subscription at no extra charge. Once your subscription ends, the API responds with status 402 – see pricing.
How often can I call the API?
Up to 120 requests per minute from a single IP address. If you exceed this, you get a 429 response with a retry-after header; wait and repeat the request.
Can I upload products to Sortyra via the API?
Products come from sources – feeds, exports and files. Via the API you read them after rules are applied, edit individual values, manage rules and trigger recalculation of outputs.
How do I know a webhook was really sent by Sortyra?
Verify the x-sortyra-signature header: the HMAC-SHA256 of <timestamp>.<body> with your signing key must match the value after sha256=. The signing key is shown only once, when it is created.
Where can I see what our system changed via the API?
Changes made via the API appear in the Change history, marked REST API, and can be undone; access and events are in the Sign-ins and events section.
Your first output feed can be ready today.
7 days free, no credit card. We'll set up your first feed together on a free 15-minute online call.