Notifications and webhooks

Information can be sent to the partner when different events occur. A webhook endpoint needs to be configured in order to handle these notifications.

{
    "event": "processing-finished",
    "data": {
        "organizationId": "2345234523452345",
        "datasetId": "1234123412341234"
    }
}
{
    "event": "processing-errors",
    "data": {
        "organizationId": "2345234523452345",
        "datasetId": "1234123412341234",
        "errorCode": "CH92",
        "records": [
            "1234", "abcd"
        ]
    }
}

Get a list of all webhooks

GET /api/v2/webhooks
Authorization: Bearer ZW1haWxAZXhhbXBsZS5jb206cGFzc3dvcmQ=
Accept: application/json

The response should look like this:

[{
    "target": "https://notifications.partner.com",
    "id": 123451351235
}, {
    "target": "https://notifications-qa.partner.com",
    "id": 858585858585
}]

Configure a webhook

POST /api/v2/webhooks
Authorization: Bearer ZW1haWxAZXhhbXBsZS5jb206cGFzc3dvcmQ=
Content-Type: application/json
Accept: application/json

{
    "target": "https://notifications.partner.com"
}

The response should look like this:

{
    "id": "some_webhook_id",
    "target": "https://notifications.partner.com"
}

If there are more than one webhooks, all will be called when an event occurs.

Delete a webhook

DELETE /api/v2/webhooks/:webhook_id
Authorization: Bearer ZW1haWxAZXhhbXBsZS5jb206cGFzc3dvcmQ=

The response is a 204 No Content status code if the webhook was deleted successfully.

results matching ""

    No results matching ""