Přeskočit na obsah
API dokumentace

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

MetodaCestaPopis
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á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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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/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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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)

PoleTypPovinnéPopis
namestringano
shopIdstringano
mergeKeystringano
notestringne

Odpovědi

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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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_idpathstringanoId of the stack (string of digits).

Odpovědi

  • 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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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_idpathstringanoId of the stack (string of digits).

Odpovědi

  • 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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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_idpathstringanoId of the stack (string of digits).

Tělo požadavku (application/json)

PoleTypPovinnéPopis
contactIdanyano

Odpovědi

  • 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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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_idpathstringanoId of the stack (string of digits).

Tělo požadavku (application/json)

PoleTypPovinnéPopis
textstringano

Odpovědi

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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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_idpathstringanoId of the stack (string of digits).
fromquerystringneStart of the period (YYYY-MM-DD local day, or ISO time where noted).
pagequeryintegernePage number, from 1. default 1, min 1
pageSizequeryintegerneItems per page, 1 to 100. default 25, min 1, max 100
qquerystringneSearch text (case and diacritics insensitive). max 200 chars
statusquerystringneStatus filter.
toquerystringneEnd of the period (YYYY-MM-DD local day, or ISO time where noted).

Odpovědi

  • 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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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_idpathstringanoId of the stack (string of digits).

Tělo požadavku (application/json)

PoleTypPovinnéPopis
textstringano

Odpovědi

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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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.
feedIdquerystringne
idsquerystringne
limitquerystringne
offsetquerystringne
qquerystringneSearch text (case and diacritics insensitive). max 200 chars
shopIdquerystringne

Odpovědi

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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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.
idsquerystringne
limitquerystringne
offsetquerystringne
qquerystringneSearch text (case and diacritics insensitive). max 200 chars
shopIdquerystringne

Odpovědi

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.

List feeds

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

Oprávnění: modul settings, úroveň read; klíč s přístupem read nebo full

Parametry

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

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.

Create a feed

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

Oprávnění: modul settings, úroveň full; klíč s přístupem full

Parametry

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

PoleTypPovinnéPopis
namestringano
shopIdstringano
kindone of: google_products, shop_customers, shop_orders, articlesne
formatone of: google, heureka, zbozineOnly with kind google_products; fixed once the feed exists.
urlstringne
autoRefreshbooleanne
pairingarray of FeedPairingne

Odpovědi

  • 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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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_idpathstringanoId of the feed (string of digits).

Odpovědi

  • 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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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_idpathstringanoId of the feed (string of digits).

Tělo požadavku (application/json)

PoleTypPovinnéPopis
namestringne
kindone of: google_products, shop_customers, shop_orders, articlesne
formatone of: google, heureka, zbozineOnly with kind google_products; fixed once the feed exists.
urlstringne
autoRefreshbooleanne
pairingarray of FeedPairingne

Odpovědi

  • 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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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_idpathstringanoId of the feed (string of digits).

Odpovědi

  • 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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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_idpathstringanoId of the feed (string of digits).

Tělo požadavku (application/json)

PoleTypPovinnéPopis
xmlstringano

Odpovědi

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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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_idpathstringanoId of the feed (string of digits).
pagequeryintegernePage number, from 1. default 1, min 1
pageSizequeryintegerneItems per page, 1 to 100. default 25, min 1, max 100
qquerystringneSearch text (case and diacritics insensitive). max 200 chars

Odpovědi

  • 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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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_idpathstringanoId of the feed (string of digits).
indexquerystringne

Odpovědi

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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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_idpathstringanoId of the feed (string of digits).

Tělo požadavku (application/json)

object

Odpovědi

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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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/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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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.

PoleTypPovinnéPopis
itemsarray of OrderStateRuleanoThe new rules (replace all). max 500 items

Odpovědi

  • 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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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.
contactIdquerystringneContact id.
pagequeryintegernePage number, from 1. default 1, min 1
pageSizequeryintegerneItems per page, 1 to 100. default 25, min 1, max 100
qquerystringneSearch text. max 200 chars
shopquerystringneShop id filter.
statequerystringneOrder state.

Odpovědi

  • 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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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)

PoleTypPovinnéPopis
idstring or integeranoOrder id in the e-shop (1 to 100 characters). The order is created or updated by (shopId, id).
shopIdstringanoShop of the order.
createdAtstringanoISO 8601 with a time zone, e.g. 2026-10-12T09:30:00+02:00.
paidAtstring or nullne
emailstringneBuyer e-mail (or contactId). A buyer without a contact gets one without marketing consent (status customer, never e-mailed).
contactIdstringneExisting contact (its e-mail must match email when both).
statusstringanoState 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).
eshopCodestringne
orderUrlstringne
companyIdstringne
currencystringneDefault and only allowed value: the shop currency.
totalWithVatstring or numberne
totalWithoutVatstring or numberne
sellerobjectne
orderDeliveryobjectne
itemsarray of objectnemax 1000 items
deletedbooleannetrue = the order is deleted (ends post-purchase runs).

Odpovědi

  • 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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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)

PoleTypPovinnéPopis
dryRunanyano
itemsanyano

Odpovědi

  • 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.

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ázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic 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_idpathstringanoId of the order (string of digits).

Odpovědi

  • 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.

Schémata

CouponCounts

PoleTypPovinnéPopis
totalnumberano
freenumberano
assignednumberano
usednumberano

CouponImportResult

PoleTypPovinnéPopis
countsobjectano
stackCouponStackano

CouponStack

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

PoleTypPovinnéPopis
idstringano
namestringano
shopIdstringano
mergeKeystringano
tagstringano
notestringano
countsCouponCountsano
createdAtstringano
updatedAtstringano

CouponStackInput

PoleTypPovinnéPopis
namestringano
shopIdstringano
mergeKeystringano
notestringne

CouponStatus

one of: free, assigned, used

CouponUsedResult

PoleTypPovinnéPopis
markednumberano
alreadynumberano
unknownnumberano
stackCouponStackano

Currency

one of: CZK, EUR

Error

PoleTypPovinnéPopis
errorobjectano
json
{
  "error": {
    "code": "validation",
    "message": "email"
  }
}

Feed

PoleTypPovinnéPopis
idstringano
namestringano
shopIdstringano
kindFeedKindano
formatFeedFormatano
currencyCurrencyanoThe shop's currency, read only.
urlstringano
autoRefreshbooleanano
pairingarray of FeedPairingano
itemCountnumberano
versionnumberano
importedAtstring or nullano
refreshedAtstring or nullanoLast scheduled download (auto refresh) and its failure ('' = imported).
refreshErrorstringano
refreshReasonstringanorefreshError 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.
refreshDetectedstringano
maxBytesnumberanoLargest document the feed accepts (20 MB products, 100 MB customers, 200 MB orders).
historyAtstring or nullanoOrder 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.
lastCountsobjectanoCounts of the last import ({} before the first one).
createdAtstringano
updatedAtstringano

FeedArticle

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

PoleTypPovinnéPopis
idstringano
feedIdstringano
shopIdstringano
itemIdstringanoguid / id of the article, else its link: what the editor stores to refresh it.
titlestringano
urlstringano
perexstringanoPlain text, at most 500 characters.
imageUrlstringano
publishedAtstring or nullano
inFeedbooleanano

FeedArticleList

PoleTypPovinnéPopis
itemsarray of FeedArticleano
totalnumberano
feedsarray of FeedProductFeedano

FeedFormat

one of: google, heureka, zbozi

FeedFormatter

PoleTypPovinnéPopis
typeFeedFormatterTypeano
textstringneappend, prepend
separatorstringnesplit_join: split by separator, the parts from offset (negative from the end) to offset + length (0 = all)
offsetnumberne
lengthnumberne
formatstringnedate: PHP-style format (d j m n Y y H G i s D N w)
decimalsnumbernenumber (0 to 6)
decimalSeparatorstringne
thousandsSeparatorstringne
currencyone of: CZK, EUR, feed, USDnecurrency: 'feed' = the feed's shop currency
searchstringnereplace
replacestringne

FeedFormatterType

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

FeedImportResult

PoleTypPovinnéPopis
countsobjectano
feedFeedano

FeedInput

PoleTypPovinnéPopis
namestringano
shopIdstringano
kindone of: google_products, shop_customers, shop_orders, articlesne
formatone of: google, heureka, zbozineOnly with kind google_products; fixed once the feed exists.
urlstringne
autoRefreshbooleanne
pairingarray of FeedPairingne

FeedItem

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

PoleTypPovinnéPopis
idstringano
itemIdstringano
codestringano
datamap of FeedValueano
valuesmap of stringanoPaired parameters after their formatters (product feeds).
updatedAtstringano

FeedKind

one of: google_products, shop_customers, shop_orders, articles

FeedList

PoleTypPovinnéPopis
itemsarray of Feedano
defaultPairingarray of FeedPairingano

FeedPairing

PoleTypPovinnéPopis
namestringanoOwn parameter name (se-id, se-product ...); se-id pairs order items by product code.
fieldstringanoField of the feed item (g:id, title ...).
formatarray of FeedFormatterneFormatters applied in order to the value (core/feed_format.py); absent = none. Never change the product code.

FeedPreview

PoleTypPovinnéPopis
indexnumberano
totalnumberano
itemobject or nullano
valuesmap of stringanoPaired values of the item by parameter name.
fieldsarray of stringano

FeedProduct

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

PoleTypPovinnéPopis
idstringano
feedIdstringano
shopIdstringano
itemIdstringanog:id: the id the editor stores to refresh the product later (Párovat feed).
codestringano
namestringano
urlstringano
imageUrlstringano
pricenumber or nullanoWith VAT, in the shop's currency (never converted); sale price when the feed has one.
regularPricenumber or nullanoThe price before the sale; null without a sale.
currencyCurrencyano
priceTextstringano
priceCurrencyMismatchbooleanne
availabilityone of: `, in_stock, out_of_stock, preorder, backorder`ano
brandstringano
shortDescriptionstringneThe feed description as a short plain text (about 160 characters) for the product's text in an e-mail.
valuesmap of stringneThe 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).
inFeedbooleanano
updatedAtstringano

FeedProductFeed

PoleTypPovinnéPopis
idstringano
namestringano
shopIdstringano
currencyCurrencyano
itemCountnumberano
refreshedAtstring or nullano
importedAtstring or nullano
refreshErrorstringano

FeedProductList

PoleTypPovinnéPopis
itemsarray of FeedProductano
totalnumberano
feedsarray of FeedProductFeedano

FeedRefreshResult

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

PoleTypPovinnéPopis
stateone of: queued, runningano
feedFeedano

FeedValue

string or array of FeedValue or map of FeedValue

Order

PoleTypPovinnéPopis
idstringano
externalIdstringano
eshopCodestringano
eshopNamestringano
shopIdstringano
createdAtstringano
paidAtstring or nullano
emailstring or nullano
contactIdstring or nullano
stateone of: cancelled, unpaid, new, other, paid, processing, shipped, pickup, delivered, returnedano
statusOrderStatusano
sourceStatusstringano
orderUrlstringano
currencyCurrencyano
totalWithVatstring or nullano
totalWithoutVatstring or nullano
itemCountnumberano
itemsarray of OrderItemanoThe list has the first three items, the detail all of them.
conversionOrderConversion or nullano

OrderConversion

PoleTypPovinnéPopis
kindone of: direct, assistedano
campaignIdstring or nullano
automationIdstring or nullano
clickedAtstringano

OrderItem

PoleTypPovinnéPopis
idstringano
productCodestringano
namestringano
descriptionstringano
priceOrderItemPriceano
quantitynumberano
unitstringano
urlstringano
imageUrlstringano
attributesmap of boolean or string or number or nullanoItemType, Brand, Category, g:condition, g:availability, g:brand of the paired feed product under the item's own.
pairedbooleananoTrue when the item met a product of the shop's feeds by its code.

OrderItemPrice

PoleTypPovinnéPopis
withVatstring or nullanoUnit prices as decimal strings in the order currency.
withoutVatstring or nullano
currencyCurrencyano

OrderStateRule

orders.check_state_map: one rule of the state map

PoleTypPovinnéPopis
sourceStatusstringanoState name of the e-shop, at most 80 characters.
matchone of: exact, prefixnedefault exact
stateone of: new, unpaid, paid, processing, shipped, pickup, delivered, cancelled, returned, otherano

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.

PoleTypPovinnéPopis
idstringano
codestringano
statusCouponStatusano
assignedAtstring or nullano
usedAtstring or nullano
contactobject or nullanonull after the contact was erased.
emailobject or nullanoThe e-mail the code went out with; null = handed out by hand, or before every e-mail took its own code.