Request duplicate profile in segment by consent export

Duplicate profile in segment by consent export

Request an export with profiles that share a specific attribute value.

You can filter the results further by including only the profiles from existing segments or matching provided AQL queries. Provide the existing segments in segment_discriminators or AQL queries in segment_definitions. You also need to send the filter property with a simple logical expression that references the segment discriminator or definition names. You can use either discriminators or definitions. For example:

"segments": {
  "timezone": "Europe/Stockholm",
  "segment_discriminators": {
    "women": "usercreated.segments.women-rjz6b8td2n",
    "europe": "usercreated.segments.europe-d8jye63u2y"
  },
  "filter": "!(europe) & women"
},

The AQL queries can be obtained by calling APSIS One API endpoints that provide them for specific scenarios. For example, to export all profiles who opened a specific email, use the AQL query returned by Get a specific email activity.

You can also filter the results by including only the profiles who subscribed to specific topics. Provide one or more topic_discriminators and channel_discriminator to achieve this. For example:

"topic_discriminators": [
  "usercreated.topics.shoes-8u78kijgzn",
  "usercreated.topics.hats-udj7e6ywh3"
],
"channel_discriminator": "com.apsis1.channels.email"

The export file always contains the export key. You can select other attributes and tags to include their value as columns in the export file.

Downloading the requested export file

Once executed successfully, this endpoint returns a poll URL that is valid for 1 day. Call this URL repeatedly with exponential back-off using HTTP GET and the same authentication token as for the other APSIS One API calls. You will be getting one of the following responses:

  • HTTP 404 Not Found - export in progress, the export file is no longer available or the ID provided is invalid
  • HTTP 200 OK - the export file is ready and is immediately streamed as a response
  • HTTP 410 Gone - the export file is no longer available or the ID provided is invalid

Export file format

The Content-Type response header received when calling the poll URL specifies the export file format. Provide the Accept request header when calling the poll URL to select a different export file format. Supported values for these headers are:

  • CSV: text/csv;charset=UTF-8;header=present (default)
  • Excel: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet

You can download the same export multiple times using the same poll URL in different file formats.

Export file compression

By default the export file is not compressed so your code should treat it as, depending on the file format, .csv for example. If you prefer a compressed export, provide Accept-Encoding: gzip request header when calling the poll URL. The response will then contain Content-Encoding: gzip header and you will be able to handle the file as, depending on the file format, .csv.gz.

You can download the same export multiple times using the same poll URL with or without compression.

Limits

Receiving HTTP 413 Payload Too Large from this POST request usually means that the request body contains a number of topics, attributes and/or tags that is currently not supported.

Changes in Consent 2.0

In Consent 2.0 consent list discriminator is not required anymore so consent_list_discriminator request parameter is now deprecated

See this page to understand how to proceed with your existing and new integrations

More information

Video guides

Content-Type response header

Accept request header

Accept-Encoding request header

Language
Authorization
Bearer
JWT
URL