Imports and exports
CSV import of contacts (upload, preview, run) and CSV exports.
Technická reference je anglicky (stejně jako strojově čitelný dokument OpenAPI). Celou skupinu pro AI agenta načtete z /api/openapi.json?tag=Imports%20and%20exports.
Přihlášení: Authorization: Bearer pst_... nebo HTTP Basic (e-mail člena firmy a API klíč).
Operace
| Metoda | Cesta | Popis |
|---|---|---|
| GET | /api/v1/tenants/{tenant}/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ávnění: modul contacts, úroveň read; klíč s přístupem read nebo full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Odpovědi
- 200 OK:
application/jsonobject
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 429 | 429 rate_limited: wait Retry-After seconds. |
List exports
GET /api/v1/tenants/{tenant}/exports
Oprávnění: modul contacts, úroveň read; klíč s přístupem read nebo full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
idFrom | query | string | ne | |
idTo | query | string | ne | |
name | query | string | ne | |
page | query | integer | ne | Page number, from 1. default 1, min 1 |
pageSize | query | integer | ne | Items per page, 1 to 100. default 25, min 1, max 100 |
q | query | string | ne | Search text (case and diacritics insensitive). max 200 chars |
sort | query | string | ne | Sort fields separated by commas, "-" = descending, at most 3 (e.g. name,-id). |
status | query | string | ne | Status filter. |
Odpovědi
- 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. |
Start a CSV export
POST /api/v1/tenants/{tenant}/exports
Oprávnění: modul contacts, úroveň full; klíč s přístupem full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Tělo požadavku (application/json): Required by the server: name, selection.
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | ano | |
selection | one of: bounced, blacklisted, all, lists | ano | |
listIds | array of string | ne | |
fields | array of string | ano | |
purposeIds | array of string | ne | |
encoding | one of: utf-8, windows-1250 | ano |
Odpovědi
- 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. |
Get an export
GET /api/v1/tenants/{tenant}/exports/{export_id}
Oprávnění: modul contacts, úroveň read; klíč s přístupem read nebo full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
export_id | path | string | ano | Id of the export (string of digits). |
Odpovědi
- 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. |
Download an export (CSV)
GET /api/v1/tenants/{tenant}/exports/{export_id}/download
Oprávnění: modul contacts, úroveň full; klíč s přístupem full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
export_id | path | string | ano | Id of the export (string of digits). |
Odpovědi
- 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. |
List imports
GET /api/v1/tenants/{tenant}/imports
Oprávnění: modul contacts, úroveň read; klíč s přístupem read nebo full · Nástroj MCP: list_imports
Imports with status and counts.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
idFrom | query | string | ne | |
idTo | query | string | ne | |
name | query | string | ne | |
page | query | integer | ne | Page number, from 1. default 1, min 1 |
pageSize | query | integer | ne | Items per page, 1 to 100. default 25, min 1, max 100 |
q | query | string | ne | Search text (case and diacritics insensitive). max 200 chars |
sort | query | string | ne | Sort fields separated by commas, "-" = descending, at most 3 (e.g. name,-id). |
status | query | string | ne | Status filter. |
Odpovědi
- 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. |
Start an import
POST /api/v1/tenants/{tenant}/imports
Oprávnění: modul contacts, úroveň full; klíč s přístupem full · Nástroj MCP: start_import (přes MCP jen s náhledem a potvrzením)
Runs an import. upsert and update_only need purposeId and consentConfirmed true; unsubscribe, remove and blacklist leave both out.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Tělo požadavku (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | ano | |
source | string | ano | Where the contacts come from (se-spec 01 §7.1), e.g. a trade fair. |
purposeId | string | ne | 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 | ne | The user confirms a documented, valid purpose for every contact; must be true. Not required for OPT_OUT_MODES. |
runAutomations | boolean | ne | 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 | ne | Autofill, start of the purpose consent and the double opt-in e-mail (SE wizard). |
draftId | string | ne | The wizard's draft this import comes from (deleted when the import starts). |
fileId | string | ano | |
mapping | ImportMapping | ano | |
mode | one of: upsert, update_only, unsubscribe, remove, blacklist | ano | |
kind | one of: csv, shoptet_customers, shoptet_newsletter | ne | Default csv. |
subscribersConfirmed | boolean | ne | A Shoptet newsletter export without a consent column: the person confirmed that every row is an active subscriber (required, 400 subscribers otherwise). |
shopId | string | ano | Main shop of new contacts; lists must belong to it or to the whole company. |
listIds | array of string | ano |
Odpovědi
- 201 Created:
application/jsonImportDetail
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | consent, draftId, purpose, runAutomations |
| 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. |
Start an import draft (wizard)
POST /api/v1/tenants/{tenant}/imports/drafts
Oprávnění: modul contacts, úroveň full; klíč s přístupem full
SE "Rozpracováno": the wizard saves itself after its first step. Body {name, source, step, state, fileId?, shopId?}; 201 ImportDraft.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Tělo požadavku (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | ne | |
source | string | ne | |
step | number | ne | |
state | ImportDraftState | ne | |
fileId | string or null | ne | |
shopId | string or null | ne |
Odpovědi
- 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. |
Get an import draft
GET /api/v1/tenants/{tenant}/imports/drafts/{import_id}
Oprávnění: modul contacts, úroveň read; klíč s přístupem read nebo full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
import_id | path | string | ano | Id of the import (string of digits). |
Odpovědi
- 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. |
Save an import draft
PUT /api/v1/tenants/{tenant}/imports/drafts/{import_id}
Oprávnění: modul contacts, úroveň full; klíč s přístupem full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
import_id | path | string | ano | Id of the import (string of digits). |
Tělo požadavku (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | ne | |
source | string | ne | |
step | number | ne | |
state | ImportDraftState | ne | |
fileId | string or null | ne | |
shopId | string or null | ne |
Odpovědi
- 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. |
Upload a CSV file for import
POST /api/v1/tenants/{tenant}/imports/files
Oprávnění: modul contacts, úroveň full; klíč s přístupem 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.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Tělo požadavku (application/json)
object
Odpovědi
- 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. |
Preview an import: mapping, counts, problems
POST /api/v1/tenants/{tenant}/imports/preview
Oprávnění: modul contacts, úroveň full; klíč s přístupem full · Nástroj MCP: preview_import
What an import would do with the file: counts per action and the first rows.
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
Tělo požadavku (application/json)
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
fileId | string | ano | |
mapping | ImportMapping | ano | |
mode | one of: upsert, update_only, unsubscribe, remove, blacklist | ano | |
kind | one of: csv, shoptet_customers, shoptet_newsletter | ne | Default csv. |
subscribersConfirmed | boolean | ne | A Shoptet newsletter export without a consent column: the person confirmed that every row is an active subscriber (required, 400 subscribers otherwise). |
shopId | string | ano | Main shop of new contacts; lists must belong to it or to the whole company. |
listIds | array of string | ano |
Odpovědi
- 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. |
Get an import with its progress and result
GET /api/v1/tenants/{tenant}/imports/{import_id}
Oprávnění: modul contacts, úroveň read; klíč s přístupem read nebo full
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
import_id | path | string | ano | Id of the import (string of digits). |
Odpovědi
- 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. |
Delete an import record
DELETE /api/v1/tenants/{tenant}/imports/{import_id}
Oprávnění: modul contacts, úroveň full; klíč s přístupem full
SE "Odstranit import": only a draft (409 status for an import that started).
Parametry
| Název | Kde | Typ | Povinné | Popis |
|---|---|---|---|---|
tenant | path | string (uuid) | ano | Public id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page. |
import_id | path | string | ano | Id of the import (string of digits). |
Odpovědi
- 204 No content
Chyby
| Stav | Kód | Hodnoty message |
|---|---|---|
| 400 | validation | |
| 401 | 401 unauthorized: missing, unknown, revoked, expired or idle API key. | |
| 403 | 403 forbidden: message tenant (another company), scope (read-only key), api_key (person only), or the module the key's roles lack. | |
| 404 | not_found | |
| 409 | conflict | status |
| 429 | 429 rate_limited: wait Retry-After seconds. |
Schémata
Error
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
error | object | ano |
{
"error": {
"code": "validation",
"message": "email"
}
}ExportField
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | ano | df_* system field or cf_<id> custom field. |
kind | one of: custom, contact | ano | |
name | string | ano | Custom fields: their name (tenant data); system fields are named by the UI. |
type | string | ano |
ExportInput
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | ano | |
selection | one of: bounced, blacklisted, all, lists | ano | |
listIds | array of string | ne | |
fields | array of string | ano | |
purposeIds | array of string | ne | |
encoding | one of: utf-8, windows-1250 | ano |
ExportStatus
one of: queued, running, finished, failed
ExportSummary
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | ano | |
name | string | ano | |
status | ExportStatus | ano | |
selection | one of: bounced, blacklisted, all, lists | ano | |
listIds | array of string | ano | |
fields | array of string | ano | |
purposeIds | array of string | ano | |
encoding | one of: utf-8, windows-1250 | ano | |
rowCount | number or null | ano | |
fileName | string or null | ano | |
downloadable | boolean | ano | The file exists and its link has not expired. |
downloads | number | ano | |
createdAt | string | ano | |
finishedAt | string or null | ano | |
expiresAt | string or null | ano | |
listNames | array of string | ne | Names of the chosen lists in their order (SE's column Seznamy); older servers leave it out. |
ImportCounts
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
rows | number | ano | |
create | number | ano | |
update | number | ano | |
skipSuppressed | number | ano | Unsubscribed, bounced, complained or suppressed: never re-subscribed and not changed. |
skipMissing | number | ano | update_only and the address is not a contact. |
invalid | number | ano | |
duplicate | number | ano | Same address earlier in the file. |
unsubscribe | number | ano | Opt-out modes: unsubscribed from the lists, removed from them, put on the blacklist. |
remove | number | ano | |
blacklist | number | ano |
ImportDetail
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
source | string | ano | |
purposeId | string | ano | |
addedToLists | number | ano | New list memberships. |
errors | array of ImportRowProblem | ano | First 50 invalid rows. |
report | ImportReport or null | ano | null until finished. |
runAutomations | boolean | ne | The import starts automations (ImportRequest.runAutomations); false by default. |
options | ImportOptions | ne | |
id | string | ano | |
name | string | ano | |
status | one of: queued, running, draft, finished, failed | ano | |
kind | one of: csv, shoptet_customers, shoptet_newsletter | ano | |
fileName | string | ano | |
shopId | string | ano | |
mode | one of: upsert, update_only, unsubscribe, remove, blacklist | ano | |
listIds | array of string | ano | |
createdAt | string | ano | |
startedAt | string or null | ano | When the run started (null while queued). |
finishedAt | string or null | ano | |
progress | object | ano | Rows the run has processed so far (it commits batch by batch). |
counts | ImportCounts or null | ano | null until finished. |
listNames | array of string | ne | Names of the chosen lists in their order (SE's column Seznamy; the grid only). |
ImportDraft
SE "Rozpracováno": the summary, the wizard's state and the stored file while it lasts (24 hours).
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
source | string | ano | |
state | ImportDraftState | ano | |
file | ImportFile or null | ano | |
updatedAt | string or null | ano | |
id | string | ano | |
name | string | ano | |
status | one of: queued, running, draft, finished, failed | ano | |
kind | one of: csv, shoptet_customers, shoptet_newsletter | ano | |
fileName | string | ano | |
shopId | string | ano | |
mode | one of: upsert, update_only, unsubscribe, remove, blacklist | ano | |
listIds | array of string | ano | |
createdAt | string | ano | |
startedAt | string or null | ano | When the run started (null while queued). |
finishedAt | string or null | ano | |
progress | object | ano | Rows the run has processed so far (it commits batch by batch). |
counts | ImportCounts or null | ano | null until finished. |
listNames | array of string | ne | Names of the chosen lists in their order (SE's column Seznamy; the grid only). |
ImportDraftInput
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | ne | |
source | string | ne | |
step | number | ne | |
state | ImportDraftState | ne | |
fileId | string or null | ne | |
shopId | string or null | ne |
ImportDraftState
The wizard's own state of a draft import (opaque to the server, with the step).
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
step | number | ne | |
* | any | ne |
ImportEncoding
one of: utf-8, windows-1250, utf-16
ImportFile
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
fileId | string | ano | |
fileName | string | ano | |
size | number | ano | Bytes of the file as uploaded. |
delimiter | string | ano | ; , tab or the one character the person chose. |
quote | string | ne | Field enclosure (default "). |
hasHeader | boolean | ne | false = the first line is data and the columns have no names. |
encoding | ImportEncoding | ano | What the server read the file as (detected). |
columns | array of string | ano | Header row. |
rowCount | number | ano | Data rows without the header. |
sample | array of array of string | ano | First data rows as they are in the file. |
suggestedKind | one of: csv, shoptet_customers, shoptet_newsletter | ano | The server's suggestion from the header names (Czech, Slovak, English, Shoptet). |
suggestedMapping | ImportMapping | ano |
ImportMapping
ImportOptions
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
autofill | object | ne | Fill empty fields from the first name and the address (SE "Automatické doplnění údajů ke kontaktu"). |
consentFrom | object | ne | Start of the purpose consent: now, or one date for every row (a date column is the mapped newsletterConsentAt). |
doi | object | ne | Double opt-in e-mail instead of an immediate subscription (upsert and update_only). |
ImportPlan
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
fileId | string | ano | |
mapping | ImportMapping | ano | |
mode | one of: upsert, update_only, unsubscribe, remove, blacklist | ano | |
kind | one of: csv, shoptet_customers, shoptet_newsletter | ne | Default csv. |
subscribersConfirmed | boolean | ne | A Shoptet newsletter export without a consent column: the person confirmed that every row is an active subscriber (required, 400 subscribers otherwise). |
shopId | string | ano | Main shop of new contacts; lists must belong to it or to the whole company. |
listIds | array of string | ano |
ImportPreview
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
counts | ImportCounts | ano | |
rows | array of ImportPreviewRow | ano | First 20 rows. |
report | ImportReport | ano |
ImportPreviewRow
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
row | number | ano | Line in the file, the header is line 1. |
email | string | ano | |
action | one of: invalid, unsubscribe, remove, blacklist, create, update, skip_suppressed, skip_missing, duplicate | ano | |
error | one of: email_missing, email_invalid, value_invalid, null | ano | |
field | one of: companyId, firstName, lastName, phone, country, street, city, language, note, email, company, mobile, postalCode, gender, fullName, titleBefore, titleAfter, birthday, newsletterConsent, newsletterConsentAt, registeredAt, null | ano | The field with an invalid value. |
values | object | ano | Normalized values that would be written. |
consent | boolean or null | ano | 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 | ano | |
merge | object | ano | |
dropped | object | ano | Values of Shoptet files that did not fit and were left out, per field. |
ImportRequest
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
name | string | ano | |
source | string | ano | Where the contacts come from (se-spec 01 §7.1), e.g. a trade fair. |
purposeId | string | ne | 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 | ne | The user confirms a documented, valid purpose for every contact; must be true. Not required for OPT_OUT_MODES. |
runAutomations | boolean | ne | 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 | ne | Autofill, start of the purpose consent and the double opt-in e-mail (SE wizard). |
draftId | string | ne | The wizard's draft this import comes from (deleted when the import starts). |
fileId | string | ano | |
mapping | ImportMapping | ano | |
mode | one of: upsert, update_only, unsubscribe, remove, blacklist | ano | |
kind | one of: csv, shoptet_customers, shoptet_newsletter | ne | Default csv. |
subscribersConfirmed | boolean | ne | A Shoptet newsletter export without a consent column: the person confirmed that every row is an active subscriber (required, 400 subscribers otherwise). |
shopId | string | ano | Main shop of new contacts; lists must belong to it or to the whole company. |
listIds | array of string | ano |
ImportRowProblem
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
row | number | ano | |
error | one of: email_missing, email_invalid, value_invalid | ano | |
field | one of: companyId, firstName, lastName, phone, country, street, city, language, note, email, company, mobile, postalCode, gender, fullName, titleBefore, titleAfter, birthday, newsletterConsent, newsletterConsentAt, registeredAt, null | ano |
ImportSummary
| Pole | Typ | Povinné | Popis |
|---|---|---|---|
id | string | ano | |
name | string | ano | |
status | one of: queued, running, draft, finished, failed | ano | |
kind | one of: csv, shoptet_customers, shoptet_newsletter | ano | |
fileName | string | ano | |
shopId | string | ano | |
mode | one of: upsert, update_only, unsubscribe, remove, blacklist | ano | |
listIds | array of string | ano | |
createdAt | string | ano | |
startedAt | string or null | ano | When the run started (null while queued). |
finishedAt | string or null | ano | |
progress | object | ano | Rows the run has processed so far (it commits batch by batch). |
counts | ImportCounts or null | ano | null until finished. |
listNames | array of string | ne | Names of the chosen lists in their order (SE's column Seznamy; the grid only). |