Customer Groups

Create manual or rule-based customer groups and manage their memberships through the Store API.

Customer Groups require customer scopes: reads use read_customers and writes use write_customers. Manual groups have members you add or remove. Automatic groups select members from their saved rules. A group's type cannot change after creation.

Spending and order-count thresholds#

For lifetime_spend, orders_count and rto_count, use gte or lte with a non-negative decimal string in value and omit value_id. Read GET /customer-groups/limits before constructing inputs: each numeric operator includes decimal_places and max_value. Spending operators also include currency with the store base currency code, symbol, and display precision. Use decimal_places for accepted amount precision; currency display precision can differ.

Field

Accepted value

Meaning

lifetime_spend

Use the store base currency, no grouping or symbol, at most 12 integral digits, and the currency's amount precision. For example, INR accepts 100.01 but rejects 100.001; JPY accepts 100; KWD accepts 100.001. Extra trailing zeroes that do not change the amount are accepted. Do not send scientific notation.

The customer's total recorded paid value less refunds, in the store base currency.

orders_count

A whole-number string from 0 through 2147483647, with no decimal point.

Orders recorded as paid. Refunding an order does not remove it from this count. For retained purchases that exclude fully refunded orders, use the purchase rules below.

rto_count

A whole-number string from 0 through 2147483647, with no decimal point.

Orders of the customer that came back undelivered (RTO), cash on delivery or prepaid, each counted once. Pair it with a cash-on-delivery rule on the group to stop cash on delivery for these customers.

Create, rule updates, and preview use the same validation. Invalid spending precision or bounds return HTTP 400 GROUP_RULE_MONEY_INVALID; invalid order counts return GROUP_RULE_ORDER_COUNT_INVALID. Malformed numeric values can return GROUP_RULE_NUMBER_INVALID, and unrelated references return GROUP_RULE_VALUE_SHAPE_INVALID. Saved rule values remain decimal strings; General display preferences do not change their meaning. Existing saved thresholds are not rounded automatically. Correct an invalid older threshold before resubmitting its rules.

Use purchase rules#

Automatic Customer Groups can use last_purchase_at and purchased_product rules. Before authoring or previewing one, call GET /customer-groups/purchase-rule-readiness. This read endpoint requires read_customers; the credential determines the store.

GET /customer-groups/purchase-rule-readiness json
{
  "success": true,
  "data": {
    "available": true,
    "status": "ready"
  }
}

While purchase history is being prepared, the endpoint returns available: false, status: refreshing, and reason: CUSTOMER_PURCHASE_FACTS_REFRESHING. Requests that create, change, preview, or evaluate purchase rules then return HTTP 409 with the same error code. Metadata-only updates, such as changing a group name without submitting rules, remain available. Retry after readiness becomes ready; do not interpret refreshing as no matching customers.

Field

Operators

Value and behavior

last_purchase_at

within_last, before, after, is_null, is_not_null

For within_last, use 1d through 365d, without signs or leading zeroes; each day is a rolling 24-hour period. For before and after, use a valid YYYY-MM-DD date in years 0001–9999. Dates use UTC calendar boundaries and exclude the selected day; after starts at the next UTC midnight. Omit value_id for every purchase-date rule. Null operators also require value to be omitted or null.

purchased_product

includes, excludes

Put the positive parent product ID in value as a canonical decimal string from 1 through 9223372036854775807, without whitespace, signs, or leading zeroes, and omit value_id. A parent product matches retained eligible quantity from any variant. Do not send a variant, category, or collection ID.

Purchase conditions count paid and cash-on-delivery orders with item quantity remaining after refunds. Cancelled, test, unpaid non-COD, and fully refunded orders do not count. A full monetary refund excludes the order even when no individual item quantities were marked as refunded. A fully refunded line no longer matches purchased_product; a partially refunded line still matches while eligible quantity remains. last_purchase_at is the latest order creation time among qualifying purchases, so an order can continue to set the date when another eligible item remains after refunds. Once readiness is complete, an eligible customer with no retained purchase matches last_purchase_at is_null and purchased_product excludes.

An invalid, deleted, or other-store parent product returns HTTP 400 with GROUP_RULE_PRODUCT_INVALID. Invalid dates or day ranges return GROUP_RULE_DATE_INVALID or GROUP_RULE_DURATION_INVALID; missing required values return GROUP_RULE_VALUE_REQUIRED. Extra values on an empty check or a value_id on a purchase-date rule return GROUP_RULE_VALUE_SHAPE_INVALID. Purchase-rule readiness only states whether these rules can be evaluated; it does not grant marketing consent.

Synchronize group membership#

Use the membership snapshot and change feed together when your integration needs a durable local copy of a Customer Group's membership. Both endpoints require read_customers. The credential determines the store, and each item contains only a customer UUID. The feed does not include customer profiles, contact details, or marketing-consent state; treat customer UUIDs as customer data and protect them accordingly.

Task

Endpoint

First-page query

Read a complete starting membership

GET /customer-groups/{id}/membership-snapshot

Optional limit from 1 to 250; default 100.

Replay later membership changes

GET /customer-groups/{id}/membership-changes

Optional non-negative after_revision and optional limit from 1 to 250; defaults are 0 and 100.

Take the initial snapshot#

GET /customer-groups/58ee109f-64f7-4a51-8d48-b0ca62c4236a/membership-snapshot?limit=1 json
{
  "success": true,
  "data": {
    "group_id": "58ee109f-64f7-4a51-8d48-b0ca62c4236a",
    "revision": 42,
    "ready": true,
    "last_evaluated_at": "2026-09-12T10:00:00-04:00",
    "customer_ids": ["87964951-2890-4b72-bd8f-78625a76c737"],
    "has_more": true,
    "next_cursor": "opaque"
  }
}

Always take this initial snapshot, even if you plan to request changes from after_revision=0: revision 0 can already have members but has no change item for each preexisting membership. Keep the returned revision. If has_more is true, request the next page with cursor as the only query parameter. The cursor pins every snapshot page to the same revision and page limit. If membership changes while you paginate, the API returns CUSTOMER_GROUP_MEMBERSHIP_RESTART_REQUIRED; discard the partial snapshot and restart without a cursor. An automatic group that is still refreshing returns CUSTOMER_GROUP_MEMBERSHIP_REFRESHING and no customer IDs or cursor.

Replay changes after the snapshot#

GET /customer-groups/58ee109f-64f7-4a51-8d48-b0ca62c4236a/membership-changes?after_revision=42&limit=100 json
{
  "success": true,
  "data": {
    "group_id": "58ee109f-64f7-4a51-8d48-b0ca62c4236a",
    "current_revision": 44,
    "history_floor_revision": 12,
    "through_revision": 44,
    "group_deleted": false,
    "changes": [
      {"revision": 43, "operation": "added", "customer_id": "28f97875-549a-4ec3-a074-51b159411f99"},
      {"revision": 44, "operation": "removed", "customer_id": "87964951-2890-4b72-bd8f-78625a76c737"}
    ],
    "revisions": [
      {"revision": 43, "change_kind": "members_changed", "added_count": 1, "removed_count": 0, "recorded_at": "2026-09-12T10:05:00-04:00"},
      {"revision": 44, "change_kind": "members_changed", "added_count": 0, "removed_count": 1, "recorded_at": "2026-09-12T10:06:00-04:00"}
    ],
    "has_more": false
  }
}

Apply changes in the returned order: revision ascending, then operation in the fixed order added, removed, group_deleted, then customer UUID. A page contains at most limit change items, including a group_deleted marker. revisions supplies counts and timestamps for exactly the revisions touched by that page; counts can cover items split across more than one page. Persist each operation idempotently. For a page with has_more, checkpoint next_cursor only after the complete page is durable. For the final page, checkpoint through_revision only after the complete traversal is durable. Pagination is pinned to through_revision, so changes committed later do not enter the traversal. Begin the next traversal with after_revision equal to that checkpointed through_revision.

A removed operation means that the customer left this group. It does not mean that the customer withdrew marketing consent, and an added operation does not grant consent. Read and process marketing consent through the customer contract separately.

Promotional campaign control groups are configured by staff in Store Admin or the mobile app and are not Store API resources. An integration can synchronize a Customer Group with these endpoints and run its own authorized experiment, but it must enforce destination consent, suppression, assignment and deletion rules itself. The membership feed cannot launch a Tringify campaign or place a customer into a Tringify campaign's message or control arm.

Cursors, retention, and deletion#

Cursors are opaque, bound to the credential's store, group, endpoint, page limit, and captured revision, and expire no later than 24 hours after the first page was issued. Continuation requests accept only cursor; changing limit or after_revision requires a new first page. Store cursors exactly as returned and never inspect or modify them.

Change history is retained for at least 30 days. history_floor_revision is the highest revision already removed; complete replay is available only when after_revision is at or above that floor. CUSTOMER_GROUP_MEMBERSHIP_CURSOR_EXPIRED means the cursor's 24-hour lifetime ended or required change history was removed; take a new snapshot instead of treating the result as no changes. The change feed remains readable after group deletion and ends with a group_deleted operation without a customer_id. After that marker is durable, discard the obsolete local membership mirror. Snapshot requests for a deleted group return CUSTOMER_GROUP_MEMBERSHIP_DELETED.

HTTP

Error code

Recovery

400

CUSTOMER_GROUP_MEMBERSHIP_CURSOR_INVALID

Start a new request with valid first-page parameters; do not reuse the cursor for another store, group, or endpoint.

404

CUSTOMER_GROUP_NOT_FOUND

Verify the group belongs to the credential's store.

409

CUSTOMER_GROUP_MEMBERSHIP_REFRESHING

Retry the first snapshot after automatic evaluation completes.

409

CUSTOMER_GROUP_MEMBERSHIP_RESTART_REQUIRED

Discard all partial snapshot pages and begin the snapshot again.

410

CUSTOMER_GROUP_MEMBERSHIP_CURSOR_EXPIRED

Take a new snapshot, then resume replay from that snapshot revision.

410

CUSTOMER_GROUP_MEMBERSHIP_DELETED

Stop snapshot synchronization; use the change feed to observe deletion when retained history permits.

Receive membership webhooks#

A merchant can connect a saved Customer Group to a webhook endpoint. The endpoint receives customer_group_membership.snapshot while a complete membership is synchronized, then customer_group_membership.changes for later revisions. These deliveries use the standard webhook JSON envelope and request signature described in Webhook events. Verify the signature against the raw request body, deduplicate by envelope event_id, and return a successful response only after durably accepting the batch.

Process batches by subscription_id, generation_number, and batch_sequence. generation is the opaque UUID for one synchronization epoch. generation_number increases when a fresh synchronization starts, and batch_sequence increases within that generation. HTTP requests can complete out of order. Stage a later sequence until earlier sequences in that generation are durable. When a larger generation number appears, discard partial work from older generations and build the replacement membership from the new snapshot.

customer_group_membership.snapshot data json
{
  "subscription_id": "6cb6ffb3-2d41-49cb-bac6-e3229c499cd3",
  "group_id": "bd74fa4d-13c3-4ae8-90ef-c4bed6bc6518",
  "generation": "c010b2a7-dd8b-4b24-8a03-9201becafbdd",
  "generation_number": 2,
  "batch_sequence": 1,
  "final": true,
  "revision": 18,
  "customer_ids": [
    "014f36c2-2469-4cc5-a105-e785d7605416",
    "bf655bea-c683-43e2-8792-16e4411d593d"
  ]
}

Collect every snapshot batch for one generation and promote it as the current membership only after all sequences through the batch marked final: true are durable. An empty final snapshot is a valid empty group. final closes that snapshot or change-page sequence; it does not close the connection.

customer_group_membership.changes data json
{
  "subscription_id": "6cb6ffb3-2d41-49cb-bac6-e3229c499cd3",
  "group_id": "bd74fa4d-13c3-4ae8-90ef-c4bed6bc6518",
  "generation": "c010b2a7-dd8b-4b24-8a03-9201becafbdd",
  "generation_number": 2,
  "batch_sequence": 2,
  "final": true,
  "from_revision": 18,
  "through_revision": 20,
  "changes": [
    {"revision": 19, "operation": "added", "customer_id": "8a4d941f-5541-4f54-9a71-29c4dc063987"},
    {"revision": 20, "operation": "removed", "customer_id": "014f36c2-2469-4cc5-a105-e785d7605416"}
  ],
  "revisions": [
    {"revision": 19, "change_kind": "members_changed", "added_count": 1, "removed_count": 0, "recorded_at": "2026-09-12T09:30:00-04:00"},
    {"revision": 20, "change_kind": "members_changed", "added_count": 0, "removed_count": 1, "recorded_at": "2026-09-12T09:31:00-04:00"}
  ],
  "group_deleted": false
}

Apply changes in their supplied order and make each revision idempotent. added inserts a customer UUID and removed removes it. revisions describes the source revisions represented by the batch and can include a revision with no item changes. Each revision's recorded_at is RFC 3339 in the store's timezone with its offset, as everywhere else in webhooks. Use through_revision as the durable source checkpoint only after the complete batch is accepted. A checkpoint shown by Tringify means the batch was queued; it does not prove that your endpoint received it.

When group_deleted is true, the changes include a terminal group_deleted operation without customer_id. Apply all earlier operations in the batch before removing the local group. Delivery is at least once, so retries can repeat the same event_id. Pausing and reconnecting begins a new generation with sequence 1 and a fresh snapshot. Removing the connection deletes its queued and historical deliveries, although a request already in flight can complete.

Endpoints#

Customer Group limits

GET read_customers

Get Customer Group limits.

Returns field, list, rule, membership, and store limits enforced by Customer Group endpoints. group_type_options, match_type_options and customer_status_options list the group types, rule match types and member statuses as value with a label worded by the API. rule_fields lists each field rules can test with its label, and its operators, each with a label and, for a fixed set of values, options (value and label), all worded by the API.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the read_customers scope.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The request has a query parameter; this endpoint takes none.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

Purchase rule readiness

GET read_customers

Check whether purchase rules can be used.

Reports whether the store's purchase history is ready for last_purchase_at and purchased_product rules. While it is refreshing, available is false, status is refreshing and reason is CUSTOMER_PURCHASE_FACTS_REFRESHING; creating, updating or previewing a group with purchase rules returns that code with 409 until status is ready. A refresh starts automatically when needed.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the read_customers scope.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The request has a query parameter; this endpoint takes none.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

List Customer Groups

GET read_customers

List Customer Groups for the store.

Returns a paginated, searchable, sortable list of manual and automatic groups. Pass exclude_customer_id to leave out groups that customer already belongs to, for example with group_type=manual to list groups a customer can be added to; totals and pages reflect the filter. Each group carries type_display, its type worded by the API.

Query parameters

Name Type Description
page integer

Page number.

Example: 1
limit integer

Page size.

Example: 50
search string

Search by name or slug.

Example: vip
group_type string

Filter by manual or automatic.

Example: automatic
exclude_customer_id string

Customer UUID. Leaves out groups this customer already belongs to.

Example: f37a970d-5f56-4ca8-9d4d-4ea10190f8a5
sort_by string

Sort by name (default), member_count, created_at or updated_at.

Allowed values
namemember_countcreated_atupdated_at
Example: name
sort_direction string

Sort direction: asc or desc.

Allowed values
ascdesc
Example: asc

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the read_customers scope.

  • 400 CUSTOMER_GROUP_LIST_INVALID_PAGE

    Page must be a positive integer.

  • 400 CUSTOMER_GROUP_LIST_INVALID_LIMIT

    Limit must be a positive integer up to list_max_limit from the limits endpoint.

  • 400 CUSTOMER_GROUP_LIST_INVALID_SORT_BY

    Sort field is not supported for this list.

  • 400 CUSTOMER_GROUP_LIST_INVALID_SORT_DIRECTION

    Sort direction must be asc or desc.

  • 400 CUSTOMER_GROUP_SEARCH_TOO_LONG

    Search is longer than search_max_length from the limits endpoint. Search matches name or slug.

  • 400 CUSTOMER_GROUP_TYPE_INVALID

    group_type must be manual or automatic.

  • 400 INVALID_INPUT

    exclude_customer_id is not a valid UUID.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The query string has a parameter this request does not accept. The message and error.details.allowed_parameters list the ones it does.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

Get a Customer Group

GET read_customers

Get one Customer Group.

Returns the group, its rules, and membership freshness when it belongs to the token's store. type_display words the group type. membership.ready is false while membership needs refreshing. within_last uses rolling 24-hour days; date boundaries and birthday rules use UTC. birthday_within includes today through the selected number of days ahead; February 29 maps to February 28 in non-leap years.

Path parameters

Name Type Description
id required string

Customer Group UUID.

Example: 8eb31980-7f67-453f-bf13-873b62a47b68

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the read_customers scope.

  • 400 CUSTOMER_GROUP_ID_INVALID

    Customer Group id is not a valid UUID.

  • 404 CUSTOMER_GROUP_NOT_FOUND

    Customer Group does not exist in this store.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The request has a query parameter; this endpoint takes none.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

Create a Customer Group

POST write_customers

Create a Customer Group.

Creates a manual group or an automatic group whose members are selected by its rules. Activity rules (last_visit_at, visits_30_days, viewed_product, viewed_collection, viewed_category, viewed_not_bought, carted_not_bought) test what customers did on the storefront while signed in, recorded only with their analytics consent, as returned by GET /customers/{id}/activity. visits_30_days, viewed_product, viewed_collection, viewed_category, viewed_not_bought and carted_not_bought look at the rule's last window_days days (1 to 30); viewed_collection and viewed_category match a customer who viewed any product that is in the collection, or assigned to the category, now; a product counts as bought once the customer buys it after viewing it or adding it to the cart. Groups with activity rules are refreshed every few minutes.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
name required string

Group name.

Example: VIP customers
slug string

Group slug. Omit on create to generate it from the name.

Example: vip-customers
description string

Merchant description.

Example: Customers eligible for VIP benefits.
type string

Group type: manual or automatic. Type cannot change after creation.

Example: automatic
match_type string

Whether all or any rules must match.

Example: all
rules array<object>

Automatic rules shaped as {field, op, value, value_id, window_days}.

Example: [{"field":"orders_count","op":"gte","value":"5"}]

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the write_customers scope.

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON or has an unknown field.

  • 400 CUSTOMER_GROUP_NAME_REQUIRED

    Name is empty after trimming.

  • 400 CUSTOMER_GROUP_NAME_TOO_LONG

    Name is longer than name_max_length from the limits endpoint.

  • 400 CUSTOMER_GROUP_DESCRIPTION_TOO_LONG

    Description is longer than desc_max_length from the limits endpoint.

  • 400 CUSTOMER_SLUG_INVALID

    Slug may only use lowercase letters, numbers and hyphens.

  • 400 CUSTOMER_GROUP_RULES_MANUAL

    Rules were sent for a manual group. Set type to automatic to use rules; a group without a type is manual.

  • 400 CUSTOMER_GROUP_TYPE_INVALID

    type must be manual or automatic.

  • 400 CUSTOMER_GROUPS_LIMIT

    The store already has max_groups_per_store groups.

  • 409 CUSTOMER_GROUP_NAME_DUPLICATE

    Another group in this store has this name. error.details.existing_id is that group's id.

  • 409 CUSTOMER_GROUP_SLUG_DUPLICATE

    Another group in this store has this slug. error.details.existing_id is that group's id.

  • 400 GROUP_RULE_MATCH_TYPE_INVALID

    match_type must be all or any.

  • 400 GROUP_RULE_CONDITIONS_REQUIRED

    An automatic group needs at least one condition.

  • 400 GROUP_RULE_CONDITIONS_LIMIT

    More conditions than max_conditions from the limits endpoint.

  • 400 GROUP_RULE_FIELD_INVALID

    A condition uses a field that is not in rule_fields.

  • 400 GROUP_RULE_OPERATOR_INVALID

    A condition uses an operator the field does not support.

  • 400 GROUP_RULE_VALUE_REQUIRED

    A condition is missing the value its operator requires.

  • 400 GROUP_RULE_VALUE_SHAPE_INVALID

    A condition sends a value or value_id its operator does not accept.

  • 400 GROUP_RULE_STATUS_INVALID

    A status condition value is not active or disabled.

  • 400 GROUP_RULE_BOOL_INVALID

    A yes/no condition value is not true or false.

  • 400 GROUP_RULE_TAG_INVALID

    A tags condition has no value_id, or its value_id is not a customer tag in this store.

  • 400 GROUP_RULE_PRODUCT_INVALID

    A purchased_product or viewed_product condition's value is not the ID of a product in this store, or the condition also sends value_id.

  • 400 GROUP_RULE_COLLECTION_INVALID

    A viewed_collection condition's value is not the ID of a collection in this store, or the condition also sends value_id.

  • 400 GROUP_RULE_CATEGORY_INVALID

    A viewed_category condition's value is not the ID of a category in this store, or the condition also sends value_id.

  • 400 GROUP_RULE_MONTH_RANGE

    A birthday month is not between 1 and 12.

  • 400 GROUP_RULE_DURATION_INVALID

    A day count is not a whole number from 1 to 365, such as 30d.

  • 400 GROUP_RULE_DATE_INVALID

    A date is not in YYYY-MM-DD format.

  • 400 GROUP_RULE_NUMBER_INVALID

    A number condition value is not a valid non-negative number.

  • 400 GROUP_RULE_WINDOW_INVALID

    A condition that looks back over days has no window_days, a window_days outside 1 to the field's window_max_days, or a window_days on a field that does not look back.

  • 400 GROUP_RULE_ORDER_COUNT_INVALID

    An orders_count, rto_count or visits_30_days value is not a whole number from 0 to the field's max_value.

  • 400 GROUP_RULE_MONEY_INVALID

    A lifetime_spend amount is above the field's max_value or has more decimal places than the store currency allows.

  • 409 CUSTOMER_PURCHASE_FACTS_REFRESHING

    Purchase rules cannot be used while purchase history is refreshing; check purchase-rule-readiness and try again.

  • 400 STORE_API_BODY_PROPERTY_UNKNOWN

    The body has a property this request does not accept. The message and error.details.properties list the allowed and required properties (nested for each object or list of objects).

  • 400 STORE_API_BODY_PROPERTY_INVALID

    A body property has the wrong type (error.details.expected_type). The message and error.details.properties list the allowed and required properties.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The request has a query parameter; this endpoint takes none.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

Update a Customer Group

PUT write_customers

Update a Customer Group.

Updates supplied fields. Supplying rules replaces an automatic group's existing rules and refreshes its membership.

Path parameters

Name Type Description
id required string

Customer Group UUID.

Example: 8eb31980-7f67-453f-bf13-873b62a47b68

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
name string

Group name.

Example: VIP customers
slug string

Group slug. Omit on create to generate it from the name.

Example: vip-customers
description string

Merchant description.

Example: Customers eligible for VIP benefits.
type string

Group type: manual or automatic. Type cannot change after creation.

Example: automatic
match_type string

Whether all or any rules must match.

Example: all
rules array<object>

Automatic rules shaped as {field, op, value, value_id, window_days}.

Example: [{"field":"orders_count","op":"gte","value":"5"}]

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the write_customers scope.

  • 400 CUSTOMER_GROUP_ID_INVALID

    Customer Group id is not a valid UUID.

  • 404 CUSTOMER_GROUP_NOT_FOUND

    Customer Group does not exist in this store.

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON or has an unknown field.

  • 400 CUSTOMER_GROUP_NAME_REQUIRED

    Name is empty after trimming.

  • 400 CUSTOMER_GROUP_NAME_TOO_LONG

    Name is longer than name_max_length from the limits endpoint.

  • 400 CUSTOMER_GROUP_DESCRIPTION_TOO_LONG

    Description is longer than desc_max_length from the limits endpoint.

  • 400 CUSTOMER_SLUG_INVALID

    Slug may only use lowercase letters, numbers and hyphens.

  • 400 CUSTOMER_GROUP_RULES_MANUAL

    Rules were sent for a manual group. Set type to automatic to use rules; a group without a type is manual.

  • 403 CUSTOMER_GROUP_TYPE_IMMUTABLE

    type differs from the group's type; type cannot change after creation.

  • 409 CUSTOMER_GROUP_NAME_DUPLICATE

    Another group in this store has this name. error.details.existing_id is that group's id.

  • 409 CUSTOMER_GROUP_SLUG_DUPLICATE

    Another group in this store has this slug.

  • 400 GROUP_RULE_MATCH_TYPE_INVALID

    match_type must be all or any.

  • 400 GROUP_RULE_CONDITIONS_REQUIRED

    An automatic group needs at least one condition.

  • 400 GROUP_RULE_CONDITIONS_LIMIT

    More conditions than max_conditions from the limits endpoint.

  • 400 GROUP_RULE_FIELD_INVALID

    A condition uses a field that is not in rule_fields.

  • 400 GROUP_RULE_OPERATOR_INVALID

    A condition uses an operator the field does not support.

  • 400 GROUP_RULE_VALUE_REQUIRED

    A condition is missing the value its operator requires.

  • 400 GROUP_RULE_VALUE_SHAPE_INVALID

    A condition sends a value or value_id its operator does not accept.

  • 400 GROUP_RULE_STATUS_INVALID

    A status condition value is not active or disabled.

  • 400 GROUP_RULE_BOOL_INVALID

    A yes/no condition value is not true or false.

  • 400 GROUP_RULE_TAG_INVALID

    A tags condition has no value_id, or its value_id is not a customer tag in this store.

  • 400 GROUP_RULE_PRODUCT_INVALID

    A purchased_product or viewed_product condition's value is not the ID of a product in this store, or the condition also sends value_id.

  • 400 GROUP_RULE_COLLECTION_INVALID

    A viewed_collection condition's value is not the ID of a collection in this store, or the condition also sends value_id.

  • 400 GROUP_RULE_CATEGORY_INVALID

    A viewed_category condition's value is not the ID of a category in this store, or the condition also sends value_id.

  • 400 GROUP_RULE_MONTH_RANGE

    A birthday month is not between 1 and 12.

  • 400 GROUP_RULE_DURATION_INVALID

    A day count is not a whole number from 1 to 365, such as 30d.

  • 400 GROUP_RULE_DATE_INVALID

    A date is not in YYYY-MM-DD format.

  • 400 GROUP_RULE_NUMBER_INVALID

    A number condition value is not a valid non-negative number.

  • 400 GROUP_RULE_WINDOW_INVALID

    A condition that looks back over days has no window_days, a window_days outside 1 to the field's window_max_days, or a window_days on a field that does not look back.

  • 400 GROUP_RULE_ORDER_COUNT_INVALID

    An orders_count, rto_count or visits_30_days value is not a whole number from 0 to the field's max_value.

  • 400 GROUP_RULE_MONEY_INVALID

    A lifetime_spend amount is above the field's max_value or has more decimal places than the store currency allows.

  • 409 CUSTOMER_PURCHASE_FACTS_REFRESHING

    Purchase rules cannot be used while purchase history is refreshing; check purchase-rule-readiness and try again.

  • 400 STORE_API_BODY_PROPERTY_UNKNOWN

    The body has a property this request does not accept. The message and error.details.properties list the allowed and required properties (nested for each object or list of objects).

  • 400 STORE_API_BODY_PROPERTY_INVALID

    A body property has the wrong type (error.details.expected_type). The message and error.details.properties list the allowed and required properties.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The request has a query parameter; this endpoint takes none.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

Delete a Customer Group

DELETE write_customers

Delete a Customer Group.

Deletes the group and its memberships without deleting customer profiles. The group's own versions of storefront sections and blocks are removed from every theme with their translations, in the same step; removed_versions counts them. Read GET /customer-groups/{id}/impact first to show where they are. A section or block whose Everyone version showed nothing is turned off, since nobody saw it once the group is gone. A group that a discount targets is refused with 409 CUSTOMER_GROUP_USED_BY_DISCOUNTS, naming those discounts, and one that a cash on delivery rule names with 409 CUSTOMER_GROUP_USED_BY_COD_RULES, naming those markets; remove the group from them first.

Path parameters

Name Type Description
id required string

Customer Group UUID.

Example: 8eb31980-7f67-453f-bf13-873b62a47b68

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the write_customers scope.

  • 400 CUSTOMER_GROUP_ID_INVALID

    Customer Group id is not a valid UUID.

  • 404 CUSTOMER_GROUP_NOT_FOUND

    Customer Group does not exist in this store.

  • 409 CUSTOMER_GROUP_USED_BY_DISCOUNTS

    A discount targets this group; the message names those discounts. Remove the group from them first.

  • 409 CUSTOMER_GROUP_USED_BY_COD_RULES

    A cash on delivery rule names this group; the message names those markets. Remove those rules first.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The request has a query parameter; this endpoint takes none.

  • 400 STORE_API_BODY_PROPERTY_UNKNOWN

    The request body has a property; this endpoint takes no body. Send no body or an empty object {}.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

Get a Customer Group's delete impact

GET read_customers

Get what deleting a Customer Group removes from storefronts.

Read-only. Lists the group's own versions of sections and blocks on storefront theme pages, which deleting the group removes. Each entry names the storefront_name, the theme_name (theme_live is true for the theme shoppers see), the page (page_type, with label_key, handle and template_label_key naming it the way the theme editor does), the section_name and, for a block, the block_name, all worded by the theme in English, and shows_nothing when the version hides the section or block from the group. published is true when the version is on the published page, not only its draft. versions_count counts every version; at most 100 are listed and truncated is true when there are more. Discounts and cash on delivery rules that name the group are not listed: DELETE refuses while they do, naming them.

Path parameters

Name Type Description
id required string

Customer Group UUID.

Example: 8eb31980-7f67-453f-bf13-873b62a47b68

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the read_customers scope.

  • 400 CUSTOMER_GROUP_ID_INVALID

    Customer Group id is not a valid UUID.

  • 404 CUSTOMER_GROUP_NOT_FOUND

    Customer Group does not exist in this store.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The request has a query parameter; this endpoint takes none.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

Preview automatic rules

POST read_customers

Preview Customer Group rules.

Returns the matching customer count and a sample without saving a group. Each sample customer carries status_display, its status worded by the API.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
match_type required string

Whether all or any rules must match.

Example: all
rules required array<object>

Rules to preview.

Example: [{"field":"orders_count","op":"gte","value":"5"}]

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the read_customers scope.

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON or has an unknown field.

  • 400 GROUP_RULE_MATCH_TYPE_INVALID

    match_type must be all or any.

  • 400 GROUP_RULE_CONDITIONS_REQUIRED

    An automatic group needs at least one condition.

  • 400 GROUP_RULE_CONDITIONS_LIMIT

    More conditions than max_conditions from the limits endpoint.

  • 400 GROUP_RULE_FIELD_INVALID

    A condition uses a field that is not in rule_fields.

  • 400 GROUP_RULE_OPERATOR_INVALID

    A condition uses an operator the field does not support.

  • 400 GROUP_RULE_VALUE_REQUIRED

    A condition is missing the value its operator requires.

  • 400 GROUP_RULE_VALUE_SHAPE_INVALID

    A condition sends a value or value_id its operator does not accept.

  • 400 GROUP_RULE_STATUS_INVALID

    A status condition value is not active or disabled.

  • 400 GROUP_RULE_BOOL_INVALID

    A yes/no condition value is not true or false.

  • 400 GROUP_RULE_TAG_INVALID

    A tags condition has no value_id, or its value_id is not a customer tag in this store.

  • 400 GROUP_RULE_PRODUCT_INVALID

    A purchased_product or viewed_product condition's value is not the ID of a product in this store, or the condition also sends value_id.

  • 400 GROUP_RULE_COLLECTION_INVALID

    A viewed_collection condition's value is not the ID of a collection in this store, or the condition also sends value_id.

  • 400 GROUP_RULE_CATEGORY_INVALID

    A viewed_category condition's value is not the ID of a category in this store, or the condition also sends value_id.

  • 400 GROUP_RULE_MONTH_RANGE

    A birthday month is not between 1 and 12.

  • 400 GROUP_RULE_DURATION_INVALID

    A day count is not a whole number from 1 to 365, such as 30d.

  • 400 GROUP_RULE_DATE_INVALID

    A date is not in YYYY-MM-DD format.

  • 400 GROUP_RULE_NUMBER_INVALID

    A number condition value is not a valid non-negative number.

  • 400 GROUP_RULE_WINDOW_INVALID

    A condition that looks back over days has no window_days, a window_days outside 1 to the field's window_max_days, or a window_days on a field that does not look back.

  • 400 GROUP_RULE_ORDER_COUNT_INVALID

    An orders_count, rto_count or visits_30_days value is not a whole number from 0 to the field's max_value.

  • 400 GROUP_RULE_MONEY_INVALID

    A lifetime_spend amount is above the field's max_value or has more decimal places than the store currency allows.

  • 409 CUSTOMER_PURCHASE_FACTS_REFRESHING

    Purchase rules cannot be used while purchase history is refreshing; check purchase-rule-readiness and try again.

  • 400 STORE_API_BODY_PROPERTY_UNKNOWN

    The body has a property this request does not accept. The message and error.details.properties list the allowed and required properties (nested for each object or list of objects).

  • 400 STORE_API_BODY_PROPERTY_INVALID

    A body property has the wrong type (error.details.expected_type). The message and error.details.properties list the allowed and required properties.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The request has a query parameter; this endpoint takes none.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

List group members

GET read_customers

List members of a Customer Group.

Returns store-scoped members with pagination, literal name/email search, and sorting. Each member carries status_display, its customer status worded by the API. Each page and its membership metadata use one snapshot. Check membership.ready before reuse; evaluated_at and valid_until are RFC 3339 in the store's timezone with its offset. A rolling-date selection expires after five minutes; birthday selections expire at the next UTC midnight. Dirty or never-evaluated automatic groups are not ready. Pages from separate requests are not a frozen export. Membership does not grant marketing consent.

Path parameters

Name Type Description
id required string

Customer Group UUID.

Example: 8eb31980-7f67-453f-bf13-873b62a47b68

Query parameters

Name Type Description
page integer

Page number.

Example: 1
limit integer

Page size.

Example: 50
search string

Search member names or email addresses.

Example: lee
sort_by string

Sort by added_at (default), email, name or status.

Allowed values
added_atemailnamestatus
Example: added_at
sort_direction string

Sort direction: asc or desc. Defaults to desc.

Allowed values
ascdesc
Example: desc

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the read_customers scope.

  • 400 CUSTOMER_GROUP_ID_INVALID

    Customer Group id is not a valid UUID.

  • 404 CUSTOMER_GROUP_NOT_FOUND

    Customer Group does not exist in this store.

  • 400 CUSTOMER_GROUP_LIST_INVALID_PAGE

    Page must be a positive integer.

  • 400 CUSTOMER_GROUP_LIST_INVALID_LIMIT

    Limit must be a positive integer up to list_max_limit from the limits endpoint.

  • 400 CUSTOMER_GROUP_LIST_INVALID_SORT_BY

    Sort field is not supported for this list.

  • 400 CUSTOMER_GROUP_LIST_INVALID_SORT_DIRECTION

    Sort direction must be asc or desc.

  • 400 CUSTOMER_GROUP_SEARCH_TOO_LONG

    Search is longer than search_max_length from the limits endpoint. Search matches member names and email addresses.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The query string has a parameter this request does not accept. The message and error.details.allowed_parameters list the ones it does.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

List candidate members

GET read_customers

List customers that can be added to a manual group.

Returns active customers in the token's store that are not already members. Each carries status_display, its status worded by the API.

Path parameters

Name Type Description
id required string

Customer Group UUID.

Example: 8eb31980-7f67-453f-bf13-873b62a47b68

Query parameters

Name Type Description
page integer

Page number.

Example: 1
limit integer

Page size.

Example: 50
search string

Search customer names or email addresses.

Example: lee
sort_by string

Sort by email (default), name or created_at.

Allowed values
emailnamecreated_at
Example: email
sort_direction string

Sort direction: asc or desc. Defaults to asc.

Allowed values
ascdesc
Example: asc

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the read_customers scope.

  • 400 CUSTOMER_GROUP_ID_INVALID

    Customer Group id is not a valid UUID.

  • 404 CUSTOMER_GROUP_NOT_FOUND

    Customer Group does not exist in this store.

  • 400 CUSTOMER_GROUP_LIST_INVALID_PAGE

    Page must be a positive integer.

  • 400 CUSTOMER_GROUP_LIST_INVALID_LIMIT

    Limit must be a positive integer up to list_max_limit from the limits endpoint.

  • 400 CUSTOMER_GROUP_LIST_INVALID_SORT_BY

    Sort field is not supported for this list.

  • 400 CUSTOMER_GROUP_LIST_INVALID_SORT_DIRECTION

    Sort direction must be asc or desc.

  • 400 CUSTOMER_GROUP_SEARCH_TOO_LONG

    Search is longer than search_max_length from the limits endpoint. Search matches member names and email addresses.

  • 400 CUSTOMER_GROUP_MEMBERS_AUTOMATIC

    The group is automatic; its members come from its rules, so it has no candidates.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The query string has a parameter this request does not accept. The message and error.details.allowed_parameters list the ones it does.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

Membership snapshot

GET read_customers

Read a Customer Group's member ids at one revision.

Returns member customer ids sorted ascending, all from the same membership revision. Follow next_cursor while has_more is true. If membership changes before you finish, a continuation page returns CUSTOMER_GROUP_MEMBERSHIP_RESTART_REQUIRED: start again from the first page. Then call membership-changes with after_revision set to that revision to keep in sync. Returns CUSTOMER_GROUP_MEMBERSHIP_REFRESHING while an automatic group's membership is being refreshed; try again shortly. Membership does not grant marketing consent.

Path parameters

Name Type Description
id required string

Customer Group UUID.

Example: 8eb31980-7f67-453f-bf13-873b62a47b68

Query parameters

Name Type Description
limit integer

Page size, 1–250. Defaults to 100. Do not send with cursor.

Example: 100
cursor string

next_cursor from the previous page. Send it alone; the page size and revision come from the cursor.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the read_customers scope.

  • 400 CUSTOMER_GROUP_ID_INVALID

    Customer Group id is not a valid UUID.

  • 404 CUSTOMER_GROUP_NOT_FOUND

    Customer Group does not exist in this store.

  • 400 INVALID_INPUT

    An unknown or repeated query parameter, a limit outside 1–250, an after_revision above the current revision, or cursor sent together with other parameters.

  • 400 CUSTOMER_GROUP_MEMBERSHIP_CURSOR_INVALID

    cursor is not valid for this group.

  • 410 CUSTOMER_GROUP_MEMBERSHIP_CURSOR_EXPIRED

    cursor has expired; start again from the first page.

  • 409 CUSTOMER_GROUP_MEMBERSHIP_RESTART_REQUIRED

    Membership changed after the first page; start again from the first page.

  • 409 CUSTOMER_GROUP_MEMBERSHIP_REFRESHING

    The automatic group's membership is being refreshed; try again shortly.

  • 410 CUSTOMER_GROUP_MEMBERSHIP_DELETED

    The group was deleted.

  • 503 SERVICE_UNAVAILABLE

    Membership could not be read right now; try again.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The query string has a parameter this request does not accept. The message and error.details.allowed_parameters list the ones it does.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

Membership changes

GET read_customers

List membership changes after a revision.

Returns members added and removed after after_revision, ordered by revision, through through_revision. revisions summarises each revision on the page. Follow next_cursor while has_more is true, then store through_revision as your next after_revision. If after_revision is older than history_floor_revision, that history is gone and the call returns CUSTOMER_GROUP_MEMBERSHIP_CURSOR_EXPIRED: read a new membership-snapshot. When the group is deleted, group_deleted is true and the last change has operation group_deleted.

Path parameters

Name Type Description
id required string

Customer Group UUID.

Example: 8eb31980-7f67-453f-bf13-873b62a47b68

Query parameters

Name Type Description
after_revision integer

Return changes after this revision, usually the snapshot revision or the last through_revision. Defaults to 0. Do not send with cursor.

Example: 41
limit integer

Maximum changes per page, 1–250. Defaults to 100. Do not send with cursor.

Example: 100
cursor string

next_cursor from the previous page. Send it alone.

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the read_customers scope.

  • 400 CUSTOMER_GROUP_ID_INVALID

    Customer Group id is not a valid UUID.

  • 404 CUSTOMER_GROUP_NOT_FOUND

    Customer Group does not exist in this store.

  • 400 INVALID_INPUT

    An unknown or repeated query parameter, a limit outside 1–250, an after_revision above the current revision, or cursor sent together with other parameters.

  • 400 CUSTOMER_GROUP_MEMBERSHIP_CURSOR_INVALID

    cursor is not valid for this group.

  • 410 CUSTOMER_GROUP_MEMBERSHIP_CURSOR_EXPIRED

    cursor has expired, or after_revision is older than history_floor_revision; read a new membership-snapshot.

  • 503 SERVICE_UNAVAILABLE

    Membership could not be read right now; try again.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The query string has a parameter this request does not accept. The message and error.details.allowed_parameters list the ones it does.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

Add group members

POST write_customers

Add customers to a manual group.

Adds customers from the token's store. added is the number newly added; already_members lists ids already in the group and not_found lists ids that are not customers of this store, so one bad id does not fail the batch. The code is CUSTOMER_GROUP_MEMBERS_ADDED_PARTIAL, with the three counts in the message, when any id is in not_found; otherwise it is CUSTOMER_GROUP_MEMBERS_ADDED, and the message says how many were already in the group. Duplicate ids in the request count once.

Path parameters

Name Type Description
id required string

Customer Group UUID.

Example: 8eb31980-7f67-453f-bf13-873b62a47b68

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
customer_ids required array<string>

Customer UUIDs to add.

Example: ["f37a970d-5f56-4ca8-9d4d-4ea10190f8a5"]

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the write_customers scope.

  • 400 CUSTOMER_GROUP_ID_INVALID

    Customer Group id is not a valid UUID.

  • 404 CUSTOMER_GROUP_NOT_FOUND

    Customer Group does not exist in this store.

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON or has an unknown field.

  • 400 CUSTOMER_GROUP_MEMBERS_EMPTY

    customer_ids is empty.

  • 400 CUSTOMER_GROUP_MEMBERS_MAX

    customer_ids has more than max_members_batch ids from the limits endpoint.

  • 400 CUSTOMER_ID_INVALID

    An entry in customer_ids is not a valid UUID; nothing is changed.

  • 400 CUSTOMER_GROUP_MEMBERS_AUTOMATIC

    The group is automatic; its members come from its rules.

  • 400 STORE_API_BODY_PROPERTY_UNKNOWN

    The body has a property this request does not accept. The message and error.details.properties list the allowed and required properties (nested for each object or list of objects).

  • 400 STORE_API_BODY_PROPERTY_INVALID

    A body property has the wrong type (error.details.expected_type). The message and error.details.properties list the allowed and required properties.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The request has a query parameter; this endpoint takes none.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

Remove group members

POST write_customers

Remove customers from a manual group.

Removes the listed customers from the group. removed is the number of memberships removed and not_members lists ids that were not in the group. The code is always CUSTOMER_GROUP_MEMBERS_REMOVED; ids that were not members are left as they were, and the message says how many. Duplicate ids in the request count once.

Path parameters

Name Type Description
id required string

Customer Group UUID.

Example: 8eb31980-7f67-453f-bf13-873b62a47b68

Headers

Name Type Description
Authorization required string

Bearer Store API token.

Body parameters

Name Type Description
customer_ids required array<string>

Customer UUIDs to remove.

Example: ["f37a970d-5f56-4ca8-9d4d-4ea10190f8a5"]

Errors

  • 401 UNAUTHORIZED

    The Authorization header is missing.

  • 401 INVALID_TOKEN

    The Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.

  • 401 TOKEN_NOT_ACCEPTED

    The token is unknown, expired, revoked or replaced, or its app was uninstalled.

  • 402 SUBSCRIPTION_REQUIRED

    The store does not have an active or trialing subscription.

  • 403 API_VERSION_UNSUPPORTED

    The credential is pinned to an API version that cannot be served.

  • 403 STORE_SUSPENDED

    Tringify has suspended the store. Every request is refused until it is reinstated.

  • 403 STORE_TERMINATED

    Tringify has terminated the store permanently. Every request is refused.

  • 403 STORE_API_SCOPE_REQUIRED

    The token lacks the write_customers scope.

  • 400 CUSTOMER_GROUP_ID_INVALID

    Customer Group id is not a valid UUID.

  • 404 CUSTOMER_GROUP_NOT_FOUND

    Customer Group does not exist in this store.

  • 400 STORE_API_INVALID_REQUEST_BODY

    Request body is not valid JSON or has an unknown field.

  • 400 CUSTOMER_GROUP_MEMBERS_EMPTY

    customer_ids is empty.

  • 400 CUSTOMER_GROUP_MEMBERS_MAX

    customer_ids has more than max_members_batch ids from the limits endpoint.

  • 400 CUSTOMER_ID_INVALID

    An entry in customer_ids is not a valid UUID; nothing is changed.

  • 400 CUSTOMER_GROUP_MEMBERS_AUTOMATIC

    The group is automatic; its members come from its rules.

  • 400 STORE_API_BODY_PROPERTY_UNKNOWN

    The body has a property this request does not accept. The message and error.details.properties list the allowed and required properties (nested for each object or list of objects).

  • 400 STORE_API_BODY_PROPERTY_INVALID

    A body property has the wrong type (error.details.expected_type). The message and error.details.properties list the allowed and required properties.

  • 400 STORE_API_QUERY_PARAMETER_UNKNOWN

    The request has a query parameter; this endpoint takes none.

  • 429 RATE_LIMITED

    The request allowance is exhausted. Wait for Retry-After before retrying.

Fields#

Field

Type

Create

Update

Required

Translatable

name

text

Yes

Yes

create

No

slug

slug

Yes

Yes

No

description

textarea

Yes

Yes

No

type

select

Yes

Yes

No

match_type

select

Yes

Yes

No

member_count

integer

No

No

No

last_evaluated_at

datetime

No

No

No

created_at

datetime

No

No

No

updated_at

datetime

No

No

No

Webhook events#

Subscribe to these events to keep your integration in sync with customer groups. Each event shows the required Store API scope and store permission, the available payload fields, and an example payload. Subscription setup is validated against those permissions; delivery is always restricted to the subscription's store.

Customer group created

EVENT customer_groups/create App scope: read_customers Staff permission: customers:write

Fired when a customer group is created.

Payload fields

Field Type Description
group.id string Always present
group.name string Selectable in the Payload builder
group.slug string Selectable in the Payload builder
group.description string | null Selectable in the Payload builder
group.type string Selectable in the Payload builder
group.match_type string | null Selectable in the Payload builder
group.member_count integer Selectable in the Payload builder
group.rules[*].field string Selectable in the Payload builder
group.rules[*].op string Selectable in the Payload builder
group.rules[*].value string | null Selectable in the Payload builder
group.rules[*].value_id string | null Selectable in the Payload builder
group.created_at string Selectable in the Payload builder
group.updated_at string Selectable in the Payload builder

Customer group updated

EVENT customer_groups/update App scope: read_customers Staff permission: customers:write

Fired when a customer group's definition changes, including when deleting a customer tag removes one of its rules. Customers joining or leaving the group send no per-customer events; connect the group to a webhook endpoint to receive its membership.

Possible changed_fields values

The changed_fields array names exactly which of these changed in this event — use it to skip processing updates your integration doesn't care about.

description match_type name rules slug

Payload fields

Field Type Description
previous.id string Always present
previous.name string Selectable in the Payload builder
previous.slug string Selectable in the Payload builder
previous.description string | null Selectable in the Payload builder
previous.type string Selectable in the Payload builder
previous.match_type string | null Selectable in the Payload builder
previous.member_count integer Selectable in the Payload builder
previous.rules[*].field string Selectable in the Payload builder
previous.rules[*].op string Selectable in the Payload builder
previous.rules[*].value string | null Selectable in the Payload builder
previous.rules[*].value_id string | null Selectable in the Payload builder
previous.created_at string Selectable in the Payload builder
previous.updated_at string Selectable in the Payload builder
current.id string Always present
current.name string Selectable in the Payload builder
current.slug string Selectable in the Payload builder
current.description string | null Selectable in the Payload builder
current.type string Selectable in the Payload builder
current.match_type string | null Selectable in the Payload builder
current.member_count integer Selectable in the Payload builder
current.rules[*].field string Selectable in the Payload builder
current.rules[*].op string Selectable in the Payload builder
current.rules[*].value string | null Selectable in the Payload builder
current.rules[*].value_id string | null Selectable in the Payload builder
current.created_at string Selectable in the Payload builder
current.updated_at string Selectable in the Payload builder
changed_fields array Selectable in the Payload builder

Customer group deleted

EVENT customer_groups/delete App scope: read_customers Staff permission: customers:write

Fired when a customer group is deleted.

Payload fields

Field Type Description
group.id string Always present
group.name string Selectable in the Payload builder
group.slug string Selectable in the Payload builder
group.description string | null Selectable in the Payload builder
group.type string Selectable in the Payload builder
group.match_type string | null Selectable in the Payload builder
group.member_count integer Selectable in the Payload builder
group.rules[*].field string Selectable in the Payload builder
group.rules[*].op string Selectable in the Payload builder
group.rules[*].value string | null Selectable in the Payload builder
group.rules[*].value_id string | null Selectable in the Payload builder
group.created_at string Selectable in the Payload builder
group.updated_at string Selectable in the Payload builder