Employee API
...
Endpoints
Webhook Subscriptions

Subscribe to Changes

28min

Overview

Subscribe to employee profile changes by:

  • Submitting a list of employee IDs
  • Querying employee profiles using search filters
  • Querying employee profiles using the ES DSL schema.

Choose the subscription method that fits you best

POST requests using Elasticsearch schema

Use endpoint /v1/subscriptions/professional_network/member/es_dsl to specify a range of profiles you want to see the updates from. 

The following filters are not available in the subscription ES DSL requests:

  • created
  • last_updated.

Endpoint usage

  • Prepare your request using the following request by adding select filters and your webhook URL to the template:
Request body template

Example request

  • Insert your Employee API token instead of {JWT}.
  • Insert your Elasticsearch query in the"es_dsl_query": {} section.
  • Import the cURL to any API-compatible application.
  • Send the request.
  • You will start getting updates on select profiles after two days.

You will see a subscription ID as an output for your POST request. However, you can ignore this ID since the necessary data will be provided in the webhook updates. You can retrieve employee data using the employee (member) IDs visible in the webhook text.

POST requests using search filters

Use endpoint /v1/subscriptions/professional_network/member/filter to specify a range of profiles you want to see the updates from:

The following filters are not available in the subscription search filter requests:

  • created_at_gte and created_at_lte
  • last_updated_gte and last_updated_at_lte.

Endpoint usage

  • Prepare your request using the following request by adding select filters and your webhook URL to the template:
Request body template

Example request

  • Insert your Employee API token instead of {JWT}.
  • Add the selected filters in the "filters": {} section.
  • Import the prepared cURL request to any API-compatible application.
  • Send the request.
  • You will start getting updates on select profiles after two days.

You will see a subscription ID as an output for your POST request. However, you can ignore this ID since the necessary data will be provided in the webhook updates. You can retrieve employee data using the employee (member) IDs visible in the webhook text.



POST requests using IDs

Use the endpoint /v1/subscriptions/professional_network/member/id_file to submit a list of IDs in a CSV or Txt file to subscribe to changes in a range of profiles. Check the example for the ID list formatting:

Endpoint usage

  • Prepare the IDs file in a CSV or Txt format. Make sure the list only contains numeric IDs.

Avoid any additional headings in the file. The request will fail if non-numeric data is present in the file.

  • Paste in your JWT token instead of {JWT} and your webhook URL in the cURL request template:
cURL request

  • Import the edited cURL request to Postman or any other API-compatible application.

Further instructions are for the POST requests using Postman.

  • Click Body:
Document image

  • Upload the IDs file by clicking the Select Files button in the Value column:
Document image

  • Send the request.
  • You will start getting updates on select profiles after two days.

You will see a subscription ID as an output for your POST request. However, you can ignore this ID since the necessary data will be provided in the webhook updates. You can retrieve employee data using the employee (member) IDs visible in the webhook text.



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


To see the exact changes in the profile, you will have to use the profile ID in the following endpoint:

Function

Endpoint

GET

/v1/professional_network/member/collect/{member_id}



Multiple profile updates

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

Webhook


To identify the changes in these profiles, you need to export the employee (member) IDs in a CSV or TXT file and use them with the following Bulk Collect endpoints:

Function

Endpoint

POST

/v1/professional_network/member/bulk_collect/id_file

GET

/v1/bulk_collect/{data_request_id}/files

GET

/v1/bulk_collect/{data_request_id}/files/{file_name}

Follow the instructions here to successfully collect the employee data (from left to right):