Webhooks: MidEvent
MidEvent webhooks can be defined for each page within an event and will be triggered when the "Continue" button is clicked by the user to go to the next page. As such, they always take place between the start and the submission of a case creation or progression and are only issued by the QuickCase UI, not by the API.
Use cases
- Bespoke validation of the fields captured in the current page
- Pre-populate case fields on subsequent pages based on answers provided on the previous or current pages
Contract
Request
Payload:
{
"case_details": {
"id": "string",
"case_type_id": "string",
"created_date": "string",
"last_modified": "string",
"state": "string",
"security_classification": "string",
"case_data": {
"case_field1": "",
"case_field2": "",
},
"data_classification": {
"case_field1": "<Security classification>",
"case_field2": "<Security classification>",
}
}
}
Response
Status: 200
Payload (optional):
{
"data": {
"case_field1": "",
"case_field2": "",
"case_field3": "",
},
"errors": [
"Error 1",
],
"warnings": [
"Warning 1",
]
}
data
(optional) - the altered, complete case data to be returned. Any case fields present in the requestcase_data
and omitted from the responsedata
will be missing from the mid event payload and would appear empty in the UI. The data returned in the response will be validated against the case type definition, including checks for valid field names and data type correctness. In case of any validation errors, the mid event call will fail and the error messages will be returned with HTTP status 422 back to initiator of the mid event (UI or API). Whendata
is omitted from the webhook response, then the case data as provided in the request will be used instead.errors
(optional) - list of error messages to be returned. If there are any errors, the about to mid event call will fail and the error messages will be returned with HTTP status 422 back to initiator of the mid event (UI or API).warnings
(optional) - list of warning messages to be returned. If there are any warnings, the mid event call will fail and the warning messages will be returned with HTTP status 422 back to initiator of the mid event (UI or API) unless the about to start URL is configured with query parameterignore-warning=true
.