Blankets on jobs
The following endpoints are available for working with blankets through the job API:
- GET
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}
- GET
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}
- POST
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}
- PATCH
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}
- DELETE
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}
- GET
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/blanket-associations
- GET
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/blanket-associations/{blanketAssociationsId}
- POST
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/blanket-associations
- DELETE
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/blanket-associations/{blanketAssociationsId}
- GET
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/candidate-blanket-associations
- GET
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/coverages
- GET
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/coverages/{coverageId}
- POST
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/coverages
- PATCH
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/coverages/{coverageId}
- DELETE
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/coverages/{coverageId}
- POST
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/sync-coverages
- POST
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/sync-fields
The placeholders in the preceding endpoints hold the following information:
jobId
: The ID of the job to which the blanket is being applied.lineId
: The ID of the LOB, such as CommercialPropertyLine or WorkersCompLine.blanketName
: The type of blanket being applied, such as high-risk-blankets or clause-only-blankets.blanketId
: The ID of the blanket being referenced.
The examples in this topic use a sample LOB named TSTLine, and high-risk-blankets.
Retrieve blankets
This example retrieves all the high risk blankets available on the TSTLine LOB for job pc:200.
Command
GET /job/v1/jobs/pc:200/lines/TSTLine/high-risk-blankets
Response
{
"data": [
{
"attributes": {
"coverableJurisdiction": {
"code": "CA",
"name": "California"
},
"id": "4",
"sequenceNumber": 3
},
Add a blanket to a job
This example adds a high risk blanket to job pc:200. Note that there are no required fields for blankets.
Command
POST /job/v1/jobs/pc:200/lines/TSTLine/high-risk-blankets
Request
{
"data": {
"attributes": {
"integerField": 1,
"stringField": "High risk blanket string field"
},
}
}
Response
{
"data": {
"attributes": {
"coverableJurisdiction": {
"code": "CA",
"name": "California"
},
"id": "6",
"integerField": 1,
"sequenceNumber": 4,
"stringField": "High risk blanket string field"
},
Update a blanket on a job
The following example updates a blanket by adding a string to the high risk blanket with an ID of 6 on job pc:200:
Command
PATCH /job/v1/jobs/pc:200/lines/TSTLine/high-risk-blankets/6
Request
{
"data": {
"attributes": {
"stringField": "A high risk blanket"
}
}
}
Response
{
"data": {
"attributes": {
"coverableJurisdiction": {
"code": "CA",
"name": "California"
},
"id": "6",
"sequenceNumber": 4,
"stringField": "A high risk blanket"
},
This example deletes the high risk blanket with an ID of 6 from job pc:200:
Command
DELETE /job/v1/jobs/pc:200/lines/TSTLine/high-risk-blankets/6
No request body is required.
Working with blanket associations
A blanket covers one or more other coverables. Use the
blanket-associations
endpoints to define and determine which
coverables are covered under a blanket:
- GET
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/candidate-blanket-associations
- GET
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/blanket-associations
- GET
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/blanket-associations/{blanketAssociationsId}
- POST
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/blanket-associations
- DELETE
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/blanket-associations/{blanketAssociationsId}
Retrieve blanket candidates
You can retrieve the coverables and clauses that can be associated with a blanket
by calling the candidate-blanket-associations
endpoint. The
response from this endpoint provides the list of coverables that can be
specified when you create a blanket association. (See Add an association to a blanket below.)
After a coverable or clause has been associated with a blanket, it will no longer be a candidate and will therefore not be returned in the response.
Command
GET /job/v1/jobs/pc:200/lines/TSTLine/high-risk-blankets/4/candidate-blanket-associations
Response
{
"data": [
{
"attributes": {
"coverable": [
{
"displayName": "1: Kerosene Can: Leaky Gasoline Truck field",
"id": "1",
"type": "TSTKeroseneCan",
…
},
"id": "TSTKeroseneCan:1"
},
…
},
{
"attributes": {
"coverable": [
{
"displayName": "2: Kerosene Can: Leaky Gasoline Truck field",
"id": "2",
"type": "TSTKeroseneCan",
…
},
"id": "TSTKeroseneCan:2"
},
…
},
{
"attributes": {
"clause": {
"displayName": "Kerosene Liquid leak",
"id": "TSTKeroseneLiquidLeak",
"type": "TSTKeroseneCanCoverage",
…
},
"coverable": {
"displayName": 2: Kerosene Can: Leaky Gasoline Truck field",
"id": "2",
"type": "TSTKeroseneCan",
…
},
…
This partial response shows two coverables available for association, and one clause on one of those coverables.
Add an association to a blanket
You can add coverable and clause associations to a blanket. However,
for a specific blanket you can add only those coverables and clauses that are
returned from the candidate-blanket-associations
endpoint. You
cannot add a single coverable or clause twice to the same blanket.
This example associates a coverable with the blanket.
Command
POST /job/v1/jobs/pc:200/lines/TSTLine/high-risk-blankets/4/blanket-associations
Request
{
"data": {
"attributes": {
"coverable": {
"id": "2",
"type": "TSTKeroseneCan"
}
}
}
}
Associating a clause is similar. Instead of adding only the coverable, you add the clause and the corresponding coverable.
Request
{
"data": {
"attributes": {
"clause": {
"id": "TSTKeroseneLiquidLeak"
},
"coverable": {
"id": "2",
"type": "TSTKeroseneCan"
}
}
}
}
Retrieve associated blankets
The coverables and clauses returned in the preceding example are available to be
associated with the blanket, but have not been associated yet. To retrieve the
coverables and clauses that have been associated with the blanket, use
the blanket-associations
endpoint.
Command
GET /job/v1/jobs/pc:200/lines/TSTLine/high-risk-blankets/4/blanket-associations
Response
{
"data": [
{
"attributes": {
"coverable": [
{
"displayName": "1: Kerosene Can: Leaky Gasoline Truck field",
"id": "2",
"type": "TSTKeroseneCan",
…
},
"id": "TSTKeroseneCan:1"
},
},
The response shows that the high-risk-blankets blanket with ID 4 has one coverable associated with it.
Delete an association
Deleting an association removes the coverable or clause from the blanket, and returns it to the list of configured blanket associations.
Command
DELETE /job/v1/jobs/pc:200/lines/TSTLine/high-risk-blankets/4/blanket-associations/TSTKeroseneCan:2
No request body is required
Blankets associations in graph submissions
You can include blanket associations in submissions created through the graph API. Here's an example showing the segment of the request with the blanket associations:
…
"lines": {
"TSTLine": {
"condos": [
{
"condoDecField": "9999.99",
"occupancies": [
{
"coverages": {
"TSTOccCondHQBlanket": {
"pattern": {
"id": "TSTOccCondHQBlanket"
}
}
},
"integerField": 1,
"personalProperties": [
{
"booleanField": true,
"keroseneCans": [
{
"refid": "testKeroseneCan",
"stringField": "Leaky Gasoline Truck field"
}
],
"stringField": "Personal property"
}
],
"refid": "testOccupancyOccCondHQBlanket",
"stringField": "occupancy1"
}
],
"pin": "PIN_9999"
}
],
"highRiskBlankets": [
{
"blanketAssociations": [
{
"clause": {
"id": "TSTOccCondHQBlanket"
},
"coverable": {
"refid": "testOccupancyOccCondHQBlanket",
"type": "TSTOccupancy"
}
},
{
"coverable": {
"refid": "testKeroseneCan",
"type": "TSTKeroseneCan"
}
}
]
}
]
}
}
…
Notice the use of refids to associate coverables with the blanket.
For more information on graph submissions, see Streamlined account and submission creation.
Working with blanket coverages
Working with coverages on blanket coverables is identical to working with other types of coverables. The only difference is that instead of specifying a coverable name, you specify a blanket name (since a blanket is a coverable). For example, to retrieve all coverages for a vehicle coverable on TSTAutoLine, you would use the following endpoint:
- GET
/jobs/{jobId}/lines/TSTAutoLine/vehicles/{vehicleId}/coverages
Whereas to retrieve all coverages for a blanket coverable, you would use an endpoint similar to this:
GET
/jobs/{jobId}/lines/TSTAutoLine/high-risk-coverables/{blanketId}/coverages
Note that coverage instances can be assigned to only a single type of blanket.
See Overview of coverages for more information on working with coverages on coverables.
Sync blanket coverages
You can use Cloud API to synchronize blankets. See The /sync endpoints for information on syncing data.
- POST
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/sync-coverages
- POST
/job/v1/jobs/{jobId}/lines/{lineId}/{blanketName}/{blanketId}/sync-fields
Neither of these POST commands require a request body.
Command
POST /job/v1/jobs/pc:200/lines/TSTLine/high-risk-blankets/4/sync-coverages
Response
{
"data": {
"attributes": {
"coverableJurisdiction": {
"code": "CA",
"name": "California"
},
"id": "4",
"sequenceNumber": 1
},
Command
POST /job/v1/jobs/pc:200/lines/TSTLine/high-risk-blankets/4/sync-fields
Response
{
"data": {
"attributes": {
"coverableJurisdiction": {
"code": "CA",
"name": "California"
},
"id": "4",
"sequenceNumber": 1
},