Marketing

Create an email list from shop criteria

Builds an auto-populated email list in the Customer API from criteria evaluated against the Shop API. The intended use case is one-shot mailshots: select an order filter or session attendance in the operator UI and have the matching customers piped into a Mailchimp-compatible list without manual export.

The criteria type determines which selector fields are required — order_filters expects the filters object, session_attendees expects session_id, and so on.

post/shop/email-lists

Request body

namestring required

The display name of the email list.

criteria_type'order_filters' | 'session_attendees' required

Which selector the list is populated from. Determines which of the optional fields below must be supplied.

filtersobject

For criteria_type: order_filters, the order filters applied — same shape as the order-list query parameters.

session_idstring

For criteria_type: session_attendees, the session whose attendees should be added to the list.

site_idstring

The site the email list belongs to.

Example request

{
  "name": "January orders",
  "criteria_type": "order_filters",
  "session_id": "5dcb47800000000000000000",
  "site_id": "00000000-0000-0000-0000-111111111111"
}

Response

The email list was successfully created.

Example response

{
  "data": {
    "id": "00000000-0000-0000-0000-111111111111",
    "name": "January orders"
  }
}

Changes