Customer Profile B2B APIs

Getting Started with Customer Profile B2B APIs

The Customer Profile B2B API is a key component in digital marketing, offering real-time insights into individual customers. It aggregates data such as demographics, purchase history, online activity, and campaign involvement into a unified profile. These APIs enable marketers to provide personalized experiences to customers, improve engagement, and optimize campaigns.

Key Features:

  • Consolidated real-time customer profiles

  • Identity resolution and customer lifecycle insights

  • Data-driven segmentation and product recommendations

Authentication Scope

The Customer Profile B2B API uses OAuth 2.0 for secure authentication. You must generate an OAuth access token to interact with the API endpoints. Each token has a limited validity period, enhancing security by restricting unauthorized access to sensitive customer data.

OAuth Requirements:

  • Access tokens are required for API calls.

  • Tokens are temporary and can be refreshed as needed.

Note: For more information about creating and updating an OAuth access token, see API Authentication.

Obtaining Access Tokens

To use the Customer Profile B2B APIs, you need to request an access token. This token will authenticate your API calls. The following details are necessary to create an access token:

API token URL

You can obtain your API token URL by contacting your CSM or Algonomy support team.

Resources

To create a token, you need one or more resources in your request payload. You can include multiple resources in the payload by separating them with commas.

Available resources are:

Resources Description
basic Retrieves basic profile details (name, age, DOB, etc.).
segments

Fetches the segments associated with the customer.

searchSegments

Checks if a customer belongs to a specific segment by name.

isCustomerInSegment Verifies if a customer belongs to a particular segment by ID.
campaigns Lists campaigns the customer is involved in.
searchCampaigns To check if a customer is part of a specific campaign by name.
recommendedProducts Retrieves product recommendations for the customer.

userActivity

Provides an overview of the customer’s online activity.

productPurchaseTrends

Shows the customer’s historical purchase trends.

productPurchased

Retrieves historical product purchases.

affinity

Displays the customer’s affinity for specific products or categories.

userAttributes

Fetches customer attributes.

gcrId

Fetches customer records.

optIn

Fetches the opt-in status of the customer for marketing communications.

Tenant_hash

You can obtain your tenant_hash by contacting your CSM or Algonomy support team.

OAuth_key_secret

Note: OAuth_key_secret is required if the tenant is enabled with B2B API OAuth authentication.

You can obtain your OAuth_key_secret (OAuth secret key) by contacting your Customer Success Manager (CSM) or the Algonomy support team.

There is a soft limit on the number of tokens that can be created for B2B APIs daily. The soft limit is 100, but it can be increased as needed. Contact your CSM or Algonomy support team for assistance.

Example Token Request

Copy
{
  "resources": ["basic", "segments"],
  "validity": 600
}

Customer Identifier

Each API request requires at least one customer identifier to retrieve the correct profile. If multiple identifiers are provided, they must correspond to a single customer. If the input leads to more than one customer match, the API will not process the request.

Supported Identifiers:

Identifier Type Request Header Parameter
GCRID (Golden Customer Record ID generated by RCDP Application) gcrId
Email address email_address
Mobile number mobile_number
External customer code customer_code_external

Examples of Request Headers with Identifiers:

All identifiers are part of Request Header, user can send the following values as identifiers:

  • gcrId=1 for customer ID as identifier

  • mobile_number=1212121212 for mobile number as identifier

  • email_address=a@a.com for email as identifier

  • email_address=a@a.com and mobile_number=1212121212 for combined email and mobile mapping.

  • gcrId=1 and email_address=a@a.com and mobile_number=1212121212 for a customer mapped to all three identifiers.

List of Customer Profile APIs

The following Customer Profile APIs are available to access the user data in Real-time CDP:

FAQs