Viewing available coverages on a policy
The Cloud API allows you to view the coverages on a job or policy. You can also use a filter query parameter to retrieve coverages that are available but are not selected on the job or policy.
Use the following GET endpoints to view the selected coverages on a job or policy:
- GET
/jobs/{jobId}/lines/{lineId}/{coverablesName}/{coverableNameId}/coverages - GET
/jobs/{jobId}/lines/{lineId}/{coverablesName}/{coverableNameId}/coverages/{coverageId} - GET
/policy/{policyId}/lines/{lineId}/{coverablesName}/{coverableNameId}/coverages - GET
/policy/{policyId}/lines/{lineId}/{coverablesName}/{coverableNameId}/coverages/{coverageId}
Note: For a job or policy, the
selected field in
the API response indicates whether a coverage was selected or not. By default, the
API responses returns coverages where "selected": true. Based on your requirements, add one of the following filters to the GET
request:
| To | Use this filter |
|---|---|
| View the list of selected coverages and the list of coverages that are available but are not selected on a job or policy | filter=selected:in:true,false |
| View the list of coverages that are available but are not selected on a job or policy | filter=selected:false |
For example, the following endpoint returns the list of selected coverages and the list of coverages that are available but are not selected for the SBOline on job pc:1:
Command
GET /job/v1/jobs/pc:1/lines/SBOLine/coverages?filter=selected:in:true,false Response
{
"count": 4,
"data": [
{
"attributes": {
"clauseType": "coverage",
"id": "SBOBusinessLiability",
"pattern": {
"displayName": "Business Liability",
"id": "SBOBusinessLiability"
},
"priority": 1,
"selected": true,
"terms":
...
},
"checksum": "7376ade1376e202bbd67c5552a886438",
"links": {
"self": {
"href": "/job/v1/jobs/pc:1/lines/SBOLine/coverages/SBOBusinessLiability",
"methods": [
"get"
]
}
}
},
{
"attributes": {
"clauseType": "coverage",
"id": "SBOBusinessIncome",
"pattern": {
"displayName": "Business Income",
"id": "SBOBusinessIncome"
},
"priority": 2,
"selected": true,
"terms":
...
},
"checksum": "beb3c9e1b1fbbe560c175ef76b428d7a",
"links": {
"self": {
"href": "/job/v1/jobs/pc:1/lines/SBOLine/coverages/SBOBusinessIncome",
"methods": [
"get"
]
}
}
},
{
"attributes": {
"clauseType": "coverage",
"id": "SBOEmployeeDishonesty",
"pattern": {
"displayName": "Employee Dishonesty",
"id": "SBOEmployeeDishonesty"
},
"priority": 3,
"selected": false,
"terms": {}
}
},
{
"attributes": {
"clauseType": "coverage",
"id": "SBOFogeryAlteration",
"pattern": {
"displayName": "Forgery Alteration",
"id": "SBOFogeryAlteration"
},
"priority": 4,
"selected": false,
"terms": {}
}
}
],
"links": {
"first": {
"href": "/job/v1/jobs/pc:1/lines/SBOLine/coverages?filter=selected:in:true,false",
"methods": [
"get"
]
},
"self": {
"href": "/job/v1/jobs/pc:1/lines/SBOLine/coverages?filter=selected:in:true,false",
"methods": [
"get"
]
}
}
}In the response, the property "selected": false indicates that a
coverage was not selected. The response indicates that the forgery alteration and
employee dishonesty coverages were not selected but they are available as coverages on
this submission job.