Management of contact data endpoints
Delete contact data
Create a new delete contact request.
You can browse the full information about the Delete contact request API using the dedicated API browser.
Go to API server docs
Sample request and response
The following request creates a new request for deletion of data for a contact reported to the Website data source with a tracking ID 183:
Body JSON:
GET /analytics/v1/contacts/delete-requests
Get all delete requests in a specific data center.
You can browse the full information about the Get all delete requests API using the dedicated API browser.
Go to API server docs
Parameters
Name |
Location |
Required |
Data type |
Description |
x-dataintelligence-filter |
Header |
No |
{
"PropertyName":
"PropertyValue"
|
You can filter the delete requests by some of their properties. The allowed properties are Status and CreatedOn |
Sample request and response
The following request will filter only delete requests, which are with status Done.
HTTP:
GET https://api.insight.sitefinity.com/analytics/v1/contacts/delete-requests
Headers:
Authorization: bearer token
x-dataintelligence-datacenterkey: c27aeeb7-d222-d848-d8bf-9792485dafa9
x-dataintelligence-filter: {“Status”: “Done”}
Sample JSON response:
GET /analytics/v1/contacts/delete-requests/{request-id}
Get a delete request by ID.
You can browse the Get delete request by ID API using the dedicated API browser.
Go to API server docs
Parameters
Name |
Location |
Required |
Data type |
Description |
request-id |
URI path |
Yes |
Integer |
The ID of the delete request you want to retrieve |
Sample request and response
The following request will get the delete request with ID 83.
HTTP:
GET https://api.insight.sitefinity.com/analytics/v1/contacts/delete-requests/83
Sample JSON response:
Export contact data
Create a new export request for contact data.
Request body
Name |
Required |
Data type |
Description |
JSON root |
Yes |
{
"TargetSubjectsJson": SubjectId[]
}
For more information, see Subject ID API data type.
|
The array of the subject (tracking ID) and data source pairs you wish to export the data of |
Responses
Sample request and response
The following request creates a new export data request for a contact reported to the “Website” data source with a tracking ID “185”.
HTTP:
POST https://api.insight.sitefinity.com/analytics/v1/contacts/export-requests
Body JSON:
Sample JSON response:
GET /analytics/v1/contacts/export-requests
Get all export requests in a specific data center.
You can browse the Get all export requests API using the dedicated API browser.
Go to API server docs
Parameters
Name |
Location |
Required |
Data type |
Description |
x-dataintelligence-filter |
Header |
No |
{
"PropertyName":
"PropertyValue"
}
|
You can filter the delete requests by some of their properties. The allowed properties are Status and CreatedOn . |
Responses
Name |
Returned data |
Description |
200 OK |
{
"items": ExportContactRequest[],
"count": Integer
}
For more information, see ExportContactRequest API data type.
|
Returns a collection containing data delete requests. The count property is returned only if the x-dataintelligence-count parameter is set to true . |
Sample request and response
The following request filters only export requests, which are with status DataPrepared
.
HTTP:
GET https://api.insight.sitefinity.com/analytics/v1/contacts/export-requests
Headers:
Authorization: bearer token
x-dataintelligence-datacenterkey: c27aeeb7-d222-d848-d8bf-9792485dafa9
x-dataintelligence-filter: {“Status”: “DataPrepared”}
Sample JSON response:
GET /analytics/v1/contacts/export-requests/{request-id}
Resource information
URL |
https://api.insight.sitefinity.com/analytics/v1/contacts/export-requests/{request-id} |
HTTP method |
GET |
Description |
Get an export request by ID. |
Authentication |
Required |
Parameters
Name |
Location |
Required |
Data type |
Description |
Authorization |
Header |
Yes |
String |
The access token of the user. |
x-dataintelligence-datacenterkey |
Header |
Yes |
Guid |
The API key of the data center. |
request-id |
URI path |
Yes |
Integer |
The ID of the delete request you want to retrieve. |
Responses
Sample request and response
The following request will get the export request with ID 150.
HTTP:
GET https://api.insight.sitefinity.com/analytics/v1/contacts/export-requests/150
Headers:
Authorization: bearer token
x-dataintelligence-datacenterkey: c27aeeb7-d222-d848-d8bf-9792485dafa9
Sample JSON response:
GET /analytics/v1/contacts/export-requests/{request-id}/download
Resource information
URL |
https://api.insight.sitefinity.com/analytics/v1/contacts/export-requests/{request-id}/download |
HTTP method |
GET |
Description |
Get the exported data of an export request by ID. |
Authentication |
Required |
Parameters
Name |
Location |
Required |
Data type |
Description |
Authorization |
Header |
Yes |
String |
The access token of the user. |
x-dataintelligence-datacenterkey |
Header |
Yes |
Guid |
The API key of the data center. |
request-id |
URI path |
Yes |
Integer |
The ID of the delete request you want to get the data for. |
Responses
Returned data |
Description |
Binary string |
Returns the binary string of the .ZIP file that contains a single file, named sitefinity-insight-client-data.json . This JSON file contains the exported data in the DecExportedData format. |
GeneralErrorResponse |
Returned when:
- An invalid API key is provided in the
x-dataintelligence-datacenterkey .
- The API key is valid, but the authenticated user does not have access to this data center.
- Your account does not have access to personally identifiable information.
|
GeneralErrorResponse |
A delete request with the provided ID does not exist. |
Sample request and response
The following request will get the extracted data for export request with ID 150.
HTTP:
GET https://api.insight.sitefinity.com/analytics/v1/contacts/export-requests/150/download
Headers:
Authorization: bearer token
x-dataintelligence-datacenterkey: c27aeeb7-d222-d848-d8bf-9792485dafa9
Response:
The response is a data stream which you need to save as a .ZIP
file. Extract the saved .ZIP
file and read the content of the .json
file: