Přeskočit na obsah
API dokumentace

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á reference je anglicky (stejně jako strojově čitelný dokument OpenAPI). Celou skupinu pro AI agenta načtete z /api/openapi.json?tag=Segments.

Přihlášení: Authorization: Bearer pst_... nebo HTTP Basic (e-mail člena firmy a API klíč).

Operace

MetodaCestaPopis
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ávnění: modul contacts, úroveň read; klíč s přístupem read nebo 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.

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
pagequeryintegernePage number, from 1. default 1, min 1
pageSizequeryintegerneItems per page, 1 to 100. default 25, min 1, max 100
qquerystringneSearch text. max 200 chars
refreshquerystringne
shopquerystringneShop id filter.
sortquerystringneSort fields separated by commas, "-" = descending, at most 3 (e.g. name,-id).
tagquerystringneLabel filter; repeat for more labels.

Odpovědi

  • 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ávnění: modul contacts, úroveň full; klíč s přístupem 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).

Parametry

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

Tělo požadavku (application/json)

PoleTypPovinnéPopis
namestringano
publicNamestringne
shopIdstringano
refreshone of: static, dailyano
definitionSegmentGroupano
signatureHtmlstringne
tagsarray of stringneLabels (Štítky).

Odpovědi

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ávnění: modul contacts, úroveň read; klíč s přístupem read nebo 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).

Parametry

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

Tělo požadavku (application/json)

PoleTypPovinnéPopis
shopIdstringano
definitionSegmentGroupano

Odpovědi

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ávnění: modul contacts, úroveň full; klíč s přístupem full

Parametry

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

Tělo požadavku (application/json): Required by the server: ids.

PoleTypPovinnéPopis
idsarray of stringano
addarray of stringne
removearray of stringne
tagsarray of stringne

Odpovědi

  • 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ávnění: modul contacts, úroveň read; klíč s přístupem read nebo full · Nástroj MCP: get_segment

One segment with its definition tree.

Parametry

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

Odpovědi

Chyby

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

Update a segment

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

Oprávnění: modul contacts, úroveň full; klíč s přístupem full · Nástroj MCP: update_segment

Changes a segment (the shop never changes).

Parametry

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

Tělo požadavku (application/json)

PoleTypPovinnéPopis
namestringne
publicNamestringne
shopIdstringne
refreshone of: static, dailyne
definitionSegmentGroupne
signatureHtmlstringne
tagsarray of stringneLabels (Štítky).

Odpovědi

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ávnění: modul contacts, úroveň full; klíč s přístupem full

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

Parametry

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

Odpovědi

  • 204 No content

Chyby

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

List the members of a segment

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

Oprávnění: modul contacts, úroveň read; klíč s přístupem read nebo 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.

Parametry

NázevKdeTypPovinnéPopis
tenantpathstring (uuid)anoPublic id of the company (tenant), a UUID: GET /api/v3/account-info answers it as data.guid; the app shows it on the API keys page.
segmentpathstringanoId of the segment (string of digits).
engagementquerystringne
pagequeryintegernePage number, from 1. default 1, min 1
pageSizequeryintegerneItems per page, 1 to 100. default 25, min 1, max 100
qquerystringneSearch text (case and diacritics insensitive). max 200 chars
sortquerystringneSort fields separated by commas, "-" = descending, at most 3 (e.g. name,-id).
statequerystringne

Odpovědi

  • 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ávnění: modul contacts, úroveň full; klíč s přístupem 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.

Parametry

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

Tělo požadavku (application/json)

object

Odpovědi

Chyby

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

Convert a segment into a manual list of its mailable contacts

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

Oprávnění: modul contacts, úroveň full; klíč s přístupem 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.

Parametry

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

Tělo požadavku (application/json)

PoleTypPovinnéPopis
namestringano

Odpovědi

Chyby

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

Schémata

ContactListItem

PoleTypPovinnéPopis
idstringano
emailstringano
firstNamestringano
lastNamestringano
statusone of: pending, subscribed, unsubscribed, bounced, complained, customerano
engagementone of: A, B, C, D, E, Nano
excludedbooleananoSE "Vyloučené": long inactive yet mailed often (recomputed weekly with the engagement).
shopIdstring or nullanoMain e-shop (contacts.shop_id), null when unknown.
suppressionReasonone of: invalid, manual, unsubscribed, hard_bounce, complaint, soft_bounce_limit, nullanoSet when the address is on the tenant suppression list.
blacklistedbooleanneOn 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 nullneWhen 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, blacklistedneSmartEmailing's 3-value contact state; older servers leave it out (contactState derives it).
createdAtstringano
extramap of boolean or string or number or nullneValues of the extra columns asked for (ContactQuery.fields): dates as YYYY-MM-DD, times as ISO.

Error

PoleTypPovinnéPopis
errorobjectano
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 stringano
addarray of stringne
removearray of stringne
tagsarray of stringne

SegmentDetail

PoleTypPovinnéPopis
definitionSegmentGroupano
signatureHtmlstringanoAdvanced setting: owner's signature as HTML, sanitized like e-mail content.
idstringano
namestringano
publicNamestringanoAdvanced setting (se-spec 01 §3): name on the unsubscribe page when the segment is used as a sendable list.
shopIdstringanoSegments belong to one shop; only contacts whose main shop it is are evaluated.
refreshone of: static, dailyano
matchednumberanoContacts of the shop that meet the conditions, any status.
mailablenumberanoOf those: subscribed, not suppressed, without weak consent.
computedAtstringano
ruleCountnumberano
tagsarray of stringneLabels (Štítky); absent from older servers.
createdAtstringano
updatedAtstringano

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
namestringano
publicNamestringne
shopIdstringano
refreshone of: static, dailyano
definitionSegmentGroupano
signatureHtmlstringne
tagsarray of stringneLabels (Štítky).

SegmentPreview

PoleTypPovinnéPopis
matchednumberano
mailablenumberano
totalnumberanoAll 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
typecampaignano
operatorone of: received, not_received, opened, not_opened, clicked, not_clickedanoOperator.
campaignIdstring or nullanoCampaign id; null only with received = an e-mail of any campaign.
linkUrlstringneclicked / not_clicked only.
daysstring or nullneLast N days or null.
negatebooleannetrue = 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_fieldano
fieldIdstringanoCustom field id (without cf:).
kindone of: bool, choice, date, multi_choice, number, textanoKind of the field type (see above).
operatorstringanoOperator for the kind.
valuestringneValue (string).
valuesarray of stringneOptions (multi_choice).
negatebooleannetrue = 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
typeengagementano
operatorone of: in, not_inanoOperator.
valuesarray of one of: A, B, C, D, E, NanoLevels. min 1 items
negatebooleannetrue = 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
typefieldano
fieldone of: email, firstName, lastName, city, company, companyId, phone, mobile, street, postalCode, note, country, status, gender, language, source, consentBasis, createdAt, lastOpenAt, lastClickAt, lastSentAt, statusAt, consentAtanoContact 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, sinceanoText: 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.
valuestringanoAlways 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.
negatebooleannetrue = 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_orderano
operatorone of: in_last_days, older_than_days, before, afteranoOperator.
valuestringanoDays "1" to "3650" or a date YYYY-MM-DD.
negatebooleannetrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
shopIdstring or nullneOnly orders of this shop (null = any).
currencystring or nullneOnly 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
typelistano
operatorone of: in, not_in, added_before, added_after, status_is, longer_than_days, shorter_than_daysanoOperator.
listIdstringanoList id.
valuestringnestatus_is: confirmed, unconfirmed, unsubscribed, removed; added_: YYYY-MM-DD; _than_days: days "1" to "3650".
negatebooleannetrue = 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_labelano
operatorone of: inanoOperator.
labelstringanoLabel, 1 to 40.
negatebooleannetrue = 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
typeopensano
operatorone of: eq, gt, lt, gte, lteanoOperator.
valuestringanoCount "0" to "100000".
daysstring or nullneOnly the last N days, "1" to "3650" (null = any time).
negatebooleannetrue = 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_attributeano
operatorone of: isanoOperator.
scopeone of: item, orderneitem (default) or order. default item
attributestringanoitem: productCode, category, brand or any attribute name; order: status, companyId, deliveryCity, deliveryCountry, deliveryZip, deliveryCompany.
valuestringanoExact value, at most 200 characters.
negatebooleannetrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
shopIdstring or nullneOnly orders of this shop (null = any).
currencystring or nullneOnly orders in this currency (CZK or EUR; it must be the currency of shopId when both are set).
daysstring or nullneOnly 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_countano
operatorone of: gte, lte, eqanoOperator.
valuestringanoCount "0" to "100000".
negatebooleannetrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
shopIdstring or nullneOnly orders of this shop (null = any).
currencystring or nullneOnly orders in this currency (CZK or EUR; it must be the currency of shopId when both are set).
daysstring or nullneOnly 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_valueano
operatorone of: gte, lteanoOperator.
amountstringanoAmount, at most 2 decimals, e.g. "1500.50".
negatebooleannetrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
shopIdstring or nullneOnly orders of this shop (null = any).
currencystring or nullanoOnly orders in this currency (CZK or EUR; it must be the currency of shopId when both are set).
daysstring or nullneOnly 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_boughtano
operatorone of: isanoOperator.
valuestringanoPart of the name or the code, at most 200.
negatebooleannetrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
shopIdstring or nullneOnly orders of this shop (null = any).
currencystring or nullneOnly orders in this currency (CZK or EUR; it must be the currency of shopId when both are set).
daysstring or nullneOnly 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
typepurposeano
operatorone of: has, not_hasanoOperator.
purposeIdstringanoPurpose id.
negatebooleannetrue = 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
typesegmentano
operatorone of: in, not_in, added_before, added_afteranoOperator.
segmentIdstringanoSegment id.
negatebooleannetrue = 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_attributeano
attributestringanoAttribute name.
operatorone of: is, starts_with, gt, gte, lt, lteanoOperator.
valuestringanoAt most 200 (a number for gt to lte).
daysstring or nullneOnly the last N days, "1" to "3650" (null = any time).
negatebooleannetrue = 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_visitano
operatorone of: any, is, starts_with, containsanoOperator.
urlstringneNot with any; at most 2 000.
daysstring or nullneOnly the last N days, "1" to "3650" (null = any time).
negatebooleannetrue = the rule must NOT hold (SmartEmailing "Neplatí, že").
json
{
  "type": "web_visit",
  "operator": "contains",
  "url": "/kava/",
  "days": "30"
}

SegmentSummary

PoleTypPovinnéPopis
idstringano
namestringano
publicNamestringanoAdvanced setting (se-spec 01 §3): name on the unsubscribe page when the segment is used as a sendable list.
shopIdstringanoSegments belong to one shop; only contacts whose main shop it is are evaluated.
refreshone of: static, dailyano
matchednumberanoContacts of the shop that meet the conditions, any status.
mailablenumberanoOf those: subscribed, not suppressed, without weak consent.
computedAtstringano
ruleCountnumberano
tagsarray of stringneLabels (Štítky); absent from older servers.
createdAtstringano
updatedAtstringano

SegmentToListResult

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

PoleTypPovinnéPopis
listIdstringano
namestringano
membersnumberano