Register a notification url

SmartRecruiters can send notifications to our partners about new assessment orders as and when they are created. To receive such notifications, you can register a callback URL that will be used by the marketplace to send the ID of the new assessment order. 

Note: Notifications mechanism shouldn’t be the only way to find out about new orders from SmartRecruiters. This is because a notification is being sent only once. If your endpoint is not available, a notification won’t be sent again and an order will remain on the list, waiting to be handled.
In order to avoid it, you should implement a periodic check whether there are any new orders pending. To do this, please use the List assessment orders guidelines and filter the list by orders in status-NEW.
This will ensure you collect and process all new orders.

Register a notification url

You can register the callback URL by sending the Config object on the /configs endpoint. Please note that the Config object needs to have an “assessmentNotificationUrl” id.

Here is the POST request for URL registration:

curl -i -H "X-SmartToken:abc123" -H "Content-Type: application/json;charset=utf-8" -d @body.json -X POST https://api.smartrecruiters.com/v1/configs

body.json:

1
2
3
4
{
    "id": "assessmentNotificationUrl",
    "value": "http://api.partnercompany.com/notifications"
}

If there is a change in the URL, another POST request containing the updated value needs to be sent.

Check a notification url 

You can check how the notification url is set up using the following GET request:

curl -i -H "X-SmartToken: abc123" -X GET https://api.smartrecruiters.com/v1/configs/assessmentNotificationUrl

response body:

1
2
3
4
{
    "id": "assessmentNotificationUrl",
    "value": "http://api.partnercompany.com/notifications"
}

Assessment Notification body

After a successful URL registration, the system will send assessment order IDs as and when each order is created. The system will send an http POST request on the callback URL that you provided earlier. The body will be very simple and will contain AssessmentOrderNotification object:

1
2
3
4
{
    "assessmentOrderId": "511a3942300469a9c33819d8",
    "createDate": "2013-02-26T09:32:02.528+0000"
}