Orders, feeds and coupons
Orders of the e-shops (they drive purchase triggers and conditions), order states, product and customer feeds, coupon stacks.
Technická reference je anglicky (stejně jako strojově čitelný dokument OpenAPI). Celou skupinu pro AI agenta načtete z /api/openapi.json?tag=Orders%20and%20feeds.
Přihlášení: Authorization: Bearer pst_... nebo HTTP Basic (e-mail člena firmy a API klíč).
Operace
| Metoda | 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ávnění: modul settings, úroveň read; klíč s přístupem read nebo full · Nástroj MCP: list_coupon_stacks
Coupon code stacks with free, assigned and used counts.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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. |
Odpovědi
- 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ávnění: modul settings, úroveň full; klíč s přístupem full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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. |
Tělo požadavku (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | ano | |
shopId | string | ano | |
mergeKey | string | ano | |
note | string | ne |
Odpovědi
- 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ávnění: modul settings, úroveň read; klíč s přístupem read nebo full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ano | Id of the stack (string of digits). |
Odpovědi
- 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ávnění: modul settings, úroveň full; klíč s přístupem full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ano | Id of the stack (string of digits). |
Odpovědi
- 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ávnění: modul contacts, úroveň full; klíč s přístupem full
A new code of the stack for the contact, by hand (PZ-05: every assignment is a new code): 201, 409 empty.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ano | Id of the stack (string of digits). |
Tělo požadavku (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
contactId | any | ano |
Odpovědi
- 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ávnění: modul settings, úroveň full; klíč s přístupem full
Adds codes ({codes: [...]} or {text: "..."}) to the stack: {counts, stack}.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ano | Id of the stack (string of digits). |
Tělo požadavku (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
text | string | ano |
Odpovědi
- 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ávnění: modul contacts, úroveň read; klíč s přístupem read nebo 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.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ano | Id of the stack (string of digits). |
from | query | string | ne | Start of the period (YYYY-MM-DD local day, or ISO time where noted). |
page | query | integer | ne | Page number, from 1. default 1, min 1 |
pageSize | query | integer | ne | Items per page, 1 to 100. default 25, min 1, max 100 |
q | query | string | ne | Search text (case and diacritics insensitive). max 200 chars |
status | query | string | ne | Status filter. |
to | query | string | ne | End of the period (YYYY-MM-DD local day, or ISO time where noted). |
Odpovědi
- 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ávnění: modul settings, úroveň full; klíč s přístupem full
Marks codes the shop reports used: {marked, already, unknown, stack}.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ano | Id of the stack (string of digits). |
Tělo požadavku (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
text | string | ano |
Odpovědi
- 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ávnění: modul content, úroveň read; klíč s přístupem read nebo 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}.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ne | |
ids | query | string | ne | |
limit | query | string | ne | |
offset | query | string | ne | |
q | query | string | ne | Search text (case and diacritics insensitive). max 200 chars |
shopId | query | string | ne |
Odpovědi
- 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ávnění: modul content, úroveň read; klíč s přístupem read nebo 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}.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ne | |
limit | query | string | ne | |
offset | query | string | ne | |
q | query | string | ne | Search text (case and diacritics insensitive). max 200 chars |
shopId | query | string | ne |
Odpovědi
- 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ávnění: modul settings, úroveň read; klíč s přístupem read nebo full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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. |
Odpovědi
- 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ávnění: modul settings, úroveň full; klíč s přístupem full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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. |
Tělo požadavku (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | ano | |
shopId | string | ano | |
kind | one of: google_products, shop_customers, shop_orders, articles | ne | |
format | one of: google, heureka, zbozi | ne | Only with kind google_products; fixed once the feed exists. |
url | string | ne | |
autoRefresh | boolean | ne | |
pairing | array of FeedPairing | ne |
Odpovědi
- 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ávnění: modul settings, úroveň read; klíč s přístupem read nebo full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ano | Id of the feed (string of digits). |
Odpovědi
- 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ávnění: modul settings, úroveň full; klíč s přístupem full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ano | Id of the feed (string of digits). |
Tělo požadavku (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | ne | |
kind | one of: google_products, shop_customers, shop_orders, articles | ne | |
format | one of: google, heureka, zbozi | ne | Only with kind google_products; fixed once the feed exists. |
url | string | ne | |
autoRefresh | boolean | ne | |
pairing | array of FeedPairing | ne |
Odpovědi
- 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ávnění: modul settings, úroveň full; klíč s přístupem full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ano | Id of the feed (string of digits). |
Odpovědi
- 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ávnění: modul settings, úroveň full; klíč s přístupem 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).
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ano | Id of the feed (string of digits). |
Tělo požadavku (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
xml | string | ano |
Odpovědi
- 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ávnění: modul settings, úroveň read; klíč s přístupem read nebo 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).
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ano | Id of the feed (string of digits). |
page | query | integer | ne | Page number, from 1. default 1, min 1 |
pageSize | query | integer | ne | Items per page, 1 to 100. default 25, min 1, max 100 |
q | query | string | ne | Search text (case and diacritics insensitive). max 200 chars |
Odpovědi
- 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ávnění: modul settings, úroveň read; klíč s přístupem read nebo full
One product of the feed (?index=, from 0) with its paired values and the field names of the feed.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ano | Id of the feed (string of digits). |
index | query | string | ne |
Odpovědi
- 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ávnění: modul settings, úroveň full; klíč s přístupem 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.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ano | Id of the feed (string of digits). |
Tělo požadavku (application/json)
object
Odpovědi
- 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ávnění: modul settings, úroveň read; klíč s přístupem read nebo full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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. |
Odpovědi
- 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ávnění: modul settings, úroveň full; klíč s přístupem full
Replaces the rules and re-maps the stored orders (no order events).
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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. |
Tělo požadavku (application/json): Required by the server: items.
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
items | array of OrderStateRule | ano | The new rules (replace all). max 500 items |
Odpovědi
- 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ávnění: modul contacts, úroveň read; klíč s přístupem read nebo full · Nástroj MCP: list_contact_orders
Orders, filtered by contact, shop, state or text. Money per currency, never summed across currencies.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ne | Contact id. |
page | query | integer | ne | Page number, from 1. default 1, min 1 |
pageSize | query | integer | ne | Items per page, 1 to 100. default 25, min 1, max 100 |
q | query | string | ne | Search text. max 200 chars |
shop | query | string | ne | Shop id filter. |
state | query | string | ne | Order state. |
Odpovědi
- 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ávnění: modul contacts, úroveň full; klíč s přístupem full
Creates or updates one order by (shop, id): 201 created, 200 updated or unchanged.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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. |
Tělo požadavku (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string or integer | ano | Order id in the e-shop (1 to 100 characters). The order is created or updated by (shopId, id). |
shopId | string | ano | Shop of the order. |
createdAt | string | ano | ISO 8601 with a time zone, e.g. 2026-10-12T09:30:00+02:00. |
paidAt | string or null | ne | |
email | string | ne | Buyer e-mail (or contactId). A buyer without a contact gets one without marketing consent (status customer, never e-mailed). |
contactId | string | ne | Existing contact (its e-mail must match email when both). |
status | string | ano | 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 | ne | |
orderUrl | string | ne | |
companyId | string | ne | |
currency | string | ne | Default and only allowed value: the shop currency. |
totalWithVat | string or number | ne | |
totalWithoutVat | string or number | ne | |
seller | object | ne | |
orderDelivery | object | ne | |
items | array of object | ne | max 1000 items |
deleted | boolean | ne | true = the order is deleted (ends post-purchase runs). |
Odpovědi
- 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ávnění: modul contacts, úroveň full; klíč s přístupem 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}.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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. |
Tělo požadavku (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
dryRun | any | ano | |
items | any | ano |
Odpovědi
- 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ávnění: modul contacts, úroveň read; klíč s přístupem read nebo full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | 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 | ano | Id of the order (string of digits). |
Odpovědi
- 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émata
CouponCounts
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
total | number | ano | |
free | number | ano | |
assigned | number | ano | |
used | number | ano |
CouponImportResult
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
counts | object | ano | |
stack | CouponStack | ano |
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 | ano | |
name | string | ano | |
shopId | string | ano | |
mergeKey | string | ano | |
tag | string | ano | |
note | string | ano | |
counts | CouponCounts | ano | |
createdAt | string | ano | |
updatedAt | string | ano |
CouponStackInput
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | ano | |
shopId | string | ano | |
mergeKey | string | ano | |
note | string | ne |
CouponStatus
one of: free, assigned, used
CouponUsedResult
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
marked | number | ano | |
already | number | ano | |
unknown | number | ano | |
stack | CouponStack | ano |
Currency
one of: CZK, EUR
Error
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
error | object | ano |
{
"error": {
"code": "validation",
"message": "email"
}
}Feed
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | ano | |
name | string | ano | |
shopId | string | ano | |
kind | FeedKind | ano | |
format | FeedFormat | ano | |
currency | Currency | ano | The shop's currency, read only. |
url | string | ano | |
autoRefresh | boolean | ano | |
pairing | array of FeedPairing | ano | |
itemCount | number | ano | |
version | number | ano | |
importedAt | string or null | ano | |
refreshedAt | string or null | ano | Last scheduled download (auto refresh) and its failure ('' = imported). |
refreshError | string | ano | |
refreshReason | string | ano | 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 | ano | |
maxBytes | number | ano | Largest document the feed accepts (20 MB products, 100 MB customers, 200 MB orders). |
historyAt | string or null | ano | 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 | ano | Counts of the last import ({} before the first one). |
createdAt | string | ano | |
updatedAt | string | ano |
FeedArticle
An article of an article feed (GET /feed-articles, Články FEED of the Magic editor).
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | ano | |
feedId | string | ano | |
shopId | string | ano | |
itemId | string | ano | guid / id of the article, else its link: what the editor stores to refresh it. |
title | string | ano | |
url | string | ano | |
perex | string | ano | Plain text, at most 500 characters. |
imageUrl | string | ano | |
publishedAt | string or null | ano | |
inFeed | boolean | ano |
FeedArticleList
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
items | array of FeedArticle | ano | |
total | number | ano | |
feeds | array of FeedProductFeed | ano |
FeedFormat
one of: google, heureka, zbozi
FeedFormatter
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
type | FeedFormatterType | ano | |
text | string | ne | append, prepend |
separator | string | ne | split_join: split by separator, the parts from offset (negative from the end) to offset + length (0 = all) |
offset | number | ne | |
length | number | ne | |
format | string | ne | date: PHP-style format (d j m n Y y H G i s D N w) |
decimals | number | ne | number (0 to 6) |
decimalSeparator | string | ne | |
thousandsSeparator | string | ne | |
currency | one of: CZK, EUR, feed, USD | ne | currency: 'feed' = the feed's shop currency |
search | string | ne | replace |
replace | string | ne |
FeedFormatterType
one of: number, currency, date, append, prepend, strip_tags, split_join, replace, lower, upper
FeedImportResult
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
counts | object | ano | |
feed | Feed | ano |
FeedInput
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | ano | |
shopId | string | ano | |
kind | one of: google_products, shop_customers, shop_orders, articles | ne | |
format | one of: google, heureka, zbozi | ne | Only with kind google_products; fixed once the feed exists. |
url | string | ne | |
autoRefresh | boolean | ne | |
pairing | array of FeedPairing | ne |
FeedItem
An item of a product or article feed (GET .../feeds/{id}/items, Položky feedu).
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | ano | |
itemId | string | ano | |
code | string | ano | |
data | map of FeedValue | ano | |
values | map of string | ano | Paired parameters after their formatters (product feeds). |
updatedAt | string | ano |
FeedKind
one of: google_products, shop_customers, shop_orders, articles
FeedList
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
items | array of Feed | ano | |
defaultPairing | array of FeedPairing | ano |
FeedPairing
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | ano | Own parameter name (se-id, se-product ...); se-id pairs order items by product code. |
field | string | ano | Field of the feed item (g:id, title ...). |
format | array of FeedFormatter | ne | 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 | ano | |
total | number | ano | |
item | object or null | ano | |
values | map of string | ano | Paired values of the item by parameter name. |
fields | array of string | ano |
FeedProduct
A product of a shop's product feed for the editor's product picker (GET .../feed-products).
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | ano | |
feedId | string | ano | |
shopId | string | ano | |
itemId | string | ano | g:id: the id the editor stores to refresh the product later (Párovat feed). |
code | string | ano | |
name | string | ano | |
url | string | ano | |
imageUrl | string | ano | |
price | number or null | ano | With VAT, in the shop's currency (never converted); sale price when the feed has one. |
regularPrice | number or null | ano | The price before the sale; null without a sale. |
currency | Currency | ano | |
priceText | string | ano | |
priceCurrencyMismatch | boolean | ne | |
availability | one of: `, in_stock, out_of_stock, preorder, backorder` | ano | |
brand | string | ano | |
shortDescription | string | ne | The feed description as a short plain text (about 160 characters) for the product's text in an e-mail. |
values | map of string | ne | 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 | ano | |
updatedAt | string | ano |
FeedProductFeed
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | ano | |
name | string | ano | |
shopId | string | ano | |
currency | Currency | ano | |
itemCount | number | ano | |
refreshedAt | string or null | ano | |
importedAt | string or null | ano | |
refreshError | string | ano |
FeedProductList
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
items | array of FeedProduct | ano | |
total | number | ano | |
feeds | array of FeedProductFeed | ano |
FeedRefreshResult
POST .../feeds/{id}/refresh: a download queued now, or one already running.
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
state | one of: queued, running | ano | |
feed | Feed | ano |
FeedValue
string or array of FeedValue or map of FeedValue
Order
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | ano | |
externalId | string | ano | |
eshopCode | string | ano | |
eshopName | string | ano | |
shopId | string | ano | |
createdAt | string | ano | |
paidAt | string or null | ano | |
email | string or null | ano | |
contactId | string or null | ano | |
state | one of: cancelled, unpaid, new, other, paid, processing, shipped, pickup, delivered, returned | ano | |
status | OrderStatus | ano | |
sourceStatus | string | ano | |
orderUrl | string | ano | |
currency | Currency | ano | |
totalWithVat | string or null | ano | |
totalWithoutVat | string or null | ano | |
itemCount | number | ano | |
items | array of OrderItem | ano | The list has the first three items, the detail all of them. |
conversion | OrderConversion or null | ano |
OrderConversion
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
kind | one of: direct, assisted | ano | |
campaignId | string or null | ano | |
automationId | string or null | ano | |
clickedAt | string | ano |
OrderItem
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | ano | |
productCode | string | ano | |
name | string | ano | |
description | string | ano | |
price | OrderItemPrice | ano | |
quantity | number | ano | |
unit | string | ano | |
url | string | ano | |
imageUrl | string | ano | |
attributes | map of boolean or string or number or null | ano | ItemType, Brand, Category, g:condition, g:availability, g:brand of the paired feed product under the item's own. |
paired | boolean | ano | True when the item met a product of the shop's feeds by its code. |
OrderItemPrice
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
withVat | string or null | ano | Unit prices as decimal strings in the order currency. |
withoutVat | string or null | ano | |
currency | Currency | ano |
OrderStateRule
orders.check_state_map: one rule of the state map
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
sourceStatus | string | ano | State name of the e-shop, at most 80 characters. |
match | one of: exact, prefix | ne | default exact |
state | one of: new, unpaid, paid, processing, shipped, pickup, delivered, cancelled, returned, other | ano |
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 | ano | |
code | string | ano | |
status | CouponStatus | ano | |
assignedAt | string or null | ano | |
usedAt | string or null | ano | |
contact | object or null | ano | null after the contact was erased. |
email | object or null | ano | The e-mail the code went out with; null = handed out by hand, or before every e-mail took its own code. |