Orders, feeds and coupons
Orders of the e-shops (they drive purchase triggers and conditions), order states, product and customer feeds, coupon stacks.
Technická referencia je v angličtine (rovnako ako strojovo čitateľný dokument OpenAPI). Celú skupinu pre AI agenta načítate z /api/openapi.json?tag=Orders%20and%20feeds.
Prihlásenie: Authorization: Bearer pst_... alebo HTTP Basic (e-mail člena firmy a API kľúč).
Operácie
| Metóda | Cesta | Popis |
|---|---|---|
| GET | /api/v1/tenants/{tenant}/coupon-stacks | List coupon stacks |
| POST | /api/v1/tenants/{tenant}/coupon-stacks | Create a coupon stack |
| GET | /api/v1/tenants/{tenant}/coupon-stacks/{stack_id} | Get a coupon stack |
| DELETE | /api/v1/tenants/{tenant}/coupon-stacks/{stack_id} | Delete a coupon stack |
| POST | /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/assign | Give a coupon of a stack to a contact |
| POST | /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/codes | Add coupon codes to a stack |
| GET | /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/coupons | List coupons of a stack |
| POST | /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/used | Mark coupons as used |
| GET | /api/v1/tenants/{tenant}/feed-articles | Search articles of the article feeds |
| GET | /api/v1/tenants/{tenant}/feed-products | Search products of the product feeds |
| GET | /api/v1/tenants/{tenant}/feeds | List feeds |
| POST | /api/v1/tenants/{tenant}/feeds | Create a feed |
| GET | /api/v1/tenants/{tenant}/feeds/{feed_id} | Get a feed |
| PATCH | /api/v1/tenants/{tenant}/feeds/{feed_id} | Update a feed |
| DELETE | /api/v1/tenants/{tenant}/feeds/{feed_id} | Delete a feed |
| POST | /api/v1/tenants/{tenant}/feeds/{feed_id}/import | Import a feed file by upload |
| GET | /api/v1/tenants/{tenant}/feeds/{feed_id}/items | List items of a feed |
| GET | /api/v1/tenants/{tenant}/feeds/{feed_id}/preview | Preview a feed (first items, detected fields) |
| POST | /api/v1/tenants/{tenant}/feeds/{feed_id}/refresh | Download and process a feed now |
| GET | /api/v1/tenants/{tenant}/order-states | Get the order state mapping |
| PUT | /api/v1/tenants/{tenant}/order-states | Replace the order state mapping |
| GET | /api/v1/tenants/{tenant}/orders | List orders |
| POST | /api/v1/tenants/{tenant}/orders | Create or update an order |
| POST | /api/v1/tenants/{tenant}/orders/paid-at | Maintenance: fill empty dates of payment of orders (SmartEmailing data) |
| GET | /api/v1/tenants/{tenant}/orders/{order_id} | Get an order |
List coupon stacks
GET /api/v1/tenants/{tenant}/coupon-stacks
Oprávnenie: modul settings, úroveň read; kľúč s prístupom read alebo full · Nástroj MCP: list_coupon_stacks
Coupon code stacks with free, assigned and used counts.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Odpovede
- 200 OK:
application/jsonobject
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Create a coupon stack
POST /api/v1/tenants/{tenant}/coupon-stacks
Oprávnenie: modul settings, úroveň full; kľúč s prístupom full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Telo požiadavky (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | áno | |
shopId | string | áno | |
mergeKey | string | áno | |
note | string | nie |
Odpovede
- 201 Created:
application/jsonCouponStack
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Get a coupon stack
GET /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}
Oprávnenie: modul settings, úroveň read; kľúč s prístupom read alebo full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
stack_id | path | string | áno | Id of the stack (string of digits). |
Odpovede
- 200 OK:
application/jsonobject
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Delete a coupon stack
DELETE /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}
Oprávnenie: modul settings, úroveň full; kľúč s prístupom full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
stack_id | path | string | áno | Id of the stack (string of digits). |
Odpovede
- 204 No content
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Give a coupon of a stack to a contact
POST /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/assign
Oprávnenie: modul contacts, úroveň full; kľúč s prístupom full
A new code of the stack for the contact, by hand (PZ-05: every assignment is a new code): 201, 409 empty.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
stack_id | path | string | áno | Id of the stack (string of digits). |
Telo požiadavky (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
contactId | any | áno |
Odpovede
- 200 OK: it already existed or nothing changed:
application/jsonobject - 201 Created (200 when it already existed or nothing changed):
application/jsonobject
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | contactId |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 409 | conflict | empty |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Add coupon codes to a stack
POST /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/codes
Oprávnenie: modul settings, úroveň full; kľúč s prístupom full
Adds codes ({codes: [...]} or {text: "..."}) to the stack: {counts, stack}.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
stack_id | path | string | áno | Id of the stack (string of digits). |
Telo požiadavky (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
text | string | áno |
Odpovede
- 200 OK:
application/jsonCouponImportResult
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | codes |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
List coupons of a stack
GET /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/coupons
Oprávnenie: modul contacts, úroveň read; kľúč s prístupom read alebo full
Codes of the stack handed out in a period, newest first (SmartEmailing: the magnifier of a stack, data.promo.assigned): ?from= and ?to= (YYYY-MM-DD, the tenant's calendar days, both included), ?status=assigned (not used yet) | used, ?q= (a code or an address), paging. Every item names the contact and the e-mail.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
stack_id | path | string | áno | Id of the stack (string of digits). |
from | query | string | nie | Start of the period (YYYY-MM-DD local day, or ISO time where noted). |
page | query | integer | nie | Page number, from 1. default 1, min 1 |
pageSize | query | integer | nie | Items per page, 1 to 100. default 25, min 1, max 100 |
q | query | string | nie | Search text (case and diacritics insensitive). max 200 chars |
status | query | string | nie | Status filter. |
to | query | string | nie | End of the period (YYYY-MM-DD local day, or ISO time where noted). |
Odpovede
- 200 OK:
application/jsonobject
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | q, status, to |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Mark coupons as used
POST /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/used
Oprávnenie: modul settings, úroveň full; kľúč s prístupom full
Marks codes the shop reports used: {marked, already, unknown, stack}.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
stack_id | path | string | áno | Id of the stack (string of digits). |
Telo požiadavky (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
text | string | áno |
Odpovede
- 200 OK:
application/jsonCouponUsedResult
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | codes |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Search articles of the article feeds
GET /api/v1/tenants/{tenant}/feed-articles
Oprávnenie: modul content, úroveň read; kľúč s prístupom read alebo full
Articles of the article feeds (kind articles, migration 0130) for the editor's element Články FEED: ?shopId=, ?feedId=, ?q= (title or perex contains, accents ignored), ?ids= (comma separated article ids, at most 100, also articles no longer in their feed), ?limit= 1 to 60 (default 24), ?offset=. {items, total, feeds}.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
feedId | query | string | nie | |
ids | query | string | nie | |
limit | query | string | nie | |
offset | query | string | nie | |
q | query | string | nie | Search text (case and diacritics insensitive). max 200 chars |
shopId | query | string | nie |
Odpovede
- 200 OK:
application/jsonFeedArticleList
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | feedId, ids, q |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Search products of the product feeds
GET /api/v1/tenants/{tenant}/feed-products
Oprávnenie: modul content, úroveň read; kľúč s prístupom read alebo full
?shopId= (optional), ?q= (title, g:id, code or brand contains, case and accents ignored), ?ids= (comma separated g:id values, at most 100: exact matches including products no longer in their feed), ?limit= 1 to 60 (default 24), ?offset=. Answers {items, total, feeds}.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
ids | query | string | nie | |
limit | query | string | nie | |
offset | query | string | nie | |
q | query | string | nie | Search text (case and diacritics insensitive). max 200 chars |
shopId | query | string | nie |
Odpovede
- 200 OK:
application/jsonFeedProductList
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | ids, q |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
List feeds
GET /api/v1/tenants/{tenant}/feeds
Oprávnenie: modul settings, úroveň read; kľúč s prístupom read alebo full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Odpovede
- 200 OK:
application/jsonFeedList
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Create a feed
POST /api/v1/tenants/{tenant}/feeds
Oprávnenie: modul settings, úroveň full; kľúč s prístupom full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Telo požiadavky (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | áno | |
shopId | string | áno | |
kind | one of: google_products, shop_customers, shop_orders, articles | nie | |
format | one of: google, heureka, zbozi | nie | Only with kind google_products; fixed once the feed exists. |
url | string | nie | |
autoRefresh | boolean | nie | |
pairing | array of FeedPairing | nie |
Odpovede
- 201 Created:
application/jsonFeed
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Get a feed
GET /api/v1/tenants/{tenant}/feeds/{feed_id}
Oprávnenie: modul settings, úroveň read; kľúč s prístupom read alebo full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
feed_id | path | string | áno | Id of the feed (string of digits). |
Odpovede
- 200 OK:
application/jsonFeed
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Update a feed
PATCH /api/v1/tenants/{tenant}/feeds/{feed_id}
Oprávnenie: modul settings, úroveň full; kľúč s prístupom full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
feed_id | path | string | áno | Id of the feed (string of digits). |
Telo požiadavky (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | nie | |
kind | one of: google_products, shop_customers, shop_orders, articles | nie | |
format | one of: google, heureka, zbozi | nie | Only with kind google_products; fixed once the feed exists. |
url | string | nie | |
autoRefresh | boolean | nie | |
pairing | array of FeedPairing | nie |
Odpovede
- 200 OK:
application/jsonFeed
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Delete a feed
DELETE /api/v1/tenants/{tenant}/feeds/{feed_id}
Oprávnenie: modul settings, úroveň full; kľúč s prístupom full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
feed_id | path | string | áno | Id of the feed (string of digits). |
Odpovede
- 204 No content
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Import a feed file by upload
POST /api/v1/tenants/{tenant}/feeds/{feed_id}/import
Oprávnenie: modul settings, úroveň full; kľúč s prístupom full
Imports the document in exactly one of {"xml": text}, {"content": text} or {"contentBase64": base64 of the file's bytes}; a refused document changes nothing (400 with the reason and the detected format).
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
feed_id | path | string | áno | Id of the feed (string of digits). |
Telo požiadavky (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
xml | string | áno |
Odpovede
- 200 OK:
application/jsonFeedImportResult
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | content, contentBase64 |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
List items of a feed
GET /api/v1/tenants/{tenant}/feeds/{feed_id}/items
Oprávnenie: modul settings, úroveň read; kľúč s prístupom read alebo full
Položky feedu (SE's product-item-list): the items of a product or article feed still in it, in feed order, ?q= (item id, code or any value, accents ignored), ?page=, ?pageSize= (at most 100). Customer and order feeds keep no items (400 validation kind). {items: [{id, itemId, code, data, values, updatedAt}], total, page, pageSize}; values are the paired parameters after their formatters (product feeds).
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
feed_id | path | string | áno | Id of the feed (string of digits). |
page | query | integer | nie | Page number, from 1. default 1, min 1 |
pageSize | query | integer | nie | Items per page, 1 to 100. default 25, min 1, max 100 |
q | query | string | nie | Search text (case and diacritics insensitive). max 200 chars |
Odpovede
- 200 OK:
application/jsonobject
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | kind, q |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Preview a feed (first items, detected fields)
GET /api/v1/tenants/{tenant}/feeds/{feed_id}/preview
Oprávnenie: modul settings, úroveň read; kľúč s prístupom read alebo full
One product of the feed (?index=, from 0) with its paired values and the field names of the feed.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
feed_id | path | string | áno | Id of the feed (string of digits). |
index | query | string | nie |
Odpovede
- 200 OK:
application/jsonFeedPreview
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | kind |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Download and process a feed now
POST /api/v1/tenants/{tenant}/feeds/{feed_id}/refresh
Oprávnenie: modul settings, úroveň full; kľúč s prístupom full
Queues a download of the feed's URL now (the worker runs it): {"state": "queued" | "running", "feed": ...}; 400 validation url when the feed has no URL.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
feed_id | path | string | áno | Id of the feed (string of digits). |
Telo požiadavky (application/json)
object
Odpovede
- 200 OK:
application/jsonFeedRefreshResult
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | url |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Get the order state mapping
GET /api/v1/tenants/{tenant}/order-states
Oprávnenie: modul settings, úroveň read; kľúč s prístupom read alebo full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Odpovede
- 200 OK:
application/jsonobject
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Replace the order state mapping
PUT /api/v1/tenants/{tenant}/order-states
Oprávnenie: modul settings, úroveň full; kľúč s prístupom full
Replaces the rules and re-maps the stored orders (no order events).
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Telo požiadavky (application/json): Required by the server: items.
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
items | array of OrderStateRule | áno | The new rules (replace all). max 500 items |
Odpovede
- 200 OK:
application/jsonobject
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
List orders
GET /api/v1/tenants/{tenant}/orders
Oprávnenie: modul contacts, úroveň read; kľúč s prístupom read alebo full · Nástroj MCP: list_contact_orders
Orders, filtered by contact, shop, state or text. Money per currency, never summed across currencies.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
contactId | query | string | nie | Contact id. |
page | query | integer | nie | Page number, from 1. default 1, min 1 |
pageSize | query | integer | nie | Items per page, 1 to 100. default 25, min 1, max 100 |
q | query | string | nie | Search text. max 200 chars |
shop | query | string | nie | Shop id filter. |
state | query | string | nie | Order state. |
Odpovede
- 200 OK:
application/jsonobject
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | contactId, q, state |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Create or update an order
POST /api/v1/tenants/{tenant}/orders
Oprávnenie: modul contacts, úroveň full; kľúč s prístupom full
Creates or updates one order by (shop, id): 201 created, 200 updated or unchanged.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Telo požiadavky (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string or integer | áno | Order id in the e-shop (1 to 100 characters). The order is created or updated by (shopId, id). |
shopId | string | áno | Shop of the order. |
createdAt | string | áno | ISO 8601 with a time zone, e.g. 2026-10-12T09:30:00+02:00. |
paidAt | string or null | nie | |
email | string | nie | Buyer e-mail (or contactId). A buyer without a contact gets one without marketing consent (status customer, never e-mailed). |
contactId | string | nie | Existing contact (its e-mail must match email when both). |
status | string | áno | State name of the e-shop (at most 200), mapped to a canonical state by GET/PUT /order-states. Unmapped names are other (never a purchase). |
eshopCode | string | nie | |
orderUrl | string | nie | |
companyId | string | nie | |
currency | string | nie | Default and only allowed value: the shop currency. |
totalWithVat | string or number | nie | |
totalWithoutVat | string or number | nie | |
seller | object | nie | |
orderDelivery | object | nie | |
items | array of object | nie | max 1000 items |
deleted | boolean | nie | true = the order is deleted (ends post-purchase runs). |
Odpovede
- 200 OK: it already existed or nothing changed:
application/jsonobject - 201 Created (200 when it already existed or nothing changed):
application/jsonobject
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | contactId, items, order |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Maintenance: fill empty dates of payment of orders (SmartEmailing data)
POST /api/v1/tenants/{tenant}/orders/paid-at
Oprávnenie: modul contacts, úroveň full; kľúč s prístupom full
ES-01 (core/orders.set_paid_at): the dates of payment SmartEmailing kept, for orders whose e-shop export has none. Body {items: [{shop: shop code, code: the e-shop's order number, paidAt: ISO time with an offset or Z, or "YYYY-MM-DD HH:MM[:SS]" in the tenant's local time}] (1 to 5 000), dryRun: bool (required)}. Sets orders.paid_at only where it is empty, never overwrites one, writes no order event. 200 {updated, alreadySet, notFound, dryRun}.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Telo požiadavky (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
dryRun | any | áno | |
items | any | áno |
Odpovede
- 200 OK:
application/jsonobject
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | dryRun, items |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Get an order
GET /api/v1/tenants/{tenant}/orders/{order_id}
Oprávnenie: modul contacts, úroveň read; kľúč s prístupom read alebo full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
order_id | path | string | áno | Id of the order (string of digits). |
Odpovede
- 200 OK:
application/jsonOrder
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Schémy
CouponCounts
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
total | number | áno | |
free | number | áno | |
assigned | number | áno | |
used | number | áno |
CouponImportResult
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
counts | object | áno | |
stack | CouponStack | áno |
CouponStack
A stack of discount codes of one e-shop (se-spec 06 §4.6); tag is the e-mail merge tag {{coupon_<mergeKey>}}.
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | áno | |
name | string | áno | |
shopId | string | áno | |
mergeKey | string | áno | |
tag | string | áno | |
note | string | áno | |
counts | CouponCounts | áno | |
createdAt | string | áno | |
updatedAt | string | áno |
CouponStackInput
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | áno | |
shopId | string | áno | |
mergeKey | string | áno | |
note | string | nie |
CouponStatus
one of: free, assigned, used
CouponUsedResult
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
marked | number | áno | |
already | number | áno | |
unknown | number | áno | |
stack | CouponStack | áno |
Currency
one of: CZK, EUR
Error
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
error | object | áno |
{
"error": {
"code": "validation",
"message": "email"
}
}Feed
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | áno | |
name | string | áno | |
shopId | string | áno | |
kind | FeedKind | áno | |
format | FeedFormat | áno | |
currency | Currency | áno | The shop's currency, read only. |
url | string | áno | |
autoRefresh | boolean | áno | |
pairing | array of FeedPairing | áno | |
itemCount | number | áno | |
version | number | áno | |
importedAt | string or null | áno | |
refreshedAt | string or null | áno | Last scheduled download (auto refresh) and its failure ('' = imported). |
refreshError | string | áno | |
refreshReason | string | áno | refreshError as a code for the UI (too_large, wrong_kind, not_google_products, not_customers, unsupported_format, invalid, doctype, http_404, network ...; '' = none) and what the document looked like. |
refreshDetected | string | áno | |
maxBytes | number | áno | Largest document the feed accepts (20 MB products, 100 MB customers, 200 MB orders). |
historyAt | string or null | áno | Order feeds (migration 0097): when the first import (the order history, which starts no automation) finished; null = not yet, the next import is the history. Other kinds: null. |
lastCounts | object | áno | Counts of the last import ({} before the first one). |
createdAt | string | áno | |
updatedAt | string | áno |
FeedArticle
An article of an article feed (GET /feed-articles, Články FEED of the Magic editor).
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | áno | |
feedId | string | áno | |
shopId | string | áno | |
itemId | string | áno | guid / id of the article, else its link: what the editor stores to refresh it. |
title | string | áno | |
url | string | áno | |
perex | string | áno | Plain text, at most 500 characters. |
imageUrl | string | áno | |
publishedAt | string or null | áno | |
inFeed | boolean | áno |
FeedArticleList
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
items | array of FeedArticle | áno | |
total | number | áno | |
feeds | array of FeedProductFeed | áno |
FeedFormat
one of: google, heureka, zbozi
FeedFormatter
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
type | FeedFormatterType | áno | |
text | string | nie | append, prepend |
separator | string | nie | split_join: split by separator, the parts from offset (negative from the end) to offset + length (0 = all) |
offset | number | nie | |
length | number | nie | |
format | string | nie | date: PHP-style format (d j m n Y y H G i s D N w) |
decimals | number | nie | number (0 to 6) |
decimalSeparator | string | nie | |
thousandsSeparator | string | nie | |
currency | one of: CZK, EUR, feed, USD | nie | currency: 'feed' = the feed's shop currency |
search | string | nie | replace |
replace | string | nie |
FeedFormatterType
one of: number, currency, date, append, prepend, strip_tags, split_join, replace, lower, upper
FeedImportResult
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
counts | object | áno | |
feed | Feed | áno |
FeedInput
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | áno | |
shopId | string | áno | |
kind | one of: google_products, shop_customers, shop_orders, articles | nie | |
format | one of: google, heureka, zbozi | nie | Only with kind google_products; fixed once the feed exists. |
url | string | nie | |
autoRefresh | boolean | nie | |
pairing | array of FeedPairing | nie |
FeedItem
An item of a product or article feed (GET .../feeds/{id}/items, Položky feedu).
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | áno | |
itemId | string | áno | |
code | string | áno | |
data | map of FeedValue | áno | |
values | map of string | áno | Paired parameters after their formatters (product feeds). |
updatedAt | string | áno |
FeedKind
one of: google_products, shop_customers, shop_orders, articles
FeedList
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
items | array of Feed | áno | |
defaultPairing | array of FeedPairing | áno |
FeedPairing
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | áno | Own parameter name (se-id, se-product ...); se-id pairs order items by product code. |
field | string | áno | Field of the feed item (g:id, title ...). |
format | array of FeedFormatter | nie | Formatters applied in order to the value (core/feed_format.py); absent = none. Never change the product code. |
FeedPreview
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
index | number | áno | |
total | number | áno | |
item | object or null | áno | |
values | map of string | áno | Paired values of the item by parameter name. |
fields | array of string | áno |
FeedProduct
A product of a shop's product feed for the editor's product picker (GET .../feed-products).
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | áno | |
feedId | string | áno | |
shopId | string | áno | |
itemId | string | áno | g:id: the id the editor stores to refresh the product later (Párovat feed). |
code | string | áno | |
name | string | áno | |
url | string | áno | |
imageUrl | string | áno | |
price | number or null | áno | With VAT, in the shop's currency (never converted); sale price when the feed has one. |
regularPrice | number or null | áno | The price before the sale; null without a sale. |
currency | Currency | áno | |
priceText | string | áno | |
priceCurrencyMismatch | boolean | nie | |
availability | one of: `, in_stock, out_of_stock, preorder, backorder` | áno | |
brand | string | áno | |
shortDescription | string | nie | The feed description as a short plain text (about 160 characters) for the product's text in an e-mail. |
values | map of string | nie | The feed's paired parameters of the product after their formatters (Párování feedu: se-title, se-price, own names); a part of a feed item may show one of them (ED-19). |
inFeed | boolean | áno | |
updatedAt | string | áno |
FeedProductFeed
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | áno | |
name | string | áno | |
shopId | string | áno | |
currency | Currency | áno | |
itemCount | number | áno | |
refreshedAt | string or null | áno | |
importedAt | string or null | áno | |
refreshError | string | áno |
FeedProductList
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
items | array of FeedProduct | áno | |
total | number | áno | |
feeds | array of FeedProductFeed | áno |
FeedRefreshResult
POST .../feeds/{id}/refresh: a download queued now, or one already running.
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
state | one of: queued, running | áno | |
feed | Feed | áno |
FeedValue
string or array of FeedValue or map of FeedValue
Order
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | áno | |
externalId | string | áno | |
eshopCode | string | áno | |
eshopName | string | áno | |
shopId | string | áno | |
createdAt | string | áno | |
paidAt | string or null | áno | |
email | string or null | áno | |
contactId | string or null | áno | |
state | one of: cancelled, unpaid, new, other, paid, processing, shipped, pickup, delivered, returned | áno | |
status | OrderStatus | áno | |
sourceStatus | string | áno | |
orderUrl | string | áno | |
currency | Currency | áno | |
totalWithVat | string or null | áno | |
totalWithoutVat | string or null | áno | |
itemCount | number | áno | |
items | array of OrderItem | áno | The list has the first three items, the detail all of them. |
conversion | OrderConversion or null | áno |
OrderConversion
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
kind | one of: direct, assisted | áno | |
campaignId | string or null | áno | |
automationId | string or null | áno | |
clickedAt | string | áno |
OrderItem
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | áno | |
productCode | string | áno | |
name | string | áno | |
description | string | áno | |
price | OrderItemPrice | áno | |
quantity | number | áno | |
unit | string | áno | |
url | string | áno | |
imageUrl | string | áno | |
attributes | map of boolean or string or number or null | áno | ItemType, Brand, Category, g:condition, g:availability, g:brand of the paired feed product under the item's own. |
paired | boolean | áno | True when the item met a product of the shop's feeds by its code. |
OrderItemPrice
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
withVat | string or null | áno | Unit prices as decimal strings in the order currency. |
withoutVat | string or null | áno | |
currency | Currency | áno |
OrderStateRule
orders.check_state_map: one rule of the state map
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
sourceStatus | string | áno | State name of the e-shop, at most 80 characters. |
match | one of: exact, prefix | nie | default exact |
state | one of: new, unpaid, paid, processing, shipped, pickup, delivered, cancelled, returned, other | áno |
OrderStatus
one of: cancelled, other, pending, completed
StackCoupon
A code of a stack handed out (PZ-05, GET /coupon-stacks/{id}/coupons): to whom and with which e-mail.
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | áno | |
code | string | áno | |
status | CouponStatus | áno | |
assignedAt | string or null | áno | |
usedAt | string or null | áno | |
contact | object or null | áno | null after the contact was erased. |
email | object or null | áno | The e-mail the code went out with; null = handed out by hand, or before every e-mail took its own code. |