Querying for contingencies

Querying for contingencies

Use the following endpoints to retrieve information about existing contingencies.

Endpoint Description
GET /jobs​/{jobId}​/contingencies Retrieve all contingencies for the given job.
GET /jobs​/{jobId}​/contingencies​/{contingencyId} Retrieve the given contingency associated with the given job.
GET /policies​/{policyId}​/contingencies Retrieve all contingencies for the given policy.
GET /policies​/{policyId}​/contingencies​/{contingencyId} Retrieve the given contingency associated with the given policy.

Contingencies use the same schema, whether they are associated with jobs or with policies.

For example, the following is the attributes portion of the payload for contingency pc:70 associated with policy pc:62:

GET /policy/v1/policies/pc:62/contingencies/pc:70

{
  ...
        "attributes": {
            "action": {
                "code": "ChangeRetroactively",
                "name": "Change policy retroactively"
            },
            "actionStartDate": "2021-11-04T00:00:00.000Z",
            "actionStarted": false,
            "createDate": "2021-11-04T23:26:33.069Z",
            "createUser": {
                "displayName": "Alice Applegate",
                "id": "pc:S8PjyiRN14A1u20zgJ76k",
                "type": "User",
                "uri": "/admin/v1/users/pc:S8PjyiRN14A1u20zgJ76k"
            },
            "description": "Driving record required for 
                            good driver discount",
            "dueDate": "2021-11-11T00:00:00.000Z",
            "id": "pc:111",
            "status": {
                "code": "Pending",
                "name": "Pending"
            },
            "title": "Driving record required"
        },
  ...

Querying for related information

Use the following endpoints to retrieve information about activities, documents, and notes related to existing contingencies.

Contingencies associated with jobs

Endpoint Description
GET /jobs​/{jobId}​/contingencies​/{contingencyId}​/activities Retrieve the given activity associated with the given contingency on the given job.
GET /jobs​/{jobId}​/contingencies​/{contingencyId}​/documents Retrieve the given document associated with the given contingency on the given job.
GET /jobs​/{jobId}​/contingencies​/{contingencyId}​/notes Retrieve the given note associated with the given contingency on the given job.

Contingencies associated with policies

Endpoint Description
GET /policies​/{policyId}​/contingencies​/{contingencyId}​/activities Retrieve the given activity associated with the given contingency on the given policy.
GET /policies​/{policyId}​/contingencies​/{contingencyId}​/documents Retrieve the given document associated with the given contingency on the given policy.
GET /policies​/{policyId}​/contingencies​/{contingencyId}​/notes Retrieve the given note associated with the given contingency on the given policy.

Activities, documents, and notes use the same schema, whether they are primarily associated with account, jobs, policies, or contingencies.

For more information on working with activities, documents, or notes, see the following: