younifyd
Menu

Get audiences for given filters

Get audiences for given filters

GET/promotions/audiences

Use it in a workflow

  1. Add a step and choose the SCAYLE Admin connector.
  2. Pick the Get audiences for given filters action (under Promotions).
  3. Fill in the fields below, then reference the result from later steps as {{getAudiencesForGivenFilters.response.data}}.

Request

Query parameters

filters[id]array<string>

Comma-separated list of IDs of entities that should be used for filtering.

filters[name]string

Entity name value.

filters[companyId]array<integer>

Comma-separated list of company IDs that should be used for filtering.

filters[customerId]array<integer>

Comma-separated list of customer IDs that should be used for filtering.

cursorstring

Valid cursor used for pagination.

limitinteger

Maximum number of entities in the result. When fetching entities with children, the limit always applies to the amount of parent entities (max. 1000).

Default 100

Response

Returns 200 with an object. Read it in later steps with {{getAudiencesForGivenFilters.response.data.<field>}}.

entitiesarray<object>
idstring

Audience id

namestringrequired

Internal name of the audience

descriptionstringrequired

Internal description of the audience

companyIdsarray<integer>required

The list of company ids where the audience takes place

customerIdsarray<integer>required

The list of customer ids

createdAtstring

Created at date

updatedAtstring

Updated at date

cursorobject
nextstring

The cursor pointing to the next page. If null there is no next page available.

json
{
  "entities": [
    {
      "name": "VIP customers",
      "description": "German VIP Customers from Hamburg only",
      "companyIds": [
        100
      ],
      "customerIds": [
        345,
        456,
        567
      ],
      "id": "645e0c241a93369ff53f26e0",
      "createdAt": "2023-05-10T10:00:00+00:00",
      "updatedAt": "2023-05-10T10:00:00+00:00"
    }
  ],
  "cursor": {
    "next": "MQ=="
  }
}

Need more? See the SCAYLE Admin guide for connection setup and behaviour shared by every action.

Get audiences for given filters — SCAYLE Admin — Documentation