Process webhooks are used to call back to external systems when a process is complete - e.g. your customer has completed all required actions.
Configuring your webhook URL
When using the API to create processes (POST api/v2/ci/processes), you must set your webhook URL in the post body by setting the “webhookUrl” property.
This is particularly useful if you wanted to parameterise your webhook call, for example;
https://my-webhook.credas.com/updates?our-reference=1232323
The webhook URL is only set at creation time for the process so any changes will only affect new processes.
JSON example
A HTTP post will be sent to the configured webhook URL on completion of the process.
An example of the JSON POST body is below.
{
"ProcessId": "1e144e85-f45b-4ae3-8915-ae2826ea1e55",
"ClientId": "8c55ebc3-7ac2-469e-9837-94023aa82c3d",
"Status": 2,
"StatusDescription": "The process is complete"
}
At present you should only expect to receive a single process status value as per the table below.
ID | Status | Description |
2 | Complete | The process is complete |
Example use case
Our process webhook is commonly used to determine when an end user (e.g. your customer) has completed their process and results can now be retrieved.
When a webhook notification is received you can identify the relevant process using the processId included as part of the post body.
You can then perform additional requests to obtain the results of any checks such as:
- GET /api/v2/ci/entities/{entityId}/active-checks to obtain high level results.
- GET /api/v2/ci/processes/{processId}/details to obtain detailed process results.
- POST /api/v2/ci/entities/{entityId}/{processId}/pdf-export to download a PDF report containing results.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article