Preskočiť na obsah
API dokumentácia

Objednávky, feedy a kupóny

Referencia API pre objednávky e-shopov a ich stavy (spúšťajú nákupné automatizácie), produktové a zákaznícke feedy a zásobníky kupónov.

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ódaCestaPopis
GET/api/v1/tenants/{tenant}/coupon-stacksList coupon stacks
POST/api/v1/tenants/{tenant}/coupon-stacksCreate 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}/assignGive a coupon of a stack to a contact
POST/api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/codesAdd coupon codes to a stack
GET/api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/couponsList coupons of a stack
POST/api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/usedMark coupons as used
GET/api/v1/tenants/{tenant}/feed-articlesSearch articles of the article feeds
GET/api/v1/tenants/{tenant}/feed-productsSearch products of the product feeds
GET/api/v1/tenants/{tenant}/feedsList feeds
POST/api/v1/tenants/{tenant}/feedsCreate 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}/importImport a feed file by upload
GET/api/v1/tenants/{tenant}/feeds/{feed_id}/itemsList items of a feed
GET/api/v1/tenants/{tenant}/feeds/{feed_id}/previewPreview a feed (first items, detected fields)
POST/api/v1/tenants/{tenant}/feeds/{feed_id}/refreshDownload and process a feed now
GET/api/v1/tenants/{tenant}/order-statesGet the order state mapping
PUT/api/v1/tenants/{tenant}/order-statesReplace the order state mapping
GET/api/v1/tenants/{tenant}/ordersList orders
POST/api/v1/tenants/{tenant}/ordersCreate or update an order
POST/api/v1/tenants/{tenant}/orders/paid-atMaintenance: 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: oblasť coupons, ú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ázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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/json object

Chyby

StavKódHodnoty message
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Create a coupon stack

POST /api/v1/tenants/{tenant}/coupon-stacks

Oprávnenie: oblasť coupons, úroveň full; kľúč s prístupom full

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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)

PoleTypPovinnéPopis
namestringáno
shopIdstringáno
mergeKeystringáno
notestringnie

Odpovede

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Get a coupon stack

GET /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}

Oprávnenie: oblasť coupons, úroveň read; kľúč s prístupom read alebo full

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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_idpathstringánoId of the stack (string of digits).

Odpovede

  • 200 OK: application/json object

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Delete a coupon stack

DELETE /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}

Oprávnenie: oblasť coupons, úroveň full; kľúč s prístupom full

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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_idpathstringánoId of the stack (string of digits).

Odpovede

  • 204 No content

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Give a coupon of a stack to a contact

POST /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/assign

Oprávnenie: oblasť 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ázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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_idpathstringánoId of the stack (string of digits).

Telo požiadavky (application/json)

PoleTypPovinnéPopis
contactIdanyáno

Odpovede

  • 200 OK: it already existed or nothing changed: application/json object
  • 201 Created (200 when it already existed or nothing changed): application/json object

Chyby

StavKódHodnoty message
400validationcontactId
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
409conflictempty
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Add coupon codes to a stack

POST /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/codes

Oprávnenie: oblasť coupons, úroveň full; kľúč s prístupom full

Adds codes ({codes: [...]} or {text: "..."}) to the stack: {counts, stack}.

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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_idpathstringánoId of the stack (string of digits).

Telo požiadavky (application/json)

PoleTypPovinnéPopis
textstringáno

Odpovede

Chyby

StavKódHodnoty message
400validationcodes
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

List coupons of a stack

GET /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/coupons

Oprávnenie: oblasť contacts, úroveň read; kľúč s prístupom read alebo full

Codes of the stack handed out in a period, newest first: ?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ázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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_idpathstringánoId of the stack (string of digits).
fromquerystringnieStart of the period (YYYY-MM-DD local day, or ISO time where noted).
pagequeryintegerniePage number, from 1. default 1, min 1
pageSizequeryintegernieItems per page, 1 to 100. default 25, min 1, max 100
qquerystringnieSearch text (case and diacritics insensitive). max 200 chars
statusquerystringnieStatus filter.
toquerystringnieEnd of the period (YYYY-MM-DD local day, or ISO time where noted).

Odpovede

  • 200 OK: application/json object

Chyby

StavKódHodnoty message
400validationq, status, to
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Mark coupons as used

POST /api/v1/tenants/{tenant}/coupon-stacks/{stack_id}/used

Oprávnenie: oblasť coupons, úroveň full; kľúč s prístupom full

Marks codes the shop reports used: {marked, already, unknown, stack}.

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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_idpathstringánoId of the stack (string of digits).

Telo požiadavky (application/json)

PoleTypPovinnéPopis
textstringáno

Odpovede

Chyby

StavKódHodnoty message
400validationcodes
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

GET /api/v1/tenants/{tenant}/feed-articles

Oprávnenie: oblasť 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ázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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.
feedIdquerystringnie
idsquerystringnie
limitquerystringnie
offsetquerystringnie
qquerystringnieSearch text (case and diacritics insensitive). max 200 chars
shopIdquerystringnie

Odpovede

Chyby

StavKódHodnoty message
400validationfeedId, ids, q
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

GET /api/v1/tenants/{tenant}/feed-products

Oprávnenie: oblasť 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ázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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.
idsquerystringnie
limitquerystringnie
offsetquerystringnie
qquerystringnieSearch text (case and diacritics insensitive). max 200 chars
shopIdquerystringnie

Odpovede

Chyby

StavKódHodnoty message
400validationids, q
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

List feeds

GET /api/v1/tenants/{tenant}/feeds

Oprávnenie: oblasť feeds, úroveň read; kľúč s prístupom read alebo full

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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

Chyby

StavKódHodnoty message
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Create a feed

POST /api/v1/tenants/{tenant}/feeds

Oprávnenie: oblasť feeds, úroveň full; kľúč s prístupom full

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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)

PoleTypPovinnéPopis
namestringáno
shopIdstringáno
kindone of: google_products, shop_customers, shop_orders, articles, genericnie
formatone of: heureka, zbozi, google, samba, xml, json, rss, atom, facebooknieOnly with kind google_products (google, heureka, zbozi) or generic (xml, json); fixed once the feed exists.
urlstringnie
autoRefreshbooleannie
pairingarray of FeedPairingnie
genericGenericFeedConfignieOnly with kind generic.
facebookFacebookFeedInputnieOnly with kind articles and format facebook.

Odpovede

  • 201 Created: application/json Feed

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Get a feed

GET /api/v1/tenants/{tenant}/feeds/{feed_id}

Oprávnenie: oblasť feeds, úroveň read; kľúč s prístupom read alebo full

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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_idpathstringánoId of the feed (string of digits).

Odpovede

  • 200 OK: application/json Feed

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Update a feed

PATCH /api/v1/tenants/{tenant}/feeds/{feed_id}

Oprávnenie: oblasť feeds, úroveň full; kľúč s prístupom full

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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_idpathstringánoId of the feed (string of digits).

Telo požiadavky (application/json)

PoleTypPovinnéPopis
namestringnie
kindone of: google_products, shop_customers, shop_orders, articles, genericnie
urlstringnie
genericGenericFeedConfignieOnly with kind generic.
facebookFacebookFeedInputnieOnly with kind articles and format facebook.
formatone of: heureka, zbozi, google, samba, xml, json, rss, atom, facebooknieOnly with kind google_products (google, heureka, zbozi) or generic (xml, json); fixed once the feed exists.
autoRefreshbooleannie
pairingarray of FeedPairingnie

Odpovede

  • 200 OK: application/json Feed

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Delete a feed

DELETE /api/v1/tenants/{tenant}/feeds/{feed_id}

Oprávnenie: oblasť feeds, úroveň full; kľúč s prístupom full

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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_idpathstringánoId of the feed (string of digits).

Odpovede

  • 204 No content

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Import a feed file by upload

POST /api/v1/tenants/{tenant}/feeds/{feed_id}/import

Oprávnenie: oblasť feeds, ú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ázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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_idpathstringánoId of the feed (string of digits).

Telo požiadavky (application/json)

PoleTypPovinnéPopis
xmlstringáno

Odpovede

Chyby

StavKódHodnoty message
400validationcontent, contentBase64
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

List items of a feed

GET /api/v1/tenants/{tenant}/feeds/{feed_id}/items

Oprávnenie: oblasť feeds, úroveň read; kľúč s prístupom read alebo full

Položky feedu: the items of a product, article or generic 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, createdAt, updatedAt}], total, page, pageSize}; values are the paired parameters after their formatters (product feeds).

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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_idpathstringánoId of the feed (string of digits).
pagequeryintegerniePage number, from 1. default 1, min 1
pageSizequeryintegernieItems per page, 1 to 100. default 25, min 1, max 100
qquerystringnieSearch text (case and diacritics insensitive). max 200 chars

Odpovede

  • 200 OK: application/json object

Chyby

StavKódHodnoty message
400validationkind, q
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Preview a feed (first items, detected fields)

GET /api/v1/tenants/{tenant}/feeds/{feed_id}/preview

Oprávnenie: oblasť feeds, ú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ázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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_idpathstringánoId of the feed (string of digits).
indexquerystringnie

Odpovede

Chyby

StavKódHodnoty message
400validationkind
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Download and process a feed now

POST /api/v1/tenants/{tenant}/feeds/{feed_id}/refresh

Oprávnenie: oblasť feeds, ú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ázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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_idpathstringánoId of the feed (string of digits).

Telo požiadavky (application/json)

object

Odpovede

Chyby

StavKódHodnoty message
400validationurl
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Get the order state mapping

GET /api/v1/tenants/{tenant}/order-states

Oprávnenie: oblasť settings, úroveň read; kľúč s prístupom read alebo full

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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/json object

Chyby

StavKódHodnoty message
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Replace the order state mapping

PUT /api/v1/tenants/{tenant}/order-states

Oprávnenie: oblasť settings, úroveň full; kľúč s prístupom full

Replaces the rules and re-maps the stored orders (no order events). A rule with shopId is for that shop only.

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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.

PoleTypPovinnéPopis
itemsarray of OrderStateRuleánoThe new rules (replace all). max 500 items

Odpovede

  • 200 OK: application/json object

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

List orders

GET /api/v1/tenants/{tenant}/orders

Oprávnenie: oblasť 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ázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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.
contactIdquerystringnieContact id.
pagequeryintegerniePage number, from 1. default 1, min 1
pageSizequeryintegernieItems per page, 1 to 100. default 25, min 1, max 100
qquerystringnieSearch text. max 200 chars
shopquerystringnieShop id filter.
statequerystringnieOrder state.

Odpovede

  • 200 OK: application/json object

Chyby

StavKódHodnoty message
400validationcontactId, q, state
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Create or update an order

POST /api/v1/tenants/{tenant}/orders

Oprávnenie: oblasť contacts, úroveň full; kľúč s prístupom full

Creates or updates one order by (shop, id): 201 created, 200 updated or unchanged.

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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)

PoleTypPovinnéPopis
idstring or integeránoOrder id in the e-shop (1 to 100 characters). The order is created or updated by (shopId, id).
shopIdstringánoShop of the order.
createdAtstringánoISO 8601 with a time zone, e.g. 2026-10-12T09:30:00+02:00.
paidAtstring or nullnie
emailstringnieBuyer e-mail (or contactId). A buyer without a contact gets one without marketing consent (status customer, never e-mailed).
contactIdstringnieExisting contact (its e-mail must match email when both).
statusstringánoState 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).
eshopCodestringnie
orderUrlstringnie
companyIdstringnie
currencystringnieDefault and only allowed value: the shop currency.
totalWithVatstring or numbernie
totalWithoutVatstring or numbernie
sellerobjectnie
orderDeliveryobjectnie
itemsarray of objectniemax 1000 items
deletedbooleannietrue = the order is deleted (ends post-purchase runs).

Odpovede

  • 200 OK: it already existed or nothing changed: application/json object
  • 201 Created (200 when it already existed or nothing changed): application/json object

Chyby

StavKódHodnoty message
400validationcontactId, items, order
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Maintenance: fill empty dates of payment of orders (SmartEmailing data)

POST /api/v1/tenants/{tenant}/orders/paid-at

Oprávnenie: oblasť 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ázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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)

PoleTypPovinnéPopis
dryRunanyáno
itemsanyáno

Odpovede

  • 200 OK: application/json object

Chyby

StavKódHodnoty message
400validationdryRun, items
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Get an order

GET /api/v1/tenants/{tenant}/orders/{order_id}

Oprávnenie: oblasť contacts, úroveň read; kľúč s prístupom read alebo full

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic 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_idpathstringánoId of the order (string of digits).

Odpovede

  • 200 OK: application/json Order

Chyby

StavKódHodnoty message
400validation
401401 unauthorized: missing, unknown, revoked, expired or idle API key.
403403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack.
404not_found
429429 rate_limited: wait Retry-After seconds.
503unavailablebusy

Schémy

CouponCounts

PoleTypPovinnéPopis
totalnumberáno
freenumberáno
assignednumberáno
usednumberáno
assignedLastMonthnumbernieCodes handed out in the last month.

CouponImportResult

PoleTypPovinnéPopis
countsobjectáno
stackCouponStackáno

CouponStack

A stack of discount codes of one e-shop (se-spec 06 §4.6); tag is the e-mail variable {{coupon_<mergeKey>}}.

PoleTypPovinnéPopis
idstringáno
namestringáno
shopIdstringáno
mergeKeystringáno
tagstringáno
notestringáno
countsCouponCountsáno
createdAtstringáno
updatedAtstringáno

CouponStackInput

PoleTypPovinnéPopis
namestringáno
shopIdstringáno
mergeKeystringáno
notestringnie

CouponStatus

one of: free, assigned, used

CouponUsedResult

PoleTypPovinnéPopis
markednumberáno
alreadynumberáno
unknownnumberáno
stackCouponStackáno

Currency

one of: CZK, EUR

Error

PoleTypPovinnéPopis
errorobjectáno
json
{
  "error": {
    "code": "validation",
    "message": "email"
  }
}

FacebookFeedInput

PoleTypPovinnéPopis
appSecretstringnieBoth or neither on a change (neither = the stored ones stay).
accessTokenstringnie
appIdstringáno
pageIdstringáno
graphVersionstringáno

Feed

PoleTypPovinnéPopis
idstringáno
namestringáno
shopIdstringáno
kindFeedKindáno
formatFeedFormatáno
currencyCurrencyánoThe shop's currency, read only.
urlstringáno
autoRefreshbooleanáno
pairingarray of FeedPairingáno
itemCountnumberáno
versionnumberáno
importedAtstring or nulláno
refreshedAtstring or nullánoLast scheduled download (auto refresh) and its failure ('' = imported).
refreshErrorstringáno
refreshReasonstringánorefreshError 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.
refreshDetectedstringáno
maxBytesnumberánoLargest document the feed accepts (20 MB products, 100 MB customers, 200 MB orders).
historyAtstring or nullánoOrder 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.
lastCountsobjectánoCounts of the last import ({} before the first one).
genericobjectnieGeneric feeds: how the document is read ({} for the other kinds).
facebookobjectnieFacebook feeds: the page ({} for the others).
createdAtstringáno
updatedAtstringáno

FeedArticle

An article of an article feed (GET /feed-articles, Články FEED of the visual editor).

PoleTypPovinnéPopis
idstringáno
feedIdstringáno
shopIdstringáno
itemIdstringánoguid / id of the article, else its link: what the editor stores to refresh it.
titlestringáno
urlstringáno
perexstringánoPlain text, at most 500 characters.
imageUrlstringáno
publishedAtstring or nulláno
inFeedbooleanáno

FeedArticleList

PoleTypPovinnéPopis
itemsarray of FeedArticleáno
totalnumberáno
feedsarray of FeedProductFeedáno

FeedFormat

one of: heureka, zbozi, google, samba, xml, json, rss, atom, facebook

FeedFormatter

PoleTypPovinnéPopis
typeFeedFormatterTypeáno
textstringnieappend, prepend
separatorstringniesplit_join: split by separator, the parts from offset (negative from the end) to offset + length (0 = all)
offsetnumbernie
lengthnumbernie
formatstringniedate: PHP-style format (d j m n Y y H G i s D N w)
decimalsnumbernienumber (0 to 6)
decimalSeparatorstringnie
thousandsSeparatorstringnie
currencyone of: CZK, EUR, feed, USDniecurrency: 'feed' = the feed's shop currency
searchstringniereplace
replacestringnie

FeedFormatterType

one of: number, currency, date, append, prepend, strip_tags, split_join, replace, lower, upper

FeedImportResult

PoleTypPovinnéPopis
countsobjectáno
feedFeedáno

FeedInput

PoleTypPovinnéPopis
namestringáno
shopIdstringáno
kindone of: google_products, shop_customers, shop_orders, articles, genericnie
formatone of: heureka, zbozi, google, samba, xml, json, rss, atom, facebooknieOnly with kind google_products (google, heureka, zbozi) or generic (xml, json); fixed once the feed exists.
urlstringnie
autoRefreshbooleannie
pairingarray of FeedPairingnie
genericGenericFeedConfignieOnly with kind generic.
facebookFacebookFeedInputnieOnly with kind articles and format facebook.

FeedItem

An item of a product or article feed (GET .../feeds/{id}/items, Položky feedu).

PoleTypPovinnéPopis
idstringáno
itemIdstringáno
codestringáno
datamap of FeedValueáno
valuesmap of stringánoPaired parameters after their formatters (product feeds).
createdAtstringánoWhen the item first came into the feed.
updatedAtstringáno

FeedKind

one of: google_products, shop_customers, shop_orders, articles, generic

FeedList

PoleTypPovinnéPopis
itemsarray of Feedáno
defaultPairingarray of FeedPairingáno

FeedPairing

PoleTypPovinnéPopis
namestringánoOwn parameter name (se-id, se-product ...); se-id pairs order items by product code.
fieldstringánoField of the feed item (g:id, title ...).
formatarray of FeedFormatternieFormatters applied in order to the value (core/feed_format.py); absent = none. Never change the product code.
searchablebooleannieThe product picker searches this field too (at most 5 rows).

FeedPreview

PoleTypPovinnéPopis
indexnumberáno
totalnumberáno
itemobject or nulláno
valuesmap of stringánoPaired values of the item by parameter name.
fieldsarray of stringáno

FeedProduct

A product of a shop's product feed for the editor's product picker (GET .../feed-products).

PoleTypPovinnéPopis
idstringáno
feedIdstringáno
shopIdstringáno
itemIdstringánog:id: the id the editor stores to refresh the product later (Párovat feed).
codestringáno
namestringáno
urlstringáno
imageUrlstringáno
pricenumber or nullánoWith VAT, in the shop's currency (never converted); sale price when the feed has one.
regularPricenumber or nullánoThe price before the sale; null without a sale.
currencyCurrencyáno
priceTextstringáno
priceCurrencyMismatchbooleannie
availabilityone of: `, in_stock, out_of_stock, preorder, backorder`áno
brandstringáno
shortDescriptionstringnieThe feed description as a short plain text (about 160 characters) for the product's text in an e-mail.
valuesmap of stringnieThe 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).
inFeedbooleanáno
updatedAtstringáno

FeedProductFeed

PoleTypPovinnéPopis
idstringáno
namestringáno
shopIdstringáno
currencyCurrencyáno
itemCountnumberáno
refreshedAtstring or nulláno
importedAtstring or nulláno
refreshErrorstringáno

FeedProductList

PoleTypPovinnéPopis
itemsarray of FeedProductáno
totalnumberáno
feedsarray of FeedProductFeedáno

FeedRefreshResult

POST .../feeds/{id}/refresh: a download queued now, or one already running.

PoleTypPovinnéPopis
stateone of: queued, runningáno
feedFeedáno

FeedValue

string or array of FeedValue or map of FeedValue

GenericFeedConfig

How a generic feed is read: the element of one item (XML) or the dot path to the list of items (JSON, '' = the document), the unique key of an item ('' = the position), the fields kept under their own names (none = the whole item) and how often the URL is downloaded.

PoleTypPovinnéPopis
itemPathstringáno
idFieldstringáno
fieldsarray of objectáno
refreshHoursnumberáno1 to 168.

Order

PoleTypPovinnéPopis
idstringáno
externalIdstringáno
eshopCodestringáno
eshopNamestringáno
shopIdstringáno
createdAtstringáno
paidAtstring or nulláno
emailstring or nulláno
contactIdstring or nulláno
stateone of: other, cancelled, unpaid, new, paid, processing, shipped, pickup, delivered, complaint, returnedáno
statusOrderStatusáno
sourceStatusstringáno
shippingMethodstringnieThe order's shipping method as the e-shop names it ('' = none) and its mapped type ('' = not mapped).
shippingTypeone of: `, other, pickup_point, courier, personal_pickup, digital`nie
fromTrackerbooleannieReported only by the shop's web (postarna.js tracker): counts in revenue, starts no automation.
attributesmap of stringnieThe order's own attributes as the e-shop names them (ES-02).
promoCodesUsedarray of stringnieDiscount codes the buyer used.
orderUrlstringáno
currencyCurrencyáno
totalWithVatstring or nulláno
totalWithoutVatstring or nulláno
itemCountnumberáno
itemsarray of OrderItemánoThe list has the first three items, the detail all of them.
conversionOrderConversion or nulláno

OrderConversion

PoleTypPovinnéPopis
kindone of: direct, assistedáno
campaignIdstring or nulláno
automationIdstring or nulláno
clickedAtstringáno

OrderItem

PoleTypPovinnéPopis
idstringáno
productCodestringáno
namestringáno
descriptionstringáno
priceOrderItemPriceáno
quantitynumberáno
unitstringáno
urlstringáno
imageUrlstringáno
attributesmap of boolean or string or number or nullánoItemType, Brand, Category, g:condition, g:availability, g:brand of the paired feed product under the item's own.
pairedbooleanánoTrue when the item met a product of the shop's feeds by its code.

OrderItemPrice

PoleTypPovinnéPopis
withVatstring or nullánoUnit prices as decimal strings in the order currency.
withoutVatstring or nulláno
currencyCurrencyáno

OrderStateRule

orders.check_state_map: one rule of the state map

PoleTypPovinnéPopis
sourceStatusstringánoState name of the e-shop, at most 80 characters.
matchone of: exact, prefixniedefault exact
stateone of: new, unpaid, paid, processing, shipped, pickup, delivered, complaint, cancelled, returned, otheráno
shopIdstring or nullnieThe one shop the rule is for; absent or null = every shop. A rule of the shop wins.

OrderStatus

one of: other, cancelled, pending, completed

StackCoupon

A code of a stack handed out (PZ-05, GET /coupon-stacks/{id}/coupons): to whom and with which e-mail.

PoleTypPovinnéPopis
idstringáno
codestringáno
statusCouponStatusáno
assignedAtstring or nulláno
usedAtstring or nulláno
contactobject or nullánonull after the contact was erased.
emailobject or nullánoThe e-mail the code went out with; null = handed out by hand, or before every e-mail took its own code.