Querying for policies
Use the following endpoints to query for policies:
- GET
/policy/v1/policies - GET
/policy/v1/policies/{policyId}
For example, the following is a portion of the payload that is returned when retrieving policy pc:909.
GET /policy/v1/policies/pc:909
{
"data": {
"attributes": {
"account": {
"displayName": "C000143542",
"id": "pc:Sl9Ku7grY4qRy28Y4GkRI",
},
"id": "pc:909",
"organization": {
"displayName": "Armstrong and Company",
"id": "pc:1",
},
"periodEnd": "2022-07-20T00:01:00.000Z",
"periodStart": "2022-01-20T00:01:00.000Z",
"policyNumber": "P000143542",
"primaryInsured": {
"displayName": "Ray Newton",
},
"primaryLocation": {
"displayName": "1: 1253 Paloma Ave, Arcadia, CA",
},
"producerCode": {
"displayName": "100-002541",
"id": "pc:6"
},
"product": {
"displayName": "Personal Auto",
"id": "PersonalAuto"
},
"termType": {
"code": "HalfYear",
"name": "6 months"
},
"totalCost": {
"amount": "764.00",
"currency": "usd"
}
}
...
Data in the Policy resource has multiple sources
Some resources manage data from multiple data model entities. The Policy
resource is one of them. There are fields in the Policy resource
that map to the Policy entity, the PolicyPeriod
entity, or the PolicyTerm entity.
Consequently, Cloud API does not have a separate set of endpoints for
PolicyPeriod or PolicyTerm. The fields from
PolicyPeriod or PolicyTerm that are exposed in
Cloud API are exposed solely through the /policy endpoints.
If you want to add extension fields to the PolicyCenter data model and expose those fields in Cloud API, Guidewire recommends the following:
- In the data model, add the fields to most appropriate entity
(
Policy,PolicyPeriod, orPolicyTerm). - In Cloud API, add the corresponding properties to the
Policyschema and map the properties to the new fields in whichever data model entity they have been declared.
For more information on how to extend schema, see the Cloud API Developer Guide.