Subscribe to Changes
Overview
Subscribe to employee experience changes by:
Submitting a list of employee IDs
Querying employee profiles using the Elasticsearch DSL schema.
Elasticsearch DSL requests
Use endpoint /v2/subscriptions/experience_changes/employee_multi_source/es_dsl to specify a range of profiles you want to see the updates from.
Endpoint usage
Prepare your request using the following request by adding select filters and your webhook URL to the template:
Change
webhook_urlto yours.Insert your Elasticsearch query in the
"es_dsl_query": {}section.Insert your API Key token instead of
{API Key}.
curl -X 'POST' \
'https://api.coresignal.com/cdapi/v2/subscriptions/experience_changes/employee_multi_source/es_dsl' \
-H 'accept: application/json' \
-H 'apikey: {API Key}' \
-H 'Content-Type: application/json' \
-d '{
"webhook_url": "{your_webhook_url}",
"es_dsl_query": {}
}'For example:
curl -X 'POST' \
'https://api.coresignal.com/cdapi/v2/subscriptions/experience_changes/employee_multi_source/es_dsl' \
-H 'accept: application/json' \
-H 'apikey: {API Key}' \
-H 'Content-Type: application/json' \
-d '{
"webhook_url": "{your_webhook_url}",
"es_dsl_query": {
"query": {
"match": {
"full_name": {
"query": "John Smith",
"operator": "and"
}
}
}
}
}'Import the cURL to any API-compatible application.
Send the request.
You will start getting updates on select profiles after two days. Updates will be sent once a week.
You will see a subscription ID as an output for your POST request.
Save this ID for later. You can use it to find your subscription through subscription management endpoints. You can retrieve employee data using the employee IDs visible in the webhook text.
IDs requests
Use the endpoint /v2/subscriptions/experience_changes/employee_multi_source/ids to submit a list of IDs to subscribe to changes in a range of profiles.
Endpoint usage
Prepare your request using the following request by adding select filters and your webhook URL to the template:
Insert your API Key instead of
{API Key}.Change
webhook_urlto yours.Add the list of IDs
curl -X 'POST' \
'https://api.coresignal.com/cdapi/v2/subscriptions/experience_changes/employee_multi_source/ids' \
-H 'accept: application/json' \
-H 'apikey: {API Key}' \
-H 'Content-Type: multipart/form-data' \
-d '{
"webhook_url": "{webhook_url}",
"ids": [
1, //Example IDs list
222,
3456
]
}'Import the edited cURL request to Postman or any other API-compatible application.
Send the request.
You will start getting updates on select profiles after two days. Updates will be sent once a week.
You will see a subscription ID as an output for your POST request.
Save this ID for later. You can use it to find your subscription through subscription management endpoints. You can retrieve employee data using the employee IDs visible in the webhook text.
Following steps
Single profile update
You have received a webhook notification about an update in one employee profile:
{
"member_id": 123,
"status": "started_matching_query"
}To see the exact changes in the profile, you will have to use the profile ID in the following endpoint:
GET
/v2/employee_multi_source/collect/{employee_id}
Multiple profile updates
You have received a webhook notification about updates in several employee profiles:
{
"member_id": 123,
"status": "started_matching_query"
},
{
"member_id": 124,
"status": "stopped_matching_query"
},
{
"member_id": 125,
"status": "changed"
}To identify the changes in these profiles, you need to export the employee IDs and use them with the following Bulk Collect endpoints:
POST
/v2/data_requests/employee_multi_source/ids
GET
/v2/data_requests/{data_request_id}/files
GET
/v2/data_requests/{data_request_id}/files/{file_name}
Follow the instructions here to successfully collect the employee data (from left to right):
Last updated
Was this helpful?