Create an incident

In the previous step we learned how to use the metadata/programmes endpoint to gather the information we need to create a Motor incident on the Demonstration Programme. We will now go ahead and create the incident using the incidents endpoint and finally review the created incident in the Claims Manager application.

The call below will create a new incident with the details provided. Note that the programmeCode and policyTypeCode are using the values we retrieved in the last step. The details provided here are the bare minimum required to create an incident, please see the Incident reference page for information on how to pass additional fields and advanced usage instructions.

curl --location --request POST 'https://api.claimsmanagertest.crawco.co.uk/Incidents' \
--header 'Authorization: Bearer {access token}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "programmeCode": "8ffd4f55",
    "policyCountry": "GB",
    "policyTypeCode": "17ed9895",
    "incidentDate": "2022-04-01",
    "description": "Test incident from Claims Manager Api"
}'

Assuming everything was OK, you will receive a 201 - Created response with a json response body containing the newly created incidentId.

{
    "incidentId": 6596553,
    "claimants": null,
    "parties": null,
    "errors": null
}

We can now use the returned incidentId to view the incident in Claims Manager. Head over to Claims Manager and enter the incidentId into the 'System Number' field in the top right hand corner. You should now see the incident you just created via the Api with the details you provided.

New Incident

Next steps

Congratulations! You've created your first incident through the Claims Manager Api. Use the navigation menu to explore each of the various endpoints and what capabilities they have.