Apiture Developers Apiture Developers

Menu

  • Explore API Banking
    • API Digital Banking
    • Embedded Banking
    • Contact Us
  • Developers
    • Quick Start Guide
    • Embedded Banking
    • Events Reference
    • Authenticated Portal
  • API Documentation
    • API Reference
Log In / Register
Apiture Developers Apiture Developers
Log In / Register
Apiture Developers

Menu

  • Explore API Banking
    • API Digital Banking
    • Embedded Banking
    • Contact Us
  • Developers
    • Quick Start Guide
    • Embedded Banking
    • Events Reference
    • Authenticated Portal
  • API Documentation
    • API Reference

API Documentation

  • folder icon closed folder iconGetting Started
  • folder icon closed folder iconConcepts
    • API Keys
    • Authorization and Authentication
    • Access Tokens
    • Resources and URI Structure
    • Resource Collections
    • Resource Sets
    • Scopes & Entitlements
    • Error Responses
    • Error Types
    • Dry Runs
    • Markdown
    • Idempotent Operations
    • Collection Pagination
    • Collection Filtering
    • Transfers
    • Business Transfers
    • Cutoff Times
    • Identity Challenges
  • folder icon closed folder iconGuides
    • Authenticate Users in your App using OpenID Connect with PKCE
    • Authenticate using OAuth 2.0 Client Credentials Flow
    • Getting a List of Accounts
    • Listing the Balances for Accounts
    • Using Pagination
    • Creating a One-Time Transfer
    • Listing Transfers
    • Retrieving Business Transfer Information
    • Completing an Identity Challenge
    • Creating a New Customer Audience
    • Importing and Exporting Audiences
  • folder icon closed folder iconAPI Reference
  • folder icon closed folder iconRelease Notes

Importing and Exporting Audiences

  • folder icon closed folder iconAPI Documentation
    • Getting Started
    • Concepts
      • API Keys
      • Authorization and Authentication
      • Access Tokens
      • Resources and URI Structure
      • Resource Collections
      • Resource Sets
      • Scopes & Entitlements
      • Error Responses
      • Error Types
      • Dry Runs
      • Markdown
      • Idempotent Operations
      • Collection Pagination
      • Collection Filtering
      • Transfers
      • Business Transfers
      • Cutoff Times
      • Identity Challenges
    • Guides
      • Authenticate Users in your App using OpenID Connect with PKCE
      • Authenticate using OAuth 2.0 Client Credentials Flow
      • Getting a List of Accounts
      • Listing the Balances for Accounts
      • Using Pagination
      • Creating a One-Time Transfer
      • Listing Transfers
      • Retrieving Business Transfer Information
      • Completing an Identity Challenge
      • Creating a New Customer Audience
      • Importing and Exporting Audiences
    • API Reference
    • Release Notes
  • folder icon closed folder iconAuthenticated Portal
    • Getting Started
      • Registration
      • Profile
    • Concepts
      • Environments
      • Products
    • Managing your Applications
      • Creating Applications
      • Creating Data Direct: Real-Time Webhooks
      • Editing Applications
      • Application Owners
      • Getting Application Keys and IDs
      • Continue your Project
    • Release Notes
      • Developer Portal 1.0
      • Developer Portal 1.1
  • folder icon closed folder iconEmbedded Banking
    • Getting Started
    • Concepts
      • Overview
      • Managing User Credentials
      • Components
      • Registering your Application
      • Terminology
      • Encryption and Authentication
    • Guides
      • Component Customization
      • Customization Examples
      • Initializing Components
      • Event Handling and Data Processing
    • Release Notes
      • EB v1.0 Release Notes
      • EB v1.2.2 Release Notes
      • EB v1.3 Release Notes
      • Developer Portal 1.0 Update
  • folder icon closed folder iconEvents
    • Introduction
    • Guides
      • General Structure
      • Field Annotations
      • Customer Onboarding Data Direct: Real-Time
    • Data Delivery
      • Flat File Delivery
      • Snowflake Delivery
      • Event History API
      • Real-time / Webhooks

Importing and Exporting Audiences

A list of audience members can be imported and exported from the Data Portal via the API.

Importing an Audience

Audiences can be imported from a list of identifying values. On the website, this feature can be used via a file upload interface. When importing via API, the list of values must be compressed to a Base64-encoded string before it can be sent, as if it was a file upload.

Select the Identifier Type

A variety of information is available to be used as the identifying value. The various identifier types are documented here.

The list must contain only one identifier type.

Building the List of Audience Members

Each customer in the list should be separated by a line break. There should be no commas or other separating characters.

If this function was using the file upload, the file would contain a one-column table. However, since using the API skips the file upload process, the data should be formatted similarly in plain text.

A header row is optional. If using the API, it is generally easier to not have a header.

Convert Audience Member List to Base64

Once the list of audience members is formed, it must be converted to Base64 string programatically. This string will be included in the request body.

Form the Request Body

The request body contains several fields:

  • identifierType: Set to the identifier type included in your list

  • includesHeader: If a header row is included, the includesHeader parameter can be set to true to skip the first row. Otherwise, set it to false.

  • content: The Base-64 string of condensed data.

  • name: The name of the new audience.

  • description: (Optional) A description of the audience.

  • fileName: A filename for the data. This field is required, even if a file is not used in this scenario. Enter ‘filename.csv’ or similar placeholder data if a file is not used.

				
					{
  "identifierType": "taxIdNumber",
  "includesHeader": false,
  "content": "QmFzZS02NCBlbmNvZGVkIENTViBjb250ZW50IGhlcmUuLi4=",
  "name": "New Customers Ages 35-49",
  "description": "New customers added within the last 60 days who are in the 35-49 years age group.",
  "fileName": "2023_18to35_north_carolina.csv"
}
				
			

Send the Request

Perform a POST operation to importedCustomerAudiences with the request body created earlier.

POST /service/importedCustomerAudiences

If successful, the response contains customer counts and other information about the created audience.

If an error occurs, troubleshoot the list of members before it is encoded into Base-64 to ensure the data in valid and formatted correctly.

Exporting Audience Members

Audience members cannot be exported to a file via the API. However, a list of audience members can be gathered, which can then be formatted and stored as desired.

listCustomerAudiences

To gather the customers within an audience, you must first gather the ID of the audience.

Perform a GET operation on customerAudiences

GET /service/customerAudiences

				
					"items": [
    {
      "name": "Most valuable customers",
      "description": "New customers added within the last 60 days who are in the 35-49 years age group.",
      ...
      "id": "0399abedfd3d",...
      } ,....
				
			

From this list, find the audience ID that matches the audience with the name or description you desire.

listCustomerAudienceCustomers

Once the audience ID has been gathered, perform a GET operation on the list of customers for the requested audience. Replace {customerAudienceId} with the ID from earlier.

GET /service/customerAudiences/{customerAudienceId}/customers

A list of customers is returned, which may have more than one page of data. This function uses pagination, which means the function may need to be called multiple times to gather all of the data. For more on pagination, read our documentation on pagination and our guide for calling functions with pagination.

Once you have collected the full list of customers, the data can be exported and formatted however desired.

How can we help?

Get support for your issues.

Explore API Banking

  • API Digital Banking
  • Embedded Banking
  • Contact Us

Developers

  • Get Started Guide
  • API Reference
  • Embedded Banking

More

  • Apiture.com

Privacy Policy

© 2023 Apiture Inc.   |   All Rights Reserved