Importy a exporty
Referencia API pre import kontaktov z CSV (nahranie, náhľad, spustenie) a exporty do CSV.
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=Imports%20and%20exports.
Prihlásenie: Authorization: Bearer pst_... alebo HTTP Basic (e-mail člena firmy a API kľúč).
Operácie
| Metóda | Cesta | Popis |
|---|---|---|
| GET | /api/v1/tenants/{tenant}/export-fields | Fields an export can contain |
| GET | /api/v1/tenants/{tenant}/exports | List exports |
| POST | /api/v1/tenants/{tenant}/exports | Start a CSV export |
| GET | /api/v1/tenants/{tenant}/exports/{export_id} | Get an export |
| GET | /api/v1/tenants/{tenant}/exports/{export_id}/download | Download an export (CSV) |
| GET | /api/v1/tenants/{tenant}/imports | List imports |
| POST | /api/v1/tenants/{tenant}/imports | Start an import |
| POST | /api/v1/tenants/{tenant}/imports/drafts | Start an import draft (wizard) |
| GET | /api/v1/tenants/{tenant}/imports/drafts/{import_id} | Get an import draft |
| PUT | /api/v1/tenants/{tenant}/imports/drafts/{import_id} | Save an import draft |
| POST | /api/v1/tenants/{tenant}/imports/files | Upload a CSV file for import |
| POST | /api/v1/tenants/{tenant}/imports/preview | Preview an import: mapping, counts, problems |
| GET | /api/v1/tenants/{tenant}/imports/{import_id} | Get an import with its progress and result |
| DELETE | /api/v1/tenants/{tenant}/imports/{import_id} | Delete an import record |
Fields an export can contain
GET /api/v1/tenants/{tenant}/export-fields
Oprávnenie: oblasť contacts, úroveň read; kľúč s prístupom read alebo full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Odpovede
- 200 OK:
application/jsonobject
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 429 | 429 rate_limited: wait Retry-After seconds. | |
| 503 | unavailable | busy |
List exports
GET /api/v1/tenants/{tenant}/exports
Oprávnenie: oblasť contacts, úroveň read; kľúč s prístupom read alebo full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
from | query | string | nie | Start of the period (YYYY-MM-DD local day, or ISO time where noted). |
idFrom | query | string | nie | |
idTo | query | string | nie | |
name | query | string | nie | |
page | query | integer | nie | Page number, from 1. default 1, min 1 |
pageSize | query | integer | nie | Items per page, 1 to 100. default 25, min 1, max 100 |
preset | query | one of: all, today, yesterday, 7d, 30d, 90d, this_week, last_week, month, last_month, this_year, last_year | nie | A period preset instead of from / to, resolved to the account's calendar days ending today (weeks start on Monday; all = no limit where the list allows it). The same days as from / to give the same numbers. |
q | query | string | nie | Search text (case and diacritics insensitive). max 200 chars |
sort | query | string | nie | Sort fields separated by commas, "-" = descending, at most 3 (e.g. name,-id). |
status | query | string | nie | Status filter. |
to | query | string | nie | End of the period (YYYY-MM-DD local day, or ISO time where noted). |
Odpovede
- 200 OK:
application/jsonobject
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | q, sort, status |
| 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. | |
| 503 | unavailable | busy |
Start a CSV export
POST /api/v1/tenants/{tenant}/exports
Oprávnenie: oblasť contacts, úroveň full; kľúč s prístupom full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Telo požiadavky (application/json): Required by the server: name, selection.
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | áno | |
selection | one of: bounced, blacklisted, all, lists | áno | |
listIds | array of string | nie | |
fields | array of string | áno | |
purposeIds | array of string | nie | |
encoding | one of: utf-8, windows-1250 | áno |
Odpovede
- 201 Created:
application/jsonExportSummary
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. | |
| 503 | unavailable | busy |
Get an export
GET /api/v1/tenants/{tenant}/exports/{export_id}
Oprávnenie: oblasť contacts, úroveň read; kľúč s prístupom read alebo full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
export_id | path | string | áno | Id of the export (string of digits). |
Odpovede
- 200 OK:
application/jsonExportSummary
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. | |
| 503 | unavailable | busy |
Download an export (CSV)
GET /api/v1/tenants/{tenant}/exports/{export_id}/download
Oprávnenie: oblasť contacts, úroveň full; kľúč s prístupom full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
export_id | path | string | áno | Id of the export (string of digits). |
Odpovede
- 200 OK:
text/csvstring
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 | |
| 409 | conflict | status |
| 410 | expired | export |
| 429 | 429 rate_limited: wait Retry-After seconds. | |
| 503 | unavailable | busy |
List imports
GET /api/v1/tenants/{tenant}/imports
Oprávnenie: oblasť contacts, úroveň read; kľúč s prístupom read alebo full · Nástroj MCP: list_imports
Imports with status and counts.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
from | query | string | nie | Start of the period (YYYY-MM-DD local day, or ISO time where noted). |
idFrom | query | string | nie | |
idTo | query | string | nie | |
name | query | string | nie | |
page | query | integer | nie | Page number, from 1. default 1, min 1 |
pageSize | query | integer | nie | Items per page, 1 to 100. default 25, min 1, max 100 |
preset | query | one of: all, today, yesterday, 7d, 30d, 90d, this_week, last_week, month, last_month, this_year, last_year | nie | A period preset instead of from / to, resolved to the account's calendar days ending today (weeks start on Monday; all = no limit where the list allows it). The same days as from / to give the same numbers. |
q | query | string | nie | Search text (case and diacritics insensitive). max 200 chars |
sort | query | string | nie | Sort fields separated by commas, "-" = descending, at most 3 (e.g. name,-id). |
status | query | string | nie | Status filter. |
to | query | string | nie | End of the period (YYYY-MM-DD local day, or ISO time where noted). |
Odpovede
- 200 OK:
application/jsonobject
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | q, sort, status |
| 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. | |
| 503 | unavailable | busy |
Start an import
POST /api/v1/tenants/{tenant}/imports
Oprávnenie: oblasť contacts, úroveň full; kľúč s prístupom full · Nástroj MCP: start_import (cez MCP len s náhľadom a potvrdením)
Runs an import. upsert and update_only need purposeId and consentConfirmed true; unsubscribe, remove and blacklist leave both out. An import that subscribes also needs consentDeclaration (where and how the consents were collected, when, and a proof link), also a file claiming a Shoptet kind, unless the file maps both newsletterConsent and newsletterConsentAt. Every subscribing import is checked automatically; a risky one is stored but waits for the platform review (review.state quarantined). In a capped trial whose contact limit the new contacts would cross (preview trialLimit) it needs trialLimit cap or continue (409 conflict trialLimit without it); ask the person which one.
Starts an import of a checked plan. In a capped trial whose contact limit the new contacts of the file would cross (core/trial_room.py) the body needs trialLimit: cap (new contacts only up to the limit, the rest counted as skipTrialLimit) or continue (everything; live sending stops at the next billing run); without it 409 conflict, message trialLimit, params {reason: trial_contact_limit, limit, contacts, adding, after, over, left}.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Telo požiadavky (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | áno | |
source | string | áno | Where the contacts come from (se-spec 01 §7.1), e.g. a trade fair. |
purposeId | string | nie | Purpose of processing given to the imported contacts. Optional for OPT_OUT_MODES (the server stores the tenant's first purpose when omitted; those modes write no consent). |
consentConfirmed | boolean | nie | The user confirms a documented, valid purpose for every contact; must be true. Not required for OPT_OUT_MODES. |
runAutomations | boolean | nie | Explicit opt-in: what the import writes starts automations (added to a list, subscribed, contact created ...). Default false: an import is a bulk write that starts none. |
options | ImportOptions | nie | Autofill, start of the purpose consent and the double opt-in e-mail. |
draftId | string | nie | The wizard's draft this import comes from (deleted when the import starts). |
consentDeclaration | ImportConsentDeclaration | nie | Consent of a manual import (required for kind csv that subscribes, 400 validation consentDeclaration.*). |
trialLimit | one of: cap, continue | nie | Required when the preview has trialLimit (409 conflict trialLimit, params reason trial_contact_limit with the numbers of TrialLimitWarning, without it): cap = new contacts only up to the limit (skipTrialLimit counts the rest), continue = everything (live sending stops at the next billing run). |
fileId | string | áno | |
mapping | ImportMapping | áno | |
mode | one of: unsubscribe, upsert, update_only, remove, blacklist | áno | |
kind | one of: csv, shoptet_customers, shoptet_newsletter | nie | Default csv. |
subscribersConfirmed | boolean | nie | A Shoptet newsletter export without a consent column: the person confirmed that every row is an active subscriber (required, 400 subscribers otherwise). |
shopId | string | áno | Main shop of new contacts; lists must belong to it or to the whole company. |
listIds | array of string | áno |
Odpovede
- 201 Created:
application/jsonImportDetail
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | consent, draftId, purpose, runAutomations, trialLimit |
| 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 | trialLimit |
| 429 | 429 rate_limited: wait Retry-After seconds. | |
| 503 | unavailable | busy |
Start an import draft (wizard)
POST /api/v1/tenants/{tenant}/imports/drafts
Oprávnenie: oblasť contacts, úroveň full; kľúč s prístupom full
The wizard saves itself after its first step. Body {name, source, step, state, fileId?, shopId?}; 201 ImportDraft.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Telo požiadavky (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | nie | |
source | string | nie | |
step | number | nie | |
state | ImportDraftState | nie | |
fileId | string or null | nie | |
shopId | string or null | nie |
Odpovede
- 201 Created:
application/jsonImportDraft
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. | |
| 503 | unavailable | busy |
Get an import draft
GET /api/v1/tenants/{tenant}/imports/drafts/{import_id}
Oprávnenie: oblasť contacts, úroveň read; kľúč s prístupom read alebo full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
import_id | path | string | áno | Id of the import (string of digits). |
Odpovede
- 200 OK:
application/jsonImportDraft
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. | |
| 503 | unavailable | busy |
Save an import draft
PUT /api/v1/tenants/{tenant}/imports/drafts/{import_id}
Oprávnenie: oblasť contacts, úroveň full; kľúč s prístupom full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
import_id | path | string | áno | Id of the import (string of digits). |
Telo požiadavky (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | nie | |
source | string | nie | |
step | number | nie | |
state | ImportDraftState | nie | |
fileId | string or null | nie | |
shopId | string or null | nie |
Odpovede
- 200 OK:
application/jsonImportDraft
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. | |
| 503 | unavailable | busy |
Upload a CSV file for import
POST /api/v1/tenants/{tenant}/imports/files
Oprávnenie: oblasť contacts, úroveň full; kľúč s prístupom full · Nástroj MCP: upload_import_csv
Uploads CSV text for an import (header row, ; , or tab, up to 5 MB of text; larger files through the administration, up to 64 MB and 300 000 rows). Answers fileId, columns, sample rows, suggestedKind and suggestedMapping.
multipart/form-data with the field file (up to imports.MAX_BYTES; werkzeug spools it to a temporary file, it is read from there as a stream) or JSON {text} (pasted, up to imports.TEXT_MAX_BYTES). 201 with the stored file, its encoding and the suggested kind and mapping.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Telo požiadavky (application/json)
object
Odpovede
- 201 Created:
application/jsonImportFile
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | file |
| 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. | |
| 503 | unavailable | busy |
Preview an import: mapping, counts, problems
POST /api/v1/tenants/{tenant}/imports/preview
Oprávnenie: oblasť contacts, úroveň full; kľúč s prístupom full · Nástroj MCP: preview_import
What an import would do with the file: counts per action and the first rows.
The preview of a plan plus the automatic check of the file (checks: score, flags, quarantine), so the wizard shows before the run whether the import will wait for the platform's review. consentDeclaration is optional here (its audience b2b / b2c changes the free mailbox check). trialLimit: in a capped trial whose contact limit the new contacts of the file would cross, {limit, contacts, adding, after, over, left, orderUrl} (core/trial_room.py), else null; the run then needs trialLimit cap or continue.
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Telo požiadavky (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
fileId | string | áno | |
mapping | ImportMapping | áno | |
mode | one of: unsubscribe, upsert, update_only, remove, blacklist | áno | |
kind | one of: csv, shoptet_customers, shoptet_newsletter | nie | Default csv. |
subscribersConfirmed | boolean | nie | A Shoptet newsletter export without a consent column: the person confirmed that every row is an active subscriber (required, 400 subscribers otherwise). |
shopId | string | áno | Main shop of new contacts; lists must belong to it or to the whole company. |
listIds | array of string | áno |
Odpovede
- 200 OK:
application/jsonImportPreview
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. | |
| 503 | unavailable | busy |
Get an import with its progress and result
GET /api/v1/tenants/{tenant}/imports/{import_id}
Oprávnenie: oblasť contacts, úroveň read; kľúč s prístupom read alebo full
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
import_id | path | string | áno | Id of the import (string of digits). |
Odpovede
- 200 OK:
application/jsonImportDetail
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. | |
| 503 | unavailable | busy |
Delete an import record
DELETE /api/v1/tenants/{tenant}/imports/{import_id}
Oprávnenie: oblasť contacts, úroveň full; kľúč s prístupom full
Only a draft (409 status for an import that started).
Parametre
| Názov | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | áno | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
import_id | path | string | áno | Id of the import (string of digits). |
Odpovede
- 204 No content
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 409 | conflict | status |
| 429 | 429 rate_limited: wait Retry-After seconds. | |
| 503 | unavailable | busy |
Schémy
Error
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
error | object | áno |
{
"error": {
"code": "validation",
"message": "email"
}
}ExportField
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | áno | df_* system field or cf_<id> custom field. |
kind | one of: custom, contact | áno | |
name | string | áno | Custom fields: their name (tenant data); system fields are named by the UI. |
type | string | áno |
ExportInput
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | áno | |
selection | one of: bounced, blacklisted, all, lists | áno | |
listIds | array of string | nie | |
fields | array of string | áno | |
purposeIds | array of string | nie | |
encoding | one of: utf-8, windows-1250 | áno |
ExportStatus
one of: queued, running, failed, finished
ExportSummary
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | áno | |
name | string | áno | |
status | ExportStatus | áno | |
selection | one of: bounced, blacklisted, all, lists | áno | |
listIds | array of string | áno | |
fields | array of string | áno | |
purposeIds | array of string | áno | |
encoding | one of: utf-8, windows-1250 | áno | |
rowCount | number or null | áno | |
fileName | string or null | áno | |
downloadable | boolean | áno | The file exists and its link has not expired. |
downloads | number | áno | |
createdAt | string | áno | |
finishedAt | string or null | áno | |
expiresAt | string or null | áno | |
listNames | array of string | nie | Names of the chosen lists in their order; older servers leave it out. |
ImportChecks
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
quarantine | boolean | áno | true = the import will be stored but its new subscribers wait for the platform's review. |
flags | array of ImportFlag | áno | |
declarationRequired | boolean | áno | A plain CSV that subscribes needs ImportRequest.consentDeclaration. |
ImportConsentDeclaration
Where the consents of a manual import come from (owner 25 Oct 2026): required for a plain CSV that subscribes, unless an API program maps both newsletterConsent and newsletterConsentAt.
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
source | one of: other, web_form, checkout, previous_platform, event | áno | |
method | string | áno | How the consent was collected, 10 to 500 characters. |
collectedFrom | string | áno | YYYY-MM-DD; both empty when the file has the consent date column (newsletterConsentAt). |
collectedTo | string | áno | |
proofUrl | string | áno | https link to the sign-up form or to the export; may be empty when the file has the consent dates, or when proofNote describes a proof that is not on the web. |
proofNote | string | nie | Only for the sources event and other (consents collected off the web): what the proof is, where it is kept and from when, 20 to 500 characters; accepted instead of proofUrl. |
audience | one of: b2c, b2b | áno |
ImportCounts
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
rows | number | áno | |
create | number | áno | |
update | number | áno | |
skipSuppressed | number | áno | Unsubscribed, bounced, complained or suppressed: never re-subscribed and not changed. |
skipMissing | number | áno | update_only and the address is not a contact. |
invalid | number | áno | |
duplicate | number | áno | Same address earlier in the file. |
unsubscribe | number | áno | Opt-out modes: unsubscribed from the lists, removed from them, put on the blacklist. |
remove | number | áno | |
blacklist | number | áno | |
skipTrialLimit | number | nie | New addresses left out by the choice trialLimit cap of a capped trial (only when there were some). |
ImportDetail
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
source | string | áno | |
purposeId | string | áno | |
addedToLists | number | áno | New list memberships. |
errors | array of ImportRowProblem | áno | First 50 invalid rows. |
report | ImportReport or null | áno | null until finished. |
runAutomations | boolean | nie | The import starts automations (ImportRequest.runAutomations); false by default. |
options | ImportOptions | nie | |
consentDeclaration | object or null | nie | |
id | string | áno | |
name | string | áno | |
status | one of: queued, running, draft, failed, finished | áno | |
kind | one of: csv, shoptet_customers, shoptet_newsletter | áno | |
fileName | string | áno | |
shopId | string | áno | |
mode | one of: unsubscribe, upsert, update_only, remove, blacklist | áno | |
listIds | array of string | áno | |
createdAt | string | áno | |
startedAt | string or null | áno | When the run started (null while queued). |
finishedAt | string or null | áno | |
progress | object | áno | Rows the run has processed so far (it commits batch by batch). |
counts | ImportCounts or null | áno | null until finished. |
listNames | array of string | nie | Names of the chosen lists in their order (the grid only). |
review | ImportReview | nie | The consent gate (core/import_checks.py). |
ImportDraft
The summary, the wizard's state and the stored file while it lasts (24 hours).
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
source | string | áno | |
state | ImportDraftState | áno | |
file | ImportFile or null | áno | |
updatedAt | string or null | áno | |
id | string | áno | |
name | string | áno | |
status | one of: queued, running, draft, failed, finished | áno | |
kind | one of: csv, shoptet_customers, shoptet_newsletter | áno | |
fileName | string | áno | |
shopId | string | áno | |
mode | one of: unsubscribe, upsert, update_only, remove, blacklist | áno | |
listIds | array of string | áno | |
createdAt | string | áno | |
startedAt | string or null | áno | When the run started (null while queued). |
finishedAt | string or null | áno | |
progress | object | áno | Rows the run has processed so far (it commits batch by batch). |
counts | ImportCounts or null | áno | null until finished. |
listNames | array of string | nie | Names of the chosen lists in their order (the grid only). |
review | ImportReview | nie | The consent gate (core/import_checks.py). |
ImportDraftInput
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | nie | |
source | string | nie | |
step | number | nie | |
state | ImportDraftState | nie | |
fileId | string or null | nie | |
shopId | string or null | nie |
ImportDraftState
The wizard's own state of a draft import (opaque to the server, with the step).
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
step | number | nie | |
* | any | nie |
ImportEncoding
one of: utf-8, windows-1250, utf-16
ImportFile
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
fileId | string | áno | |
fileName | string | áno | |
size | number | áno | Bytes of the file as uploaded. |
delimiter | string | áno | ; , tab or the one character the person chose. |
quote | string | nie | Field enclosure (default "). |
hasHeader | boolean | nie | false = the first line is data and the columns have no names. |
encoding | ImportEncoding | áno | What the server read the file as (detected). |
columns | array of string | áno | Header row. |
rowCount | number | áno | Data rows without the header. |
sample | array of array of string | áno | First data rows as they are in the file. |
suggestedKind | one of: csv, shoptet_customers, shoptet_newsletter | áno | The server's suggestion from the header names (Czech, Slovak, English, Shoptet). |
suggestedMapping | ImportMapping | áno |
ImportFlag
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
code | one of: invalid, duplicates, role, disposable, trap_like, freemail_b2b, domain_cluster, no_mx, stale_consent, future_consent, stale_declared | áno | |
count | number | áno | |
share | number | áno | 0 to 1 of the rows (or of the dated rows for the consent age). |
ImportMapping
ImportOptions
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
autofill | object | nie | Fill empty fields from the first name and the address. |
consentFrom | object | nie | Start of the purpose consent: now, or one date for every row (a date column is the mapped newsletterConsentAt). |
doi | object | nie | Double opt-in e-mail instead of an immediate subscription (upsert and update_only). |
trialLimit | one of: cap, continue | nie | Read only (ImportDetail.options): the choice ImportRequest.trialLimit of an import that crossed the trial limit. |
ImportPlan
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
fileId | string | áno | |
mapping | ImportMapping | áno | |
mode | one of: unsubscribe, upsert, update_only, remove, blacklist | áno | |
kind | one of: csv, shoptet_customers, shoptet_newsletter | nie | Default csv. |
subscribersConfirmed | boolean | nie | A Shoptet newsletter export without a consent column: the person confirmed that every row is an active subscriber (required, 400 subscribers otherwise). |
shopId | string | áno | Main shop of new contacts; lists must belong to it or to the whole company. |
listIds | array of string | áno |
ImportPreview
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
counts | ImportCounts | áno | |
rows | array of ImportPreviewRow | áno | First 20 rows. |
report | ImportReport | áno | |
checks | ImportChecks or null | nie | The automatic check of the whole file (consent gate, core/import_checks.py); null for an opt-out mode. |
trialLimit | TrialLimitWarning or null | nie | A capped trial whose contact limit the new contacts of the file would cross; null otherwise. The run then needs ImportRequest.trialLimit. |
ImportPreviewRow
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
row | number | áno | Line in the file, the header is line 1. |
email | string | áno | |
action | one of: invalid, unsubscribe, remove, blacklist, create, update, skip_suppressed, skip_missing, duplicate | áno | |
error | one of: email_missing, email_invalid, value_invalid, null | áno | |
field | one of: companyId, firstName, lastName, phone, country, street, city, language, note, email, company, mobile, postalCode, gender, fullName, titleBefore, titleAfter, birthday, newsletterConsent, newsletterConsentAt, registeredAt, smsConsent, null | áno | The field with an invalid value. |
values | object | áno | Normalized values that would be written. |
consent | boolean or null | áno | Whether the row brings a newsletter consent (false = a customer only); null for invalid rows and opt-out modes. |
ImportReport
Merge summary of an import: the consent of the rows, existing contacts and their other sources, values left out.
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
consent | object | áno | |
merge | object | áno | |
dropped | object | áno | Values of Shoptet files that did not fit and were left out, per field. |
ImportRequest
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | áno | |
source | string | áno | Where the contacts come from (se-spec 01 §7.1), e.g. a trade fair. |
purposeId | string | nie | Purpose of processing given to the imported contacts. Optional for OPT_OUT_MODES (the server stores the tenant's first purpose when omitted; those modes write no consent). |
consentConfirmed | boolean | nie | The user confirms a documented, valid purpose for every contact; must be true. Not required for OPT_OUT_MODES. |
runAutomations | boolean | nie | Explicit opt-in: what the import writes starts automations (added to a list, subscribed, contact created ...). Default false: an import is a bulk write that starts none. |
options | ImportOptions | nie | Autofill, start of the purpose consent and the double opt-in e-mail. |
draftId | string | nie | The wizard's draft this import comes from (deleted when the import starts). |
consentDeclaration | ImportConsentDeclaration | nie | Consent of a manual import (required for kind csv that subscribes, 400 validation consentDeclaration.*). |
trialLimit | one of: cap, continue | nie | Required when the preview has trialLimit (409 conflict trialLimit, params reason trial_contact_limit with the numbers of TrialLimitWarning, without it): cap = new contacts only up to the limit (skipTrialLimit counts the rest), continue = everything (live sending stops at the next billing run). |
fileId | string | áno | |
mapping | ImportMapping | áno | |
mode | one of: unsubscribe, upsert, update_only, remove, blacklist | áno | |
kind | one of: csv, shoptet_customers, shoptet_newsletter | nie | Default csv. |
subscribersConfirmed | boolean | nie | A Shoptet newsletter export without a consent column: the person confirmed that every row is an active subscriber (required, 400 subscribers otherwise). |
shopId | string | áno | Main shop of new contacts; lists must belong to it or to the whole company. |
listIds | array of string | áno |
ImportReview
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
state | ImportReviewState | áno | |
flags | array of ImportFlag | áno | |
note | string | áno | |
reviewedAt | string or null | áno |
ImportReviewState
one of: `, rejected, passed, quarantined, released`
ImportRowProblem
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
row | number | áno | |
error | one of: email_missing, email_invalid, value_invalid | áno | |
field | one of: companyId, firstName, lastName, phone, country, street, city, language, note, email, company, mobile, postalCode, gender, fullName, titleBefore, titleAfter, birthday, newsletterConsent, newsletterConsentAt, registeredAt, smsConsent, null | áno |
ImportSummary
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | áno | |
name | string | áno | |
status | one of: queued, running, draft, failed, finished | áno | |
kind | one of: csv, shoptet_customers, shoptet_newsletter | áno | |
fileName | string | áno | |
shopId | string | áno | |
mode | one of: unsubscribe, upsert, update_only, remove, blacklist | áno | |
listIds | array of string | áno | |
createdAt | string | áno | |
startedAt | string or null | áno | When the run started (null while queued). |
finishedAt | string or null | áno | |
progress | object | áno | Rows the run has processed so far (it commits batch by batch). |
counts | ImportCounts or null | áno | null until finished. |
listNames | array of string | nie | Names of the chosen lists in their order (the grid only). |
review | ImportReview | nie | The consent gate (core/import_checks.py). |
TrialLimitWarning
A capped self-serve trial would go over its contact limit (core/trial_room.py; QA 28 Oct 2026): the limit, the billable contacts now, how many new ones the import or the switch adds (at most), the total after it, how many over the limit that is and how many still fit; orderUrl = the app's page of a tariff order. Over the limit, live sending stops at the next billing run (within an hour) until a tariff is paid or the contacts fit again.
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
limit | number | áno | |
contacts | number | áno | |
adding | number | áno | |
after | number | áno | |
over | number | áno | |
left | number | áno | |
orderUrl | string | áno |