Email marketing segments use a JSON object calledDocumentation Index
Fetch the complete documentation index at: https://docs.shoppex.io/llms.txt
Use this file to discover all available pages before exploring further.
filter_rules.
You can create segments in the dashboard under Marketing -> Email -> Audience -> Segments or through POST /dev/v1/email-marketing/segments.
All top-level rules are combined with
AND. Empty JSON ({}) means all eligible subscribed contacts.OR. For example, "country": ["DE", "AT"] means Germany or Austria.
Product purchase
Use product filters when you want customers who bought a specific product. Product filters match paid invoices with statusCOMPLETED, PARTIAL_REFUND, or REFUNDED. Developer invoices are excluded.
| Key | Value |
|---|---|
product_id | string |
product_ids | string array |
productId | string |
productIds | string array |
product.id | string |
product.ids | string array |
product.product_id | string |
product.product_ids | string array |
product.productId | string |
product.productIds | string array |
product.uniqid | string |
product.uniqids | string array |
Spending
Spending filters use the customer profiletotal_spent field.
Customers who spent at least 100:
Order count
Order count filters use the customer profileorder_count field.
Country
Country filters use ISO 3166-1 alpha-2 country codes from the customer profile.country_code is also supported:
country_code can also be an array.
Tags
Match one tag:Consent basis
Segments can narrow contacts to a specific marketing consent basis. Campaign sends only include eligible subscribed contacts.consent is also supported:
consent_basis and consent can also be arrays:
Source
Use source when you need contacts created through a specific path.customer_portal, dev-api, manual, backfill:paid_invoice, and automation sources like automation:post_purchase.
Last activity
Last activity filters use the email contactupdated_at timestamp.
Combined examples
Customers from Germany who bought a product and spent at least 100:Data source notes
- Product filters use paid invoice line items.
- Spending, order count, and country filters use customer profile fields.
- Tags, consent basis, source, and last activity use email audience contact fields.
- Contacts must still be subscribed, send-eligible, and linked to a known customer or paid buyer.