Subscribe to Changes

Overview

Subscribe to employee profile changes by:

  • Submitting a list of employee IDs

  • Querying employee profiles using Search filters

  • Querying employee profiles using the Elasticsearch DSL schema.

Choose the subscription method that fits you best

Use Elasticsearch to specify the changes you want to be notified about.

Use search filters to specify the changes you want to be notified about.

Submit profile IDs to be notified of changes in that specific range.

Elasticsearch DSL requests

Use endpoint /v2/subscriptions/employee_base/es_dsl to specify a range of profiles you want to see the updates from.

Endpoint usage

  1. Prepare your request using the following request by adding select filters and your webhook URL to the template:

  • Change webhook_url to yours.

  • Insert your Elasticsearch query in the "es_dsl_query": {} section.

  • Insert your API Key token instead of {API Key}.

Request body template
curl -X 'POST' \
  'https://api.coresignal.com/cdapi/v2/subscriptions/employee_base/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:

Example request
curl -X 'POST' \
  'https://api.coresignal.com/cdapi/v2/subscriptions/employee_base/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"
            }
         }
      }
   }
}'
  1. Import the cURL to any API-compatible application.

  2. Send the request.

  3. You will start receiving updates via webhooks the next day. Updates will be sent daily.

Search filters requests

Use endpoint /v2/subscriptions/employee_base/filter to specify a range of profiles you want to see the updates from:

Endpoint usage

  1. 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}.

  • Add the selected filters in the "filters": {} section.

  • Change webhook_url to yours.

Request body template
curl -X 'POST' \
  'https://api.coresignal.com/cdapi/v2/subscriptions/employee_base/filter' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
  "webhook_url": "{your_webhook_url}",
  "filters": {}
}'

For example:

Example request
curl -X 'POST' \
  'https://api.coresignal.com/cdapi/v2/subscriptions/employee_base/filter' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: application/json' \
  -d '{
  "webhook_url": "{your_webhook_url}",
  "filters": {"experience_title": "Product Owner"}
}'
  1. Import the prepared cURL request to any API-compatible application.

  2. Send the request.

  3. You will start receiving updates via webhooks the next day. Updates will be sent daily.


IDs requests

Use the endpoint /v2/subscriptions/employee_base/ids to submit a list of IDs to subscribe to changes in a range of profiles.

Endpoint usage

  1. 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_url to yours.

  • Add the list of IDs

cURL request example
curl -X 'POST' \
  'https://api.coresignal.com/cdapi/v2/subscriptions/employee_base/ids' \
  -H 'accept: application/json' \
  -H 'apikey: {API Key}' \
  -H 'Content-Type: multipart/form-data' \
  -d '{
  "webhook_url": "{webhook_url}",
  "ids": [
    1,
    222,
    3456
  ]
}'
  1. Import the edited cURL request to Postman or any other API-compatible application.

  2. Send the request.

  3. You will start receiving updates via webhooks the next day. Updates will be sent daily.


Following steps

Keep in mind that to view specific changes in an employee profile, you will need to access the profile data using either the Base Employee API collection endpoints or the Bulk Collect endpoints.

Single profile update

You have received a webhook notification about an update in one employee profile:

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

Request type
Endpoint

GET

/v2/employee_base/collect/{employee_id}


Multiple profile updates

You have received a webhook notification about updates in several employee profiles:

Webhook
{
  "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 in a CSV or TXT file and use them with the following Bulk Collect endpoints:

Request type
Endpoint

POST

/v2/data_requests/employee_base/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?