Creating contingencies
Use the following endpoints to create a contingency associated with either a job or a policy:
- POST
/jobs/{jobId}/contingencies
- POST
/policies/{policyId}/contingencies
Minimum creation criteria
At a minimum, a contingency must specify:
- A
title
- A
description
- A
dueDate
- An
action
, which must be set to a typecode from theContingencyAction
typelist
For example, the following request creates a new contingency for policy pc:62 with the given title and description. The due date is November 11, 2021. If the contingency is not resolved by then, PolicyCenter will take the action of retroactively changing the policy (to remove the good driver discount).
POST /policy/v1/policies/pc:62/contingencies
{
"data": {
"attributes": {
"action": {
"code": "ChangeRetroactively"
},
"description": "Driving record required for good driver discount",
"dueDate": "2021-11-11T00:00:00.000Z",
"title": "Driving record required"
}
}
}
Creating related objects
Use the following endpoint to create activities, documents, and notes for a contingency.
Contingencies associated with jobs
Endpoint | Description |
---|---|
POST /jobs/{jobId}/contingencies/{contingencyId}/activities | Create an activity associated with the given contingency on the given job |
POST
/jobs/{jobId}/contingencies/{contingencyId}/documents |
Create a document associated with the given contingency on the given job |
POST
/jobs/{jobId}/contingencies/{contingencyId}/notes |
Create a note associated with the given contingency on the given job |
Contingencies associated with policies
Endpoint | Description |
---|---|
POST
/policies/{policyId}/contingencies/{contingencyId}/activities |
Create an activity associated with the given contingency on the given policy |
POST
/policies/{policyId}/contingencies/{contingencyId}/documents |
Create a document associated with the given contingency on the given policy |
POST
/policies/{policyId}/contingencies/{contingencyId}/notes |
Create a note associated with the given contingency on the given policy |
When an activity is created directly for an account, job, or policy, you must specify an
activity pattern. However, when an activity is created for a contingency, you must omit the
activity pattern. All activities created through contingencies use the "New Contingency"
activity pattern (uw_review_contingency
). If the request payload contains
an activity pattern, the request fails.
For more information on working with activities, documents, or notes, see the following: