Preskočiť na obsah
API dokumentácia

Segments

Rule based groups of contacts of one e-shop: an AND / OR tree of conditions, evaluated live (daily) or as a snapshot (static).

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=Segments.

Prihlásenie: Authorization: Bearer pst_... alebo HTTP Basic (e-mail člena firmy a API kľúč).

Operácie

MetódaCestaPopis
GET/api/v1/tenants/{tenant}/segmentsList segments
POST/api/v1/tenants/{tenant}/segmentsCreate a segment
POST/api/v1/tenants/{tenant}/segments/previewCount the contacts of a segment definition (no save)
POST/api/v1/tenants/{tenant}/segments/tagsChange labels of segments
GET/api/v1/tenants/{tenant}/segments/{segment}Get a segment
PATCH/api/v1/tenants/{tenant}/segments/{segment}Update a segment
DELETE/api/v1/tenants/{tenant}/segments/{segment}Delete a segment no campaign, segment or automation names
GET/api/v1/tenants/{tenant}/segments/{segment}/membersList the members of a segment
POST/api/v1/tenants/{tenant}/segments/{segment}/recomputeRecompute a segment now
POST/api/v1/tenants/{tenant}/segments/{segment}/to-listConvert a segment into a manual list of its mailable contacts

List segments

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

Oprávnenie: modul contacts, úroveň read; kľúč s prístupom read alebo full · Nástroj MCP: list_segments

Segments with matched and mailable counts.

Filtry of the grid (routes_grid.py): ?tag= (repeatable), ?idFrom=&idTo=, ?createdFrom=&createdTo=, ?updatedFrom=&updatedTo= (calendar days), ?refresh=static|daily.

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
pagequeryintegerniePage number, from 1. default 1, min 1
pageSizequeryintegernieItems per page, 1 to 100. default 25, min 1, max 100
qquerystringnieSearch text. max 200 chars
refreshquerystringnie
shopquerystringnieShop id filter.
sortquerystringnieSort fields separated by commas, "-" = descending, at most 3 (e.g. name,-id).
tagquerystringnieLabel filter; repeat for more labels.

Odpovede

  • 200 OK: application/json object

Chyby

StavKódHodnoty message
400validationq, refresh, sort, tag
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 segment

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

Oprávnenie: modul contacts, úroveň full; kľúč s prístupom full · Nástroj MCP: create_segment

Creates a segment of one shop from a condition tree {type: group, match: all|any, rules: [...]} (rule types: get_api_reference Segmenty).

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.

Telo požiadavky (application/json)

PoleTypPovinnéPopis
namestringáno
publicNamestringnie
shopIdstringáno
refreshone of: static, dailyáno
definitionSegmentGroupáno
signatureHtmlstringnie
tagsarray of stringnieLabels (Štítky).

Odpovede

Chyby

StavKódHodnoty message
400validationdefinition, refresh, signatureHtml, tags
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
409conflictname
429429 rate_limited: wait Retry-After seconds.

Count the contacts of a segment definition (no save)

POST /api/v1/tenants/{tenant}/segments/preview

Oprávnenie: modul contacts, úroveň read; kľúč s prístupom read alebo full · Nástroj MCP: preview_segment

Counts a condition tree without saving: matched, mailable and total contacts of the shop.

Live count for the editor: {matched, mailable, total}; the root may be empty (all contacts of the shop).

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.

Telo požiadavky (application/json)

PoleTypPovinnéPopis
shopIdstringáno
definitionSegmentGroupáno

Odpovede

Chyby

StavKódHodnoty message
400validationdefinition
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.

Change labels of segments

POST /api/v1/tenants/{tenant}/segments/tags

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

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.

Telo požiadavky (application/json): Required by the server: ids.

PoleTypPovinnéPopis
idsarray of stringáno
addarray of stringnie
removearray of stringnie
tagsarray of stringnie

Odpovede

  • 200 OK: application/json object

Chyby

StavKódHodnoty message
400validationids
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 a segment

GET /api/v1/tenants/{tenant}/segments/{segment}

Oprávnenie: modul contacts, úroveň read; kľúč s prístupom read alebo full · Nástroj MCP: get_segment

One segment with its definition tree.

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
segmentpathstringánoId of the segment (string of digits).

Odpovede

Chyby

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

Update a segment

PATCH /api/v1/tenants/{tenant}/segments/{segment}

Oprávnenie: modul contacts, úroveň full; kľúč s prístupom full · Nástroj MCP: update_segment

Changes a segment (the shop never changes).

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
segmentpathstringánoId of the segment (string of digits).

Telo požiadavky (application/json)

PoleTypPovinnéPopis
namestringnie
publicNamestringnie
shopIdstringnie
refreshone of: static, dailynie
definitionSegmentGroupnie
signatureHtmlstringnie
tagsarray of stringnieLabels (Štítky).

Odpovede

Chyby

StavKódHodnoty message
400validationdefinition, refresh, shop, signatureHtml, tags
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
409conflictname
429429 rate_limited: wait Retry-After seconds.

Delete a segment no campaign, segment or automation names

DELETE /api/v1/tenants/{tenant}/segments/{segment}

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

SE's Smazat segment: 204; 409 'conflict' with the message campaign, segment or automation while something names it.

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
segmentpathstringánoId of the segment (string of digits).

Odpovede

  • 204 No content

Chyby

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

List the members of a segment

GET /api/v1/tenants/{tenant}/segments/{segment}/members

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

SE's detail of a segment (SG-07): its members as the contacts grid (?q=, ?state=, ?engagement=, ?sort=, paging; rows as GET /contacts): the stored snapshot of a static segment, the live definition otherwise.

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
segmentpathstringánoId of the segment (string of digits).
engagementquerystringnie
pagequeryintegerniePage number, from 1. default 1, min 1
pageSizequeryintegernieItems per page, 1 to 100. default 25, min 1, max 100
qquerystringnieSearch text (case and diacritics insensitive). max 200 chars
sortquerystringnieSort fields separated by commas, "-" = descending, at most 3 (e.g. name,-id).
statequerystringnie

Odpovede

  • 200 OK: application/json object

Chyby

StavKódHodnoty message
400validationq
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.

Recompute a segment now

POST /api/v1/tenants/{tenant}/segments/{segment}/recompute

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

SE's Přepočítat segment: a static segment takes a new snapshot of its members now, a daily one is live anyway (computedAt moves); the detail.

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
segmentpathstringánoId of the segment (string of digits).

Telo požiadavky (application/json)

object

Odpovede

Chyby

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

Convert a segment into a manual list of its mailable contacts

POST /api/v1/tenants/{tenant}/segments/{segment}/to-list

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

SE's Převést na seznam: body {name}; 201 {listId, name, members} with a new manual list of the segment's mailable contacts now (bulk: no automation starts); 409 'conflict' / 'name' for a taken list name.

Parametre

NázovKdeTypPovinnéPopis
tenantpathstring (uuid)ánoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
segmentpathstringánoId of the segment (string of digits).

Telo požiadavky (application/json)

PoleTypPovinnéPopis
namestringáno

Odpovede

Chyby

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

Schémy

ContactListItem

PoleTypPovinnéPopis
idstringáno
emailstringáno
firstNamestringáno
lastNamestringáno
statusone of: pending, subscribed, unsubscribed, bounced, complained, customeráno
engagementone of: A, B, C, D, E, Náno
excludedbooleanánoSE "Vyloučené": long inactive yet mailed often (recomputed weekly with the engagement).
shopIdstring or nullánoMain e-shop (contacts.shop_id), null when unknown.
suppressionReasonone of: invalid, manual, unsubscribed, hard_bounce, complaint, soft_bounce_limit, nullánoSet when the address is on the tenant suppression list.
blacklistedbooleannieOn the tenant's blacklist ("Na blacklistu"): a manual entry, or an entry of SmartEmailing's blacklist that keeps its own reason (migration 0180). Older servers leave it out: then suppressionReason 'manual' decides.
blacklistedAtstring or nullnieWhen the address went on the blacklist (the suppression's time), null when it is not on it ("Přidán na blacklist").
stateone of: active, bounced, blacklistednieSmartEmailing's 3-value contact state; older servers leave it out (contactState derives it).
createdAtstringáno
extramap of boolean or string or number or nullnieValues of the extra columns asked for (ContactQuery.fields): dates as YYYY-MM-DD, times as ISO.

Error

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

GridTagsInput

Bulk label change: add and remove, or tags = the new labels of every row.

PoleTypPovinnéPopis
idsarray of stringáno
addarray of stringnie
removearray of stringnie
tagsarray of stringnie

SegmentDetail

PoleTypPovinnéPopis
definitionSegmentGroupáno
signatureHtmlstringánoAdvanced setting: owner's signature as HTML, sanitized like e-mail content.
idstringáno
namestringáno
publicNamestringánoAdvanced setting (se-spec 01 §3): name on the unsubscribe page when the segment is used as a sendable list.
shopIdstringánoSegments belong to one shop; only contacts whose main shop it is are evaluated.
refreshone of: static, dailyáno
matchednumberánoContacts of the shop that meet the conditions, any status.
mailablenumberánoOf those: subscribed, not suppressed, without weak consent.
computedAtstringáno
ruleCountnumberáno
tagsarray of stringnieLabels (Štítky); absent from older servers.
createdAtstringáno
updatedAtstringáno

SegmentGroup

A segment definition: AND (all) / OR (any) groups nested at most 8 levels, at most 50 rules. An empty root matches every contact of the shop (a saved segment needs at least one rule); an empty subgroup is an error. Errors: 400 validation "definition.<path>.<field>" (path = indices from the root).

json
{
  "type": "group",
  "match": "any",
  "rules": [
    {
      "type": "order_value",
      "operator": "gte",
      "amount": "2000",
      "currency": "CZK",
      "shopId": "1",
      "days": "365"
    },
    {
      "type": "group",
      "match": "all",
      "rules": [
        {
          "type": "list",
          "operator": "in",
          "listId": "101"
        },
        {
          "type": "field",
          "field": "lastOpenAt",
          "operator": "in_last_days",
          "value": "60"
        }
      ]
    }
  ]
}

SegmentInput

PoleTypPovinnéPopis
namestringáno
publicNamestringnie
shopIdstringáno
refreshone of: static, dailyáno
definitionSegmentGroupáno
signatureHtmlstringnie
tagsarray of stringnieLabels (Štítky).

SegmentPreview

PoleTypPovinnéPopis
matchednumberáno
mailablenumberáno
totalnumberánoAll contacts of the shop.

SegmentRule_campaign

Delivered / opened / clicked a campaign (not_* also matches contacts that never got it); linkUrl narrows clicks to one link.

PoleTypPovinnéPopis
typecampaignáno
operatorone of: received, not_received, opened, not_opened, clicked, not_clickedánoOperator.
campaignIdstring or nullánoCampaign id; null only with received = an e-mail of any campaign.
linkUrlstringnieclicked / not_clicked only.
daysstring or nullnieLast N days or null.
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
json
{
  "type": "campaign",
  "operator": "opened",
  "campaignId": "121",
  "days": null
}

SegmentRule_custom_field

A custom field. kind must match the field type: text and textarea -> text, number -> number, date -> date, checkbox -> bool, select and radio -> choice, multi_checkbox -> multi_choice (400 definition.<path>.kind otherwise). Operators: text like the text fields, number gte/lte/eq/is_empty/is_not_empty, date like the date fields, bool is_true/is_false, choice is/is_not, multi_choice contains_any/contains_all/not_contains_any.

PoleTypPovinnéPopis
typecustom_fieldáno
fieldIdstringánoCustom field id (without cf:).
kindone of: bool, choice, date, multi_choice, number, textánoKind of the field type (see above).
operatorstringánoOperator for the kind.
valuestringnieValue (string).
valuesarray of stringnieOptions (multi_choice).
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
json
{
  "type": "custom_field",
  "fieldId": "62",
  "kind": "text",
  "operator": "equals",
  "value": "VIP"
}

SegmentRule_engagement

Engagement level A (best) to E, N = new.

PoleTypPovinnéPopis
typeengagementáno
operatorone of: in, not_inánoOperator.
valuesarray of one of: A, B, C, D, E, NánoLevels. min 1 items
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
json
{
  "type": "engagement",
  "operator": "in",
  "values": [
    "A",
    "B"
  ]
}

SegmentRule_field

A contact field compared with a value. Text operators ignore case and diacritics; date operators count calendar days of the company. Text fields: email, firstName, lastName, city, company, companyId, phone, mobile, street, postalCode, note, country. Enum fields: status (pending/subscribed/unsubscribed/bounced/complained/customer), gender (f/m), language (cs/sk), source (erp_order/signup_form/import/api/manual/shoptet/smartemailing), consentBasis (soft_opt_in_customer/double_opt_in/imported/none). Date fields: createdAt, lastOpenAt, lastClickAt, lastSentAt, statusAt, consentAt.

PoleTypPovinnéPopis
typefieldáno
fieldone of: email, firstName, lastName, city, company, companyId, phone, mobile, street, postalCode, note, country, status, gender, language, source, consentBasis, createdAt, lastOpenAt, lastClickAt, lastSentAt, statusAt, consentAtánoContact field.
operatorone of: contains, not_contains, equals, not_equals, starts_with, ends_with, is_empty, is_not_empty, is, is_not, in_last_days, not_in_last_days, before, after, until, sinceánoText: contains, not_contains, equals, not_equals, starts_with, ends_with, is_empty, is_not_empty; enum: is, is_not; date: in_last_days, not_in_last_days, before, after, until, since, is_empty, is_not_empty.
valuestringánoAlways a string: the text, the enum value, a number of days ("30") for in_last_days / not_in_last_days, or a date YYYY-MM-DD for before / after; "" for is_empty / is_not_empty.
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
json
{
  "type": "field",
  "field": "lastOpenAt",
  "operator": "in_last_days",
  "value": "60"
}

SegmentRule_last_order

The last completed order: within / older than N days, or before / after a date.

PoleTypPovinnéPopis
typelast_orderáno
operatorone of: in_last_days, older_than_days, before, afteránoOperator.
valuestringánoDays "1" to "3650" or a date YYYY-MM-DD.
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
shopIdstring or nullnieOnly orders of this shop (null = any).
currencystring or nullnieOnly orders in this currency (CZK or EUR; it must be the currency of shopId when both are set).
json
{
  "type": "last_order",
  "operator": "older_than_days",
  "value": "180"
}

SegmentRule_list

Membership in a list. in / not_in = confirmed or unconfirmed member; status_is compares the exact state; added_before / added_after compare the day the contact was added; longer_than_days / shorter_than_days: in the list longer / shorter than N days.

PoleTypPovinnéPopis
typelistáno
operatorone of: in, not_in, added_before, added_after, status_is, longer_than_days, shorter_than_daysánoOperator.
listIdstringánoList id.
valuestringniestatus_is: confirmed, unconfirmed, unsubscribed, removed; added_: YYYY-MM-DD; _than_days: days "1" to "3650".
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
json
{
  "type": "list",
  "operator": "in",
  "listId": "101"
}

SegmentRule_list_label

Confirmed or unconfirmed member of any list with this label.

PoleTypPovinnéPopis
typelist_labeláno
operatorone of: inánoOperator.
labelstringánoLabel, 1 to 40.
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
json
{
  "type": "list_label",
  "operator": "in",
  "label": "vip"
}

SegmentRule_opens

Number of the contact's e-mails (campaigns and automations) with an open.

PoleTypPovinnéPopis
typeopensáno
operatorone of: eq, gt, lt, gte, lteánoOperator.
valuestringánoCount "0" to "100000".
daysstring or nullnieOnly the last N days, "1" to "3650" (null = any time).
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
json
{
  "type": "opens",
  "operator": "gte",
  "value": "3",
  "days": "90"
}

SegmentRule_order_attribute

A completed order has an item whose product code, category, brand or another item attribute (as stored on the order item) equals the value; with scope order an attribute of the order itself.

PoleTypPovinnéPopis
typeorder_attributeáno
operatorone of: isánoOperator.
scopeone of: item, ordernieitem (default) or order. default item
attributestringánoitem: productCode, category, brand or any attribute name; order: status, companyId, deliveryCity, deliveryCountry, deliveryZip, deliveryCompany.
valuestringánoExact value, at most 200 characters.
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
shopIdstring or nullnieOnly orders of this shop (null = any).
currencystring or nullnieOnly orders in this currency (CZK or EUR; it must be the currency of shopId when both are set).
daysstring or nullnieOnly the last N days, "1" to "3650" (null = any time).
json
{
  "type": "order_attribute",
  "operator": "is",
  "attribute": "brand",
  "value": "Example"
}

SegmentRule_order_count

Number of completed orders.

PoleTypPovinnéPopis
typeorder_countáno
operatorone of: gte, lte, eqánoOperator.
valuestringánoCount "0" to "100000".
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
shopIdstring or nullnieOnly orders of this shop (null = any).
currencystring or nullnieOnly orders in this currency (CZK or EUR; it must be the currency of shopId when both are set).
daysstring or nullnieOnly the last N days, "1" to "3650" (null = any time).
json
{
  "type": "order_count",
  "operator": "gte",
  "value": "2",
  "shopId": null,
  "currency": null,
  "days": "365"
}

SegmentRule_order_value

Sum of completed orders with VAT in one currency (CZK and EUR are never added up).

PoleTypPovinnéPopis
typeorder_valueáno
operatorone of: gte, lteánoOperator.
amountstringánoAmount, at most 2 decimals, e.g. "1500.50".
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
shopIdstring or nullnieOnly orders of this shop (null = any).
currencystring or nullánoOnly orders in this currency (CZK or EUR; it must be the currency of shopId when both are set).
daysstring or nullnieOnly the last N days, "1" to "3650" (null = any time).
json
{
  "type": "order_value",
  "operator": "gte",
  "amount": "2000",
  "currency": "CZK",
  "shopId": "1",
  "days": "365"
}

SegmentRule_product_bought

A completed order has an item whose name contains the text or whose product code equals it (case and diacritics ignored).

PoleTypPovinnéPopis
typeproduct_boughtáno
operatorone of: isánoOperator.
valuestringánoPart of the name or the code, at most 200.
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
shopIdstring or nullnieOnly orders of this shop (null = any).
currencystring or nullnieOnly orders in this currency (CZK or EUR; it must be the currency of shopId when both are set).
daysstring or nullnieOnly the last N days, "1" to "3650" (null = any time).
json
{
  "type": "product_bought",
  "operator": "is",
  "value": "Espresso",
  "days": "30"
}

SegmentRule_purpose

A valid (not withdrawn, within its validity) consent with a purpose of processing.

PoleTypPovinnéPopis
typepurposeáno
operatorone of: has, not_hasánoOperator.
purposeIdstringánoPurpose id.
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
json
{
  "type": "purpose",
  "operator": "has",
  "purposeId": "51"
}

SegmentRule_segment

Member of another segment of the same shop (never itself; chains at most 5 deep, no cycles).

PoleTypPovinnéPopis
typesegmentáno
operatorone of: in, not_in, added_before, added_afteránoOperator.
segmentIdstringánoSegment id.
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
json
{
  "type": "segment",
  "operator": "not_in",
  "segmentId": "91"
}

SegmentRule_web_attribute

A page visit whose attribute matches: visitType = the page type, other names = the visit's own attributes; gt to lte compare numbers.

PoleTypPovinnéPopis
typeweb_attributeáno
attributestringánoAttribute name.
operatorone of: is, starts_with, gt, gte, lt, lteánoOperator.
valuestringánoAt most 200 (a number for gt to lte).
daysstring or nullnieOnly the last N days, "1" to "3650" (null = any time).
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
json
{
  "type": "web_attribute",
  "attribute": "visitType",
  "operator": "is",
  "value": "product"
}

SegmentRule_web_visit

A page visit recorded by the shop's script or the API; any = any page.

PoleTypPovinnéPopis
typeweb_visitáno
operatorone of: any, is, starts_with, containsánoOperator.
urlstringnieNot with any; at most 2 000.
daysstring or nullnieOnly the last N days, "1" to "3650" (null = any time).
negatebooleannietrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
json
{
  "type": "web_visit",
  "operator": "contains",
  "url": "/kava/",
  "days": "30"
}

SegmentSummary

PoleTypPovinnéPopis
idstringáno
namestringáno
publicNamestringánoAdvanced setting (se-spec 01 §3): name on the unsubscribe page when the segment is used as a sendable list.
shopIdstringánoSegments belong to one shop; only contacts whose main shop it is are evaluated.
refreshone of: static, dailyáno
matchednumberánoContacts of the shop that meet the conditions, any status.
mailablenumberánoOf those: subscribed, not suppressed, without weak consent.
computedAtstringáno
ruleCountnumberáno
tagsarray of stringnieLabels (Štítky); absent from older servers.
createdAtstringáno
updatedAtstringáno

SegmentToListResult

POST /segments/{id}/to-list: the new list and how many contacts it got.

PoleTypPovinnéPopis
listIdstringáno
namestringáno
membersnumberáno