CROWDMANAGERCROWDMANAGER

Customer Profile Historical Push

Description

It is possible to push existing Customer Profiles data to endpoint registered in Customer Profile integration. This requires sending a POST request to export endpoint. Customer Profiles will be pushed in batches in plain json in array of elements in the same format as described in CustomerProfile Pushes.

GET endpoint can be used to retrieve status of the export job.

Warning

  1. The endpoints uses application/json content type instead of application/vnd.api+json used by most other endpoints in the API.
  2. Endpoints are part of General Api and therefore require Authorization header to be present see Security

Permissions

Endpoint

POST https://api.crowdmanager.io/v2/{organization-id}/customerinsights/customerprofiles/export?subscriptionId={long}&since={datetime}&until={datetime}

QUERY Parameters

Name Description Required
subscriptionId Id of the subscription for which historical data push should be performed. True
since Bottom date range for Customer Profiles to be pushed. Only entries updated post this date will be pushed. If null this constraint will be ignored. False
until Top date range for Customer Profiles to be pushed. Only entries updated before this date will be pushed. Defaults to the time request is made. False

Errors

Code Error Message
400 "Cannot start export historical CustomerProfiles for subscription <{subscriptionId}> which is not enabled."
400 "Cannot start export historical CustomerProfiles for subscription <{subscriptionId}> which is not validated."
400 "Invalid time frames for the export. Value of 'since' <{since}> cannot be after 'until' <{until}>."
404 "Cannot find CustomerProfile subscription with id: {subscriptionId}"
409 "Cannot start export historical CustomerProfiles for subscription <{subscriptionId}> while other export task is running."

Example

Request

GET https://api.crowdmanager.io/v2/{organization-id}}/customerinsights/customerprofiles/export?subscriptionId=111
Authorization: Basic aaabbbccc111222333
Content-Type: application/json

Response

201 Created
Response:
{
    "processedCount": 1,
    "totalCount": 0,
    "startOfExport": "2023-10-27T13:10:11.1651483Z",
    "endOfExport": null,
    "subscriptionId": 111,
    "exportSince": null,
    "exportUntil": "2023-10-27T13:10:07.1272991Z",
    "error": null
}

Endpoint

GET https://api.crowdmanager.io/v2/{organization-id}/customerinsights/customerprofiles/export?subscriptionId={long}

QUERY Parameters

Name Description Required
subscriptionId Id of the subscription for which historical data push should be performed. True

Errors

Code Error Message
404 "Cannot find CustomerProfile subscription with id: {subscriptionId}"
404 "Historical push wasn't performed for subscription with id: {subscriptionId}"

Example

Request

GET https://api.crowdmanager.io/v2/{organization-id}}/customerinsights/customerprofiles/export?subscriptionId=111
Authorization: Basic aaabbbccc111222333
Content-Type: application/json

Response

200 Ok
Response:
{
    "processedCount": 1,
    "totalCount": 0,
    "startOfExport": "2023-10-27T13:10:11.1651483Z",
    "endOfExport": null,
    "subscriptionId": 111,
    "exportSince": null,
    "exportUntil": "2023-10-27T13:10:07.1272991Z",
    "error": null
}

Fields

Historical Push Status

Fields

Name Description Type/Supported Values Supported Methods
subscriptionId Id of the subscriptions data is pushed to. long GET
processedCount Number of Customer Profiles that were pushed. int GET
totalCount Total number of the Customer Profiles that will be pushed. int GET
startOfExport Date of the start of the export job. DateTime GET
endOfExport Date of the start of the export job. If null or not present job is still running. DateTime GET
error Error that occured during the export. string GET
exportSince Bottom date range for Customer Profiles to be pushed. DateTime GET
exportUntil Top date range for Customer Profiles to be pushed. DateTime GET