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 |
|---|---|---|
|
Use the store base currency, no grouping or symbol, at most 12 integral digits, and the currency's amount precision. For example, INR accepts |
The customer's total recorded paid value less refunds, in the store base currency. |
|
A whole-number string from |
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. |
|
A whole-number string from |
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.
{
"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 |
|---|---|---|
|
|
For |
|
|
Put the positive parent product ID in |
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 |
|
Optional |
Replay later membership changes |
|
Optional non-negative |
Take the initial snapshot#
{
"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#
{
"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 |
|
Start a new request with valid first-page parameters; do not reuse the cursor for another store, group, or endpoint. |
404 |
|
Verify the group belongs to the credential's store. |
409 |
|
Retry the first snapshot after automatic evaluation completes. |
409 |
|
Discard all partial snapshot pages and begin the snapshot again. |
410 |
|
Take a new snapshot, then resume replay from that snapshot revision. |
410 |
|
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.
{
"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.
{
"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 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
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the read_customers scope.
-
400STORE_API_QUERY_PARAMETER_UNKNOWNThe request has a query parameter; this endpoint takes none.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
Purchase rule readiness
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
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the read_customers scope.
-
400STORE_API_QUERY_PARAMETER_UNKNOWNThe request has a query parameter; this endpoint takes none.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
List Customer Groups
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. |
limit
|
integer |
Page size. |
search
|
string |
Search by name or slug. |
group_type
|
string |
Filter by |
exclude_customer_id
|
string |
Customer UUID. Leaves out groups this customer already belongs to. |
sort_by
|
string |
Sort by
Allowed values
namemember_countcreated_atupdated_at |
sort_direction
|
string |
Sort direction:
Allowed values
ascdesc |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the read_customers scope.
-
400CUSTOMER_GROUP_LIST_INVALID_PAGEPage must be a positive integer.
-
400CUSTOMER_GROUP_LIST_INVALID_LIMITLimit must be a positive integer up to
list_max_limitfrom the limits endpoint. -
400CUSTOMER_GROUP_LIST_INVALID_SORT_BYSort field is not supported for this list.
-
400CUSTOMER_GROUP_LIST_INVALID_SORT_DIRECTIONSort direction must be asc or desc.
-
400CUSTOMER_GROUP_SEARCH_TOO_LONGSearch is longer than
search_max_lengthfrom the limits endpoint. Search matches name or slug. -
400CUSTOMER_GROUP_TYPE_INVALIDgroup_typemust bemanualorautomatic. -
400INVALID_INPUTexclude_customer_idis not a valid UUID. -
400STORE_API_QUERY_PARAMETER_UNKNOWNThe query string has a parameter this request does not accept. The message and
error.details.allowed_parameterslist the ones it does. -
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
Get a Customer Group
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. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the read_customers scope.
-
400CUSTOMER_GROUP_ID_INVALIDCustomer Group id is not a valid UUID.
-
404CUSTOMER_GROUP_NOT_FOUNDCustomer Group does not exist in this store.
-
400STORE_API_QUERY_PARAMETER_UNKNOWNThe request has a query parameter; this endpoint takes none.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
Create a Customer Group
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. |
slug
|
string |
Group slug. Omit on create to generate it from the name. |
description
|
string |
Merchant description. |
type
|
string |
Group type: |
match_type
|
string |
Whether all or any rules must match. |
rules
|
array<object> |
Automatic rules shaped as |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the write_customers scope.
-
400STORE_API_INVALID_REQUEST_BODYRequest body is not valid JSON or has an unknown field.
-
400CUSTOMER_GROUP_NAME_REQUIREDName is empty after trimming.
-
400CUSTOMER_GROUP_NAME_TOO_LONGName is longer than
name_max_lengthfrom the limits endpoint. -
400CUSTOMER_GROUP_DESCRIPTION_TOO_LONGDescription is longer than
desc_max_lengthfrom the limits endpoint. -
400CUSTOMER_SLUG_INVALIDSlug may only use lowercase letters, numbers and hyphens.
-
400CUSTOMER_GROUP_RULES_MANUALRules were sent for a manual group. Set
typetoautomaticto use rules; a group without a type is manual. -
400CUSTOMER_GROUP_TYPE_INVALIDtypemust bemanualorautomatic. -
400CUSTOMER_GROUPS_LIMITThe store already has
max_groups_per_storegroups. -
409CUSTOMER_GROUP_NAME_DUPLICATEAnother group in this store has this name.
error.details.existing_idis that group's id. -
409CUSTOMER_GROUP_SLUG_DUPLICATEAnother group in this store has this slug.
error.details.existing_idis that group's id. -
400GROUP_RULE_MATCH_TYPE_INVALIDmatch_typemust beallorany. -
400GROUP_RULE_CONDITIONS_REQUIREDAn automatic group needs at least one condition.
-
400GROUP_RULE_CONDITIONS_LIMITMore conditions than
max_conditionsfrom the limits endpoint. -
400GROUP_RULE_FIELD_INVALIDA condition uses a field that is not in
rule_fields. -
400GROUP_RULE_OPERATOR_INVALIDA condition uses an operator the field does not support.
-
400GROUP_RULE_VALUE_REQUIREDA condition is missing the value its operator requires.
-
400GROUP_RULE_VALUE_SHAPE_INVALIDA condition sends a value or value_id its operator does not accept.
-
400GROUP_RULE_STATUS_INVALIDA status condition value is not
activeordisabled. -
400GROUP_RULE_BOOL_INVALIDA yes/no condition value is not
trueorfalse. -
400GROUP_RULE_TAG_INVALIDA tags condition has no value_id, or its value_id is not a customer tag in this store.
-
400GROUP_RULE_PRODUCT_INVALIDA 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.
-
400GROUP_RULE_COLLECTION_INVALIDA viewed_collection condition's value is not the ID of a collection in this store, or the condition also sends value_id.
-
400GROUP_RULE_CATEGORY_INVALIDA viewed_category condition's value is not the ID of a category in this store, or the condition also sends value_id.
-
400GROUP_RULE_MONTH_RANGEA birthday month is not between 1 and 12.
-
400GROUP_RULE_DURATION_INVALIDA day count is not a whole number from 1 to 365, such as
30d. -
400GROUP_RULE_DATE_INVALIDA date is not in YYYY-MM-DD format.
-
400GROUP_RULE_NUMBER_INVALIDA number condition value is not a valid non-negative number.
-
400GROUP_RULE_WINDOW_INVALIDA condition that looks back over days has no
window_days, awindow_daysoutside 1 to the field'swindow_max_days, or awindow_dayson a field that does not look back. -
400GROUP_RULE_ORDER_COUNT_INVALIDAn orders_count, rto_count or visits_30_days value is not a whole number from 0 to the field's
max_value. -
400GROUP_RULE_MONEY_INVALIDA lifetime_spend amount is above the field's
max_valueor has more decimal places than the store currency allows. -
409CUSTOMER_PURCHASE_FACTS_REFRESHINGPurchase rules cannot be used while purchase history is refreshing; check purchase-rule-readiness and try again.
-
400STORE_API_BODY_PROPERTY_UNKNOWNThe body has a property this request does not accept. The message and
error.details.propertieslist the allowed and required properties (nestedfor each object or list of objects). -
400STORE_API_BODY_PROPERTY_INVALIDA body property has the wrong type (
error.details.expected_type). The message anderror.details.propertieslist the allowed and required properties. -
400STORE_API_QUERY_PARAMETER_UNKNOWNThe request has a query parameter; this endpoint takes none.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
Update a Customer Group
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. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Body parameters
| Name | Type | Description |
|---|---|---|
name
|
string |
Group name. |
slug
|
string |
Group slug. Omit on create to generate it from the name. |
description
|
string |
Merchant description. |
type
|
string |
Group type: |
match_type
|
string |
Whether all or any rules must match. |
rules
|
array<object> |
Automatic rules shaped as |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the write_customers scope.
-
400CUSTOMER_GROUP_ID_INVALIDCustomer Group id is not a valid UUID.
-
404CUSTOMER_GROUP_NOT_FOUNDCustomer Group does not exist in this store.
-
400STORE_API_INVALID_REQUEST_BODYRequest body is not valid JSON or has an unknown field.
-
400CUSTOMER_GROUP_NAME_REQUIREDName is empty after trimming.
-
400CUSTOMER_GROUP_NAME_TOO_LONGName is longer than
name_max_lengthfrom the limits endpoint. -
400CUSTOMER_GROUP_DESCRIPTION_TOO_LONGDescription is longer than
desc_max_lengthfrom the limits endpoint. -
400CUSTOMER_SLUG_INVALIDSlug may only use lowercase letters, numbers and hyphens.
-
400CUSTOMER_GROUP_RULES_MANUALRules were sent for a manual group. Set
typetoautomaticto use rules; a group without a type is manual. -
403CUSTOMER_GROUP_TYPE_IMMUTABLEtypediffers from the group's type; type cannot change after creation. -
409CUSTOMER_GROUP_NAME_DUPLICATEAnother group in this store has this name.
error.details.existing_idis that group's id. -
409CUSTOMER_GROUP_SLUG_DUPLICATEAnother group in this store has this slug.
-
400GROUP_RULE_MATCH_TYPE_INVALIDmatch_typemust beallorany. -
400GROUP_RULE_CONDITIONS_REQUIREDAn automatic group needs at least one condition.
-
400GROUP_RULE_CONDITIONS_LIMITMore conditions than
max_conditionsfrom the limits endpoint. -
400GROUP_RULE_FIELD_INVALIDA condition uses a field that is not in
rule_fields. -
400GROUP_RULE_OPERATOR_INVALIDA condition uses an operator the field does not support.
-
400GROUP_RULE_VALUE_REQUIREDA condition is missing the value its operator requires.
-
400GROUP_RULE_VALUE_SHAPE_INVALIDA condition sends a value or value_id its operator does not accept.
-
400GROUP_RULE_STATUS_INVALIDA status condition value is not
activeordisabled. -
400GROUP_RULE_BOOL_INVALIDA yes/no condition value is not
trueorfalse. -
400GROUP_RULE_TAG_INVALIDA tags condition has no value_id, or its value_id is not a customer tag in this store.
-
400GROUP_RULE_PRODUCT_INVALIDA 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.
-
400GROUP_RULE_COLLECTION_INVALIDA viewed_collection condition's value is not the ID of a collection in this store, or the condition also sends value_id.
-
400GROUP_RULE_CATEGORY_INVALIDA viewed_category condition's value is not the ID of a category in this store, or the condition also sends value_id.
-
400GROUP_RULE_MONTH_RANGEA birthday month is not between 1 and 12.
-
400GROUP_RULE_DURATION_INVALIDA day count is not a whole number from 1 to 365, such as
30d. -
400GROUP_RULE_DATE_INVALIDA date is not in YYYY-MM-DD format.
-
400GROUP_RULE_NUMBER_INVALIDA number condition value is not a valid non-negative number.
-
400GROUP_RULE_WINDOW_INVALIDA condition that looks back over days has no
window_days, awindow_daysoutside 1 to the field'swindow_max_days, or awindow_dayson a field that does not look back. -
400GROUP_RULE_ORDER_COUNT_INVALIDAn orders_count, rto_count or visits_30_days value is not a whole number from 0 to the field's
max_value. -
400GROUP_RULE_MONEY_INVALIDA lifetime_spend amount is above the field's
max_valueor has more decimal places than the store currency allows. -
409CUSTOMER_PURCHASE_FACTS_REFRESHINGPurchase rules cannot be used while purchase history is refreshing; check purchase-rule-readiness and try again.
-
400STORE_API_BODY_PROPERTY_UNKNOWNThe body has a property this request does not accept. The message and
error.details.propertieslist the allowed and required properties (nestedfor each object or list of objects). -
400STORE_API_BODY_PROPERTY_INVALIDA body property has the wrong type (
error.details.expected_type). The message anderror.details.propertieslist the allowed and required properties. -
400STORE_API_QUERY_PARAMETER_UNKNOWNThe request has a query parameter; this endpoint takes none.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
Delete a Customer Group
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. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the write_customers scope.
-
400CUSTOMER_GROUP_ID_INVALIDCustomer Group id is not a valid UUID.
-
404CUSTOMER_GROUP_NOT_FOUNDCustomer Group does not exist in this store.
-
409CUSTOMER_GROUP_USED_BY_DISCOUNTSA discount targets this group; the message names those discounts. Remove the group from them first.
-
409CUSTOMER_GROUP_USED_BY_COD_RULESA cash on delivery rule names this group; the message names those markets. Remove those rules first.
-
400STORE_API_QUERY_PARAMETER_UNKNOWNThe request has a query parameter; this endpoint takes none.
-
400STORE_API_BODY_PROPERTY_UNKNOWNThe request body has a property; this endpoint takes no body. Send no body or an empty object
{}. -
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
Get a Customer Group's delete impact
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. |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the read_customers scope.
-
400CUSTOMER_GROUP_ID_INVALIDCustomer Group id is not a valid UUID.
-
404CUSTOMER_GROUP_NOT_FOUNDCustomer Group does not exist in this store.
-
400STORE_API_QUERY_PARAMETER_UNKNOWNThe request has a query parameter; this endpoint takes none.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
Preview automatic rules
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. |
rules
required
|
array<object> |
Rules to preview. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the read_customers scope.
-
400STORE_API_INVALID_REQUEST_BODYRequest body is not valid JSON or has an unknown field.
-
400GROUP_RULE_MATCH_TYPE_INVALIDmatch_typemust beallorany. -
400GROUP_RULE_CONDITIONS_REQUIREDAn automatic group needs at least one condition.
-
400GROUP_RULE_CONDITIONS_LIMITMore conditions than
max_conditionsfrom the limits endpoint. -
400GROUP_RULE_FIELD_INVALIDA condition uses a field that is not in
rule_fields. -
400GROUP_RULE_OPERATOR_INVALIDA condition uses an operator the field does not support.
-
400GROUP_RULE_VALUE_REQUIREDA condition is missing the value its operator requires.
-
400GROUP_RULE_VALUE_SHAPE_INVALIDA condition sends a value or value_id its operator does not accept.
-
400GROUP_RULE_STATUS_INVALIDA status condition value is not
activeordisabled. -
400GROUP_RULE_BOOL_INVALIDA yes/no condition value is not
trueorfalse. -
400GROUP_RULE_TAG_INVALIDA tags condition has no value_id, or its value_id is not a customer tag in this store.
-
400GROUP_RULE_PRODUCT_INVALIDA 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.
-
400GROUP_RULE_COLLECTION_INVALIDA viewed_collection condition's value is not the ID of a collection in this store, or the condition also sends value_id.
-
400GROUP_RULE_CATEGORY_INVALIDA viewed_category condition's value is not the ID of a category in this store, or the condition also sends value_id.
-
400GROUP_RULE_MONTH_RANGEA birthday month is not between 1 and 12.
-
400GROUP_RULE_DURATION_INVALIDA day count is not a whole number from 1 to 365, such as
30d. -
400GROUP_RULE_DATE_INVALIDA date is not in YYYY-MM-DD format.
-
400GROUP_RULE_NUMBER_INVALIDA number condition value is not a valid non-negative number.
-
400GROUP_RULE_WINDOW_INVALIDA condition that looks back over days has no
window_days, awindow_daysoutside 1 to the field'swindow_max_days, or awindow_dayson a field that does not look back. -
400GROUP_RULE_ORDER_COUNT_INVALIDAn orders_count, rto_count or visits_30_days value is not a whole number from 0 to the field's
max_value. -
400GROUP_RULE_MONEY_INVALIDA lifetime_spend amount is above the field's
max_valueor has more decimal places than the store currency allows. -
409CUSTOMER_PURCHASE_FACTS_REFRESHINGPurchase rules cannot be used while purchase history is refreshing; check purchase-rule-readiness and try again.
-
400STORE_API_BODY_PROPERTY_UNKNOWNThe body has a property this request does not accept. The message and
error.details.propertieslist the allowed and required properties (nestedfor each object or list of objects). -
400STORE_API_BODY_PROPERTY_INVALIDA body property has the wrong type (
error.details.expected_type). The message anderror.details.propertieslist the allowed and required properties. -
400STORE_API_QUERY_PARAMETER_UNKNOWNThe request has a query parameter; this endpoint takes none.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
List group members
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. |
Query parameters
| Name | Type | Description |
|---|---|---|
page
|
integer |
Page number. |
limit
|
integer |
Page size. |
search
|
string |
Search member names or email addresses. |
sort_by
|
string |
Sort by
Allowed values
added_atemailnamestatus |
sort_direction
|
string |
Sort direction:
Allowed values
ascdesc |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the read_customers scope.
-
400CUSTOMER_GROUP_ID_INVALIDCustomer Group id is not a valid UUID.
-
404CUSTOMER_GROUP_NOT_FOUNDCustomer Group does not exist in this store.
-
400CUSTOMER_GROUP_LIST_INVALID_PAGEPage must be a positive integer.
-
400CUSTOMER_GROUP_LIST_INVALID_LIMITLimit must be a positive integer up to
list_max_limitfrom the limits endpoint. -
400CUSTOMER_GROUP_LIST_INVALID_SORT_BYSort field is not supported for this list.
-
400CUSTOMER_GROUP_LIST_INVALID_SORT_DIRECTIONSort direction must be asc or desc.
-
400CUSTOMER_GROUP_SEARCH_TOO_LONGSearch is longer than
search_max_lengthfrom the limits endpoint. Search matches member names and email addresses. -
400STORE_API_QUERY_PARAMETER_UNKNOWNThe query string has a parameter this request does not accept. The message and
error.details.allowed_parameterslist the ones it does. -
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
List candidate members
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. |
Query parameters
| Name | Type | Description |
|---|---|---|
page
|
integer |
Page number. |
limit
|
integer |
Page size. |
search
|
string |
Search customer names or email addresses. |
sort_by
|
string |
Sort by
Allowed values
emailnamecreated_at |
sort_direction
|
string |
Sort direction:
Allowed values
ascdesc |
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the read_customers scope.
-
400CUSTOMER_GROUP_ID_INVALIDCustomer Group id is not a valid UUID.
-
404CUSTOMER_GROUP_NOT_FOUNDCustomer Group does not exist in this store.
-
400CUSTOMER_GROUP_LIST_INVALID_PAGEPage must be a positive integer.
-
400CUSTOMER_GROUP_LIST_INVALID_LIMITLimit must be a positive integer up to
list_max_limitfrom the limits endpoint. -
400CUSTOMER_GROUP_LIST_INVALID_SORT_BYSort field is not supported for this list.
-
400CUSTOMER_GROUP_LIST_INVALID_SORT_DIRECTIONSort direction must be asc or desc.
-
400CUSTOMER_GROUP_SEARCH_TOO_LONGSearch is longer than
search_max_lengthfrom the limits endpoint. Search matches member names and email addresses. -
400CUSTOMER_GROUP_MEMBERS_AUTOMATICThe group is automatic; its members come from its rules, so it has no candidates.
-
400STORE_API_QUERY_PARAMETER_UNKNOWNThe query string has a parameter this request does not accept. The message and
error.details.allowed_parameterslist the ones it does. -
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
Membership snapshot
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. |
Query parameters
| Name | Type | Description |
|---|---|---|
limit
|
integer |
Page size, 1–250. Defaults to 100. Do not send with |
cursor
|
string |
|
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the read_customers scope.
-
400CUSTOMER_GROUP_ID_INVALIDCustomer Group id is not a valid UUID.
-
404CUSTOMER_GROUP_NOT_FOUNDCustomer Group does not exist in this store.
-
400INVALID_INPUTAn unknown or repeated query parameter, a
limitoutside 1–250, anafter_revisionabove the current revision, orcursorsent together with other parameters. -
400CUSTOMER_GROUP_MEMBERSHIP_CURSOR_INVALIDcursoris not valid for this group. -
410CUSTOMER_GROUP_MEMBERSHIP_CURSOR_EXPIREDcursorhas expired; start again from the first page. -
409CUSTOMER_GROUP_MEMBERSHIP_RESTART_REQUIREDMembership changed after the first page; start again from the first page.
-
409CUSTOMER_GROUP_MEMBERSHIP_REFRESHINGThe automatic group's membership is being refreshed; try again shortly.
-
410CUSTOMER_GROUP_MEMBERSHIP_DELETEDThe group was deleted.
-
503SERVICE_UNAVAILABLEMembership could not be read right now; try again.
-
400STORE_API_QUERY_PARAMETER_UNKNOWNThe query string has a parameter this request does not accept. The message and
error.details.allowed_parameterslist the ones it does. -
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
Membership changes
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. |
Query parameters
| Name | Type | Description |
|---|---|---|
after_revision
|
integer |
Return changes after this revision, usually the snapshot |
limit
|
integer |
Maximum changes per page, 1–250. Defaults to 100. Do not send with |
cursor
|
string |
|
Headers
| Name | Type | Description |
|---|---|---|
Authorization
required
|
string |
Bearer Store API token. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the read_customers scope.
-
400CUSTOMER_GROUP_ID_INVALIDCustomer Group id is not a valid UUID.
-
404CUSTOMER_GROUP_NOT_FOUNDCustomer Group does not exist in this store.
-
400INVALID_INPUTAn unknown or repeated query parameter, a
limitoutside 1–250, anafter_revisionabove the current revision, orcursorsent together with other parameters. -
400CUSTOMER_GROUP_MEMBERSHIP_CURSOR_INVALIDcursoris not valid for this group. -
410CUSTOMER_GROUP_MEMBERSHIP_CURSOR_EXPIREDcursorhas expired, orafter_revisionis older thanhistory_floor_revision; read a new membership-snapshot. -
503SERVICE_UNAVAILABLEMembership could not be read right now; try again.
-
400STORE_API_QUERY_PARAMETER_UNKNOWNThe query string has a parameter this request does not accept. The message and
error.details.allowed_parameterslist the ones it does. -
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
Add group members
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. |
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. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the write_customers scope.
-
400CUSTOMER_GROUP_ID_INVALIDCustomer Group id is not a valid UUID.
-
404CUSTOMER_GROUP_NOT_FOUNDCustomer Group does not exist in this store.
-
400STORE_API_INVALID_REQUEST_BODYRequest body is not valid JSON or has an unknown field.
-
400CUSTOMER_GROUP_MEMBERS_EMPTYcustomer_idsis empty. -
400CUSTOMER_GROUP_MEMBERS_MAXcustomer_idshas more thanmax_members_batchids from the limits endpoint. -
400CUSTOMER_ID_INVALIDAn entry in
customer_idsis not a valid UUID; nothing is changed. -
400CUSTOMER_GROUP_MEMBERS_AUTOMATICThe group is automatic; its members come from its rules.
-
400STORE_API_BODY_PROPERTY_UNKNOWNThe body has a property this request does not accept. The message and
error.details.propertieslist the allowed and required properties (nestedfor each object or list of objects). -
400STORE_API_BODY_PROPERTY_INVALIDA body property has the wrong type (
error.details.expected_type). The message anderror.details.propertieslist the allowed and required properties. -
400STORE_API_QUERY_PARAMETER_UNKNOWNThe request has a query parameter; this endpoint takes none.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
Remove group members
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. |
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. |
Errors
-
401UNAUTHORIZEDThe Authorization header is missing.
-
401INVALID_TOKENThe Authorization header is not Bearer followed by a token, or the token is not in the form Tringify issues.
-
401TOKEN_NOT_ACCEPTEDThe token is unknown, expired, revoked or replaced, or its app was uninstalled.
-
402SUBSCRIPTION_REQUIREDThe store does not have an active or trialing subscription.
-
403API_VERSION_UNSUPPORTEDThe credential is pinned to an API version that cannot be served.
-
403STORE_SUSPENDEDTringify has suspended the store. Every request is refused until it is reinstated.
-
403STORE_TERMINATEDTringify has terminated the store permanently. Every request is refused.
-
403STORE_API_SCOPE_REQUIREDThe token lacks the write_customers scope.
-
400CUSTOMER_GROUP_ID_INVALIDCustomer Group id is not a valid UUID.
-
404CUSTOMER_GROUP_NOT_FOUNDCustomer Group does not exist in this store.
-
400STORE_API_INVALID_REQUEST_BODYRequest body is not valid JSON or has an unknown field.
-
400CUSTOMER_GROUP_MEMBERS_EMPTYcustomer_idsis empty. -
400CUSTOMER_GROUP_MEMBERS_MAXcustomer_idshas more thanmax_members_batchids from the limits endpoint. -
400CUSTOMER_ID_INVALIDAn entry in
customer_idsis not a valid UUID; nothing is changed. -
400CUSTOMER_GROUP_MEMBERS_AUTOMATICThe group is automatic; its members come from its rules.
-
400STORE_API_BODY_PROPERTY_UNKNOWNThe body has a property this request does not accept. The message and
error.details.propertieslist the allowed and required properties (nestedfor each object or list of objects). -
400STORE_API_BODY_PROPERTY_INVALIDA body property has the wrong type (
error.details.expected_type). The message anderror.details.propertieslist the allowed and required properties. -
400STORE_API_QUERY_PARAMETER_UNKNOWNThe request has a query parameter; this endpoint takes none.
-
429RATE_LIMITEDThe request allowance is exhausted. Wait for Retry-After before retrying.
Fields#
Field |
Type |
Create |
Update |
Required |
Translatable |
|---|---|---|---|---|---|
|
text |
Yes |
Yes |
create |
No |
|
slug |
Yes |
Yes |
No |
|
|
textarea |
Yes |
Yes |
No |
|
|
select |
Yes |
Yes |
No |
|
|
select |
Yes |
Yes |
No |
|
|
integer |
No |
No |
No |
|
|
datetime |
No |
No |
No |
|
|
datetime |
No |
No |
No |
|
|
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
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
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
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 |