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
{
"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

If you attempt to use an expired token, you will receive a 401 Unauthorized HTTP response.

Yes, you can extend the validity of an existing token using the following API:
https://{B2B_API_URL}/secureApi/token/profile/update
The structure of the request payload and other details are the same. Additionally, you need to include the token as an additional request body parameter with the previously created token as its value. You should specify the desired validity in the payload in terms of the number of minutes.
Here is an example to extend the validity to another 600 minutes.
{
"resource":["basic"],
"validity":600,
"token":"<previously generated token>"
}

Yes, you can. You can update the resources for an existing valid token using the following API:
https://{B2B_API_URL}/secureApi/token/profile/update
The structure of the request payload and other details remain the same. Additionally, you need to include the token as an additional request body parameter, along with the previously created token as its value. You should specify the desired set of resources in the payload.
In this example, we have updated the resources, including the addition of another resource called "segments."
{
"resource":["basic","segments"],
"validity":300,
"token":"<previously generated token>"
}

The token will be automatically discarded after the full 60 minutes of validity has passed.