Webhooks

The 4Comply service uses webhooks to communicate with your code at various touchpoints. To add a webhook, you can use the POST /webhooks endpoints see API Reference or the 4Comply Dashboard (under Configuration select the Webhooks option and try to add a new webhook). To see a list of Actions that you can configure webhooks, you can call the GET /webhooks/triggers endpoint or see them in the 4Comply Dashboard.

Webhook events as configured in Right Request Steps will be delivered with the following format:

{
    "step_name": "RTPReadyToFulfillWebhook",
    "next_step_name": "RTPSendPartialData",
    "email": "jane.doe@email.com",
    "data": null,
    "history": [{
            "step_name": "RTBFSubmitForm",
            "timestamp": "07/07/2020 20:31:33",
            "output_data": {
                "Message": "Success to start",
                "failed": false
            },
            "error": null
        }, {
            "step_name": "RTBFReadyToFulfill",
            "timestamp": "07/07/2020 20:31:33",
            "output_data": {
                "Message": "Automatic move to next step",
                "failed": false
            },
            "error": null
        }
    ],
    "failed": null,
    "right_request_type": "RTP",
    "right_request_id": "469c72f8-ada9-4737-b139-06c1e1f06258",
    "regulation_id": "5e5920dde7c3aa000162dfef"
}

This is an example from a Right to Portability request.

If you need more information in your processing, you can retrieve the Right request itself using the right_request_id value and the GET /rightrequests/{id} endpoint, and from there you can fetch all the steps of the right request configuration using the GET /rightsrequestconfig endpoint.