Guidewre PC CloudAPI Consumer
Guidewre PC CloudAPI Consumer
Contents
Support.......................................................................................................................................................... 15
Part 1
Basic REST operations........................................................................................................................ 17
Contents 3
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
4 Contents
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Part 2
Optimizing calls.......................................................................................................................................93
Contents 5
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Part 3
Business flows: Accounts................................................................................................................ 145
6 Contents
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Part 4
Business flows: Job types................................................................................................................191
17 Submissions................................................................................................................................................... 193
Initiating a submission................................................................................................................................... 194
Modifying the submission.............................................................................................................................. 195
Quoting the submission................................................................................................................................. 195
Completing the submission............................................................................................................................ 196
Binding and issuing a submission at the same time............................................................................... 196
Binding a submission without issuing.................................................................................................... 196
Issuing a previously bound policy...........................................................................................................196
Withdrawing and rejecting submissions................................................................................................ 198
Copying submissions...................................................................................................................................... 199
Additional features for submissions............................................................................................................... 200
Composite request submission example for Personal Auto........................................................................... 200
18 Renewals........................................................................................................................................................ 205
Overview of policy transaction management................................................................................................ 205
Initiating a renewal.........................................................................................................................................206
Modifying the renewal................................................................................................................................... 206
Quoting the renewal...................................................................................................................................... 207
Completing the renewal................................................................................................................................. 208
19 Audits............................................................................................................................................................. 209
Audit policy endpoints................................................................................................................................... 209
Audit job endpoints........................................................................................................................................216
Contents 7
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
20 Policy changes................................................................................................................................................221
Overview of policy transaction management................................................................................................ 221
Initiating a policy change................................................................................................................................222
Modifying the policy change.......................................................................................................................... 222
Quoting the policy change............................................................................................................................. 222
Completing the policy change........................................................................................................................ 223
Issues specific to policy changes.................................................................................................................... 223
Changing producers................................................................................................................................223
Preemptions........................................................................................................................................... 223
21 Cancellations and reinstatements.................................................................................................................231
Overview of policy transaction management................................................................................................ 231
Cancellations.................................................................................................................................................. 232
Initiating a cancellation.......................................................................................................................... 232
Modifying and requoting the cancellation............................................................................................. 232
Completing the cancellation.................................................................................................................. 232
Reinstatements.............................................................................................................................................. 233
Initiating a reinstatement....................................................................................................................... 233
Modifying and quoting the reinstatement............................................................................................. 234
Completing the reinstatement............................................................................................................... 234
22 Rewrite and Rewrite New Account............................................................................................................... 235
Overview of policy transaction management................................................................................................ 235
Rewrite transaction........................................................................................................................................ 236
Rewrite new account transaction...................................................................................................................237
Part 5
Business flows: Job policies...........................................................................................................239
8 Contents
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Contents 9
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Part 6
Business flows: Job support...........................................................................................................325
10 Contents
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Part 7
Business flows: Framework APIs.................................................................................................. 419
47 Activities........................................................................................................................................................ 421
Querying for activities.................................................................................................................................... 421
Creating activities........................................................................................................................................... 423
Assigning activities......................................................................................................................................... 424
Contents 11
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
12 Contents
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Producer codes...............................................................................................................................................465
Querying for producer codes................................................................................................................. 465
Creating producer codes........................................................................................................................ 467
Updating producer codes....................................................................................................................... 467
Managing producer codes for users and groups.................................................................................... 468
Exposing producer codes to external users............................................................................................ 470
52 Security zones................................................................................................................................................ 471
Querying for security zones........................................................................................................................... 471
Creating security zones.................................................................................................................................. 472
Modifying and deleting security zones.......................................................................................................... 472
Associating security zones with other objects............................................................................................... 473
53 Geographic zones.......................................................................................................................................... 475
54 Typelist metadata.......................................................................................................................................... 477
The /typelists endpoints.................................................................................................................................477
Querying with typekey filters......................................................................................................................... 477
Tutorial: Query for typelist metadata............................................................................................................. 479
55 Batch processes............................................................................................................................................. 481
Overview of batch processes......................................................................................................................... 481
Querying for batch process information........................................................................................................ 482
Managing batch processes............................................................................................................................. 483
Starting a batch process......................................................................................................................... 483
Starting a batch process with arguments............................................................................................... 484
Stopping a batch process....................................................................................................................... 485
56 Database consistency checks........................................................................................................................ 487
Overview of database consistency checks (DBCCs)........................................................................................487
Running DBCCs............................................................................................................................................... 488
Running a previously run DBCC.............................................................................................................. 489
Querying for DBCC run information............................................................................................................... 490
57 Personal data destruction............................................................................................................................. 493
API entity destruction overview..................................................................................................................... 493
System configuration......................................................................................................................................494
Obfuscating user data.................................................................................................................................... 494
Destroying a contact...................................................................................................................................... 495
Destroying an account....................................................................................................................................496
Destroying a policy......................................................................................................................................... 497
Preventing data destruction........................................................................................................................... 497
58 Business entity schemas................................................................................................................................499
Retrieve an entity schema..............................................................................................................................499
Business entity schema query parameters.................................................................................................... 500
ETag support...................................................................................................................................................502
CreateSubmissionAttributes schema............................................................................................................. 502
Schema properties......................................................................................................................................... 503
Schema properties overview.................................................................................................................. 503
Schema properties usage....................................................................................................................... 506
59 The Test Util API.............................................................................................................................................527
Enabling the Test Util API............................................................................................................................... 527
View the Test Util API in Swagger UI.............................................................................................................. 528
Test Util API endpoints................................................................................................................................... 528
Contents 13
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
14 Contents
Support
Guidewire customers
https://community.guidewire.com
Guidewire partners
https://partner.guidewire.com
part 1
The following topics discuss how caller applications can execute fundamental REST operations on Cloud API, and the
Guidewire-specific enhancements to these operations. This includes how to:
• Construct GET requests to query for data
• Use query parameters to refine response payloads
• Construct POST requests to create new data
• Construct PATCH requests to modify existing data
• Construct DELETE requests to remove data
InsuranceSuite Cloud API for PolicyCenter is a set of RESTful system APIs that caller applications can use to request
data from or initiate action within PolicyCenter. Cloud API is built on top of the Guidewire REST API framework
using the Swagger 2.0 Specification. The APIs in Cloud API are also referred to as the system APIs.
This topic provides an overview of the APIs available in Cloud API and how you can view them.
If you are coding a consumer application and have limited experience with REST APIs, the “REST API fundamentals”
on page 26 section provides a brief overview of how REST APIs work in Cloud API.
System Tools API for batch processes and database consistency checks /systemtools/v1
Test Util API for testing during development /test-util/v1
(Available only when enabled)
Note: The /apis endpoint returns all REST APIs for PolicyCenter. This includes some APIs that are not part of
Cloud API, such as /system/v0/database and /system/v0/maintenance. The only APIs that are part of
Cloud API are the ones listed in the previous table. These are the only APIs that have access to Cloud API
features, such as request inclusion and authentication.
Introduction to Cloud API 19
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Note: The /apis endpoint returns all REST APIs for ContactManager. This includes some APIs that are not
part of Cloud API, such as /system/v0/database and /system/v0/maintenance. The only APIs that are part
of Cloud API are the ones listed in the previous table. These are the only APIs that have access to Cloud API
features, such as request inclusion and authentication.
You can use the API path to view metadata about the API. This is discussed in detail in the following section.
Release numbers
Every release of Cloud API has a three-digit version number. The first digit is the version's major release number. The
second digit is the version's minor release number. For example, suppose the latest release of Cloud API has a version
number of 1.5.0. This release is major release 1 and minor release 5.
The release number can be seen in the API definition. For example, in Swagger UI, when you view an API, the version
number appears in a gray bubble next to the API name. (Note that individual APIs do not have distinct version
numbers. The version numbers that appear in the API definition are for the entire Cloud API release.)
For every API, the major release number is also part of the endpoint path. It is the number that appears after the "/v".
For example, the first major release of the Admin API has a path of /admin/v1. If there was a theoretical ninth major
release of the Admin API, its path would be /admin/v9.
Release Month Version # Compared to the previous release, this Major versions in this release
release...
January 1.0.0 ...is identical or additive /admin/v1
April 1.1.0 ...is identical or additive /admin/v1
July 1.2.0 ...is identical or additive /admin/v1
October 1.3.0 and 2.0.0 ...includes changes to existing functionality /admin/v1 (identical or additive to July's release),
and /admin/v2 (containing the changed
functionality)
Swagger UI
Swagger UI is an open source tool that presents API definitions as interactive web pages. For information on Swagger
UI, refer to the Swagger web site: https://swagger.io/tools/swagger-ui/
Swagger UI is automatically bundled with PolicyCenter.
Swagger UI can be helpful when viewing schema information. Swagger UI presents this information hierarchically.
Child schemas are indented with respect to parent schemas, and individual nodes of the hierarchy can be expanded and
collapsed. Searching through a complex schema is relatively straightforward in Swagger UI.
However, Swagger UI strips out some of the metadata that is present in the source files. For example, Guidewire-
proprietary tags are not rendered in Swagger UI. When you need access to all the metadata for an API, it may be better
to call the /openapi.json endpoint directly.
Swagger UI also requires access to a running instance of PolicyCenter. If you do not have access to a running instance,
you may want to use the Guidewire API References site.
Note: Swagger UI also has the capability to send requests to a working endpoint and observe responses.
However, Guidewire recommends using Swagger UI only to view API definitions. The APIs in Cloud API are
significantly robust. When sending requests using Swagger UI, the performance time for getting responses can
be unacceptably long. Also, if you attempt to send calls from Swagger UI and log into the PolicyCenter user
interface on the same machine, the two systems may attempt to share the same session, and either or both may
stop working. For more information on recommended request tools, see “Requests and responses” on page
30.
Results
The following screenshot shows the top of the Swagger UI display of the Common API.
Information in Swagger UI
The Cloud API version number at the top in a gray bubble after the API name. (Note that individual APIs do not have
distinct version numbers. The version numbers that appear in Swagger UI are for the entire Cloud API release.)
Every endpoint in the API appears in a list. For each API, the following information is shown by default:
• The endpoint's operation (such as GET)
• The endpoint's path (such as /activities)
• An endpoint summary (such as "Returns a list of activities assigned to the current user")
If you click the operation button, additional information about the endpoint appears. This includes:
Postman
You can call the API definition endpoints using a request tool. Request tools are not automatically bundled with
InsuranceSuite applications. You must download and install them on your own.
Postman is a request tool that Guidewire recommends. This tool has the ability to:
• Save API calls, including headers and payloads
• Save collections of calls
• Automatically create a collection of calls for a schema's paths by importing the Swagger schema file
• Share collections with other developers on your team
For more information and to download the tool, see https://www.postman.com/.
Install Postman. For more information and to download the tool, see https://www.postman.com/.
This task does not involve authentication information. This is because every type of caller can request API metadata,
including unauthenticated callers.
Procedure
1. Identify the path for the API. (For a list of paths for each API, see “List of APIs in Cloud API” on page 19.)
2. Start PolicyCenter.
3. Start Postman.
4. In Postman, start a new request by clicking the + tab to the right of the Launchpad tab.
5. Under the Untitled Request label, make sure that GET is selected. (This is the default operation.)
6. In the Enter request URL field, enter the following URL: <applicationURL>/rest<APIpath>/openapi.json (or
<applicationURL>/rest<APIpath>/swagger.json). For example, to view the Common API on a local instance
of PolicyCenter, enter the following:
• http://localhost:8180/pc/rest/common/v1/openapi.json (OR http://localhost:8180/pc/rest/common/v1/
swagger.json)
7. Click the Send button to the right of the request field.
Results
The API information appears in the results pane. For example, the following is the first part of the results when calling
the previously referenced openapi.json endpoint:
{
"components": {
"parameters": {
"activityId": {
"description": "The REST identifier for the activity, as returned via previous requests that return a
list of activities\n",
"in": "path",
"name": "activityId",
"required": true,
"schema": {
"type": "string"
}
},
...
For example, the following HTTP request retrieves the metadata for the Admin API. It also enables filterByUser and
prettyPrint.
http://localhost:8180/pc/rest/admin/v1/openapi.json?filterByUser=true&prettyPrint=true
• An endpoint summary (such as "Returns a list of activities assigned to the current user")
The right pane shows Response samples. You can expand the data.attributes note to see the fields on the parent resource.
If there is an included node, you can expand it to see the child resources for the endpoint.
1. The caller application constructs a request object. The request object consists of:
• A header, which can contain authentication information and other metadata.
• A payload, when necessary.
2. The caller application sends the request to Cloud API using an HTTP command.
• The command calls a specific endpoint.
• The command may include query parameters that further identify the data that is desired.
• The request object is sent with the command.
3. Cloud API processes the request.
• This activity uses all of the InsuranceSuite application logic, such as validation logic and pre-update rules.
• The request is restricted by authorization controls within Cloud API.
4. Cloud API responds with an HTTP response code (such as 200 for success) and a response object. The response
object consists of:
• A header
• A payload, when necessary.
Resources
The primary mechanism for passing information between the caller application and PolicyCenter is the resource. A
resource is an instance of data that you can create, modify, delete, or query for. Resources are defined in JSON schema
files.
Every resource has a type. The type defines the Guidewire data model entities that the resource maps to. For example,
Activity resources map to the Activity data model entity. In most cases, each resource maps to a single data model
entity. However, there are some resources which map to multiple data model entities. For example, the
AccountContact resource maps to three data model entities in PolicyCenter: AccountContact, Contact, and
AccountContactRole.
Resources contain a set of fields. Each field stores information about the resource. Depending on the context, fields are
also referred to as properties or attributes.
Resources are exchanged in the payloads of the request and response objects. The payload is a block of JSON-
formatted text that contains fields from the relevant resources and their values. The following is a portion of the
response payload for an Activity resource.
"attributes": {
"assignedGroup": {
"displayName": "Auto1 - TeamA",
"id": "demo_sample:31"
},
"assignedUser": {
"displayName": "Andy Applegate",
"id": "demo_sample:1"
},
"dueDate": "2020-11-16T08:00:00.000Z",
"id": "xc:20",
"priority": {
"code": "urgent",
"name": "Urgent"
"subject": "Contact claimant"
}
A single resource is called an element. For example, /contact/xc:203 is an element. (In some REST API literature,
this is also referred to as a singleton.)
A set of resources is called a collection. For example, /contact/xc:203/addresses (the addresses associated with
contact xc:203) is a collection.
Endpoints
Every API consists of a set of endpoints. An endpoint is a command that a caller application can use to request data
from or trigger action in PolicyCenter. For example, the /common/v1/activities endpoint can be used to either
request data about PolicyCenter activities or trigger actions related to PolicyCenter activities. When referenced in
documentation, endpoints start with a slash (/), such as the /activities endpoint. Endpoints are defined in Swagger
schema files.
In Cloud API, the endpoint path (the full name of the endpoint) includes the API and the version. For convenience
sake, the documentation often refers to endpoints using only the last part of the endpoint path. For example, the /rest/
common/v1/activities endpoint is often referred to simply as "the /activities endpoint".
Endpoints in Cloud API have four fundamental components: root resources, child resources, methods, and paths.
Root resources
Every endpoint has a root resource. The root resource is the resource which the endpoint creates, updates, deletes, or
queries for. Every call to an endpoint makes use of the root resource.
For example, the root resource for the /common/v1/activities endpoint is Activity. This endpoint is used to
potentially create, update, delete, or queries for activities.
Child resources
Most endpoints also include child resources. A child resource is a resource related to the root resource. Child resources
improve the usability of an endpoint by providing access to information related to the root resource. For example, the /
common/v1/activities endpoint has one child resource - Notes. This means you could use the endpoint to:
Methods
A method is a type of action a caller application can take on a resource through an endpoint. Methods are also referred
to as verbs or operations. Cloud API supports the following subset of HTTP methods:
• GET - Used to request resources.
• POST - Used to create resources. Also used to execute business actions, such as quoting a submission or
submitting a claim.
Paths
Every endpoint has a path. The path is the portion of the URL used by caller applications to identify the specific
endpoint.
rest/<APIname>/<APImajorVersion>/<endpointName>
For most endpoints, the endpoint name is the same as the resource name, with the following conventions and caveats:
• If the endpoint's root resource is an element, the endpoint name ends in a singular noun (such as /activity) or a
resource reference (such as /activity/{activityId}).
• If the endpoint's root resource is a collection, the endpoint name ends in a plural noun (such as /activities).
• If the endpoint executes a business action, the endpoint name ends in a verb (such as /{activityId}/assign).
• The endpoint name is often close to, but not identical to, the resource name.
◦ Endpoint names use lower case, whereas resource names use mixed case (for example, the root resource for
the /activity endpoint is Activity)
◦ Endpoint names use hyphens to separate words, whereas resource names do not (for example, the root resource
for the /accounts/{accountId}/activity-patterns endpoint is ActivityPattern)
◦ In some cases, the endpoint name may differ from the root resource name (for example, the root resource for
the /accounts/{accountId}/contacts endpoint is AccountContact)
https://iap:8880/xc/rest/common/v1/activities/xc:207?fields=assignedGroup
\__________________/\______________________________/\___________________/
application URL endpoint path query parameters
◦ There are a small number of endpoints that require a query parameter. For example, to prevent resource-
intensive calls, the Job API's /graph-schema endpoint requires a product parameter.
Some requests require a payload. The payload is a block of JSON-formatted text that contains information about one or
more resources associated with the operation. Typically:
• GETs and DELETEs do not require request payloads.
◦ For a GET, you only need to identify the resource you want information about, and this is done in the URL.
◦ For a DELETE, you only need to identify the element to delete, and this is done in the URL.
• POSTs and PATCHes do require request payloads.
◦ For a POST, you must specify data about the element to create.
◦ For a PATCH, you must specify the data about the element that must be updated.
Responses
A response is the set of information returned by an API endpoint for a request to the caller application.
Some responses include a payload. The payload contains information about one or more resources that are returned by
the operation. For example, for a request to get all open activities assigned to a given user, the response includes a
payload with information about the open activities. For more information about the payload structure, see “GETs” on
page 35.
The outcome of the operation is specified as an HTTP status code, also referred to as a response code. These codes are
three-digit numbers. The general meanings of these codes are defined in the following table:
Tutorial steps
1. Install Postman. (For more information, refer to https://www.postman.com/.)
2. Start PolicyCenter and load the Large sample data set.
You can test your environment by sending your first Postman request.
1. Open Postman.
2. Start a new request by clicking the + to the right of the Launchpad tab.
3. Every request in Postman requires some form of authorization:
a. Click the Authorization tab.
b. For the Type drop-down list, select Basic Auth.
c. In the Username field, enter aapplegate.
d. In the Password field, enter gw.
4. Under the Untitled Request label, make sure that GET is selected. (This is the default operation.)
5. In the Enter request URL field, enter the following URL: http://localhost:8180/pc/rest/common/v1/
activities
6. Click the Send button to the right of the request field.
{
"count": 11,
"data": [
{
"attributes": {
"activityPattern": "uw_review_contingency",
"activityType": {
"code": "general",
"name": "General"
},
"assignedByUser": {
"displayName": "Alice Applegate",
"id": "pc:105"
},
...
Troubleshooting: No response
Requests can be sent only to running applications. All of the tutorials in this documentation require that PolicyCenter is
running. If you send a request when the application is not running, you will see an error similar to the following:
Could not get any response
Troubleshooting: NotFoundException
Unless it is stated otherwise, all of the tutorials use basic authentication and the aapplegate user. If you encounter a
NotFoundException such as the following example, this could be caused by not providing correct authentication
information for this user.
"status": 404,
"errorCode": "gw.api.rest.exceptions.NotFoundException",
"userMessage": "No resource was found at path /common/v1/activities"
GETs
This topic discusses how the GET method queries for data and the structure of the response payload. For information
on how you can add query parameters to a GET URL to refine the response, see “Query parameters” on page 49.
If you want to interact directly with the concepts in this topic, go to the following tutorials:
• “Tutorial: Send a basic Postman request” on page 38
• “Tutorial: Send a Postman request with included resources” on page 43
Overview of GETs
A GET is an HTTP method that is used to retrieve data from an InsuranceSuite application.
There are two types of GETs:
• A collection GET is a GET that returns a collection of one or more resources. Collection GETs have paths that end
in a plural noun, such as GET /activities/xc:1227/notes.
• An element GET is a GET that returns a single, specific resource. Element GETs have paths that end in the ID of
the specific resource. For example, GET /activities/xc:1227.
When a GET is successful, the response includes:
• An HTTP response indicating success.
• A response payload that contains the data that was queried for.
When you configure a caller application to send a GET, the construction of the API call is fairly straightforward. The
call may require query parameters, but GETs do not require a request payload. The majority of the work lies in parsing
the response payload. The remainder of this topic discusses how response payloads are structured and how developers
can learn about response payload formats.
DataEnvelope standardizes the format of information for a single element. It specifies a data property with the
following child properties:
• checksum
• id
• links (for a single element)
• method
• refid
• related
• type
• uri
The format of a payload for a single element has the following structure:
{
"data": {
"checksum": ...,
"id": ...,
"links": ...,
"method": ...,
"refid": ...,
"related": ...,
"type": ...,
"uri": ...
}
}
}
DataListEnvelope standardizes the format of information for collections. It specifies the following properties, which
are siblings to the data section:
• count
• links (for a collection)
• total
The format of a payload for a collection has the following structure:
{
"count" ...,
"data": [
{ properties_for_element_1 },
{ properties_for_element_2 },
...
],
"links": ...,
"total": ...
}
Every property does not appear in every payload. There are different reasons why a property may not appear in a given
payload. For example:
• Some properties, such as refid, apply only to requests and do not appear in response payloads.
• Some properties, such as count, apply only to responses and do not appear in request payloads.
• Some properties, such as related, do not appear by default and appear only when the request includes certain
query parameters.
36 GETs
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
To address this, Cloud API also uses request schemas and response schemas. A request schema is a schema that is used
to define the valid structure of a request payload for a specific set of endpoints. Similarly, a response schema is a
schema that is used to define the valid structure of a response payload for a specific set of endpoints.
Request and response schemas are hierarchical. For example, for responses, the GET /activity/{activityId}
endpoint uses the ActivityResponse schema. This schema has two child schemas: ActivityData and
ActivityResponseInclusions.
Request and response schemas extend DataEnvelope or DataListEnvelope. This ensures that information relevant to
all endpoints appears in payloads in a standard way.
Request and response schemas also define an attributes property for the payload. This property is associated with a
schema that includes resource-specific information for the payload. For example, the GET /activity/{activityId}
endpoint specifies an attributes property in the ActivityData child schema. This property is associated with the
Activity schema, which contains activity-specific fields, such as activityPattern and activityType. As a result,
response payloads for the GET /activity/{activityId} endpoint have this structure:
{
"data": {
"checksum": ...,
"attributes" : {
"activityPattern": ... ,
"activityType": ...,
...},
"id": ...,
"links": ...,
"method": ...,
"refid": ...,
"related": ...,
"type": ...,
"uri": ...
}
}
}
Viewing schemas
You can use API definition tools, such as Swagger UI, to review information about the schemas for a given endpoint
and how they structure the data.
Sending GETs
You can use a request tool, such as Postman, to ensure GETs are well-formed and to review the structure of the
response payloads. For more information, see “Requests and responses” on page 30.
GETs 37
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. Enter the following call and click Send: GET http://localhost:8180/pc/rest/common/v1/
activities
{
"count": 11,
"data": [
{
"attributes": {
"activityPattern": "uw_review_contingency",
"activityType": {
"code": "general",
"name": "General"
},
"assignedByUser": {
"displayName": "Alice Applegate",
"id": "pc:105"
},
38 GETs
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
(Note: JSON does not support comments. However, to clarify the code, pseudo-comments have been added. Each
pseudo-comment is preceded by a hashtag (#).)
{
"count": N, # Number of resources in collection*
"data": [ # List of resources
{ # Resource 1 begins here
"attributes": { # Resource 1 name/value pairs
"propertyName": "propertyValue",
... },
"checksum": "val", # Resource 1 checksum value
"links": { ... } # Resource 1 links
}, # Resource 1 ends here
{ # Resource 2 begins here
"attributes": { # Resource 2 name/value pairs
"propertyName": "propertyValue",
... },
"checksum": "val", # Resource 2 checksum value
"links": { ... } # Resource 2 links
}, # Resource 2 ends here
... ], # Resources 3 to N
"links": { ... } # Collection-level links*
}
# *-used only for collection responses
"attributes": {
"activityPattern": "check_coverage",
"activityType": {
"code": "general",
"name": "General"
},
...
},
Each resource has a default set of fields that are returned. This is typically a subset of all the fields that could be
returned. You can override the default set of fields returned using the fields query parameter. For more information,
see “The fields query parameter” on page 51.
GETs 39
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Simple values
When a field is a scalar, its value is listed after the colon. For example:
ID properties
Every resource has an id field. This has the same value as the Public ID of the object in PolicyCenter. This is typically
one of the fields returned by default. For example:
"id": "xc:20",
This value is also used in an endpoint that names a specific element, such as:
GET /activities/xc:20/notes
Be aware that, for some fields, Cloud API requires a date value as an input. But, PolicyCenter stores the value as a
datetime value, and therefore the value in response payloads is a datetime value. This behavior is an attempt to closely
model the PolicyCenter behavior of adding a time value to entered date values. For example, the JobEffectiveDate
field is specified in the CreateSubmissionAttributes schema as a date value. But once the submission has been
created, the JobEffectiveDate field in the response payload will have a datetime value.
Inlined resources
Some response payloads contain inlined resources. An inlined resource is a resource that is not the root resource, but
some of its fields are listed in the attributes section by default along with fields from the root resource. Inlined
resources follow the format:
"inlinedResourceName": {
"inlinedResourceField1": value,
"inlinedResourceField2": value,
...
},
40 GETs
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Inlined resources are declared in the response schema. Similar to scalar values, you can control which inlined resources
and inlined resource fields are returned in a response by using the fields query parameter. For more information, see
“The fields query parameter” on page 51.
Broadly speaking, there are four types of inlined resources: typelists, currency amount values, simple references, and
complex references.
Typelists are listed with a code field and a name field. They use the TypeCodeReferences schema. For example:
"priority": {
"code": "urgent",
"name": "Urgent"
},
Currency amount values have a currency field and an amount field. For example:
"transactionAmount": {
"amount": "500.00",
"currency": "usd"
Simple references are references to a related object that use the SimpleReferences schema. This schema includes
only the following fields: displayName, id, refId, type, and uri. By default, most endpoints return only
displayName and id.
For example, in the following snippet, assignedGroup and assignedUser are simple references:
"assignedGroup": {
"displayName": "Auto1 - TeamA",
"id": "demo_sample:31"
},
"assignedUser": {
"displayName": "Andy Applegate",
"id": "demo_sample:1"
},
Complex references are references to a related object that uses a schema more complex than the SimpleReferences
schema. For example, when a contact's primary address is added to a response payload, it uses the Address schema,
which includes a larger number of fields.
GETs 41
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
For example, suppose that a given caller application gets activity xc:20. This application has sufficient permission to
assign this activity and to view the notes associated with this activity. The following would appear in the links section
for activity xc:20:
"links": {
"assign": {
"href": "/common/v1/activities/xc:20/assign",
"methods": [
"post"
]
},
"notes": {
"href": "/common/v1/activities/xc:20/notes",
"methods": [
"get",
"post"
]
},
"self": {
"href": "/common/v1/activities/xc:20",
"methods": [
"get"
]
}
}
The self link is a link to the resource itself. The self link is useful when a caller application receives a list of
resources and wants to navigate to a specific resource in the list.
For a given object, links that execute business actions appear only if the action makes sense given the state of the
object, and only if the caller has sufficient permission to execute the action. For example, the link to close an activity
will not appear if the activity is already closed. Similarly, the link to assign an activity will not appear if the caller lacks
permission to assign activities.
<endpointPath>?include=<resourceName>
where:
• <endpointPath> is the default path, such as /common/v1/activities
• <resourceName> is the name of the related resource, such as notes
For example GET /activities?include=notes returns all activities assigned to the current user, and all notes
associated with those activities.
You can include multiple resource types in a single query. To do this, identify the resources in a comma-delimited list.
For example, GET /policies?include=contacts,locations returns all policies assigned to the current user, and all
contacts and locations associated with those policies.
42 GETs
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
When you execute a call with include, the response payload contains information about the primary resources and the
included resources. However, most of the information about the included resources do not appear inline with the
primary resources. Rather:
• Every primary resource has a related section. This section lists the ids (and types) of included resources related to
that resource. However, each related section does not include any other details about those resources.
• Details about the included resources appear at the end of the payload in a section called included.
The ids of included objects appear in both the related section and the included section. You can use these ids to
match a primary resource with details about its included resources.
Resource How many related resources Where do their fields When do they appear?
type for each primary resource? appear?
Inlined Typically one. (For example, Entirely in the attributes If the query does not use the fields query
resource every activity has only one section of the root resource parameter, then each inlined resource appears only if
related assignedUser.) it is one of the default attributes.
If the query does use the fields query parameter,
then each inlined resource does or does not appear
based on whether it is specified in that query
parameter.
Included One to many. (For example, ids appear in the related When the query parameter includes the ?
resource every activity can have section of the root resource. include=resourceName query parameter
several related notes.) The remaining attributes
appear in the included
section at the bottom of the
payload.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. In order to look at a policy in detail, you need to know the policy's public ID. Enter this URL in Postman to
retrieve the ID of the first policy, and click Send:
GET http://localhost:8180/pc/rest/policy/v1/policies?fields=id&pageSize=1
The ID of the policy is in the response payload at or around line 6. This value is referenced in the next steps as
<policyID>.
3. You can use a GET to retrieve a resource and a set of related resources. For example, in a single GET you can
retrieve a policy and all of its contacts. The following GET retrieves the first policy and its contacts. Enter this
URL in Postman and click Send:
GET http://localhost:8180/pc/rest/policy/v1/policies/<policyId>?include=contacts
Note the following in the response payload:
• The data section starts at line 2. It includes information about the policy.
GETs 43
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
• The included section includes an array of contacts for this policy. The start of the included section depends
on the amount of data for the policy. For example, for policy P000143542, the included section starts at line
254.
4. You can use a GET to retrieve a resource and a single related resource. For example, in a single GET you can
retrieve a policy and its primary insured. The following GET retrieves the first policy and its primary insured.
Enter this URL in Postman and click Send:
GET http://localhost:8180/pc/rest/policy/v1/policies/<policyId>?include=primaryInsured
Note the following in the response payload:
• The data section starts at line 2. It includes information about the policy. At or around line 35, there is
information about the policy's primary insured. However, the only meaningful information is the main
contact's display name and ID.
• The included section includes a single contact for this policy (the primary insured). In this section, there is
detailed information about the contact beyond just the display name and ID.
{
"count": N, # Number of resources is payload
"data": [ # Details for each resource
{ # Resource 1 begins here
"attributes": { # Resource 1 name/value pairs
"propertyName": "propertyValue",
... },
"checksum": "val", # Resource 1 checksum value
"links": { # Links relevant to Resource 1
... },
"related": { # List of resources related to R1
"resourceType": { # Related resource type
"count": NN, # Number of related resources for R1
"data": [
{ # First resource related to R1 starts
"id": "relatedResourceID",
"type": "resourceType"
}, # First resource related to R1 ends
... # Other resources related to R1
] } }
}, # Resource 1 ends here
{ # Resource 2 begins here
"attributes": { # Recourse 2 name/value pairs
"propertyName": "propertyValue",
... },
"checksum": "val", # Resource 2 checksum value
"links": { # Links relevant to Resource 2
... },
"related": { # List of resources related to R2
"resourceType": { # Related resource type
"count": NN, # Number of related resources for R2
"data": [
{ # First resource related to R2 starts
"id": "relatedResourceID",
"type": "resourceType"
}, # First resource related to R2 ends
... # Other resources related to R2
] } }
}, # Resource 2 ends here
... ], # Resources 3 to N
"links": { # Links relevant to collection
...
},
"included": { # List of related resources
"resourceType": [ # First related resource type
{
"attributes": { # Related resource 1 start
... # Related resource 1 name/value pairs
"id": " relatedResourceID ",
... },
"checksum": "0", # Related resource 1 checksum value
"links": { ... } # Links relevant to Related resource 1
},
... # Related resources 2 to end
44 GETs
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
] }
}
{
"attributes": {
...
"id": "xc:44",
...
"subject": "Check coverage"
},
"checksum": "2",
"links": {
...
},
"related": {
"notes": {
"count": 1,
"data": [
{
"id": "xc:55",
"type": "Note"
}
]
}
}
},
If a GET uses the included query parameter, but no related resources exist, the related section still appears. But, the
count is 0 and the data section is empty. For example:
"related": {
"notes": {
"count": 0,
"data": []
}
}
If a GET omits the included query parameter, the related section is omitted from the response payload.
"included": {
"Note": [
{
"attributes": {
"author": {
"displayName": "Betty Baker",
"id": "demo_sample:8"
},
"bodySummary": "Main contact is on vacation 03/20",
"confidential": false,
"createdDate": "2020-03-30T23:11:33.346Z",
"id": "xc:55",
"securityType": {
"code": "unrestricted",
"name": "Unrestricted"
},
"subject": "Main contact is on vacation 03/20",
"topic": {
"code": "general",
"name": "General"
GETs 45
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
},
"updateTime": "2020-03-30T23:12:08.892Z"
},
"checksum": "0",
"links": {
"self": {
"href": "/common/v1/notes/xc:55",
"methods": [
"get",
"patch"
]
}
}
}
]
},
Recall that activity xc:44 has one included note. The included note's id is xc:55. The note shown in the included
section is the note related to activity xc:44.
An example of the first case is GET /policies/{policyId}?include=contacts. This call returns the policy with the
given Policy ID and all contacts related to that policy. There are theoretically several related resources (contacts) for
each primary resource (the policy with the given Policy ID).
An example of the second case is GET /policies/{policyId}?include=primaryInsured. This call returns the
policy with the given Policy ID and the contact who is designated as the primary insured. There is only a single related
resources (the contact who is the primary insured) for each primary resource (the policy with the given Policy ID).
You can also specify multiple include options, as in GET /policies/{policyId}?
include=contacts,primaryInsured. In this case, for each policy, the related section specifies the IDs of all related
contacts and it also explicitly identifies the ID of the primary insured.
As a general rule, if an include option is named using a plural, it returns a set of resources for each primary resource.
If an include option is named using a singular, it returns a single resource for each primary resource.
"userMessage": "Bad value for the 'include' query parameter - The requested inclusions
'[AccountContact]' are not valid for this resource. The valid options are [accountHolder,
activities, activity-assignees, activity-patterns, contacts, documents, jobs, locations, notes,
policies, primaryLocation]."
In cases such as this, the error message will specify which elements are allowed in the include.
Other than creating an error and viewing the results, there are a couple of general rules that can help determine which
elements are allowed in an include for a given endpoint: child endpoints and response payload references. (Note that
these are general guidelines, and don’t necessarily apply in all cases.)
46 GETs
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Child endpoints
Suppose you have the following set of endpoints:
• /api/v1/endpoint
• /api/v1/endpoint/child1
• /api/v1/endpoint/child1/child2
In most cases, you can include child2 on any calls to endpoint or endpoint/child1:
GET /api/v1/endpoint?include=child2
GET /api/v1/endpoint/child1?include=child2
{
"data": {
"attributes": {
"foreignKeyEntity" {
"id": "100"
}
}
}
}
In many cases such as this you can do an include that specifies the returned attribute (or attributes, if there are more
than one):
GET /api/v1/endpoint?include=foreignKeyEntity
GETs 47
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
48 GETs
chapter 3
Query parameters
This topic discusses how to use query parameters to refine a request to customize the response payload. This is most
often done with GETs. But, query parameters can also be used with POSTs and PATCHes to refine the responses to
those methods.
If you want to interact directly with the concepts in this topic, go to the following tutorials:
• “Tutorial: Send a GET with the fields parameter” on page 53
• “Tutorial: Send a GET with the filter parameters” on page 56
• “Tutorial: Send a GET with the sort query parameter” on page 58
• “Tutorial: Send a GET with the pageSize and totalCount parameters” on page 61
• “Tutorial: Send a GET with query parameters for included resources” on page 64
<URL>?<queryParameterExpressionList>
For example:
Query parameters 49
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
• GET /common/v1/activities?fields=*all
• GET /common/v1/activities?filter=escalated:eq:false
Included resources
With GETs, you can use the include query parameter to include resources related to the primary resources of the
response. You can also use query parameters to specify a custom set of properties for included resources, filter out
included resources that do not meet a given criteria, sort the included resources, and so on. For more information, see
“Query parameters for included resources” on page 62.
"message": "The sort column 'escalationDate' is not a valid option. The valid
sort options are [assignedUser, dueDate, escalated, priority, status, subject],
optionally prefixed with '-' to indicate a descending sort."
Parameter definitions
The Parameters section describes each query parameter.
Supported parameters
The Responses section include a Model tab. This tab provides information about the fields that support particular query
parameters. For example, you can sort results on some fields, but not all of them. The fields that support sorting appear
in the model with the text "sortable": true.
asOfDate=dateValue
For example, the following query returns policy pc:10 as it existed on January 1, 2019:
GET /policy/v1/policies/pc:10?asOfDate=2019-01-01
50 Query parameters
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
If you query for a policy at a point in time before its effective date or after its expiration date, you will get a
BadInputException with the user message similar to the following: "Bad value for the 'asOfDate' query
parameter - No branch found for date 01/01/2019 12:00 AM".
The fields parameter has three options related to these default sets:
• *detail - Return the fields in the "detail list"
• *summary - Return the fields in the "summary list"
• *default - Return the default list. If the endpoint returns a single element, the default is the "detail list". If the
endpoint returns a collection, the default is the "summary list"
fields=*default,fieldList
Query parameters 51
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
fields=fieldList
"attributes": {
"activityPattern": "contact_claimant",
"assignedGroup": {
"displayName": "Auto1 - TeamA",
"id": "demo_sample:31"
},
"assignedUser": {
"displayName": "Andy Applegate",
"id": "demo_sample:1"
},
"closeDate": "2020-04-06T07:00:00.000Z",
"dueDate": "2020-04-06T07:00:00.000Z",
"escalated": false,
"id": "cc:20",
...
}
You can use the fields query parameter to specify an inlined resource. When you do, all default fields for that
resource are returned. For example, you could specify that you want a GET /activities to return only the
assignedGroup and assignedUser fields (and all of their default subfields) using the following:
GET /activities?fields=assignedGroup,assignedUser
This would return:
"attributes": {
"assignedGroup": {
"displayName": "Auto1 - TeamA",
"id": "demo_sample:31"
},
"assignedUser": {
"displayName": "Andy Applegate",
"id": "demo_sample:1"
}
}
You can also specify specific subfields using the following syntax:
fields=inlinedResourceName.fieldName
For example, you could specify that you want a GET /activities to return only the ids of the assigned user and
group using the following:
GET /activities?fields=assignedGroup.id,assignedUser.id
This would return:
"attributes": {
"assignedGroup": {
"id": "demo_sample:31"
},
"assignedUser": {
"id": "demo_sample:1"
}
}
52 Query parameters
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
fields=*all
For example, the following query returns all the possible fields for activity xc:20.
GET /activities/xc:20?fields=*all
Note that the *all query parameter returns all fields that the caller is authorized to view. If there are fields on a
resource that a caller is not authorized to view, they are excluded from queries using the *all query parameter.
*all is not recommended for production environments as it may return fields that are not included in default responses
because they require additional resources to calculate. Instead, use the *default filter with any specific fields that do
not appear in the default detail or summary list.
POST /admin/v1/users
The following request also creates a new user. But, the response will contain only the id.
POST /admin/v1/users?fields=id
The fields query parameter is the only parameter you can use with POSTs and PATCHes.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities
3. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
4. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities?fields=id,subject
Query parameters 53
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
filter=field:op:value
where:
• field is the name of a filterable field
• op is one of the comparison operators from the following table
• value is the value to compare
op value Meaning Example using the GET /activities endpoint Returns activities where...
eq Equal to ?filter=escalated:eq:true ...the escalated field equals true
ne Not equal to ?filter=escalated:ne:true ...the escalated field equals false
lt Less than ?filter=dueDate:lt: ...the due date is less than (before) May 11,
2020-05-11T07::00::00.000Z 2020.
gt Greater than ?filter=dueDate:gt: ...the due date is greater than (after) May
2020-05-11T07::00::00.000Z 11, 2020.
le Less than or equal ?filter=dueDate:le: ...the due date is less than or equal to (on
2020-05-11T07::00::00.000Z or before) May 11, 2020.
ge Greater than or equal ?filter=dueDate:ge: ...the due date is greater than or equal to
2020-05-11T07::00::00.000Z (on or after) May 11, 2020.
in In ?filter=priority:in:urgent,high ...the priority is either urgent or high
ni Not in ?filter=priority:ni:urgent,high ...the priority is neither urgent nor high
sw Starts with ?filter=subject:sw:Contact ...the subject starts with the string "Contact
%20claimant claimant"
cn Contains ?filter=subject:cn:Contact ...the subject contains the string "Contact
%20claimant claimant"
The query parameter is passed as part of a URL. Therefore, special conventions must be used for certain types of
characters to ensure the URL can be parsed correctly.
• Specify strings without surrounding quotes.
• If a string has a space in it, use the URL encoding for a space (%20). (For example, "subject starts with 'Contact
claimant'" is specified as filter=subject:sw:Contact%20claimant)
• If a string has a colon (:) in it, use two colons (::) in the URL. The first colon acts as an escape character. (For
example, "subject starts with 'Urgent: Information needed'" is specified as ?filter=subject:sw:Urgent::
%20Information%20needed)
• Specify Booleans as either true or false. (For example, "escalated is true" is specified as ?
filter=escalated:eq:true)
• Date and datetime fields must be specified as an ISO-8601 datetime value. All datetime fields can accept either date
values or datetime values. For datetime values, the colons in the value must be expressed as "::". For example, "due
date is less than 2020-04-03T15:00:00.000Z" is specified as ?filter=dueDate:lt:
2020-05-11T07::00::00.000Z.
• Specify null values as null. For example, "all activities whose escalation date is null" is specified as ?
filter=escalationDate:eq:null.
References to typekey fields automatically resolve to the field's code. For example, to filter on activities whose priority
is set to urgent, use: GET /activities?filter=priority:eq:urgent.
54 Query parameters
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
You can also use the filter query for related resources added through the include parameter. For more information, see
“Query parameters for included resources” on page 62.
"message": "The field 'dogsaregreat' is not a filterable field for this endpoint.
The set of filterable fields is [accountNumber, accountStatus, createdDate]."
Another option that allows you to identify some of the attributes that are filterable is by reviewing the schema
definition. If a field is filterable, then the schema definition includes the text: "filterable": true.
For example, the following is the schema description from Swagger UI for two fields returned by the Common API /
activities endpoint.
escalated boolean
readOnly: true
x-gw-extensions: OrderedMap { "filterable": true, "sortable": true }
escalationDate string($date-time)
x-gw-nullable: true
Note that the escalated field includes the "filterable": true expression, but the escalationDate field does not.
This means that you can filter on escalated, but not escalationDate.
The limitation to the preceding option is that it won't display custom filters. You might have to look at the Gosu
resource files to determine whether a customization has been added to make a field filterable. See Cloud API
Developer Guide for information on custom filters and where to find them.
filter=field:op:value&filter=field:op:value
When multiple criteria are specified, the criteria are ANDed together. Resources must meet all criteria to be included in
the response. For example, the following GET returns only high priority activities that have not been escalated.
GET /activities?filter=priority:eq:high&filter=escalated:eq:false
The filter query parameter cannot be used to construct OR criteria.
When querying for a specific root resource, do not filter on the id property
When writing a call to GET a single root resource, use an endpoint that returns a single element, such as:
GET /activities/xc:20
Do not attempt to retrieve the resource by using an endpoint that returns a collection and filtering on the id property, as
in:
GET /activities?filter=id:eq:xc::20
Typically, the latter approach does not work because collection endpoints do not have filterable id properties.
This restriction applies to the root resource only. There may be situations where you need to retrieve a root resource
and one or more child resources. When retrieving the child resources, it may be possible and appropriate to filter on the
child resource's id.
Query parameters 55
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
3. Specify Basic Auth authorization using user aapplegate and password gw.
4. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities
5. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
6. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities?filter=priority:eq:high
56 Query parameters
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
sort=propertiesList
where propertiesList is a comma-delimited list of properties that support sorting for that endpoint.
For example, the following query returns all activities and sorts them by due date:
GET /activities?sort=dueDate
You can specify multiple sort properties. Resources are sorted based on the first property. Any resources with the same
value for the first property are then sorted by the second property, and so on. For example, the following query returns
all activities assigned to the current caller and sorts them first by escalation status and then by due date:
GET /activities?sort=escalated,dueDate
You can also use the sort query for related resources added through the include parameter. For more information, see
“Query parameters for included resources” on page 62.
Sort orders
The default sort order is ascending. To specify a descending sort, prefix the property name with a hyphen (-). For
example, the following queries return all activities assigned to the current caller, sorted by due date. The first query
sorts them in ascending order. The second sorts them in descending order.
GET /activities?sort=dueDate
GET /activities?sort=-dueDate
escalated boolean
readOnly: true
x-gw-extensions: OrderedMap { "filterable": true, "sortable": true }
escalationDate string($date-time)
x-gw-nullable: true
Note that the escalated field includes the "sortable": true expression, but the escalationDate field does not.
This means that you can sort on escalated, but not escalationDate.
resources:
...
Activities:
resource: gw.rest.core.pc.common.v1.activity.ActivitiesCoreResource
defaultSort:
- priority
- subject
Query parameters 57
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
In the defaultSort section, every field is preceded by a hyphen and a space (- ). This first hyphen does not indicate
descending order. If a field has a default descending order, then the field name is preceded by a second hyphen and
surrounded by quotation marks. For example, a default sort on priority in descending order would appear as - "-
priority".
As discussed in the previous section, you can use the sort query parameter to override the default sort for a collection.
You can also remove the default sort order by specifying ?sort=*none. When you do this, results are sorted based on
their id value. This may improve performance when you are retrieving a large amount of information from an endpoint
with a default sort order and the column that the sort is based on is not indexed.
For example:
• GET /common/v1/activities returns activities using the default sort (priority and then subject).
• GET /common/v1/activities?sort=priority returns activities sorted by priority only.
• GET /common/v1/activities?sort=*none returns activities sorted only by id.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
3. Specify Basic Auth authorization using user aapplegate and password gw.
4. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities?fields=id,dueDate
5. Open a second request tab by right-clicking the first tab and selecting Duplicate Tab.
6. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities?fields=id,dueDate&sort=dueDate
58 Query parameters
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
pageSize=n
{
"attributes": {
...
"id": "cc:32",
... },
...
"links": {
...
"self": {
"href": "/common/v1/activities/cc:32",
"methods": [
"get",
"patch"
]
}
Query parameters 59
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
}
}
The href property of the self link is an endpoint to that specific element. When necessary, you can use this link to
construct a call to act on that element.
"links": {
"first": {
"href": "/common/v1/activities?pageSize=5&fields=id",
"methods": [
"get"
]
},
"next": {
"href": "/common/v1/activities?pageSize=5&fields=id&pageOffset=10",
"methods": [
"get"
]
},
"prev": {
"href": "/common/v1/activities?pageSize=5&fields=id",
"methods": [
"get"
]
},
"self": {
"href": "/common/v1/activities?pageSize=5&fields=id&pageOffset=5",
"methods": [
"get"
]
}
}
To access a collection that starts with a specific resource, Cloud API uses a pageOffset parameter. This parameter is
used in the prev and next links for a collection. The pageOffset index starts with 0, so a theoretical pageOffset=0
would start with the first element and pageOffset=5 skips the first 5 elements and starts with the sixth.
Note: There can be some complexity involved in determining how to construct a link with the correct
pageOffset value. Therefore, Guidewire recommends that you use the prev and next provided in response
payloads and avoid constructing pageOffset queries of your own.
Note: pageOffset is supported for root resources only. When executing a query that uses request inclusion,
you cannot use pageOffset to page through included resources.
60 Query parameters
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
includeTotal=true
When you submit this query parameter, the payload includes an additional total value that specifies the total. For
example:
"total": 72
When the includeTotal query parameter is used, the response payload contains two counting values:
• count - The number of resources returned in this page.
• total - The total number of resources that meet the query's criteria.
If the total number of resources that meet the criteria is less than or equal to the pageSize, then count and total are
the same. If the total number of resources that meet the criteria is greater than the pageSize, then count is less than
total. count can never be greater than total.
For performance reasons, Guidewire will count the total number of items up to 1000 only. When the total value is
stated as 1000, the actual count could be 1000 or some number greater than 1000.
Note: If the number of resources to total is sufficiently large, using the includeTotal parameter can affect
performance. Guidewire recommends you use this parameter only when there is a need for it, and only when
the number of resources to total is unlikely to affect performance.
In some situations, you may be interested in retrieving only the total number of resources that meet a given criteria,
without needing any information from any specific resource. However, a GET cannot return only an included total. If
there are resources that meet the criteria, it must return the first N set of resources and at least one field for each
resource. For calls that are sent to retrieve only the total number of resources, Guidewire recommends using a call with
query parameters that return the smallest amount of resource information, such as GET ...?
includeTotal=true&fields=id&pageSize=1.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
3. Specify Basic Auth authorization using user aapplegate and password gw.
4. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities
5. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
6. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities?pageSize=10&includeTotal=true
Query parameters 61
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
?include=<resourceName>
For example, GET /activities?include=notes returns all activities assigned to the current caller, and all notes
associated with those activities.
For more information on the default behavior of include, see “Payload structure for a response with included
resources” on page 42.
Most query parameters that can be used on primary resources can also be used on included resources.
<queryParameter>=<includedResource>:<queryValue>
For example, the following GET retrieves activities and their notes. It also specifies that the number of notes to return
is limited to 5.
GET /activities?include=notes
&pageSize=notes:5
The following GET retrieves activities and their notes. It also specifies that the only fields to return for the notes are id
and subject.
GET /activities?include=notes
&fields=notes:id,subject
• Returns: Policy pc:10 and its included contacts. For the contacts, return only licenseState and licenseNumber.
62 Query parameters
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
• Syntax: filter=resource:field:op:value
• Example:
GET policy/v1/policies/pc:10?include=contacts
&filter=contacts:maritalStatus:eq:S
• Returns: Policy pc:10 and its included contacts that have a marital status of "S" (single)
• Returns: Policy pc:10 and its included locations, sorted by their location number.
• Returns: Policy pc:10, its included contacts, and the total number of included contacts for pc:10.
GET /activities?include=notes
&fields=id,description,dueDate
&fields=notes:id,subject
Query parameters 63
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
You can also use different query parameters for each resource. For example, the following query retrieves activities and
their notes. For activities, only the id, description, and dueDate fields are returned. For notes, the number of notes
per activity is limited to 5.
GET /activities?include=notes
&fields=id,description,dueDate
&pageSize=notes:5
GET /accounts?include=accountHolder,contacts
&fields=id,accountNumber
&fields=accountHolder:id,displayName
&fields=contacts:displayName
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. Enter the following and click Send:
GET http://localhost:8180/pc/rest/policy/v1/policies?include=contacts
3. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
4. Enter the following and click Send:
GET http://localhost:8180/pc/rest/policy/v1/policies?
include=contacts&fields=id,policyNumber&filter=contacts:contactSubtype:eq:company
64 Query parameters
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
• For contacts, only the contacts that are marked as primary payers are returned.
POST /admin/v1/users
The following request also creates a new user. But, the response will contain only the id.
POST /admin/v1/users?fields=id
The fields query parameter is the only parameter you can use with POSTs and PATCHes.
Query parameters 65
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
66 Query parameters
chapter 4
POSTs
This topic discusses the POST method and how to construct a request payload for creating a single resource. For
information on how to create request payloads that specify multiple resources, see “Reducing the number of calls” on
page 95.
If you want to interact directly with the concepts in this topic, go to the following tutorials:
• “Tutorial: Create a new note that specifies required fields only” on page 73
• “Tutorial: Create a new note that specifies optional fields” on page 74
Overview of POSTs
A POST is a REST API method that creates a resource in PolicyCenter. The POST method is also used to execute
specific business processes, such as assigning an activity.
A POST consists of the POST method and the endpoint, such as POST /activities/{activityId}/notes, and a
request payload. The request payload contains data about the resource to create.
The response to a POST includes an HTTP code indicating success or failure. It also includes a response payload. The
contents of the response payload is determined by the endpoint's schema.
• For an endpoint used to create data, the response payload may contain data from the request payload. It may also
contain data generated by PolicyCenter, such as ids and timestamps.
• For an endpoint used to execute a business action, the response payload is a resource related to the business action.
It could be the resource on which the action was executed. For example, when assigning an activity, the response
payload contains the assigned activity. It could also be a resource generated by the business action. For example,
when canceling a policy the response payload contains a JobResponse.
When a developer is configuring a caller application to POST information using Cloud API, they will need to
determine the correct structure for the request payload. They may also need to parse information out of the response
payload. The remainder of this topic discusses how request payloads for resources are structured and how developers
can learn about request payload formats.
POSTs are also used to execute business actions. For these types of POSTs, request payloads may be unnecessary,
optional, or required. For example:
• A POST that marks an activity as complete does not require a request payload.
◦ You can optionally provide a request payload to add a note to the completed activity.
• A POST that assigns an activity requires a request payload. The payload specifies how to assign the activity.
POSTs 67
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
{
"data": {
"checksum": ...,
"id": ...,
"links": ...,
"method": ...,
"refid": ...,
"related": ...,
"type": ...,
"uri": ...
}
}
}
DataListEnvelope is used to standardize the format of information for collections. It specifies the following
properties, which are siblings to the data section: count, links (for a collection), and total. At a high level, the
format of a payload for a single element looks like:
{
"count" ...,
"data": [
{ properties_for_element_1 },
{ properties_for_element_2 },
...
],
"links": ...,
"total": ...
}
Every property does not appear in every payload. There are different reasons why a property may not appear in a given
payload. For example:
• Some properties, such as refid, apply only to requests and do not appear in response payloads.
• Some properties, such as count, apply only to responses and do not appear in request payloads.
• Some properties, such as related, do not appear by default and appear only when the request includes certain
query parameters.
68 POSTs
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Request and response schemas extend DataEnvelope or DataListEnvelope. This ensures that information relevant to
all endpoints appears in payloads in a standard way.
Request and response schemas also define an attributes property for the payload. This property is associated with a
schema that includes resource-specific information for the payload. For example, the GET /activity/{activityId}
endpoint specifies an attributes property in the ActivityData child schema. This property is associated with the
Activity schema, which contains activity-specific fields, such as activityPattern and activityType. As a result,
response payloads for the GET /activity/{activityId} endpoint have this structure:
{
"data": {
"checksum": ...,
"attributes" : {
"activityPattern": ... ,
"activityType": ...,
...},
"id": ...,
"links": ...,
"method": ...,
"refid": ...,
"related": ...,
"type": ...,
"uri": ...
}
}
}
{
"data": {
"attributes": {
<field/value pairs are specified here>
}
}
}
POSTs 69
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
{
"data": {
"attributes": {
"subject": "Main contact vacation",
"body": "Rodney is on vacation in June. Direct urgent questions to Sarah Jackson.",
"confidential": false,
"topic": {
"code": "general"
}
}
}
}
In some situations, you can create an object using an "empty body" (a body that specifies no values). An object created
in this way will contain only default values. In these situations, the payload has an empty attributes section:
{
"data": {
"attributes": {
}
}
}
70 POSTs
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
For scalars, the formats for values are the same for request payloads and response payloads. For a given field, you can
use its format in a response payload as a model for how to build a request payload.
ids
ID values are assigned by PolicyCenter. Therefore, you cannot specify an id for an object that is being created.
However, you can specify ids when identifying an existing object that the new object is related to.
Typekeys
Typekeys use the following format:
"field": {
"code": "value"
}
For example:
"priority": {
"code": "urgent"
}
Typekeys also have a name field, which is included in responses. But, the name field is not required. If you include it in
a request schema, it is ignored.
Monetary amounts
Monetary amounts use the following format:
"field": {
"amount": "amountValue",
"currency": "currencyCode"
}
For example:
"transactionAmount": {
"amount": "500.00",
POSTs 71
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
"currency": "usd"
}
Spatial points
Spatial points use the following format:
"field": {
"longitude": "coordinateValue",
"latitude": "coordinateValue"
}
For example:
"coordinates": {
"longitude": "-122.26842",
"latitude": "37.55496"
}
To set the value of an object to null, specify the null at the object field level. For example, a user can optionally have a
home phone number. The following explicitly states that the home phone number is null:
"homePhone": null
To set a typekey to null, specify the null at the typekey field level. (Do not specify the null at the code level.) For
example, the following sets a document's language field to null:
"language": null
To set a monetary amount, currency amount, or spatial point to null, specify the null at the field level. (Do not specify
the null at the amount, currency, longitude, or latitude level.) For example, the following sets a transactionAmount
field to null:
"transactionAmount": null
Sending POSTs
You use a request tool, such as Postman, to ensure POSTs are well-formed and to review the structure of the response
payloads. For more information, see “Requests and responses” on page 30.
72 POSTs
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. Alice Applegate has two "Review submission" activities. Enter the following call and click Send to retrieve them:
GET http://localhost:8180/pc/rest/common/v1/activities?filter=subject:eq:Review
%20submission
3. Identify the id of the first activity in the payload. This value is referenced below as <activityId>.
4. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
5. Change the operation to POST and enter the following URL, but do not click Send yet:
POST http://localhost:8180/pc/rest/common/v1/activities/<activityId>/notes
6. Specify the request payload.
a. In the first row of tabs (the one that starts with Params), click Body.
b. In the row of radio buttons, select raw.
c. At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
d. Paste the following into the text field underneath the radio buttons.
{
"data":
{
"attributes": {
"body": "API tutorial note 1"
}
}
}
1. Click Send. The response payload appears below the request payload.
POSTs 73
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
The API tutorial note is listed as one of the notes. If the note is not present, check the second "Review submission"
activity.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. Alice Applegate has two "Review submission" activities. Enter the following call and click Send to retrieve them:
GET http://localhost:8180/pc/rest/common/v1/activities?filter=subject:eq:Review
%20submission
3. Identify the id of the first activity in the payload. This value is referenced below as <activityId>.
4. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
5. Change the operation to POST and enter the following URL, but do not click Send yet:
POST http://localhost:8180/pc/rest/common/v1/accounts/<accountId>/notes
6. Specify the request payload.
a. In the first row of tabs (the one that starts with Params), click Body.
b. In the row of radio buttons, select raw.
c. At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
d. Paste the following into the text field underneath the radio buttons.
{
"data":
{
"attributes": {
"body": "API tutorial note 2",
"confidential": true,
"topic": {
"code": "legal"
}
}
}
}
7. Click Send. The response payload appears below the request payload.
74 POSTs
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Responses to a POST
Every successful POST generates a response object with a response payload. This payload may contain values
generated by PolicyCenter during resource creation that are needed by the caller application. For example:
• The resource's Public id (which is also the Cloud API id value)
• Generated human-readable id values, such as the policy number
• Values generated by a business flow, such as:
◦ The user and group that the resource was assigned to
◦ Activities generated to process the resource
Similarly to request schemas, response schemas follow certain patterns around using data envelopes to wrap the
resource schema. In many instances, the request and response schemas will match.
POSTs 75
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
executed through a PATCH because the caller application cannot always determine how to set the assignedUser and
assignedGroup fields.
In standard REST architecture, there is no operation for this type of business action. Therefore, Cloud API has adopted
the following conventions:
• Endpoints that execute business actions use the POST method.
• Endpoints that execute business actions have paths the end in verbs (such as "assign" or "complete").
Examples of endpoints that execute business actions include:
• POST /common/v1/activities/{activityId}/assign, which assigns the corresponding activity
• POST /common/v1/activities/{activityId}/complete, which marks the corresponding activity as complete
• POST /job/v1/jobs/{jobId}/quote, which quotes the job
• POST /job/v1/jobs/{jobId}/bind-and-issue, which bind and issues the job
76 POSTs
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
helps subsequent requests execute more rapidly. The best way to accomplish this is with a POST that contains the GW-
DoNotCommit header. The POST triggers the initial endpoint tasks, and the header identifies that data modifications
made by the request are to be discarded and not committed.
For more information, see “Warming up an endpoint” on page 91.
POSTs 77
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
78 POSTs
chapter 5
PATCHes
This topic discusses the PATCH method, which modifies existing data.
If you want to interact directly with the concepts in this topic, go to the following tutorials:
• “Tutorial: PATCH an activity” on page 81
Overview of PATCHes
A PATCH is a REST API method that modifies an existing resource in PolicyCenter.
A PATCH consists of the PATCH method and the endpoint, such as PATCH /activities/{activityId}, and a
request payload. The request payload contains the data to modify in the specified resource.
The response to a PATCH includes an HTTP code indicating success or failure. It also includes a response payload.
The default response for a PATCH consists of a predetermined set of fields and resources. This may or may not include
the data that the PATCH modified.
When a developer is configuring a consumer application to PATCH information to Cloud API, they will need to
determine the correct structure for the request payload. They may also need to parse information out of the response
payload.
Within REST API architecture, there are two operations that modify existing resources - PATCH and PUT. PATCH is
used to modify a portion of an existing resource (while leaving other aspects of it unmodified). PUT is used to replace
the entire contents of an existing resource with new data. Cloud API supports the PATCH operation, but not the PUT
operation. This is because nearly every operation that modifies an InsuranceSuite object modifies only a portion of it
while keeping the rest of the object untouched. This behavior maps to PATCH, but not to PUT.
PATCHes 79
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
{
"data":
{
"attributes": {
"roles": [
{
"group": "systemTables:1",
"role": {
"code": "Auditor"
},
"user": "default_data:1"
}
]
}
}
}
If you want a PATCH to be additive to an array, you must first determine the existing members of the array, and then
specify an array in the PATCH with the existing members as well as the ones you wish to add.
Sending PATCHes
You can use a request tool, such as Postman, to ensure PATCHes are well-formed and to review the structure of the
response payloads. For more information on Postman, see “Requests and responses” on page 30.
80 PATCHes
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
• At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
• Paste the request payload into the text field underneath the radio buttons.
6. Click Send. The response payload appears below the request payload.
7. Click Send. The response payload appears below the request payload.
Checking your work
1. View the modified activity in PolicyCenter.
a. Log on to PolicyCenter as the user aapplegate. In the left-hand side bar, click My Activities. PolicyCenter
shows the My Activities screen, which shows the open activities assigned to Alice.
b. Click the Priority column to sort the activities in ascending priority order.
The PATCHed activity (whose priority is now Low) should be at or near the top of the list. The patched activity will
have a subject ending with an "!".
PATCHes 81
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Responses to a PATCH
Every successful PATCH generates a response object with a response payload. Depending on the default fields returned
and whether any query parameters have been specified, the response payload may or may not contain the values
modified by the PATCH.
Similarly to request schemas, response schemas follow certain patterns around using data envelopes to wrap the
resource schema. In many instances, the request and response schemas will match.
82 PATCHes
chapter 6
DELETEs
This topic provides an overview of DELETEs, which are used to delete resources.
If you want to interact directly with the concepts in this topic, go to the following tutorial:
• Tutorial: “Tutorial: DELETE a note” on page 83
Overview of DELETEs
Within the context of APIs that are fully REST-compliant, a DELETE is an endpoint operation that deletes a resource.
This typically involves removing the resource from the underlying database.
Within the context of Cloud API, a DELETE is a Cloud API method that "removes" an existing resource from
PolicyCenter. What it means to "remove" the resource depends on the resource type. The DELETE operation federates
to the PolicyCenter code that matches the functionality most closely tied to deletion. That code could theoretically:
• Delete the corresponding data model instance from the operational database.
• Mark the corresponding data model instance as retired.
• Modify the corresponding data model instance and other related instances to indicate the data is no longer active or
available.
Unlike GET, POST, and PATCH, there are only a small number of endpoints in the base configuration that support
DELETE. This is because, in most cases, PolicyCenter does not support the removal of data. Several business objects
can be approved, canceled, completed, closed, declined, rejected, retired, skipped, or withdrawn. But only a few can be
deleted.
A DELETE call consists of the DELETE method and the endpoint, such as DELETE /notes/{noteId}. Similar to
GETs, DELETEs are not permitted to have a request payload.
The response to a DELETE includes an HTTP code indicating success or failure. DELETE responses do not have a
response payload.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. The sample data includes one "Review risk information" activity for Alice Applegate. Query for that activity by
entering the following call and clicking Send:
a. GET http://localhost:8180/pc/rest/common/v1/activities?filter=subject:sw:Review%20risk
3. Identify the id of the activity in the payload. This value is referenced below as <activityId>.
4. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
a. On the Authorization tab, select Basic Auth using user aclinton and password gw.
5. Change the operation to POST and enter the following URL, but do not click Send yet:
a. POST http://localhost:8180/pc/rest/common/v1/activities/<activityId>/notes
6. Specify the request payload.
a. In the first row of tabs (the one that starts with Params), click Body.
b. In the row of radio buttons, select raw.
c. At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
d. Paste the following into the text field underneath the radio buttons.
{
"data":
{
"attributes": {
"body": "API tutorial note to be deleted"
}
}
}
84 DELETEs
chapter 7
Request headers
This topic describes how you can modify call behavior using the Guidewire-proprietary headers supported by Cloud
API.
HTTP headers
Request and response objects are used by REST APIs to send information between application. These objects contain
HTTP headers. An HTTP header is a name/value pair included with a request or response object that provides
metadata about the request or response. An HTTP header can specify information such as:
• The format used in the request object (such as whether it is JSON or XML)
• The format to use in the response object
• Session and connection information
• Authorization information
Request headers 85
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
GW-FailOnValidationWarnings Boolean This can cause certain Job actions to fail if the action
throws any validation warnings.
If set to true on a request to quote, bind-only, or bind-
and-issue a Job, this will cause the action to fail if there
are any validation warnings. (Normally, these actions fail
only if there are validation errors.) The default is false.
For more information on Job actions, see “Submissions”
on page 193.
GW-IncludeSchemaProperty Boolean This can modify the format of a JSON payload.
When this is set to true, if the operation returns JSON
with a defined schema, the $GW-Schema property is
added to the root JSON object of the response with the
fully-qualified name of the JSON Schema definition for
that object. The default is false.
GW-Language String This sets the language for the response.
For more information, see “Language and locale” on
page 88.
GW-Locale String This sets the locale for the response.
For more information, see “Language and locale” on
page 88.
GW-UnknownPropertyHandling One of these string values: This specifies the behavior for handling request payloads
with unknown properties. The default behavior is
• log
reject.
• reject
For more information, see “Handling a call with
• ignore unknown elements” on page 91.
GW-UnknownQueryParamHandling One of these string values: This specifies the behavior for handling URLs with
unknown query parameters. The default behavior is
• log
reject.
• reject
For more information, see “Handling a call with
• ignore unknown elements” on page 91.
GW-User-Context String This provides information about the represented user
when a service makes a service-for-user or service-for-
service call.
For more information, see the Cloud API Developer Guide.
86 Request headers
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Procedure
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
2. Specify authorization as appropriate.
3. Add the header and header value.
• In the first row of tabs (the one that starts with Params), click Headers.
• Scroll to the bottom of the existing key/value list.
Request headers 87
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
• In the blank row at the bottom of the key/value list, enter the header name in KEY column and its value in the
VALUE column.
4. Enter the request operation and URL.
5. Click Send.
GW headers
Cloud API has two Guidewire-specific headers you can use to specify language and locale: GW-Language and GW-
Locale. These headers give you the ability to explicitly state the desired language and locale for a call.
To specify a language using Guidewire-specific headers, include the following header with the request:
• Key: GW-Language
• Value: (an ISO 639-1 code designating the language)
For example, to set the language to Japanese, the request must contain a GW-Language/ja header.
To specify a locale using GW headers, include the following header with the request:
• Key: GW-Locale
• Value: (an ISO 639-1 code followed by an underscore followed by an ISO 3166-1 alpha-2 locale code)
For example, to set the locale to Japanese, the request must contain a GW-Locale/ja_JP header.
If you want to specify a language and locale, Guidewire recommends using these headers. They are the most explicit
declaration of the intent of the call.
88 Request headers
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
If the request does not contain either a GW-Language header or GW-Locale header, and the caller is not an authenticated
user with a preferred language, then the Accept-Language header is used.
What is specified What is language set to? What is locale set to?
Both GW-Language and GW- The GW-Language header value. The GW-Locale header value.
Locale
Only GW-Language The GW-Language header value. The caller's preferred locale, if any. Otherwise,
the PolicyCenter default locale.
Only GW-Locale The caller's preferred language, if any. Otherwise, The GW-Locale header value.
the PolicyCenter default language.
Neither GW-Language nor The caller's preferred language, if any. Otherwise, The caller's preferred locale, if any. Otherwise,
GW-Locale the Accept-Language header, if any. Otherwise, the PolicyCenter default locale.
the PolicyCenter default language.
The GW-DBTransaction-ID header identifies a transaction ID (a string of up to 128 characters). When submitted with a
Cloud API call, Cloud API attempts to insert the value into the database's TransactionID table.
• If the value does not already exist in the table, the insert is successful. Cloud API assumes the transaction has not
already been committed, and the call is processed as normal.
• If the value does exist in the table, the insert fails. Cloud API assumes the transaction has already been committed,
and the call is rejected. Cloud API returns a 400 status code with an
gw.api.webservice.exception.AlreadyExecutedException error.
For the call to succeed, the transaction ID specified in the header must be globally unique across all clients, APIs, and
web services.
The GW-DBTransaction-ID header has the following limitations:
• It only works with Cloud API calls that commit data to the database.
• It only works when Cloud API commits a single time only. (Cloud API calls that commit multiple times are rare.)
• It only works if the commit is either the only side effect of the call, or if the commit happens before any other side
effects, such as the sending of notifications to external systems.
Duplicate requests do not return identical responses. The first request will succeed, but subsequent requests will fail. It
is the responsibility of the caller application to decide how or if to handle this situation.
Request headers 89
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Note: The session ID and cookie behavior described below is a feature of API Gateway. In order for the
behavior to work as described, the caller application must use an appropriate API Gateway URL to connect to
PolicyCenter. For more information, contact Guidewire.
x-gwre-session: 09d0fbf0-243c-4337-a582-725df8d33e39
Because all three calls specify the same session ID, all three calls will be routed to the same node.
Session IDs is the default behavior of the Guidewire Cloud Platform. If you wish to use this option, you do not need to
make any special request to Guidewire.
Using cookies
Within the context of Cloud API calls in a clustered environment, a cookie is an arbitrary string generated by
Guidewire Cloud Platform that can be used to identify subsequent related API calls.
If a request header does not contain an x-gwre-session header key, the Guidewire Cloud Platform generates a cookie
and returns it in the response header with a Set-Cookie header key. Subsequent calls can include this cookie in the
request header using the Cookie header key. Every request that uses a given cookie will be routed to the same node in
the cluster that generated the cookie.
For example, suppose that a caller application makes the following calls to PolicyCenter cluster:
1. A POST to create an activity
• The request header contains no x-gwre-session header key.
• The response header contains the following: Set-Cookie: gwre=ccd37ca0-f8d3-4a8e-
b278-83274d82b355; Path=/
2. A PATCH to update the activity.
• The request header contains the following: Cookie: gwre=ccd37ca0-f8d3-4a8e-b278-83274d82b355
3. A POST to create a note on the activity
• The request header contains the following: Cookie: gwre=ccd37ca0-f8d3-4a8e-b278-83274d82b355
Because the second and third call specify the cookie returned by the first call, the second and third call are routed to the
same node that processed the first call.
Cookies are not the default behavior of the Guidewire Cloud Platform. If you wish to use this option, you must request
this from Guidewire.
90 Request headers
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
• Session IDs are the default behavior for Guidewire Cloud Platform.
If you wish to use cookies, you must request this from Guidewire.
Warming up an endpoint
The first time a caller application makes a call to a Cloud API endpoint, the call may take longer to process than
normal. This is because the Guidewire server may need to execute tasks for the first call that it does not need to re-
execute for subsequent tasks, such as:
• Loading Java and Gosu classes
• Parsing and loading configuration files that are lazy-loaded on the first reference
• Loading data from the database or other sources into local caches
• Initializing database connections
A caller application may want to avoid having this slow processing time occur during a genuine business call.
Therefore, the caller application may want to "warm up" the endpoint. This involves sending a dummy "warm-up
request" to trigger these initial tasks. The warm-up request helps subsequent requests execute more rapidly.
Warm-up requests are not supposed to create or modify data. Theoretically, a caller application could use a GET as a
warm-up request. However, GETs do not trigger as wide a range of start-up tasks as POSTs. The better option is to
send a POST that does not commit any changes to the database. The best way to accomplish this is with a POST that
contains the GW-DoNotCommit header. This header identifies that data modifications made by the request are to be
discarded and not committed.
• ignore - Ignore all unknown properties. Do not log any messages or return any validation errors.
• log - Log a service-side info message, but then process the call, ignoring any unknown properties.
• reject - Do not process the call. Return a validation error specifying there are unknown properties.
Similarly, a Cloud API call may include a URL with a query parameter that is not defined in the associated schema. By
default, Cloud API rejects calls with unknown query parameters. You can override the default behavior by including
the GW-UnknownQueryParamHandling header. The header must be set to one of the following string values:
• ignore - Ignore all unknown query parameters. Do not log any messages or return any validation errors.
• log - Log a service-side info message, but then process the call, ignoring any unknown query parameters.
• reject - Do not process the call. Return a validation error specifying there are unknown query parameters.
Request headers 91
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
92 Request headers
part 2
Optimizing calls
The following topics discuss how caller applications can optimize Cloud API calls. This may involve reducing the
number of calls needed to complete an operation, or improving call performance. This includes how to:
• Reduce the number of calls needed to accomplish a business flow using:
◦ Composite requests
◦ Request inclusion
◦ Batch requests
• Prevent lost updates using checksums
• Execute calls asynchronously
Optimizing calls 93
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
94 Optimizing calls
chapter 8
Good integration design typically involves writing integration points so that the number of calls between services is as
small as possible. Cloud API includes multiple features that let caller applications execute multiple requests in a single
call. This topic provides an overview of these features.
Composite requests
From a Cloud API perspective, a composite request is a set of requests that are executed in a single InsuranceSuite
bundle (which corresponds to a single database transaction).
• A composite request can include one or more subrequests that create or modify data. Either all of the subrequests
succeed, or none of them are executed. Each subrequest is a separate unit of work.
• A composite request can also include one or more subselections that query for data.
◦ If the composite request has one or more subrequests, the subselections can retrieve data created or modified by
those subrequests.
◦ A composite request can also have no subrequests. In this case, the subselections merely execute multiple
queries to retrieve existing data.
Subrequests and subresponses are executed serially, in the order they are specified in the composite request payload.
PolicyCenter then gathers the response to each subrequest and subselection and returns them in a single response
payload. The responses to each subrequest and subselection appear in the same order as the original composite request.
Composite requests can make use of variables. This allows data created by the execution of one subrequest to be used
by later subrequests.
Composite requests can consist entirely of subrequests that merely retrieve data. For more information, see “Composite
requests that execute only queries” on page 104.
Composite requests support the use of most endpoints, but not all of them. They also support many query parameters,
but not all of them. For more information, see “Composite request limitations” on page 105.
Composite requests can be submitted asynchronously. For more information, see “Asynchronous calls” on page 133.
Composite requests are limited to a maximum number of subrequests. For more information, see “Configuring the
maximum number of subrequests” on page 107.
Composite requests 97
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
POST <applicationURL>/rest/composite/v1/composite
{
"requests": [
{
<subrequest 1>
},
{
<subrequest 2>
},
...
],
"selections": [
{
<subselection 1>
},
{
<subselection 2>
},
...
]
}
{
"requests": [
{
"method": "<post/patch/delete>",
"uri": "<path>",
"body": {
"data": {
"attributes": {
"<field1>": "<value1>",
"<field2>": "<value2>",
...
}
}
}
},
{
<next subrequest>
},
...
{
<final subrequest>
}
]
}
For example, the following simple composite request creates two notes for activity xc:202.
POST <applicationURL>/rest/composite/v1/composite
{
"requests": [
{
"method": "post",
"uri": "/common/v1/activities/xc:202/notes",
"body": {
98 Composite requests
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
"data": {
"attributes": {
"body": "Cloud API note #1."
}
}
}
},
{
"method": "post",
"uri": "/common/v1/activities/xc:202/notes",
"body": {
"data": {
"attributes": {
"body": "Cloud API note #2."
}
}
}
}
]
}
For the complete syntax that includes all composite request features, see “Complete composite request syntax” on page
108.
Declaring variables
Composite variables are declared in a subrequest's vars section. Each variable has a name and path. The name is an
arbitrary string. The path specifies what to set the variable to. It is set to a JSON path expression that identifies a value
in the subrequest's response payload.
For example, suppose a subrequest that creates an activity has the following:
"vars": [
{
"name": "newActivityId",
"path": "$.data.attributes.id"
}
]
This creates a variable named newActivityId, which is set to the value of the data section's attributes section's id
field (which would typically be the id of the newly created activity).
Referencing variables
To reference a variable, use the following syntax:
${<varName>}
You can use variables anywhere in the body of a subrequest. The most common uses for variable values are:
• In an attributes field
• Within the path of a uri
• As part of a query parameter
For example, suppose there is a subrequest that creates an activity, and it is followed by a subrequest that creates a
note. The first subrequest creates a newActivityId variable as shown previously. The uri for the second subrequest is:
"uri": "/common/v1/activities/${newActivityId}/notes"
This would create the new note as a child of the first subrequest's activity.
The following is the complete code for the previous examples.
{
"requests": [
Composite requests 99
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
{
"method": "post",
"uri": "/account/v1/accounts/pc:34/activities",
"body": {
"data": {
"attributes": {
"activityPattern": "contact_insured",
"subject": "Cloud API activity"
}
}
},
"vars": [
{
"name": "newActivityId",
"path": "$.data.attributes.id"
}
]
},
{
"method": "post",
"uri": "/common/v1/activities/${newActivityId}/notes",
"body": {
"data": {
"attributes": {
"body": "Cloud API note #1."
}
}
}
}
]
}
"responses": [
{
"body": {
"data": {
"attributes": {
"activityPattern": "contact_insured",
"activityType": {
"code": "general",
"name": "General"
},
"assignedByUser": {
"displayName": "Andy Applegate",
"id": "demo_sample:1",
"type": "User",
"uri": "/admin/v1/users/demo_sample:1"
},
...
},
"checksum": "0",
"links": {
"assign": {
"href": "/common/v1/activities/cc:403/assign",
"methods": [
"post"
]
},
...
}
}
},
"headers": {
"GW-Checksum": "0",
"Location": "/common/v1/activities/xc:403"
},
"status": 201
},
"includeResponse": false
For example:
{
"requests": [
{
"method": "post",
"uri": "/common/v1/activities/xc:202/notes",
"body": {
"data": {
"attributes": {
"body": "Cloud API note #1."
}
}
},
"includeResponse": false
},
...
The composite response still includes a subresponse for the subrequest. But instead of providing the endpoint's default
response, the subresponse appears as:
{
"responseIncluded": false
},
The responseIncluded field defaults to true. If you want a detailed response for a given subrequest, simply omit the
responseIncluded reference.
{
"requests": [
{
"method": "<post/patch>",
"uri": "<path>",
"body": {
"data": {
"attributes": {
"<field1>": "<value1>",
"<field2>": "<value2>",
...
}
}
},
"parameters" : {
"fields" : "<value>"
}
},
...
]
}
For example, the following code snippet creates an activity. For the subresponse, it specifies to include only the
activity's id and the assigned user.
{
"requests": [
{
"method": "post",
"uri": "/account/v1/accounts/pc:34/activities",
"body": {
"data": {
"attributes": {
"activityPattern": "contact_insured",
"subject": "Cloud API activity"
}
}
},
"parameters" : {
"fields" : "id,assignedUser"
}
},
...
For a given API, you can see a complete list of all query parameters that can be used in composite requests by
executing a GET /openapi.json call. If a query parameter is available to composite requests, the OpenAPI output will
include the following line: "x-gw-allowForCompositeApi": true.
"selections": [
{
"uri": "<pathForFirstSubselection>"
},
{
"uri": "<pathForSecondSubselection>"
},
....
]
For example, the following code creates a new activity and a note for that activity. It then queries for the newly created
activity.
{
"requests": [
{
"method": "post",
"uri": "/account/v1/accounts/pc:34/activities",
"body": {
"data": {
"attributes": {
"activityPattern": "contact_insured",
"subject": "Cloud API activity"
}
}
},
"vars": [
{
"name": "newActivityId",
"path": "$.data.attributes.id"
}
]
},
{
"method": "post",
"uri": "/common/v1/activities/${newActivityId}/notes",
"body": {
"data": {
"attributes": {
"body": "Cloud API note #1."
}
}
}
}
],
"selections": [
{
"uri": "/common/v1/activities/${newActivityId}"
}
]
}
For the complete syntax that includes all composite request features, see “Complete composite request syntax” on page
108.
"selections": [
{
"uri": "<pathForFirstQuery>",
"parameters" : {
"fields" : "<value>",
"filter" : [<value>],
"includeTotal" : <value>,
"pageOffset" : <value>,
"pageSize" : <value>,
"sort" : [<value>]
}
},
....
]
{
"uri": "/common/v1/activities",
"parameters" : {
"fields" : "assignedUser,dueDate,priority,subject"
}
To return only open and complete activities with due dates after 2022-12-20:
{
"uri": "/common/v1/activities",
"parameters" : {
"filter" : ["dueDate:gt:2022-12-20","status:in:open,complete"] }
{
"uri": "/common/v1/activities",
"parameters" : {
"fields" : "assignedUser,dueDate,priority,subject",
"filter" : ["dueDate:gt:2022-12-20","status:in:open,complete"],
"includeTotal" : true,
"pageSize" : 5,
"sort" : ["dueDate"]
}
There may be additional query parameters you can use. For information on how to determine whether a query
parameter is supported in a composite request, see “Composite request limitations” on page 105.
Business-specific limitations
There are also specific business requirements where you cannot use a composite request. For example:
• You cannot quote a job unless that job is created and quoted in the same composite request.
• You cannot bind-only or bind-and-issue in a composite request.
Many of the examples in the previous list pertain to situations where there must be an intermediate data commit, which
composite requests do not allow by design. However, the previous list is not intended to be exhaustive. Refer to the
section of the documentation that discusses each business requirement for more information on requirements or
limitations related to composite requests.
Error handling
If any of the subrequests in the requests section fail, Cloud API does the following:
• Does not commit any of the data
• Does not execute any GETs in the selections section
• Returns a 400 error
Cloud API also returns a response.
• The response begins with the following: "requestFailed": true. This is to make it easy to identify that the
composite request did not commit data.
• For the initial subrequests that did not fail (if any), the response is returned.
◦ This is either the response as specified by the associated endpoint (and any query parameters), or the
"responseIncluded": false text.
◦ The standard response can be useful for debugging purposes, as you can see the state of objects that succeeded
before the subrequest that failed.
• For the subrequest that failed, the error message is returned.
• For the subrequests after the failed subrequest, the text "skipped": true is returned.
• If a selections section was included, the text "skipped": true is returned for each subselection.
For example, the following is the response for a composite request with five subrequests and a set of queries. All
subrequests have responseIncluded set to false. The third subrequest failed because the dueDate attribute was
incorrectly spelled as ueDate.
{
"requestFailed": true,
"responses": [
{
"responseIncluded": false
},
{
"responseIncluded": false
},
{
"requestError": {
"details": [
{
"message": "Schema definition 'ext.common.v1.common_ext-
1.0#/definitions/Note' does not define any property
named 'ueDate'",
"properties": {
"lineNumber": 1,
"parameterLocation": "body",
"parameterName": "body"
}
}
],
"developerMessage": "The request parameters or body had issues.
See the details elements for exact details of the problems.",
"errorCode": "gw.api.rest.exceptions.BadInputException",
"status": 400,
"userMessage": "The request parameters or body had issues"
},
"status": 400
},
{
"skipped": true
},
{
"skipped": true
}
],
"selections": [
{
"skipped": true
}
]
}
If there is an error in the selections section only, the subrequests in the requests section will execute, the data will
be committed, and the composite request will return with a 200 response code, indicating success. Cloud API also
attempts to execute each subselection as best as possible.
Logging
Cloud API logs information about composite requests at both the composite request level and the subrequest/
subselection level. This information appears in the logs under the CompositeSubRequest marker, which is a child of
the normal RestRequest marker.
Each subrequest and subselection log message details information for that subrequest/subselection, such as the actual
path, the HTTP method, and the apiFqn. The same log parameter names and conventions are used for both the parent
request logging and the subrequest logging, such as whether a given value is logged with an empty string or whether it
is omitted. However:
• Some parameters are always omitted at the subrequest level because they only make sense for the parent request.
• Some additional composite-specific parameters are added.
For example, suppose you executed the previous composite request example in which a composite request creates two
notes for activity xc:202. The corresponding log entries could appear as follows. Note that the first message is for the
parent request and the next two messages are for the two subrequests:
Each subrequest or subselection always generates a log statement, whether the subrequest succeeded, failed, or was
skipped due to prior failures. A separate log statement is also added specifically for the commit of the composite
request, whether the composite request commit succeeded, failed, or was skipped.
The greater the number of subrequests in a composite request, the greater the chances that there will be a compromise
in performance. A composite request with the maximum number of subrequests could result in a slow response,
depending on what the maximum is and what those subrequests are doing.
You can increase the maximum number of subrequests to a value greater than 100. However, composite requests with a
significantly large number of subrequests could have negative consequences, such as:
• The request consuming a significant amount of service resources. This could include both memory and database
resources.
• The request taking so long to complete that it times out before a response can be provided to the caller.
Consequently, Guidewire recommends setting the maximum number of subrequests to the lowest value that is needed.
If there is a legitimate business need to raise the maximum above 100, Guidewire recommends the limit be raised only
as much as is absolutely necessary.
Also, be aware that composite requests are subject to any application server limitations around the maximum size of a
request body. Thus, it is possible for a composite request to be too large to process, even if the number of subrequests is
at or below the allowed maximum.
{
"requests": [
{
"method": "<post/patch/delete>",
"uri": "<path>",
"body": {
"data": {
"attributes": {
"<field1>": "<value1>",
"<field2>": "<value2>",
...
}
}
},
"parameters" : {
"fields" : "<value>"
},
"vars": [
{
"name": "<name>",
"path": "<path-starting-with-$>"
},
<next variable>,
...
],
"includeResponse": false
},
{
<next subrequest>
},
...
{
<final subrequest>
}
],
"selections": [
{
"uri": "<pathForFirstQuery>",
"parameters" : {
"fields" : "<value>",
"filter" : [<value>],
"includeTotal" : <value>,
"pageOffset" : <value>,
"pageSize" : <value>,
"sort" : [<value>]
}
},
{
<next subselection>
},
...
{
<final subselection>
}
]
}
Inclusion is a way of accessing both a parent resource and resources relating to that parent in one command. The
availability of inclusion depends on the resource, and can be available for both requests and responses.
Request inclusion
Request inclusion is a technique for POSTs and PATCHes in which the call consists of the following:
• A single parent request that creates or modifies a resource
• One or more child requests that create or modify resources related to the parent resource
If either the parent request or any child request fails, the entire request fails.
The parent resource is often referred to as the root resource. The root resource is specified in the payload's data
section. The related resources are specified in the payload's included section.
For example, a caller can use a single POST /accounts to create a new account, a set of AccountContacts for that
account, a set of AccountLocations for that account, and a set of documents for that account.
In order to use request inclusion, the following must be true:
• There must be a POST or PATCH endpoint for the root resource.
• This endpoint must have the child resource as part of its included section.
• There must also be a POST or PATCH endpoint for the child resource.
The syntax for request inclusion varies slightly, depending on whether the relationship between the root resource and
the included resource is a "simple parent/child relationship", or a "named relationship".
Request inclusion can use endpoints from different APIs for included resources.
Response inclusion
Some endpoints allow you to use query parameters to include information about related resources in the response. See
“Additional behaviors with read inclusion” on page 117 and “Payload structure for a response with included
resources” on page 42 for more information.
{
"data" : {
"attributes": {
...
}
},
"included": {
"<resourceType>": [
{
"attributes": {
...
},
"method": "post",
"uri": "/../this/..."
}
]
}
}
"included": {
"Note": [
{
"attributes": {
...
},
"method": "post",
"uri": "/common/v1/activities/this/notes"
}
]
}
This specifies that in order to create the note, use the POST /common/v1/activities/{activityId}/notes endpoint.
The uri must start with the API name, such as "/common/v1".
If the included resource is being POSTed, the uri must specify the ID of the root resource. When the root resource and
the included resources are being created at the same time, the root resource does not yet have an ID. Therefore, the
keyword this is used in the uri to represent the root resource's ID. If the root resource is being PATCHed, the URI
field does not use this. For more information, see “PATCHes in request inclusion” on page 115.
POST http://localhost:8180/pc/rest/account/v1/accounts/pc:10/activities
{
"data": {
"attributes": {
"activityPattern": "general_reminder"
}
},
"included": {
"Note": [
{
"attributes": {
"subject": "Initial phone call",
"body": "Initial phone call with claimant"
},
"method": "post",
"uri": "/common/v1/activities/this/notes"
}
]
}
}
{
"data" : {
"attributes": {
"<relationshipField>": "<arbitraryRefId>"
...
}
},
"included": {
"<resourceType>": [
{
"attributes": {
...
},
"refid": "<arbitraryRefId>",
"method": "post",
"uri": "/../this/..."
}
]
}
}
"included": {
"AccountContact": [
{
"attributes": {
...
},
"refid": "...",
"method": "post",
"uri": "/account/v1/accounts/this/contacts"
}
]
}
This specifies that in order to create the AccountContact, use the POST /account/v1/{accountId}/contacts
endpoint.
The uri must start with the API name, such as "/account/v1".
If the included resource is being POSTed, the uri must specify the ID of the root resource. When the root resource and
the included resources are being created at the same time, the root resource does not yet have an ID. Therefore, the
keyword this is used in the uri to represent the root resource's ID. If the root resource is being PATCHed, the URI
field would not use this. For more information, see “PATCHes in request inclusion” on page 115.
POST http://localhost:8180/pc/rest/account/v1/accounts
{
"data": {
"attributes": {
"accountHolder": {
"refid": "newperson"
},
"organizationType": {
"code": "individual"
},
"preferredCoverageCurrency": {
"code": "USD"
},
"preferredSettlementCurrency": {
"code": "USD"
},
"primaryLocation": {
"refid": "newloc"
},
"producerCodes": [
{
"id": "pc:6"
}
]
}
},
"included": {
"AccountContact": [
{
"attributes": {
"contactSubtype": "Person",
"firstName": "Bill",
"lastName": "Preston",
"primaryAddress": {
"addressLine1": "2850 S Delaware St #400",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
},
"method": "post",
"refid": "newperson",
"uri": "/account/v1/accounts/this/contacts"
}
],
"AccountLocation": [
{
"attributes": {
"locationCode": "0001",
"locationName": "Location 0001",
"nonSpecific": true,
"postalCode": "94403",
"state": {
"code": "CA"
}
},
"method": "post",
"refid": "newloc",
"uri": "/account/v1/accounts/this/locations"
}
]
}
}
{
"data" : {
"attributes": {
...
}
},
"included": {
"<resourceType>": [
{
"attributes": {
...
},
"method": "post",
"uri": "/../<parentId>/<resourceType>
}
]
}
}
{
"data" : {
"attributes": {
...
}
},
"included": {
"<resourceType>": [
{
"attributes": {
...
},
"method": "patch",
"uri": "/../<childId>"
}
]
}
}
Note: The uri field may or may not include a placeholder for the parent id. It depends on the structure of the
endpoint the uri is referencing.
For example, if the children were a PATCHed contact on an account and a PATCHed note, the uri fields would
be:
• "uri": "/account/v1/accounts/<accountId>/contacts/<contactId>"
• "uri": "/common/v1/notes/<noteId>"
Included resources cannot reference resources other than the root resource
When using request inclusion, each included resource must specify its own operation and uri. The uri is expected to
reference the root resource using the keyword this. This ensures that when the included resource is POSTed or
PATCHed, the included resource is related to the root resource.
For example, suppose a POST is creating an account and an AccountContact. The uri for the AccountContact would
have a value such as "/account/v1/accounts/this/contacts".
From a syntax perspective, you could attempt to attach an included resource not to the root resource, but rather to some
other existing resource. For example, instead of referencing the root resource, the uri for the AccountContact could
reference an existing account, such as "/account/v1/accounts/pc:20/contacts". This uri says "create an
AccountContact and attach it not to the root resource of this POST, but rather to the existing account pc:20".
Cloud API will not allow this. Any attempt to POST or PATCH an included resource to something other than the root
resource will cause the operation to fail.
"uri": "/account/v1/accounts/<accountid>/notes"
To PATCH a note, the method and uri fields look like this:
"method": "patch",
"uri": "/common/v1/notes/<noteid>"
However, some included resources are accessed through the same API as the root resource. For example,
AccountContacts are POSTed and PATCHed through the Account API. POSTing an AccountContact as an included
resource would use method and uri fields similar to this:
"method": "post",
"uri": "/account/v1/accounts/<accountid>/contacts"
PATCHing a contact would use method and uri fields like this:
"method": "patch",
"uri": "/account/v1/accounts/<accountid>/contacts/<contactid>"
GET /activities?include=notes&pageSize=notes:5
For more information on how to use query parameters with included resources, see “Query parameters for included
resources” on page 62.
Batch requests
From a Cloud API perspective, a batch request is a set of requests that are executed in a non-transactional sequence.
Each call within the batch request is referred to as a subrequest. The object that contains all of the subrequests is
referred to as the main request.
Subrequests are executed serially, in the order they are specified in the request payload. PolicyCenter then gathers the
responses to each subrequest and returns them in a single response payload. Once again, the subresponses appear in the
same order as the corresponding subrequests.
When the response to a batch request contains a response code of 200, it means the batch request itself was well-
formed. However, each individual subrequest may have succeeded or failed.
Batch requests are limited to a maximum number of subrequests. The maximum is specified by the
MaximumAllowedNumberOfBatchSubRequests configuration parameter. In the base configuration, this parameter is set
to 100. Batch requests with more than the maximum number of subrequests fail with a BadInputException. For more
information on modifying the maximum number of subrequests, see “Configuring the maximum number of
subrequests” on page 123.
POST <applicationURL>/rest/<apiWithVersion>/batch
For example, if you were executing a Policy API batch from an instance of PolicyCenter on your local machine, the
call would be:
POST http://localhost:8180/pc/rest/policy/v1/batch
{
"requests": [
{
"method": "<method>",
"path": "<path>",
"query": "<queryParameters>",
"data":
{
"attributes": {
"<field1>": "<value1>",
"<field2>": "<value2>",
...
}
}
},
{
"method": "<method>",
"path": "<path>",
"query": "<queryParameters>",
"data":
{
"attributes": {
"<field1>": "<value1>",
"<field2>": "<value2>",
...
}
}
},
...
]
}
where:
• <method> is the method in lower case, such as "get", "post", "patch", or "delete".
• <path> is the endpoint path.
◦ This path starts as if it was immediately following the API path (including the major version, such as "/v1").
For example, suppose the path for a command when executed in isolation is: http://localhost:8180/pc/
rest/policy/v1/policies/pc:22/activities/pc:55. The path within a batch is: /policies/pc:22/
activities/pc:55
• <queryParmaters> is an optional string of query parameters. Start this string without an initial "?".
• <field1/<value> are the field and value pairs of the request body.
The following sections provide examples of how to use this syntax.
{
"requests": [
{
"method": "get",
"path": "/policies/demo_sample:1"
},
{
"method": "get",
"path": "/policies/demo_sample:2"
},
{
"method": "get",
"path": "/policies/demo_sample:3"
}
]
}
{
"requests": [
{
"method": "get",
"path": "/policies/demo_sample:1",
"query": "sort=createdDate"
},
{
"method": "get",
"path": "/policies/demo_sample:2",
"query": "fields=*all"
},
{
"method": "get",
"path": "/policies/demo_sample:3"
}
]
}
{
"requests": [
{
"method": "post",
"path": "/activities/xc:11/notes",
"data":
{
"attributes": {
"body": "Batch note 1"
}
}
},
{
"method": "post",
"path": "/activities/xc:73/notes",
"data":
{
"attributes": {
"body": "Batch note 2"
}
}
}
]
}
{
"requests": [
{
"method": "post",
"path": "/activities/xc:21/notes"
"body": {
"data": {
"attributes": {
"body": "Batch activity 1",
"subject": "Batch activity 1",
"topic": {
"code": "general",
"name": "General"
}
}
}
}
},
{
"method": "patch",
"path": "/notes/xc:22",
"body": {
"data": {
"attributes": {
"body": "PATCHed note body"
}
}
},
},
{
"method": "delete",
"path": "/notes/xc:23"
},
{
"method": "get",
"path": "/activities/xc:24/notes",
"query": "sort=subject&fields=id,subject"
}
]
}
{
"requests": [
{
"method": "delete",
"path": "/activities/xc:55",
"headers": [
{
"name": "GW-Checksum",
"value": "2"
}
]
},
{
"method": "delete",
"path": "/activities/xc:57",
"headers": [
{
"name": "GW-Checksum",
"value": "4"
}
]
}
]
}
{
"requests": [
{
"method": "patch",
"path": "/activities/xc:93",
"body": {
"data": {
"attributes": {
"subject": "PATCH body 1"
}
}
},
"onFail": "abort"
},
{
"method": "patch",
"path": "/activities/xc:94",
"body": {
"data": {
"attributes": {
"subject": "PATCH body 2"
}
}
},
"onFail": "abort"
},
{
"method": "patch",
"path": "/activities/xc:95",
"body": {
"data": {
"attributes": {
"subject": "PATCH body 3"
}
}
}
}
]
}
Also, be aware that batch requests are subject to any application server limitations around the maximum size of a
request body. Thus, it is possible for a batch request to be too large to process, even if the number of subrequests is at
or below the allowed maximum.
This topic defines lost updates and discusses how you can prevent them through the use of checksums.
If you want to interact directly with the concepts in this topic, go to the following tutorials:
• “Tutorial: PATCH an activity using checksums” on page 127
• “Tutorial: Assign an activity using checksums” on page 128
• “Tutorial: DELETE a note using checksums” on page 129
Lost updates
Business processes often span multiple Cloud API calls. When this occurs, the first call is typically either a GET that
retrieves data or a POST that creates data. A later call may attempt to modify the resource queried for or created in the
initial GET or POST.
Some other process could modify the resource between the GET/POST and the subsequent attempt to modify it. For
example, suppose:
1. A caller application GETs activity xc:20. The activity's subject is "Contact additional insured" and the priority is
Normal.
2. An internal user manually changes the subject of activity xc:20 to "Contact primary insured" and sets the priority
to Urgent.
3. The caller application PATCHes activity xc:20 and sets the priority to Low.
The caller application's PATCH overwrites some of the changes made by the internal user. This could be a problem for
several reasons:
• The caller application's change may be based on the data it initially retrieved. The caller application may not have
initiated the change if it had known the subject or priority had later been changed by someone else.
• The internal user may not be aware that some of their changes were effectively discarded.
• The activity may now be in an inconsistent state (such as having a subject that is normally used for urgent activities
and a priority of Low).
This type of modification is referred to as a lost update. Within Cloud API, a lost update is a modification made to a
resource that unintentionally overwrites changes made by some other process. You can prevent lost updates through the
use of checksums.
Checksums
A checksum is a string value that identifies the "version" of a particular resource. Cloud API calculates checksums as
needed based on information about the underlying entities in the PolicyCenter database.
When a process modifies data, either through user action, Cloud API, or some other process, Cloud API calculates a
different checksum for the resource. You can prevent lost updates by checking a resource's checksum before you
modify the resource to see if it matches a previously retrieved checksum.
By default, checksums are provided in the response payloads of all GETs, POSTs, and PATCHes.
Checksums can be included in:
• Request payloads, which is appropriate for:
◦ PATCHes
◦ Business action POSTs that allow request payloads (such as POST /{activityID}/assign)
• Request object headers for:
◦ DELETEs
◦ Business action POSTs that do not allow request payloads
When you submit a request with a checksum, PolicyCenter calculates the checksum and compares that value to the
submitted checksum value.
• If the values match, PolicyCenter determines the resource has not been changed since the caller application last
acquired the data. The request is executed.
• If the values do not match, PolicyCenter determines the resource has been changed since the caller application last
acquired the data. The request is not executed, and PolicyCenter returns an error similar to the following:
{
"message": "The supplied checksum '1' does not match the current checksum '2' for the resource with uri '/
common/v1/notes/xc:101'",
"properties": {
"uri": "/common/v1/notes/xc:101",
"currentChecksum": "2",
"suppliedChecksum": "1"
}
}
Generating checksums
Checksums are always string values generated by Guidewire based on all the values in the database for the associated
entity. Checksums are typically complex string values, such as c689ec1403a489ed7bc3ca6e8ce4f73e.
An resource's checksum is modified when any field in the associated entity changes, whether that field is exposed to
Cloud API or not. For example, the Activity entity has a field named EmailTemplate which stores the id of any email
template associated with the activity. This field is not exposed in Cloud API. However, if this field is changed for a
given activity, either through the user interface or by some other process, this will increment the Activity resource's
checksum.
In some cases, checksums are set to simple integer values, such as 1, and a change to the entity simply increments the
integer value by 1. However, when a checksum is an integer, there is no guarantee that the next checksum will be the
integer value incremented by one. Guidewire recommends against caller applications attempting to predict what the
next checksum value will be. Limit checksums in Cloud API requests to only the checksums returned in previous
responses.
However, there are resources that combine fields from multiple data model entities. For example, the User resource has
fields that map to the User data model entity (such as externalUser), the Credential data model entity (such as
username), and the UserContact data mode entity (such as cellphone).
In the base configuration, when a resource maps to multiple data model entities, a change to any one of the underlying
entities increments the resource's checksum. Custom resources that map to multiple data model entities can also be
configured to have the checksum reflect changes to any of the underlying data model entities. For more information,
see the Cloud API Developer Guide.
"checksum": "<value>"
For example, the following payload is for a PATCH to an activity. The payload specifies a new attribute value (setting
priority to urgent) and a checksum value (7a0d9677f11e246bbe3c124889219c50).
{
"data": {
"attributes": {
"priority": {
"code": "urgent"
}
},
"checksum": "7a0d9677f11e246bbe3c124889219c50"
}
}
Checksums can be specified on the root resource and on any included resource. Specifying a checksum for any one
resource does not require you to specify checksums for the others. For example:
• You could specify a checksum for only the root resource.
• You could specify a checksum for only one of the included resources.
• You could specify a checksum for the root resource and some of the included resources, but not all of the included
resources.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. The sample data includes one "Review risk information" activity for Alice Applegate. Query for that activity by
entering the following call and clicking Send:
a. GET http://localhost:8180/pc/rest/common/v1/activities?filter=subject:sw:Review%20risk
3. Note the ID, subject, and checksum of the first activity returned in the response payload. (These values are
referred to in later steps as "<ActivityID>", "<originalSubject>", and "<originalChecksum>".)
4. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
5. Change the operation to PATCH and enter the following URL, but do not click Send yet:
a. PATCH http://localhost:8180/pc/rest/common/v1/activities/<ActivityID>
6. Specify the request payload.
a. In the first row of tabs (the one that starts with Params), click Body.
b. In the row of radio buttons, select raw.
c. At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
d. Paste the following into the text field underneath the radio buttons. For subject, specify the original subject
with an additional "-1".
{
"data": {
"attributes": {
"subject" : "<originalSubject>-1"
},
"checksum": "<originalChecksum>"
}
}
7. Click Send. The checksum value in the payload matches the checksum value for the activity stored in
PolicyCenter. So, the PATCH should be successful and the response payload should appear below the request
payload.
8. Click Send a second time. Now, the checksum value in the payload does not match the checksum value for the
activity calculated by PolicyCenter. So, the second PATCH is unsuccessful and an error message appears.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. The sample data includes one "Review risk information" activity for Alice Applegate. Query for that activity by
entering the following call and clicking Send:
a. GET http://localhost:8180/pc/rest/common/v1/activities?filter=subject:sw:Review%20risk
3. Note the ID and checksum of the first activity returned in the response payload. (These values are referred to in
later steps as "<ActivityID>", and "<originalChecksum>".)
4. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
5. Change the operation to POST and enter the following URL, but do not click Send yet:
a. POST http://localhost:8180/pc/rest/common/v1/activities/<ActivityID>/assign
6. The POST /{activityId}/assign endpoint requires a request payload that specifies how the assignment is to
be done. Specify the request payload.
a. In the first row of tabs (the one that starts with Params), click Body.
b. In the row of radio buttons, select raw.
c. At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
d. Paste the following into the text field underneath the radio buttons. For subject, specify the original subject
with an additional "-1".
{
"data": {
"attributes": {
"autoAssign": true
},
"checksum": "<originalChecksum>"
}
}
7. Click Send. The checksum value in the payload matches the checksum value for the activity stored in
PolicyCenter. So, the POST /assign should be successful and the response payload should appear below the
request payload.
8. Click Send a second time. Now, the checksum value in the payload does not match the checksum value for the
activity calculated by PolicyCenter. (The successful POST /assign from the previous step will have modified
the checksum value.) So, the second POST /assign is unsuccessful and an error message appears.
Procedure
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
2. Specify authorization as appropriate.
3. Add the checksum to the header.
• In the first row of tabs (the one that starts with Params), click Headers.
• Scroll to the bottom of the existing key/value list.
• In the blank row at the bottom of the key/value list, enter the following:
◦ KEY: GW-Checksum
◦ VALUE: <checksum value>
4. Enter the request operation and URL.
5. Click Send.
Results
The response appears below the request. Depending on the checksum value provided, the response will either include a
success code or an error message.
attempt to DELETE the note twice. Both DELETEs will include a checksum value. The first DELETE will fail, and the
second will succeed.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. The sample data includes one "Review risk information" activity for Alice Applegate. Query for that activity by
entering the following call and clicking Send:
a. GET http://localhost:8180/pc/rest/common/v1/activities?filter=subject:sw:Review%20risk
3. Identify the id of the activity in the payload. This value is referenced below as <activityId>.
4. Identify the id of the account in the payload. This value is referenced below as <accountId>.
5. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab tab.
a. On the Authorization tab, select Basic Auth using user aclinton and password gw.
6. Change the operation to POST and enter the following URL, but do not click Send yet:
a. POST http://localhost:8180/pc/rest/common/v1/activities/<activityId>/notes
7. Specify the request payload.
a. In the first row of tabs (the one that starts with Params), click Body.
b. In the row of radio buttons, select raw.
c. At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
d. Paste the following into the text field underneath the radio buttons.
{
"data":
{
"attributes": {
"body": "API tutorial note to be deleted with a checksum"
}
}
}
15. Click Send a second time. Now, the checksum value in the header matches the checksum value for the note
calculated by PolicyCenter. So, the DELETE is successful. (The response to a successful DELETE is "204 - No
content".)
Asynchronous calls
REST calls made to Cloud API are typically synchronous. The caller application submits a call and then waits for the
reply. However, for some types of calls, waiting for a reply may be problematic. For example:
• The call may take long enough to process that the API Gateway times out.
• The call may take long enough to process that the client-side toolkit used to make the call times out.
• A synchronous call may consume too many client-side resources.
To address these situations, calls can also be made asynchronously. The caller application submits the request at one
point in time. At a later point in time, the caller application retrieves the response.
This topic discusses how to execute Cloud API calls asynchronously.
If you want to interact directly with the concepts in this topic, go to the following tutorials:
• “Tutorial: Send a request asynchronously” on page 139
• “Tutorial: Retrieve information about an asynchronous request” on page 140
• “Tutorial: Send a request asynchronously with a wait time” on page 141
1. The caller application sends a request to Cloud API. In the diagram, the request is a POST for a resource named
someResource. The request has a set of request headers and may have a payload.
2. Cloud API processes the request synchronously.
3. Assuming the request is successful, Cloud API provides the response. The response also has a set of response
headers and may have a payload.
Asynchronous calls
For some calls, it can be problematic to wait for a synchronous response. For example, quoting a large commercial
policy may take several minutes, and the API Gateway may time out before the quote can be completed and returned to
the caller.
To address these situations, you can execute a Cloud API call asynchronously. Broadly speaking, there are three phases
to an asynchronous call. In practice, this could occur with fewer than or more than three calls.
1. The caller application sends a request to Cloud API. The request object includes a request header indicating to
process the call asynchronously.
2. Cloud API accepts the request. But it does not immediately process it.
3. Cloud API provides a response. The response includes a header with an Async API /requests path that can be
used to retrieve:
a. Information about the initial request.
b. The response to the initial request, once it is available.
{
"data": {
"attributes": {
"requestMethod": "POST",
"requestPath": "/admin/v1/users",
"responseStatus": 202,
"startTime": "2022-07-12T16:53:12.365Z",
"status": {
"code": "Accepted",
"name": "Accepted"
}
}
}
}
{
"data": {
"attributes": {
"completionTime": "2022-07-12T16:53:16.073Z",
"requestMethod": "POST",
"requestPath": "/admin/v1/users",
"responseBodyJson": {
"data": {
"attributes": {
...
"username": "asyncUser99",
"vacationStatus": {
"code": "atwork",
"name": "At work"
}
},
"checksum": "321dff263827cbbd772c26676398d8ae",
"links": {
...
}
}
},
"responseHeaders": {
"Cache-Control": [
"must-revalidate",
"post-check=0",
"pre-check=0",
"max-age=0",
"no-store",
"no-cache"
],
"Content-Type": [
"application/json;charset=UTF-8"
],
"GW-Checksum": [
"321dff263827cbbd772c26676398d8ae"
],
"Location": [
"/admin/v1/users/pc:ScaA3kB5cImBkuh7bxjNn"
],
"X-Correlation-ID": [
"d516344d-5769-4964-adb7-79eaca41e4a2"
],
...
},
"responseStatus": 201,
"startTime": "2022-07-12T16:53:12.365Z",
"status": {
"code": "Complete",
"name": "Complete"
}
}
...
}
}
1. The caller application sends a GET /async/v1/requests/{asyncRequestId} request to Cloud API. The path
comes from the header of the initial response.
2. The Cloud API response includes information about the original request. If the status is Accepted or In Progress,
the caller application must re-submit the GET after an appropriate interval.
When the response includes a status of Complete, the caller can retrieve the response to the original request. There are
multiple ways that it can be retrieved.
4. The caller application sends a GET /async/v1/requests/{asyncRequestId} request to Cloud API. The
acyncRequestId comes from the header of the initial response.
5. The Cloud API response includes information about the original request. When the status is Complete, the response
includes the original request's response if the response type is application/json.
Note that the GET /async/v1/requests/{asyncRequestId} request could return a response of Complete the first
time it is submitted or on a subsequent try.
For example, if the original request was a POST that created a new activity, the GET request to retrieve the response
might return a 201 response code and have a Location header. If the original request failed because of a validation
error, the GET request to retrieve the response might have a 400 status code and a response body with details of the
errors.
/async/v1/requests/<asyncRequestId>
The <asyncRequestId> is a random value that provides secure access to the results of the original call. Because this
value provides access to application data, Guidewire recommends keeping it secure.
There are some situations where the response will not be "202 Accepted":
• If the wait preference is used and the request completes faster than the requested wait time, the response will be
synchronous. For information on specifying a wait preference, see “Waiting for a response synchronously” on page
141.
• If the application is overloaded and unable to process or queue the request, it will return a 503 response.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user su and password gw.
2. Enter the following call, but do not click Send yet:
a. POST http://localhost:8180/pc/rest/admin/v1/users
3. Specify the request payload.
a. In the first row of tabs (the one that starts with Params), click Body.
b. In the row of radio buttons, select raw.
c. At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
d. Paste the following into the text field underneath the radio buttons.
{
"data": {
"attributes": {
"username": "asyncUser"
}
}
}
Results
The response should be "202 Accepted". To view the value for GW-Async-Location header, click the Headers tab in
the response object pane. (This Headers tab is in a row of tabs that starts with Body and Cookies.) This value is used in
the next tutorial.
/async/v1/requests/<asyncRequestId>
You can execute a GET on this endpoint to retrieve information about the original request.
/async/v1/requests/<asyncRequestId>/response
If the original request is complete, this endpoint returns the response to the original request as if the call had been
executed synchronously. This endpoint is useful when:
• The response type is something other than application/json, and therefore is not included in the /requests
response.
• The caller application wants to work with the response as it would normally appear, as opposed to having to extract
it from within the responseBodyJson attribute of a larger data envelope.
Note that there are two situations in which this endpoint could return a 400 error:
• The original request does not yet have a status of Complete. Its status is either still Accepted or In Progress.
• The original request has a status of Complete, and the response to the original request is a 400 error.
In this tutorial, you will retrieve information about the asynchronous request using both the /requests and /response
endpoints.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab
a. On the Authorization tab, select Basic Auth using user su and password gw.
2. Enter the following call, but do not click Send yet:
a. GET http://localhost:8180/pc/rest/<Async-Location>, where <Async-Location> is the value of
the GW-Async-Location response header from the initial asynchronous request.
3. Ensure that, for this request, you do not have Prefer/respond-async header specified in your request.
(Although you can submit the /requests call asynchronously, you typically would not want to.)
4. Click Send.
5. Send a second request that uses the /response endpoint to retrieve only the response.
a. Right-click the current tab and choose Duplicate Tab.
b. In the new tab, add "/response" to the end of the existing URL.
6. Click Send.
Results
On the first tab, the response object contains information about the response to the original request. Typically, user
creation occurs very rapidly, and the original request should already be processed. If so:
• The completionTime is specified.
• The responseBodyJson attribute contains the response to the original request. In this case, it is information about
the newly created user.
• The responseStatus is 201.
• The status has a code of Complete.
On the second tab, the response object contains the same information that would have been returned if the initial
request were submitted synchronously.
Tutorial steps
1. In Postman, start a new request by:
Results
The first tab executes an asynchronous call with a wait time of 1 second. The application is able to complete the call
within this time, so the response is provided. (The status is "201 Created" and the response to the original call is
provided.)
The second tab executes an asynchronous call with a wait time of 1 millisecond. The application is not able to
complete the call within this time, so the call is merely accepted. (The status is "202 Accepted" and the response body
is blank.)
• The value of X is 7.
• The batch process is scheduled to run once a day at 3:30 am.
You can configure the value of X by manually adding an AsynchApiRequestPurgeDaysOld configuration parameter to
config.xml. For example, if you wanted request information to be purged when it is 6 days old, you would add the
following to config.xml:
You can also configure when the batch process is scheduled to run. For more information, see the Administration
Guide.
The InsuranceSuite Cloud API is a set of RESTful system APIs that expose functionality in PolicyCenter so that caller
applications can request data from or initiate action within PolicyCenter.
The following topics discuss how caller applications can initiate specific PolicyCenter business flows related to
accounts. This includes:
• Creating accounts
• Managing accounts
• Managing an account's bound policies
Creating accounts
An account is a person or organization which has or may have one or more policies. You can view, create, and modify
accounts through Cloud API. This topic focuses on account creation. For information on viewing and modifying
accounts, see “Managing accounts” on page 153.
Creating an account
To create a new account, use the following endpoint:
• POST /account/v1/accounts
There are two ways you can specify the account holder in a POST /accounts payload:
• Using the initialAccountHolder attribute
• Using the accountHolder attribute to reference a contact created through request inclusion
The only difference between these two approaches is the way the information is specified. The first approach specifies
the initial account holder in the main attributes section, and the second specifies it using request inclusion.
Otherwise, the result of each approach is the same.
In either approach, you must specify the following information for the account holder:
• contactSubtype (typically Person or Company)
◦ For the Person subtype, you must also specify lastName and firstName
Creating accounts 147
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
{
"data": {
"attributes": {
"initialAccountHolder": {
"contactSubtype": "Person",
"firstName": "Bill",
"lastName": "Preston",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
},
...
{
"data": {
"attributes": {
"accountHolder": {
"refid": "BillPreston"
},
...
},
"included": {
"AccountContact": [
{
"attributes": {
"contactSubtype": "Person",
"firstName": "Bill",
"lastName": "Preston",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
},
"method": "post",
"refid": "BillPreston",
"uri": "/account/v1/accounts/this/contacts"
}
]
}
}
There are two ways you can specify the account location in a POST /accounts payload:
• Using the initialPrimaryLocation attribute
• Using the primaryLocation attribute to reference a location created through request inclusion
The only difference between these two approaches is the way the information is specified. The first approach specifies
the primary location in the main attributes section, and the second specifies it using request inclusion. Otherwise,
the result of each approach is the same.
In either approach, by default, you must specify the following information for the primary location:
• addressLine1
• city
• state
• postalCode
{
"data": {
"attributes": {
"initialPrimaryLocation": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
},
...
{
"data": {
"attributes": {
"primaryLocation": {
"refid": "newlocation"
},
...
},
"included": {
"AccountLocation": [
{
"attributes": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
},
"method": "post",
"refid": "newlocation",
"uri": "/account/v1/accounts/this/locations"
}
]
}
}
Non-specific locations
All locations, including an account's primary location, have a nonSpecific flag that indicates how complete the
location information is. This flag defaults to false.
{
"data": {
"attributes": {
"initialPrimaryLocation": {
"nonSpecific": true,
"state": {
"code": "CA"
}
...
{
"attributes": {
"branch": {
"branchCode": "301",
"displayName": "Minneapolis Branch UW",
"id": "pc:Sk46AxgTMK1O7s6659Ats"
},
"code": "301-008578",
"description": "ACV Property Insurance",
"displayName": "301-008578",
"id": "pc:16",
"organization": {
"displayName": "ACV Property Insurance",
"id": "pc:4",
"type": "Organization",
"uri": "/admin/v1/organizations/pc:4"
},
"producerStatus": {
"code": "Active",
"name": "Active"
}
}
For more information on working with producer codes through Cloud API, see “Producer codes” on page 465.
{
"data": {
"attributes": {
"producerCodes": [
{
"id": "pc:16"
}
]
...
POST /account/v1/accounts
{
"data": {
"attributes": {
"initialAccountHolder": {
"contactSubtype": "Person",
"firstName": "Bill",
"lastName": "Preston",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
},
"initialPrimaryLocation": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
},
"producerCodes": [
{
"id": "pc:16"
}
]
}
}
}
Account status
On account creation, the account status is set to "Pending". This indicates that the account exists but that there are no
policies associated with it. Once the account has at least one policy, its status changes to "Active".
Managing accounts
This topic covers the different ways that a caller application can get information on existing accounts, and additional
actions they can take on accounts.
For information on creating accounts, see “Creating an account” on page 147.
GET /account/v1/accounts/pc:477
{
"data": {
"attributes": {
"accountHolder": {
"displayName": "Agnes Allenson",
"id": "pc:SdImoclfPl10vrB0wMXoo"
},
"accountNumber": "8990509182",
"accountStatus": {
"code": "Pending",
"name": "Pending"
},
"id": "pc:477",
"numberOfContacts": "1",
"organizationType": {
"code": "individual",
"name": "Individual"
},
"primaryLocation": {
"displayName": "1: Location 0001",
"id": "pc:S_4dxAb4ZhvmMM-vrmoAU",
"type": "AccountLocation",
"uri": "/account/v1/accounts/pc:477/locations/pc:119"
},
"producerCodes": [
{
"displayName": "100-002541",
"id": "pc:6"
}
]
}
...
{
"data": {
"attributes": {
"accountNumber": "stringValue",
"companyName": "stringValue",
"firstName": "stringValue",
"lastName": "stringValue",
"organization": {
"id": "stringValue"
},
"phoneNumber": "stringValue",
"producerCode": {
"id": "stringValue"
},
"taxId": "stringValue"
}
}
}
{
"data": {
"attributes": {
"accountNumber": "C000143542"
}
}
}
The following payload will query for all accounts where the account holder has a first name of "Ray" and a last name
of "Newton":
{
"data": {
"attributes": {
"firstName": "Ray",
"lastName": "Newton"
}
}
}
Searching by producer
Two search criteria pertain to producers: producerCode and organization.
If you know a producer's code, you can search for all accounts associated with that producer by including
producerCode as a search criteria. For example, the following searches for accounts associated with producer code pc:
16 (ACV Property Insurance).
{
"data": {
"attributes": {
"producerCode": {
"id": "pc:16"
}
}
}
}
In the base configuration, producers are stored in the Organization entity. If you know a producer's ID, you can
search for accounts associated with that producer by including the organization as search criteria. For example, the
following searches for accounts associated with the producer whose id is pc:4 (ACV Property Insurance).
{
"data": {
"attributes": {
"organization": {
"id": "pc:4"
}
}
}
}
Please enter enough search information: first name or last name, company name, account number,
phone number, producer information, or an official ID. If searching by last name with partial
match, either city and state, or ZIP are required. At least three letters are required for
names (five for companies) with partial match."
Note that this message is intended primarily for user interface account searches. This is why it makes reference to
partial matches and a minimum number of required letters.
Searching in Japanese
The search endpoint also supports certain Japanese locale-specific fields:
• companyNameKanji: Complete company name, in Japanese
• firstNameKanji: Complete first name, in Japanese. Can be used in combination with firstName or
lastNameKanji.
• lastNameKanji: Complete last name, in Japanese. Can be used in combination with lastName or firstNameKanji.
• particle: Particle used in account holder names (matching the particle property of an AccountContact
resource)
The following code block is a request body for a search based on first name and first name in Japanese:
{
"data": {
"attributes": {
"firstNameKanji": "太郎",
"firstName": "Taro"
}
}
}
Modifying accounts
PATCHing accounts
Use the following endpoint to PATCH values on an existing account:
• PATCH /account/v1/accounts/{accountId}
For example, the following call changes the preferred coverage and settlement currencies for account pc:477 to
Canadian dollars (cad).
PATCH /account/v1/accounts/pc:477
{
"data": {
"attributes": {
"preferredCoverageCurrency": {
"code": "cad"
},
"preferredSettlementCurrency": {
"code": "cad"
}
}
}
}
Merging accounts
Merging accounts is the action of collapsing two accounts into one. One account is designated as the source account.
The other is the target account. During the merge, information is moved from the source to the target, such as the
source account's policies, policy transactions, notes, activities, and other data. After the merge, the source account is
deleted and only the target account remains. For more information on merging accounts, see the Application Guide.
Use the following endpoint to merge accounts:
• POST /account/v1/accounts/{accountId}/merge
The POST is executed from the target account (the account that will be retained). The request requires a payload. This
is the syntax for the URL and the payload.
POST /account/v1/accounts/{targetAccountId}/merge
{
"data": {
"attributes": {
"account": {
"id": "<sourceAccountId>"
}
}
}
}
For example, the following call merges source account pc:1010 into target account pc:33.
POST /account/v1/accounts/pc:33/merge
{
"data": {
"attributes": {
"account": {
"id": "pc:1010"
}
}
}
}
Withdrawing accounts
Some accounts are created for prospects that do not elect to bind any policies and the insurer does not expect the
account to bind any policies in the future. In these cases, the insurer can withdraw the account.
To withdraw an account through Cloud API, use the following endpoint. The call does not require a request body:
• POST /account/v1/accounts/{accountId}/withdraw
For example, the following call withdraws account pc:477.
POST /account/v1/accounts/pc:477/withdraw
Reopening accounts
To reopen a withdrawn account through Cloud API, use the following endpoint. The call does not require a request
body:
• POST /account/v1/accounts/{accountId}/reopen
For example, the following call withdraws account pc:477 (assuming the account has been withdrawn).
POST /account/v1/accounts/pc:477/reopen
Account contacts
In addition to the account holder, an account may have any number of additional contacts.
{
"data": {
"attributes": {
"displayName": "Ray Newton",
"taxId": "***-**-6789"
}
}
}
For some callers, such as internal or external users, the masking of tax ID may be appropriate as it protects personally
identifiable information. For other callers, such as services, this masking may cause a problem as the callers may
reference contacts internally using the tax ID.
There are two ways that the taxId field can be unmasked:
• You can configure the field so that it is always unmasked. For information on how to configure this, see the Cloud
API Developer Guide.
• You can grant the caller the restunmasktaxid system permission. Any caller who has a role with this permission
will get responses with unmasked tax IDs. For information on how to configure this, see the section on API role
special permissions in the Cloud API Developer Guide.
The preceding address information is not required if you’re creating a contact with a linked address. See
“Linking account contact addresses” on page 159 below for more information.
For example, the following request creates a new contact for account pc:202.
Command
POST /account/v1/accounts/pc:202/contacts
Request
{
"data": {
"attributes": {
"contactSubtype": "Person",
"firstName": "Samantha",
"lastName": "Stewart",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
}
}
}
PATCH /account/v1/accounts/pc:202/contacts/pc:444
Request
{
"data": {
"attributes": {
"emailAddress1": "[email protected]"
}
}
}
DELETE /account/v1/accounts/pc:202/contacts/pc:444
{
"data": {
"attributes": {
"accountContactRoles": [
{
"code": "AccountHolder",
"name": "AccountHolder"
}
],
...
"firstName": "Alicia",
"id": "pc:577",
"lastName": "Shirley",
...
"primaryAddress": {
"CEDEX": "11",
"addressLine1": "0399 Bridgepointe Parkway",
"addressLine2": "Floor 0399",
"addressLine3": "Developer Unit Habitation Cube #0399",
"addressType": {
"code": "home",
"name": "Home"
},
"city": "San Mateo",
"country": "US",
"county": "San Mateo",
"description": "Created by the Address Builder with code 399",
"displayName": "0399 Bridgepointe Parkway, Floor 0399, Developer Unit Habitation Cube #0399, San Mateo,
CA 94404-0399",
"id": "pc:123",
"postalCode": "94404-0399",
"state": {
"code": "CA",
"name": "California"
}
},
Create the contact using the account holder contact id (pc:577) and address id (pc:123) in the request.
Command
POST /account/v1/accounts/pc:202/contacts
Request
{
"data": {
"attributes": {
"contactSubtype": "Person",
"firstName": "Samantha",
"lastName": "Stewart",
"primaryAddress": {
"linkedAddress": {
"addressId": "pc:123",
"contactId": "pc:577"
}
}
}
}
}
Response
{
"data": {
"attributes": {
...
"id": "pc:892",
"lastName": "Stewart",
"officialIds": {},
"primaryAddress": {
"CEDEX": "11",
"addressLine1": "0399 Bridgepointe Parkway",
"addressLine2": "Floor 0399",
"addressLine3": "Developer Unit Habitation Cube #0399",
"addressType": {
"code": "home",
"name": "Home"
},
"city": "San Mateo",
"country": "US",
"county": "San Mateo",
"description": "Created by the Address Builder with code 399",
"displayName": "0399 Bridgepointe Parkway, Floor 0399, Developer Unit Habitation Cube #0399, San Mateo,
CA 94404-0399",
"id": "pc:3333",
"isLinked": true,
"postalCode": "94404-0399",
"state": {
"code": "CA",
"name": "California"
}
}
},
The response shows that the contact has been created with a primaryAddress that is identical to the linked address.
Notice the isLinked property is set to true. If you also retrieve the contact to which you linked and view the address
you linked to, you’ll see that the primaryAddress has an isLinked value of true for that contact also.
Command
GET /account/v1/accounts/pc:202/contacts/pc:577
Response
{
"data": {
"attributes": {
"accountContactRoles": [
{
"code": "AccountHolder",
"name": "AccountHolder"
}
],
...
"primaryAddress": {
"CEDEX": "11",
"addressLine1": "0399 Bridgepointe Parkway",
"addressLine2": "Floor 0399",
"addressLine3": "Developer Unit Habitation Cube #0399",
"addressType": {
"code": "home",
"name": "Home"
},
"city": "San Mateo",
"country": "US",
"county": "San Mateo",
"description": "Created by the Address Builder with code 399",
"displayName": "0399 Bridgepointe Parkway, Floor 0399, Developer Unit Habitation Cube #0399, San Mateo,
CA 94404-0399",
"id": "pc:123",
"isLinked": true,
"postalCode": "94404-0399",
"state": {
"code": "CA",
"name": "California"
}
},
This next example updates the address for an existing contact that has a linked address. If a contact has a linked address
(isLinked is set to true), you must include a linkedAddressUpdateMode value to update the address.
Command
PATCH /account/v1/accounts/pc:202/contacts/pc:892
Request
{
"data": {
"attributes": {
"primaryAddress": {
"linkedAddressUpdateMode": "update",
"addressLine1": "1234 Main St",
"addressLine2": "Apt 2B",
"addressLine3": null
}
}
}
}
Response
{
"data": {
"attributes": {
...
"id": "pc:892",
"lastName": "Stewart",
"officialIds": {},
"primaryAddress": {
"CEDEX": "11",
"addressLine1": "1234 Main St",
"addressLine2": "Apt 2B",
"addressType": {
"code": "home",
"name": "Home"
},
"city": "San Mateo",
"country": "US",
"county": "San Mateo",
"description": "Created by the Address Builder with code 399",
"displayName": "1234 Main St, Apt 2B, San Mateo, CA 94404-0399",
"id": "pc:5555",
"isLinked": true,
"postalCode": "94404-0399",
"state": {
"code": "CA",
"name": "California"
}
}
},
Because we set the linkedAddressUpdateMode to update, the linked contact’s address has also been changed:
{
"data": {
"attributes": {
"accountContactRoles": [
{
"code": "AccountHolder",
"name": "AccountHolder"
}
],
...
"firstName": "Alicia",
"id": "pc:577",
"lastName": "Shirley",
...
"primaryAddress": {
"CEDEX": "11",
"addressLine1": "1234 Main St",
"addressLine2": "Apt 2B",
"addressType": {
"code": "home",
"name": "Home"
},
"city": "San Mateo",
"country": "US",
"county": "San Mateo",
"description": "Created by the Address Builder with code 399",
"displayName": "1234 Main St, Apt 2B, San Mateo, CA 94404-0399",
"id": "pc:123",
"isLinked": true,
"postalCode": "94404-0399",
"state": {
"code": "CA",
"name": "California"
}
},
...
},
The roles discussed in this topic are the roles users have on an account, such as Driver or NamedInsured. If
you’re looking for information on API roles related to authentication, see Cloud API Developer Guide.
The base configuration of PolicyCenter includes several roles that can be assigned to a contact at the account level. The
list of available roles is in the AccountContactRole typelist. The account contact endpoint provides properties that can
be set to add and remove these roles to and from the account contact.
Command
POST /account/v1/accounts/pc:202/contacts
Request
{
"data": {
"attributes": {
"contactSubtype": "Person",
"firstName": "Samantha",
"lastName": "Stewart",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
},
"accountingContact": true,
"secondaryContact": true
}
}
}
Use the following command to update the roles on an existing account contact:
PATCH /account/v1/accounts/{accountID}/contacts/{contactID}
For example, the following request removes the SecondaryContact role from account contact pc:444 on account pc:
202 and adds the NamedInsured role
Command
PATCH /account/v1/accounts/pc:202/contacts/pc:444
Request
{
"data": {
"attributes": {
"namedInsured": true,
"secondaryContact": false
}
}
}
Any roles you set to true will be added to existing roles already assigned to the account contact. For example, if
contact pc:444 in the preceding example already had the role Driver, that contact would now have three roles
assigned: NamedInsured, AccountingContact, and Driver.
Note:
Attempting to remove a role (setting the value to false) will return an error if the role is in use at the policy
level for the contact.
GET /account/v1/accounts/pc:202/contacts?fields=id,accountContactRoles&filter=accountContactRoles:in:AccountingContact
Response
{
"data": [
{
"attributes": {
"accountContactRoles": [
{
"code": "AccountingContact",
"name": "AccountingContact"
},
...
],
"id": "pc:444"
}
}
]
…
}
Account locations
In addition to the primary location, an account may have any number of additional locations.
POST /account/v1/accounts/pc:202/locations
{
"data": {
"attributes": {
"addressLine1": "2870 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
}
}
For more information on locale-specific requirements, see the Cloud API Developer Guide
For example, the following request assigns a location name for account location pc:717 on account pc:202.
PATCH /account/v1/accounts/pc:202/contacts/pc:717
{
"data": {
"attributes": {
"locationName": "Employee parking lot"
}
}
}
DELETE /account/v1/accounts/pc:202/contacts/pc:717
GET /accounts/{AccountId}/jobs?filter=*none
See “Endpoints with default filters” on page 56 for more information on default filters.
Note that there could also be authorization filters based on the account holder. See Cloud API Developer Guide for
more information.
Moving policies
In some situations, you may want to move a policy from a source account to a target account. For example, this could
be necessary if the policy was erroneously associated with the wrong account.
To move a policy to a given target account, use the following endpoint:
• POST /account/v1/accounts/{accountId}/move-policies
The POST is executed from the target account (the account that will own the policy moving forward). The request
object requires a request payload that specifies the IDs of the policies to move to the target account. These IDs are
specified in a policies array.
For example, the following call moves the policies with IDs pc:1021 and pc:1099 to account pc:477.
POST /account/v1/accounts/pc:477/move-policies
{
"data": {
"attributes": {
"policies": [
{
"id": "pc:1021"
},
{
"id": "pc:1099"
}
]
}
}
}
This topic covers the different actions that you can take on the bound policies owned by an account outside of any
policy transaction.
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"
}
}
...
If you want to add extension fields to the PolicyCenter data model and expose those fields in Cloud API, Guidewire
recommends the following:
1. In the data model, add the fields to most appropriate entity (Policy, PolicyPeriod, or PolicyTerm).
2. In Cloud API, add the corresponding properties to the Policy schema 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.
{
"data": {
"attributes": {
"companyName": "<stringValue>",
"firstName": "<stringValue>",
"lastName": "<stringValue>",
"officialId": "<stringValue>",
"phone": "<stringValue>",
"policyNumber": "<stringValue>",
"producerCode": {
"id": "<stringValue>"
}
}
}
}
◦ The search returns only policies where the insured's official ID (such as their Social Security Number of Federal
Employee ID) is an exact match of the provided official ID.
• When searching by phone:
◦ The search returns only policies where the insured's primary phone is an exact match of the provided phone
number.
For example, the following payload will search for all policies with policy number P000143542:
{
"data": {
"attributes": {
"policyNumber": "P000143542"
}
}
}
The following payload will search for all policies where the primary insured has a first name of "Ray" and a last name
of "Newton":
{
"data": {
"attributes": {
"firstName": "Ray",
"lastName": "Newton"
}
}
}
The following payload will search for all policies where the producer code is pc:16 (ACV Property Insurance).
{
"data": {
"attributes": {
"producerCode": {
"id": "pc:16"
}
}
}
}
In a development environment, a policy search may return a policy whose product is listed as "Manual", as in the
following example.
"product": {
"displayName": "Manual Products",
"id": "Manual"
}
This happens when the policy is using an Advanced Product Designer line of business that is still in visualized mode
and is not finalized or installed. For more information, see Integrating Products with PolicyCenter.
Please enter enough search information: first name or last name, company name, account number,
phone number, producer information, or an official ID. If searching by last name with partial
match, either city and state, or ZIP are required. At least three letters are required for names
(five for companies) with partial match."
Note that this message is intended for user interface policy searches, which is why it makes reference to partial matches
and a minimum number of required letters.
The /policy/v1/search/policies endpoint executes whichever type of search is enabled, based on the value of the
FreeTextSearchEnabled application configuration parameter.
POST /account/v1/accounts/pc:477/move-policies
{
"data": {
"attributes": {
"policies": [
{
"id": "pc:1021"
},
{
"id": "pc:1099"
}
]
}
}
}
Policy producers
In PolicyCenter, the producer is stored as an instance of the Organization data model entity. A producer is associated
with a policy through a specific producer code.
When a policy's producer changes, the two producers may agree that the original producer will retain commission for
the current policy term, even though the new producer will be providing service for the policy. When this occurs:
• The original producer is referred to as the producer of record.
• The new producer is referred to as the producer of service.
For more information on the business functionality of producers of record and producers of service, see the Application
Guide.
GET /policies/v1/policies/pc:115
{
"data": {
"attributes": {
"organization": {
"displayName": "Armstrong and Company",
"id": "pc:1"
},
"organizationOfService": {
"displayName": "Armstrong and Company",
"id": "pc:1"
},
"producerCode": {
"displayName": "100-002541",
"id": "pc:6"
},
"producerCodeOfService": {
"displayName": "100-002541",
"id": "pc:6"
}
}
}
}
For example, the following is a snippet of the response to a GET of policy pc:227. For this policy, there has been a
mid-term change of producer.
GET /policies/v1/policies/pc:227
{
"data": {
"attributes": {
"organization": {
"displayName": "Armstrong and Company",
"id": "pc:1"
},
"organizationOfService": {
"displayName": "ACV Property Insurance",
"id": "pc:4"
},
"producerCode": {
"displayName": "100-002541",
"id": "pc:6"
},
"producerCodeOfService": {
"displayName": "301-008578",
"id": "pc:16"
}
}
}
}
GET /policy/v1/policies?fields=*detail
PATCH job/v1/jobs/pc:123
{
"data": {
"attributes": {
"producerCodeOfService": {
"id": "pc:16"
}
}
}
}
In the PATCH, specify the producerCodeOfService only. The organizationOfService is automatically updated to
the organization that owns the give producer code. The producerCode and organization fields are not modified.
These continue to reference the previous producer, who is now only the producer of record.
For example, the following request changes the producer of service for policy change job pc:789.
PATCH job/v1/jobs/pc:789
{
"data": {
"attributes": {
"producerCodeOfService": {
"id": "pc:16"
}
}
}
}
Policy jobs
Use the following endpoint to retrieve a list of jobs used to create or modify the policy:
• GET /policy/v1/policies/{policyId}/jobs
Policy contacts
Overview of policy contacts
In PolicyCenter, every job has an underlying policy. You can associate account contacts with this policy. For example,
when a submission is created for an account, the default behavior is to associate the account's "primary insured" contact
with the underlying policy as the "primary named insured". A contact associated with a policy is known as a policy
contact. Policy contacts exist on policies that are unbound (such as a submission's underlying policy) and on policies
that are bound.
In the PolicyCenter data model, there is no PolicyContact entity. Policy contacts are stored in the database using
multiple entities:
• The Contact entity
• The AccountContact entity
• One or more PolicyContactRole entities
In Cloud API, policy contacts are managed using a single resource named PolicyContact. This resource gathers the
information from multiple data model entities (Contact, AccountContact, and PolicyContactRole).
The following table summarizes the different base configuration /contact endpoints in each API and the resources
used by those endpoints.
GET /policy/v1/policies/pc:3894
...
"primaryInsured": {
"displayName": "Ray Newton",
"id": "test_pp:2",
"type": "PolicyContact",
...
},
...
GET /policy/v1/policies/pc:3894
Response
...
"secondaryNamedInsured": {
"displayName": "Mary Newton",
"id": "test_pp:3",
"type": "PolicyContact",
...
},
...
• GET policies/{policyId}/additional-named-insureds
• GET policies/{policyId}/additional-named-insureds/{additionalNamedInsuredId}
Technically speaking, each element returned by these endpoints is not a policy contact. Rather, it is information about
the association between a policy contact and the additional named insured role. It can optionally specify information
about this association.
For example, the following is a portion of the response when doing a GET for policy pc:3894:
GET /policy/v1/policies/pc:3894/additional-named-insureds
{
"attributes": {
"accountContact": {
"displayName": "Shirley Hemsworth",
"id": "pc:552",
"type": "AccountContact",
"uri": "/account/v1/accounts/pc:7071/contacts/pc:552"
},
"id": "353",
"relationship": "wife"
},
The response identifies that there is a contact with the "Additional Named Insured" role on the policy. The contact's id
is pc:552 (Shirley Hemsworth), and her relationship to the primary insured is "wife". The id of the role association
itself is 353.
GET /policy/v1/policies/pc:202/contacts?fields=id,policyContactRoles&filter=policyContactRoles:in:PolicySecNamedInsured
Response
{
"data": [
{
"attributes": {
"id": "pc:202",
"policyContactRoles": [
{
"code": "PolicySecNamedInsured",
"name": "PolicySecNamedInsured"
}
…
}
{
"data": {
"attributes": {
"displayName": "Ray Newton",
"taxId": "***-**-6789"
}
}
}
For some callers, such as internal or external users, the masking of tax IDs may be appropriate as it protects personally
identifiable information. For other callers, such as services, this masking may cause a problem as the callers may
reference contacts internally using the tax ID.
There are two ways that the taxId field can be unmasked:
• You can configure the field so that it is always unmasked. For information on how to configure this, see the Cloud
API Developer Guide.
• You can grant the caller the restunmasktaxid system permission. Any caller who has a role with this permission
will get responses with unmasked tax IDs. For information on how to configure this, see the section on API role
special permissions in the Cloud API Developer Guide.
Policy locations
In addition to the primary location, a policy may have any number of additional locations.
GET /policy/v1/policies/pc:3894
...
"primaryLocation": {
"displayName": "1: 1253 Paloma Ave, Arcadia, CA",
"id": "1",
"type": "PolicyLocation",
"uri": "/policy/v1/policies/pc:SNZEJIOVY-iX-69VD3056/locations/1"
},
...
Policy questions
During a submission, questions may have been posed to the insured. These questions could have been used to pre-
qualify the account, or to get additional information about a specific location. These questions and their answers are
available from the policy once the policy has been bound.
Questions can be optional, and it is possible for no answer to be provided to a question. From the policy, you can see
all the questions that were part of the submission, whether they were answered or not. You can also see any answers
that were provided.
Endpoint Response
GET /policies/{policyId}/ The set of policy-level questions from the job (which are typically used for pre-qualification),
questions and their answers, if any
GET /policies/{policyId}/ The set of location-level questions for the specified location from the job (which are typically
locations/{locationId}/ used to gather additional information for rating), and their answers, if any
questions
Structure of a QuestionAnswer
A QuestionAnswer is a resource that stores a single question for a job or policy and its answer, if any.
The datatype of a question's answer depends on the nature of the question itself. For example, "Is the driver legally
blind?" has a Boolean answer, but "What was the date of the most recent safety course completed?" has a datetime
answer.
To accommodate this variation in the datatype of an answer, a QuestionAnswer has a questionType property. This
identifies the datatype of the answer. This property is set to one of the following: Boolean, Choice, Date, Integer,
String.
There are also a set of datatype-specific ...Value properties: booleanValue, choiceValue, dateValue,
integerValue, textValue. For a given QuestionAnswer, the answer is stored in the ...Value property that
corresponds to the questionType. The ...Value properties that are not relevant are set to null.
For example, if a QuestionAnswer's questionType is set to Boolean, then the answer is stored in the booleanValue
field. The choiceValue, dateValue, integerValue, and textValue properties are set to null.
If no answer was specified for a question, there is still a QuestionAnswer for the question, but all of its ...Value
properties are null.
There is also a displayValue property. This stores the question's answer, if any, converted to a string.
"<questionId>": {
"question": {
"displayName": "<displayText>"
"id": "<questionId>"
},
"questionType": {
"code": "<questionTypeCode>",
},
"displayValue": "<value>",
"booleanValue": <value>,
"choiceValue": {
"code": "<choiceValueCode>",
},
"dateValue": "<value>",
"integerValue": <value>,
"textValue": "<value>",
},
For any given question, some values are always set and some values are always null. If a property has a null value, it is
not included in the response. The following table defines how each value is set.
{
"data": {
"attributes": {
"answers": {
"MovingViolations2": {
"question": {
"displayName": "Any drivers with convictions for moving traffic violations within
the past 3 years? If 'Yes' please explain.",
"id": "MovingViolations2"
},
"questionType": {
"code": "Boolean"
},
"displayValue": "true",
"booleanValue": true
},
...
The second question, DriverNameConviction, is a string question. Its answer is "Driving without a license".
...
"DriverNameConviction": {
"question": {
"displayName": "Please provide the driver name and explain the conviction.",
"id": "DriverNameConviction"
},
"questionType": {
"code": "String"
},
"displayValue": "Driving without a license",
"textValue": "Driving without a license"
},
...
The third question, PACurrentlyInsured, is a choice question. Its answer is a question-specific code from the product
design (newdriver, which has a display value of "No - New driver").
...
"PACurrentlyInsured": {
"question": {
"displayName": "Is the applicant currently insured?",
"id": "PACurrentlyInsured"
},
"questionType": {
"code": "Choice"
},
"displayValue": "No - New Driver",
"choiceValue": {
"code": "newdriver",
"name": "No - New Driver"
}
},
...
The fourth question, CurrentSuspense, is a Boolean question. It has not been answered, so its displayValue and
booleanValue properties are null and therefore not included in the response.
...
"CurrentSuspense": {
"question": {
"displayName": "Is the applicant's license currently suspended, canceled, or revoked?",
"id": "CurrentSuspense"
},
"questionType": {
"code": "Boolean"
}
},
...
Prior policies
Every policy and job has a set of risk analysis information. The insurer can use this information to determine how to
process policy transactions. For example, this information could be used to determine whether or not to renew a policy.
One category of risk information is the prior policies. Prior policies is a list of policies that the insured has held before
the current policy. These could be policies with the insurer or with other insurers. For more information on the business
functionality of prior policies, see the Application Guide.
You can retrieve and manage prior policy information through Cloud API.
• For policies not yet bound, you can edit prior policy information on the submission job.
• For bound policies, you can edit prior policy information on the policy itself.
{
"count": 1,
"data": [
{
"attributes": {
"annualPremium": {
"amount": "5092.00",
"currency": "usd"
},
"carrier": "CommuteCoverage",
"effectiveDate": "2021-09-04",
"id": "pc:SlpveONavkeunmUPCU4nZ",
"numLosses": 1,
"policyNumber": "CO-43221-3",
"totalLosses": {
"amount": "5721.13",
"currency": "usd"
}
},
...
POST example
The following payload creates a PriorPolicy for job pc:334. Note that it includes the required field (effectiveDate)
and additional optional fields.
POST /job/v1/jobs/pc:334/prior-policies
{
"data": {
"attributes": {
"carrier": "Interstate Insurance",
"effectiveDate": "2021-10-13",
"annualPremium": {
"amount": "617.00",
"currency": "usd"
},
"policyNumber": "BNL-123312-2"
}
}
}
PATCH /job/v1/jobs/pc:334/prior-policies/pc:1119
{
"data": {
"attributes": {
"numLosses": 0,
"totalLosses": {
"amount": "0.00",
"currency": "usd"
}
}
}
}
DELETE /job/v1/jobs/pc:334/prior-policies/pc:1119
Loss history
Every job and policy has a loss history, which is a list of any prior losses that have been incurred by the insured. This
information can be used to make business decisions such as whether to approve a submission or renewal. For more
information on the business functionality of loss history, see the Application Guide.
You can retrieve and manage loss history information through Cloud API.
• amountPaid (a MonetaryAmount)
• description
• lossStatus (a value from the LossEntryStatus typelist, such as Open or Closed)
• occurenceDate
• openReserve (a MonetaryAmount)
• totalIncurred (a MonetaryAmount)
GET job/v1/jobs/pc:333/loss-history?fields=lossHistoryType
{
"data": {
"attributes": {
"lossHistoryType": {
"code": "man",
"name": "Manually Entered"
}
},
GET job/v1/jobs/pc:444/loss-history
{
"data": {
"attributes": {
"lossHistoryType": {
"code": "att",
"name": "Attached"
},
"numPriorLosses": 2,
"priorTotalIncurred": {
"amount": "300.00",
"currency": "usd"
}
},
There is no endpoint dedicated to retrieving the attached loss history documents. However, you can use the GET /
documents endpoint to retrieve only the documents associated with the policy whose type is loss history.
For example, the following request retrieves the loss history documents for job pc:444.
GET job/v1/jobs/pc:444/documents?filter=type:eq:loss_history
{
"count": 2,
"data": [
{
"attributes": {
"id": "pc:S8SvBsGKtMsbxOfdw35lB",
"name": "Loss Details - Accident on 2022/10/12",
"status": {
"code": "draft",
"name": "Draft"
},
"type": {
"code": "loss_history",
"name": "Loss history"
}
},
...
},
{
"attributes": {
"id": "pc:Stac2g5QJvz2K96tyBkFp",
"name": "Loss Details - Accident on 2020/07/08",
"status": {
"code": "final",
"name": "Final"
},
"type": {
"code": "loss_history",
"name": "Loss history"
}
},
...
}
GET job/v1/jobs/pc:555/loss-history/prior-losses
{
"count": 1,
"data": [
{
"attributes": {
"amountPaid": {
"amount": "2000.00",
"currency": "usd"
},
"description": "Accident (with $500 deductible)",
"id": "pc:Sgg81r2HeunCNnYYWSDvl",
"lossStatus": {
"code": "Closed",
"name": "Closed"
},
"occurrenceDate": "2022-08-08",
"openReserve": {
"amount": "0.00",
"currency": "usd"
},
"totalIncurred": {
"amount": "2500.00",
"currency": "usd"
}
},
...
{
"data": {
"attributes": {
"numPriorLosses": 3,
"priorTotalIncurred": {
"amount": "450.00",
"currency": "usd"
}
}
}
}
POST /job/v1/jobs/pc:1221/loss-history/prior-losses
{
"data": {
"attributes": {
"amountPaid": {
"amount": "2000.00",
"currency": "usd"
},
"description": "Accident (with $500 deductible)",
"lossStatus": {
"code": "Closed"
},
"occurrenceDate": "2022-08-01",
"openReserve": {
"amount": "0.00",
"currency": "usd"
},
"totalIncurred": {
"amount": "2500.00",
"currency": "usd"
}
}
}
}
PATCH /job/v1/jobs/pc:1221/loss-history/prior-losses/pc:99099
{
"data": {
"attributes": {
"occurrenceDate": "2022-01-08"
}
}
}
DELETE /job/v1/jobs/pc:1221/loss-history/prior-losses/pc:99099
Pre-renewal directions
A pre-renewal direction is a special note attached to a policy that provides information on how to execute the policy's
next renewal job. There are three broad types of pre-renewal directions:
• Non-renew - The policy will not be renewed at the request of the insurer.
• Not taken - The policy will not be renewed at the request of the insured.
• Refer to an individual - The policy will be reviewed by the insurer to determine if it can be renewed.
The full set of possible values is defined in the PreRenewalDirection typelist.
When you create a pre-renewal direction note, you must specify:
• The direction
• The user that the renewal will be assigned to
{
"data": {
"attributes": {
"id": "pc:44",
"preRenewalDirection": "underwriter",
"preRenewalOwner": {
"assigneeId": "userId=pc:3630,groupId=pc:318",
"groupId": "pc:318",
"name": "Alice Applegate (Los Angeles Branch UW)",
"userId": "pc:3630"
}
},
"included": {
"Note": [
{
"attributes": {
"bodySummary": "Refer to underwriter to investigate excessive number of claims",
"confidential": true,
"securityType": {
"code": "internalonly",
"name": "Internal Only"
},
"topic": {
"code": "prerenewal",
"name": "Pre-renewal direction"
}
},
...
Non-renew example
For a non-renew direction, you must specify the non-renewal reason. This must be a typecode from the
NonRenewalCode typelist.
POST /policy/v1/policies/pc:44/set-prerenewal-direction
{
"data": {
"attributes": {
"body": "Excessive claims",
"direction": {
"code": "nonrenew"
},
"nonRenewReason": {
"code": "loss"
},
"securityType": {
"code": "internalonly"
}
}
}
}
POST /policy/v1/policies/pc:44/set-prerenewal-direction
{
"data": {
"attributes": {
"body": "Insured is selling their car",
"direction": {
"code": "nottaken"
},
"securityType": {
"code": "internalonly"
}
}
}
}
POST /policy/v1/policies/pc:44/set-prerenewal-direction
{
"data": {
"attributes": {
"assignTo": {
"userId": "pc:3630",
"groupId": "pc:318"
},
"body": "Refer to underwriter to investigate excessive number of claims",",
"direction": {
"code": "underwriter"
},
"securityType": {
"code": "internalonly"
}
}
}
}
Referral reasons
While a policy is in force, an insurer may become aware of information that has implications for the policy's renewal.
This information may require underwriter approval, but at the time the renewal has not yet been started. Because there
is no active job, the information cannot be captured as an underwriting issue.
To address these situations, PolicyCenter provides referral reasons. Like underwriting issues, a referral reason is an
object that tracks an issue that may require underwriter review. However, referral reasons are attached only to bound
policies. The next time a job is created for the policy, the referral reason may trigger the creation of an underwriting
issue.
Cloud API provides a set of endpoints for managing referral reasons. These endpoints exist in the Policy API. For more
information, see “Referral reasons” on page 415.
The InsuranceSuite Cloud API is a set of RESTful system APIs that expose functionality in PolicyCenter so that caller
applications can request data from or initiate action within PolicyCenter.
The following topics discuss how caller applications can manage specific types of jobs (also known as policy
transactions) within PolicyCenter. This includes:
• Submissions
• Renewals
• Audits
• Policy changes
• Cancellations
• Reinstatements
• Rewrites (including rewrite new account jobs)
Submissions
A submission is a policy transaction that creates a new policy. This topic covers how to create submissions through
Cloud API.
For details on the business functionality of submissions, see the Application Guide.
Initiating a submission
Before you can create a new submission, the account that will own the submission must exist. For information on
creating accounts, see “Creating an account” on page 147.
Use the following endpoint to create a submission:
• POST /job/v1/submissions
POST /job/v1/submissions
{
"data": {
"attributes": {
"account": {
"id": "pc:401"
},
"baseState": {
"code": "CA"
},
"jobEffectiveDate": "2022-08-01",
"producerCode": {
"id": "pc:16"
},
"product": {
"id": "PersonalAuto"
}
}
}
}
This new job instance has a job type of "Submission" and a status of "Draft". For the purposes of the following
examples, assume that the ID of this job is pc:4040.
194 Submissions
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
POST /job/v1/jobs/pc:4040/quote
If the job lacks all the information required for rating, the call fails. For example, for the base configuration Personal
Auto product, a submission will fail if you specify a covered vehicle, but you do not specify a driver for the vehicle.
If the call succeeds, a quote is generated for the job. The status of the job is advanced to "Quoted".
POST /job/v1/jobs/pc:4040/make-draft
Submissions 195
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
POST /job/v1/jobs/pc:4040/bind-and-issue
POST /job/v1/jobs/pc:4040/bind-only
196 Submissions
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
• Issuance does not involve the original submission job. That job is considered to be concluded when the policy was
bound.
• Similar to policy change and renewal:
◦ Issuance jobs are created from the policy.
◦ Issuance jobs can modify the policy contents.
◦ Issuance jobs must be quoted and completed.
To issue a previously bound policy, you must:
1. Initiate the issuance job from the policy.
2. Modify the job as needed. This could involve specifying information that was not available when the policy was
bound.
3. Quote the issuance job.
4. Complete the issuance job.
POST /job/v1/jobs/pc:919/issue
{
"data": {
"attributes": {
}
}
}
This creates a new job instance whose job type is "Issuance" and whose status is "Draft". For the purposes of the
following examples, assume that the ID of this job is pc:8808.
POST /job/v1/jobs/pc:8808/quote
If the quote at issuance is different than the quote when bound, this typically triggers an additional billing request to
either charge for or credit the difference.
Submissions 197
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
For example, the following request binds and issues issuance job pc:8808.
POST /job/v1/jobs/pc:8808/bind-and-issue
You can also withdraw the issuance job. For example, this might be appropriate if the issuance included significantly
erroneous information. To withdraw an issuance job, use the following endpoint:
• POST /job/v1/jobs/{jobId}/withdraw
The request object does not require a body.
For example, the following request withdraws job pc:4040.
POST /job/v1/jobs/pc:8808/withdraw
Withdrawing a submission
Use the following endpoint to withdraw a submission:
• POST /job/v1/jobs/{jobId}/withdraw
The request object does not require a body.
For example, the following request withdraws job pc:4040.
POST /job/v1/jobs/pc:4040/withdraw
Declining a submission
Use the following endpoint to decline a submission:
• POST /job/v1/jobs/{jobId}/decline
You must specify a rejectReason in the request body.
For example, the following request declines job pc:4040.
POST /job/v1/jobs/pc:4040/withdraw
{
"data": {
"attributes": {
"rejectReason": {
"code": "PaymentHistory"
}
}
}
}
198 Submissions
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
POST /job/v1/jobs/pc:4040/not-take
{
"data": {
"attributes": {
"rejectReason": {
"code": "nottaken"
}
}
}
}
Copying submissions
You can create a new submission by copying an existing submission. The submission can be unbound or bound. You
can also create a copy from a bound policy, in which case the submission used to create the policy is the one that is
copied.
To copy a submission, use one of the following endpoints:
POST /job/v1/jobs/pc:4100/copy-submission
POST /job/v1/jobs/pc:4100/copy-submission
Submissions 199
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
POST /job/v1/jobs/pc:4100/copy-submission?jobVersion=pc:62
The jobVersion query parameter is available only on the Job API version of /copy-submission. It is not available on
the Policy API version of /copy-submission.
200 Submissions
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
{
"requests": [
{
"method": "post",
"uri": "/account/v1/accounts",
"body": {
"data": {
"attributes": {
"initialAccountHolder": {
"contactSubtype": "Person",
"firstName": "Tamsin",
"lastName": "Tester",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
},
"initialPrimaryLocation": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
},
"producerCodes": [
{
"id": "pc:16"
}
],
"organizationType": {
"code": "other"
}
}
}
},
"vars": [
{
"name": "accountId",
"path": "$.data.attributes.id"
},
{
"name": "driverId",
"path": "$.data.attributes.accountHolder.id"
}
]
},
{
"method": "post",
"uri": "/job/v1/submissions",
"body": {
"data": {
"attributes": {
"account": {
"id": "${accountId}"
},
"baseState": {
"code": "CA"
},
"jobEffectiveDate": "2022-08-01",
"producerCode": {
"id": "pc:16"
},
"product": {
"id": "PersonalAuto"
}
}
}
},
"vars": [
{
"name": "jobId",
"path": "$.data.attributes.id"
}
]
},
{
"method": "patch",
"uri": "/job/v1/jobs/${jobId}/questions",
"body": {
"data": {
"attributes": {
"answers": {
Submissions 201
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
"PACurrentlyInsured": {
"choiceValue": {
"code": "newdriver"
}
}
}
}
}
}
},
{
"method": "post",
"uri": "/job/v1/jobs/${jobId}/lines/PersonalAutoLine/coverages",
"body": {
"data": {
"attributes": {
"pattern": {
"id": "PALossOfUseCov"
}
}
}
}
},
{
"method": "post",
"uri": "/job/v1/jobs/${jobId}/lines/PersonalAutoLine/vehicles",
"body": {
"data": {
"attributes": {
"make": "Toyota",
"model": "Tercel",
"modelYear": 2010,
"costNew": {
"amount": "33000",
"currency": "usd"
},
"licenseState": {
"code": "CA"
},
"vin": "14HEW8RLGMDSP03AA"
}
}
},
"vars": [
{
"name": "vehicleId",
"path": "$.data.attributes.id"
}
]
},
{
"method": "post",
"uri": "/job/v1/jobs/${jobId}/lines/PersonalAutoLine/vehicles/${vehicleId}/coverages",
"body": {
"data": {
"attributes": {
"pattern": {
"id": "PARentalCov"
},
"terms": {
"PARental": {
"choiceValue": {
"code": "60/20"
}
}
}
}
}
}
},
{
"method": "patch",
"uri": "/job/v1/jobs/${jobId}/contacts/${driverId}",
"body": {
"data": {
"attributes": {
"dateOfBirth": "1980-10-10",
"licenseNumber": "CA7732839",
"licenseState": {
"code": "CA"
},
"numberOfAccidents": {
"code": "0"
},
"numberOfViolations": {
"code": "0"
},
"policyNumberOfAccidents": {
"code": "0"
},
202 Submissions
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
"policyNumberOfViolations": {
"code": "0"
}
}
}
}
},
{
"method": "post",
"uri": "/job/v1/jobs/${jobId}/lines/PersonalAutoLine/vehicles/${vehicleId}/drivers",
"body": {
"data": {
"attributes": {
"percentageDriven": 100,
"policyDriver": {
"id": "${driverId}"
}
}
}
}
},
{
"method": "patch",
"uri": "/job/v1/jobs/${jobId}/lines/PersonalAutoLine/vehicles/${vehicleId}/modifiers/PAAntiLockBrakes",
"body": {
"data": {
"attributes": {
"booleanModifier": true
}
}
}
},
{
"method": "post",
"uri": "/job/v1/jobs/${jobId}/quote"
}
]
}
Submissions 203
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
204 Submissions
chapter 18
Renewals
A renewal is a policy transaction that creates a new term for an existing policy at the end of the latest term. This topic
covers how to manage renewals through Cloud API.
For details on the business functionality of renewals, see the Application Guide.
b. The status advances to "Bound", "Declined", or "Withdrawn", depending on the outcome and job type.
Initiating a renewal
Renewals are initiated from the policy itself. Use the following endpoint to create a renewal for a given policy:
• POST /policy/v1/policies/{policyId}/renew
The request requires an empty body (a body with no specified attributes).
For example, the following initiates a renewal for policy pc:44.
POST /policy/v1/policies/pc:44/renew
{
"data": {
"attributes": {
}
}
}
This call creates a new job instance whose job type is "Renewal".
Pre-renewal directions
A policy can have a pre-renewal direction. A pre-renewal direction is a special note attached to a policy that provides
information on how to execute the policy's renewal job when the renewal job is initiated automatically.
For more information on how to set and clear pre-renewal directions, see “Pre-renewal directions” on page 186.
POST /job/v1/jobs/pc:4040/make-draft
206 Renewals
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
PATCH /job/v1/jobs/pc:4040/lines/PersonalAutoLine/coverages
{
"data": {
"attributes": {
"pattern": {
"id": "PALimitedMexicoCov"
}
}
}
}
If the job lacks all the information required for rating, the call fails. For example, for the base configuration Personal
Auto product, a submission will fail if you specify a covered vehicle, but you do not specify a driver for the vehicle.
If the call succeeds, a quote is generated for the job. The status of the job is advanced to "Quoted".
Renewals 207
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
POST /job/v1/jobs/pc:333/bind-and-issue
POST /job/v1/jobs/pc:333/withdraw
208 Renewals
chapter 19
Audits
PolicyCenter Cloud API includes endpoints that allow you to work with audits. Audits typically take place on policies
where the premium is based on estimated amounts that must later be replaced with actual amounts. An example of this
would be a Workers’ Comp policy where the premium can change based on the salaries of the covered workers.
PolicyCenter Cloud API supports two types of audits in the base configuration: final audit and premium report. Final
audit covers an entire policy term, while premium report covers specified time periods within a policy term.
Note:
Whether or not audits are available is dependent on LOB settings. In the base configuration, Workers’ Comp
and General Liability LOBs are set as auditable.
For complete details on audits, see Application Guide.
• GET /policy/v1/policies/{policyId}/audits
• GET /policy/v1/policies/{policyId}/audits/{auditId}
• POST /policy/v1/policies/{policyId}/audits
• PATCH /policy/v1/policies/{policyId}/audits/{auditId}
You can change the status of audit jobs with the following endpoints:
• POST /policy/v1/policies/{policyId}/audits/{auditId}/start
• POST /policy/v1/policies/{policyId}/audits/{auditId}/reverse
• POST /policy/v1/policies/{policyId}/audits/{auditId}/revise
• POST /policy/v1/policies/{policyId}/audits/{auditId}/waive
GET /policy/v1/policies/pc:101/audits
Response
"attributes": {
"actualAuditMethod": {
"code": "Voluntary",
"name": "Voluntary"
},
"auditMethod": {
"code": "Voluntary",
"name": "Voluntary"
},
"auditPeriodEndDate": "2021-11-01T07:01:00.000Z",
"auditPeriodStartDate": "2021-10-11T07:01:00.000Z",
"auditScheduleType": {
"code": "PremiumReport",
"name": "Premium Report"
},
"dueDate": "2021-11-16T08:01:00.000Z",
"id": "pc:101",
"initDate": "2021-10-27T07:01:00.000Z",
"job": {
"displayName": "0002370929",
"id": "pc:SiCsb2XDZXigd2aGUldeT",
"type": "Job",
"uri": "/job/v1/jobs/pc:901"
},
"status": "In Progress"
},
...
Create an audit
Use this endpoint to create a new audit on a policy:
• POST /policy/v1/policies/{policyId}/audits
The following fields are required in the request:
210 Audits
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
• Estimate
• Phone
• Physical
• Voluntary
auditScheduleType AuditScheduleType The type of audit. In the base configuration this is either PremiumReport
TypeKey or FinalAudit. (For the General Liability LOB, only FinalAudit is
available in the base configuration.)
If an audit of type FinalAudit exists on a policy with a state of
scheduled, in progress, or complete, another audit of type FinalAudit
cannot be created for the same policy term.
POST /policy/v1/policies/pc:101/audits
Request
{
"data": {
"attributes": {
"auditMethod": {
"code": "Voluntary"
},
"auditScheduleType": {
"code": "PremiumReport"
},
"dueDate": "2025-03-14",
"initDate": "2024-12-21",
"auditPeriodEndDate": "2025-07-02",
"auditPeriodStartDate": "2025-06-03"
}
}
}
Audits 211
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
• PATCH /policy/v1/policies/{policyId}/audits/{auditId}
The attributes that can be updated differ based on whether the audit job has started. The following table lists attributes
that can be updated only when the job is in a certain state. Attributes not listed can be updated before or after the audit
job has started.
Attribute Not updatable, must be set on creation Updatable only before start Updatable only after start
auditMethod X
actualAuditMethod X
auditScheduleType X
auditPeriodEndDate X (Premium report only)
receivedDate X
paymentReceived X (Premium report only)
This example changes the due date (which can be updated before or after audit start) for audit pc:800 on policy pc:101
to August 15, 2024:
Command
POST /policy/v1/policies/pc:101/audits/pc:800
Request
{
"data": {
"attributes": {
"dueDate": "2024-08-15"
}
}
}
Start an audit
Audits start automatically on their initDate through a batch process. However, you can start the audit job prior to that
date with the following POST command:
• POST /policy/v1/policies/{policyId}/audits/{auditId}/start
This example starts audit pc:800 on policy pc:101. This command does not take a request body.
Command
POST /policy/v1/policies/pc:101/audits/pc:800/start
Response
{
"data": {
"attributes": {
"actualAuditMethod": {
"code": "Estimated",
"name": "Estimated"
},
"auditMethod": {
"code": "Estimated",
"name": "Estimated"
},
"auditPeriodEndDate": "2025-07-02T07:00:00.000Z",
"auditPeriodStartDate": "2025-06-03T07:00:00.000Z",
212 Audits
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
"auditScheduleType": {
"code": "PremiumReport",
"name": "Premium Report"
},
"dueDate": "2025-03-14T07:00:00.000Z",
"id": "pc:800",
"initDate": "2024-01-17T22:39:36.392Z",
"job": {
"displayName": "0000053333",
"id": "pc:750",
"type": "Job",
"uri": "/job/v1/jobs/pc:750"
},
"status": "In Progress",
"waived": false
},
}
Reverse an audit
It’s possible that an audit can be completed, but then need to be redone. For example, if another job that changes the
policy (such as a cancellation or policy change) completes after the audit job has completed, the audit might need to be
reversed so the changes can be accounted for. For final audits a reversal is done automatically when the policy change
or cancellation takes place.
You can also manually reverse an audit, under the following conditions:
• Audit must be a premium report. Because final audits happen automatically, only premium report audits can be
manually reversed.
• Final audit for the policy must not be complete. If a final audit for the policy is complete, premium report audits can
no longer be reversed.
See Application Guide for more information on reversing audits.
Use the following endpoint to reverse an audit.
• POST /policy/v1/policies/{policyId}/audits/{auditId}/reverse
This endpoint does not take a request body.
This example reverses audit pc:850 on policy pc:101.
Command
POST /policy/v1/policies/pc:101/audits/pc:850/reverse
Response
{
"data": {
"attributes": {
"actualAuditMethod": {
"code": "Voluntary",
"name": "Voluntary"
},
"auditMethod": {
"code": "Voluntary",
"name": "Voluntary"
},
"auditPeriodEndDate": "2024-09-01T07:01:00.000Z",
"auditPeriodStartDate": "2024-08-01T07:01:00.000Z",
"auditScheduleType": {
"code": "PremiumReport",
"name": "Premium Report"
},
"dueDate": "2024-09-16T07:01:00.000Z",
"id": "pc:850",
"initDate": "2024-01-23T23:56:41.475Z",
"job": {
"displayName": "0000703318",
"id": "pc:750",
"type": "Job",
"uri": "/job/v1/jobs/pc:750"
},
"receivedDate": "2024-01-23T08:00:00.000Z",
"reversalDate": "2024-01-24T08:00:00.000Z",
"status": "Reversed",
"totalCost": {
Audits 213
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
"amount": "30950.00",
"currency": "usd"
},
"transactionAmount": {
"amount": "0.00",
"currency": "usd"
},
"waived": false
},
Revise an audit
If an audit needs to be updated after it’s been completed, you can revise the audit. Only final audits can be revised.
See Application Guide for more information on revising audits.
• POST /policy/v1/policies/{policyId}/audits/{auditId}/revise
The following command places audit pc:850 on policy pc:101 in a Revised state. The command does not take a request
body.
Command
POST /policy/v1/policies/pc:101/audits/pc:850/revise
Response
{
"data": {
"attributes": {
"actualAuditMethod": {
"code": "Physical",
"name": "Physical"
},
"auditMethod": {
"code": "Physical",
"name": "Physical"
},
"auditPeriodEndDate": "2024-10-11T07:01:00.000Z",
"auditPeriodStartDate": "2023-10-11T07:01:00.000Z",
"auditScheduleType": {
"code": "FinalAudit",
"name": "Final Audit"
},
"dueDate": "2024-01-19T08:01:00.000Z",
"id": "pc:850",
"initDate": "2024-01-22T21:16:07.683Z",
"job": {
"displayName": "0000333796",
"id": "pc:901",
"type": "Job",
"uri": "/job/v1/jobs/pc:901"
},
"receivedDate": "2024-01-19T08:00:00.000Z",
"revisingAudit": {
"displayName": "PolicyAudit pc:855",
"id": "pc:855",
"type": "PolicyAudit",
"uri": "/policy/v1/policies/pc:101/audits/pc:855"
},
"status": "Revised",
"totalCost": {
"amount": "33339.00",
"currency": "usd"
},
"transactionAmount": {
"amount": "7577.00",
"currency": "usd"
},
"waived": false
},
214 Audits
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
of revising the audit (in this case pc:850), the audit has been given a status of Revised and a duplicate - or revising -
audit has been created.
"status": "Revised"
Revising audit
To avoid losing audit history, audit pc:850 is not actually revised. Instead, revising the audit creates and starts a new
audit job. Information for identifying the new audit is in the revisingAudit object, while information on the newly
started job is in the job object. In this example the new audit is pc:855, and the audit job for audit pc:855 is pc:901:
"revisingAudit": {
"displayName": "PolicyAudit pc:855",
"id": "pc:855",
"type": "PolicyAudit",
"uri": "/policy/v1/policies/pc:101/audits/pc:pc855"
},
…
"job": {
"displayName": "0000333796",
"id": "pc:901",
"type": "Job",
"uri": "/job/v1/jobs/pc:901"
},
If you run a GET command on the revisingAudit uri, you’ll see the information for the new audit. Because the job
started automatically, this new audit has a status of In Progress, as shown here:
Command
GET /policy/v1/policies/pc:101/audits/pc:855
Response
{
"data": {
"attributes": {
"actualAuditMethod": {
"code": "Physical",
"name": "Physical"
},
"auditMethod": {
"code": "Physical",
"name": "Physical"
},
"auditPeriodEndDate": "2024-10-11T07:01:00.000Z",
"auditPeriodStartDate": "2023-10-11T07:01:00.000Z",
"auditScheduleType": {
"code": "FinalAudit",
"name": "Final Audit"
},
"dueDate": "2024-01-22T21:23:32.232Z",
"id": "pc:855",
"initDate": "2024-01-22T21:23:32.232Z",
"job": {
"displayName": "0000444563",
"id": "pc:901",
"type": "Job",
"uri": "/job/v1/jobs/pc:901"
},
"receivedDate": "2024-01-19T08:00:00.000Z",
"revisionType": {
"code": "Revision",
"name": "Revision"
},
"status": "In Progress",
"waived": false
},
To change the information in the revising audit, use the PATCH command described above in “Update audit details” on
page 211.
Audits 215
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Waive an audit
You cannot delete a scheduled audit. Instead, if an audit has been scheduled but is no longer needed, you can waive the
audit. You cannot waive an audit that has started. (However, you can waive the audit job on an audit that has started.
See “Waive an audit job” on page 216 for more information.)
• POST /policy/v1/policies/{policyId}/audits/{auditId}/waive
This endpoint does not take a request body.
An audit that has been waived cannot be started or updated.
{
"status": 400,
"errorCode": "gw.api.rest.exceptions.BadInputException",
"userMessage": "Entity validation errors block 'quote' action",
"details": [
{
"message": "All audited amounts must be filled in to calculate premiums.",
"properties": {
"type": "WorkersCompLine",
"url": "/job/v1/jobs/pc:901/lines/WorkersCompLine",
"severity": "error"
}
},
{
"message": "Received date must be specified.",
"properties": {
"type": "WorkersCompLine",
216 Audits
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
"url": "/job/v1/jobs/pc:901/lines/WorkersCompLine",
"severity": "error"
}
}
]
}
This example demonstrates updating the required validation information for Workers’ Comp in the base configuration.
It walks through finding the covered employees for audit job pc:901, updating the audited amount and received date,
and quoting the job.
Retrieve covered employees
The audited amount is the payroll amount reported by the customer. The employees covered by the audited amount
could be in multiple jurisdictions. To update this value through the API, you need to find the covered employee
associated with the audit job and update the fields that represent the various jurisdictions.
Command
GET /jobs/pc:901/lines/WorkersCompLine/covered-employees
Response
{
"count": 1,
"data": [
{
"attributes": {
"addedDate": "2024-02-01T08:01:00.000Z",
"id": "401",
"ifAnyExposure": false,
"location": {
"displayName": "1: 2306 Market St., San Francisco, CA",
"id": "401",
"type": "PolicyLocation",
"uri": "/job/v1/jobs/pc:901/locations/401"
},
"removedDate": "2025-02-01T08:01:00.000Z",
"specialCov": {
"code": "stat",
"name": "State Act"
},
"splits": {
"1": {
"basisAmount": 35,
"endDate": "2025-02-01T08:01:00.000Z",
"numEmployees": 50,
"startDate": "2024-02-01T08:01:00.000Z"
}
}
},
Notice the splits property. If there were multiple jurisdictions on this audit, there would be multiple objects under the
splits property. In this case there is only one, so this next step updates the audited amount for that split for covered
employee 401.
Update audited amount
Command
PATCH /jobs/pc:901/lines/WorkersCompLine/covered-employees/401
Request
{
"data": {
"attributes": {
"splits": {
"1": {
"auditedAmount": 4000
}
}
}
}
}
Audits 217
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Response
...
"id": "401",
...
"splits": {
"1": {
"auditedAmount": 40,
"basisAmount": 35,
"endDate": "2025-02-01T08:01:00.000Z",
"numEmployees": 50,
"startDate": "2024-02-01T08:01:00.000Z"
}
...
PATCH /policies/pc:101/audits/pc:855
Request
{
"data": {
"attributes": {
"receivedDate": "2024-05-15"
}
}
}
POST /jobs/pc:901/quote
Response
{
"data": {
"attributes": {
...
"id": "pc:901",
...
"jobStatus": {
"code": "Quoted",
"name": "Quoted"
},
"jobType": {
"code": "Audit",
"name": "Audit"
},
...
},
As you can see in the response, the job has now been quoted.
218 Audits
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Command
POST /jobs/pc:901/complete
Response
...
"id": "pc:901",
...
"jobStatus": {
"code": "AuditComplete",
"name": "Completed"
},
"jobType": {
"code": "Audit",
"name": "Audit"
},
...
Audits 219
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
220 Audits
chapter 20
Policy changes
A policy change is a policy transaction that makes material changes to the policy prior to its expiration date. This topic
covers how to manage policy changes through Cloud API.
For details on the business functionality of renewals, see the Application Guide.
b. The status advances to "Bound", "Declined", or "Withdrawn", depending on the outcome and job type.
POST /policy/v1/policies/pc:44/change
{
"data": {
"attributes": {
"jobEffectiveDate": "2023-06-06"
}
}
}
This call creates a new job instance whose job type is "PolicyChange".
PATCH /job/v1/jobs/pc:4040/lines/PersonalAutoLine/coverages
{
"data": {
"attributes": {
"pattern": {
"id": "PALimitedMexicoCov"
}
}
}
}
If the job lacks all the information required for rating, the call fails. For example, for the base configuration Personal
Auto product, a submission will fail if you specify a covered vehicle, but you do not specify a driver for the vehicle.
If the call succeeds, a quote is generated for the job. The status of the job is advanced to "Quoted".
POST /job/v1/jobs/pc:333/bind-and-issue
POST /job/v1/jobs/pc:333/withdraw
Preemptions
A preemption is an event that occurs when two or more jobs are created from the same base policy period. The first job
to be bound preempts the second job. If you want to continue with the second job, it must be modified to handle the
changes made by the first job. Preemptions occurs most commonly with policy changes.
For example, suppose that there is a bound personal auto policy with a single car. A policy change is started to add a
motorcycle to the policy. Then, while the first job is still in progress, a second policy change is started that adds a van
to the policy. The motorcycle job has no knowledge of the van, and the van job has no knowledge of the motorcycle. If
the motorcycle job is bound first, it will preempt the van job. The policy now has both a car and a motorcycle on it.
The van job was only aware of the car. Before the van policy change can be completed, it must be modified to include
the motorcycle.
PolicyCenter provides support for working with preemptions. PolicyCenter identifies when a job has been preempted.
It provides a list of information on the preempting job that is not present in the preempted job. It also provides "handle
preemption" functionality that copies information from the preempting job over to the preempted job. For more
information, see the Application Guide.
Similarly, Cloud API provides support for preemptions. For a preempted job, you can view information about the
preempting job and execute "handle preemption" functionality. Similarly, when a policy change is bound and there is
an existing renewal for the policy, you can apply changes from the policy change to the renewal.
"userMessage": "Cannot take action 'bind-and-issue'. See the details element for further
information.",
"details": [
{
"message": "Branch 7888143943, 12/07/2021, 06/07/2022, 0006260834 has preemptions."
}
]
You can view information about the preempting job. If you want to bind the current job, you must handle the
preemptions.
{
"changedValue": <value>,
"entity": {
"displayName": <display name>,
"id": <id>
},
"existingValue": <value>,
"field": <value>
}
The difference can pertain to the value of a single field. For example, the following payload indicates that on a Medical
Payments coverage object, the choiceTerm1 field in the base job was 5000, but the preempting job changed it to
15000.
{
"changedValue": "15,000",
"entity": {
The difference can also pertain to the addition or removal of an object. When this occurs, a "√" is used to indicate the
object is present, and a "" (an empty string) is used to indicate the object is absent. For example, the following payload
indicates that a 2000 Honda Civic was not present in the base job but was present in the preempting job. (In other
words, the preempting job added a Honda Civic.)
{
"changedValue": "√",
"entity": {
"displayName": "2000 Honda Civic in California",
"id": "32"
},
"existingValue": "",
"field": "2000 Honda Civic in California"
},
GET /job/v1/jobs/pc:505/preemptions
{
"count": 1,
"data": [
{
"attributes": {
"diffs": [
{
"changedValue": "11/05/2021",
"entity": {
"displayName": "4509454228, 11/04/2021, 05/04/2022, 0004375724",
"id": "pc:421",
"type": "Job",
"uri": "/job/v1/jobs/pc:421"
},
"existingValue": "11/04/2021",
"field": "writtenDate"
},
{
"changedValue": "√",
"entity": {
"displayName": "2000 Honda Civic in California",
"id": "32"
},
"existingValue": "",
"field": "2000 Honda Civic in California"
},
{
"changedValue": "√",
"entity": {
"displayName": "Collision",
"id": "64"
},
"existingValue": "",
"field": "Collision"
},
{
"changedValue": "√",
"entity": {
"displayName": "Comprehensive",
"id": "63"
},
"existingValue": "",
"field": "Comprehensive"
},
{
"changedValue": "√",
"entity": {
"displayName": "Alicia Shirley",
"id": "15"
},
"existingValue": "",
"field": "Assigned Driver: Alicia Shirley"
}
],
"job": {
"displayName": "0004375724",
"id": "pc:421",
"type": "Job",
"uri": "/job/v1/jobs/pc:421"
},
"jobEffectiveDate": "2021-11-05T00:01:00.000Z",
"jobNumber": "0004375724",
"jobType": {
"code": "PolicyChange",
"name": "Policy Change"
}
},
...
Handling preemptions
Once a job has been preempted, it can no longer be bound in its current state. This is because the base policy period has
been modified by the preempting job, and the preempted job is now missing information present in the base policy
period.
PolicyCenter provides the ability to handle preemptions. This is an action you can take on a preempted job to copy
over the changes made by the preempting job. Handling a preemption brings a preempted job in line with the new
version of the base period. Once you have handled preemptions for a job, you can bind it.
RESPONSE:
{
"data": {
"attributes": {
"job": {
"id": "pc:505",
"isPreempted": false,
"jobNumber": "0004408964",
"jobStatus": {
"code": "Draft",
"name": "Draft"
},
"jobType": {
"code": "PolicyChange",
"name": "Policy Change"
}
}
}
}
}
RESPONSE:
{
"data": {
"attributes": {
"id": "pc:505",
"isPreempted": false,
"jobNumber": "0004408964",
"jobStatus": {
"code": "Quoted",
"name": "Quoted"
},
"jobType": {
"code": "PolicyChange",
"name": "Policy Change"
},
"taxesAndSurcharges": {
"amount": "94.00",
"currency": "usd"
},
"totalCost": {
"amount": "1396.00",
"currency": "usd"
},
"totalPremium": {
"amount": "1302.00",
"currency": "usd"
}
}
}
}
RESPONSE:
{
"data": {
"attributes": {
"id": "pc:505",
"isPreempted": false,
"jobNumber": "0004408964",
"jobStatus": {
"code": "Bound",
"name": "Bound"
},
"jobType": {
"code": "PolicyChange",
"name": "Policy Change"
}
}
}
}
For example, the following response payload snippet contains an apply-changes-to-renewal member, indicating the
changed policy has a renewal.
"links": {
..
"activity-patterns": {
"href": "/job/v1/jobs/pc:232/activity-patterns",
"methods": [
"get"
]
},
"apply-changes-to-renewal": {
"href": "/job/v1/jobs/pc:232/apply-changes-to-renewal",
"methods": [
"post"
]
},
"contacts": {
"href": "/job/v1/jobs/pc:232/contacts",
"methods": [
"get"
]
},
...
A cancellation is a policy transaction that terminates an existing policy prior to its expiration date. A reinstatement is a
policy transaction that reinstates a previously canceled policy. This topic covers how to manage cancellations and
reinstatements through Cloud API.
For details on the business functionality of cancellations and reinstatements, see the Application Guide.
a. This can be done by binding the job or by withdrawing or canceling the job.
b. The status advances to "Bound", "Declined", or "Withdrawn", depending on the outcome and job type.
Cancellations
A cancellation is a policy transaction that terminates an existing policy prior to its expiration date. This topic covers
how to manage cancellations through Cloud API.
For details on the business functionality of cancellations, see the Application Guide.
Initiating a cancellation
Cancellations are initiated from the policy itself. Use the following endpoint to create a cancellation for a given policy:
• POST /policy/v1/policies/{policyId}/cancel
You must specify the following fields:
• cancellationReasonCode: A typecode from the ReasonCode typelist
• cancellationSource: A typecode from the CancellationSource typelist
• jobEffectiveDate: A date
For example, the following initiates a cancellation for policy pc:44.
POST /policy/v1/policies/pc:44/cancel
{
"data": {
"attributes": {
"cancellationReasonCode": {
"code": "cancel"
},
"cancellationSource": {
"code": "carrier"
},
"jobEffectiveDate": "2020-08-15"
}
}
}
This call creates a new job instance whose job type is "Cancellation". The job's state is Quoted.
Outcome Endpoint
Cancel the policy now /job/v1/jobs/{jobId}/bind-and-issue
Schedule a cancellation for a future date /job/v1/jobs/{jobId}/pending-cancel
Outcome Endpoint
Change the process date for a scheduled cancellation /job/v1/jobs/{jobId}/reschedule
Rescind a scheduled cancellation /job/v1/jobs/{jobId}/rescind
Withdraw the cancellation /job/v1/jobs/{jobId}/withdraw
POST /job/v1/jobs/pc:333/bind-and-issue
POST /job/v1/jobs/pc:333/withdraw
Reinstatements
A reinstatement is a policy transaction that reinstates a previously canceled policy. This topic covers how to manage
cancellations through Cloud API.
For details on the business functionality reinstatements, see the Application Guide.
Initiating a reinstatement
Reinstatements are initiated from the policy itself. Reinstatements can be initiated only from canceled policies.
Use the following endpoint to create a reinstatement for a given canceled policy:
• POST /policy/v1/policies/{policyId}/reinstate
You must specify the following fields:
• reinstateCode: A typecode from the ReinstateCode typelist
For example, the following initiates a reinstatement for policy pc:44.
POST /policy/v1/policies/pc:44/reinstate
{
"data": {
"attributes": {
"reinstateCode": {
"code": "payment"
}
}
}
}
This call creates a new job instance whose job type is "Reinstatement". The job's state is Draft. The reinstatement's
jobEffectiveDate is automatically set to the job effective date of the corresponding cancellation.
Outcome Endpoint
Reinstate the policy /job/v1/jobs/{jobId}/bind-and-issue
Withdraw the reinstatement /job/v1/jobs/{jobId}/withdraw
POST /job/v1/jobs/pc:333/bind-and-issue
POST /job/v1/jobs/pc:333/withdraw
A rewrite is a policy transaction that creates a new policy from an existing policy. Typically, a rewrite is done when
some significant error occurred during the initial submission of policy. The original policy does not reflect the original
intent of policy, and a new set of policy documents showing correct information is required.
A rewrite new account is a policy transaction that takes data from an existing policy and creates a new policy with a
new policy number in new account. Rewriting a policy to another account means moving the policy going forward to
another account, but the policy history including earlier policy terms stay with its current account.
This topic covers how to manage rewrites through Cloud API. For details on the business functionality of rewrites, see
the Application Guide.
There are three types of policy transaction rewrites:
• Full term rewrite: Overwrites the entire term of an existing policy
• New term rewrite: Creates a new term for the policy
• Mid-term rewrite: Rewrites the remainder of an existing policy term
The full term and new term policy rewrites are called flat rewrites.
With the system APIs, a policy rewrite transaction is preceded by a cancellation policy transaction. When canceling a
policy in preparation for a rewrite, the value provided for the cancellationReasonCode property must be either
flatrewrite or midtermrewrite, as described above. When rewriting the policy, the value provided for the
rewriteType property must be either rewriteFullTerm, rewriteNewTerm, or rewriteRemainderOfTerm, as
described above.
Rewrite transaction
The rewrite policy transaction can be executed on a canceled policy.
1. Initiate the rewrite policy transaction.
• Submit a POST request to the /policy/v1/policies/{policyId}/rewrite endpoint
• The request payload must contain a value for the rewriteType property. Acceptable values are
rewriteFullTerm, rewriteNewTerm, and rewriteRemainderOfTerm.
{
"data": {
"attributes": {
"rewriteType": {
"code": "RewriteFullTerm"
}
}
}
}
• The response payload contains the associated job, which is in Draft state. Use the job ID in subsequent calls.
2. Revise the job as needed, to reflect changes to the policy. (For more information on how to modify a policy
within the context of a job, see “Overview of modifying jobs” on page 241.)
3. Generate a quote.
Submit a business action POST to the /job/v1/jobs/{jobId}/quote endpoint.
4. Complete the policy transaction.
Submit a business action POST to the /job/v1/jobs/{jobId}/bind-and-issue endpoint.
{
"data": {
"attributes": {
"account": {
"id": "pc:102"
}
}
}
}
The response payload contains the associated job, which is in Draft state. Use the job ID in subsequent calls.
2. Revise the job as needed, to reflect changes to the policy.
3. Generate a quote.
Submit a business action POST to the /job/v1/jobs/{jobId}/quote endpoint.
4. Complete the policy transaction.
Submit a business action POST to the /job/v1/jobs/{jobId}/bind-and-issue endpoint.
The InsuranceSuite Cloud API is a set of RESTful system APIs that expose functionality in PolicyCenter so that caller
applications can request data from or initiate action within PolicyCenter.
The following topics discuss how caller applications can modify the contents of a policy within the context of a job.
This includes working with:
• Lines of business
• Coverables and coverages
• Modifiers
• Questions
• Exposures, exclusions, and conditions
• Synchronization and deferred validation
• Policy contacts
• Policy locations
• Job role assignment
• Product definition metadata
• Job PATCHes
A policy can be created or modified only through the context of a policy transaction. The different types of policy
transactions include the following:
• Submission (to create a new policy)
• Renewal (to create a new term for an existing policy)
• Policy change
• Cancellation
• Reinstatement
• Rewrite
In PolicyCenter, policy transactions are managed by instances of the Job data model entity. Similarly, in Cloud API,
policy transactions are managed by instances of the Job resource. Every job has an associated policy. The majority of
the work related to modifying a job lies in specifying the contents of the policy for the job.
Contents of a policy
The contents of a policy can be divided into two categories.
• LOB-specific
◦ The structure of these contents vary based on the associated lines of business.
◦ Developers work with these contents using LOB-specific endpoints, which must be generated by the developer.
• LOB-generic
◦ The structure of these contents remains the same, regardless of the associated lines of business.
◦ Developers work with these contents using LOB-generic endpoints, which are already present in the base
configuration.
The following table summarizes the contents of a policy and the sections of the documentation that discuss how to add
this type of contents to a job.
Content Type Definition Example from Personal LOB relationship More information
Auto
Line A set of information that Personal Auto Line LOB-specific “Lines” on page 245
is used to define a type
of product offered by an
insurer
Content Type Definition Example from Personal LOB relationship More information
Auto
Coverable A thing that is covered by Vehicle LOB-specific “Coverables and
the policy coverages” on page
249
Coverage For each coverable, a Collision coverage (for a LOB-specific “Coverables and
specific type of covered specific vehicle) coverages” on page
loss 249
Coverage term A value that further A deductible for a given LOB-specific “Coverables and
defines or limits the collision coverage coverages” on page
extent of a coverage 249
Modifier Information relevant to An "Anti-Lock Breaks" LOB-specific “Modifiers” on page
rating that is not modifier that provides a 265
necessarily tied to a discount for collision
specific coverable or coverage if the vehicle
coverage has anti-lock breaks
Question Information that can be The question "Has any LOB-specific “Questions” on page
used to pre-qualify an policy or coverage been 273
account or gather declined, canceled, or
additional information non-renewed during the
relevant to rating prior 3 years?" Saying
yes could disqualify the
account.
Exposure A thing that is not a Driver. This provides LOB-specific “Exposures,
coverable but gathers information about a exclusions, and
additional information to vehicle's drivers that can conditions” on page
help rate or process a affect pricing (such as 279
policy the driver's age), but
coverages are not
attached directly to any
driver.
Exclusion A limit to coverages that A "Custom Equipment" LOB-specific “Exposures,
defines circumstances exclusion, which exclusions, and
where the coverage does excludes coverage for conditions” on page
not apply damage done to 279
"aftermarket equipment
and modifications"
Condition A contractual obligation A condition stating that LOB-specific “Exposures,
of the insurance policy cancellation for non- exclusions, and
that are neither payment requires a 30- conditions” on page
coverages nor exclusions day notice (and not just a 279
10-day notice as
mandated in the
jurisdiction)
Policy contact An account contact The policy's primary LOB-generic “Policy contacts” on
associated with a policy insured person page 291
Policy location An account location The location where a LOB-generic “Policy locations” on
associated with a policy vehicle is garaged page 307
Lines of business
LOB-specific endpoints
Every line of business has its own set of information, such as its own coverables, its own coverages, and so on. When
you want to interact with this LOB-specific information, you must use endpoints specific to that LOB.
For example, the Personal Auto line of business for a given insurer might have the following endpoints:
• POST /jobs/{jobId}/lines/PersonalAutoLine/vehicles
• POST /jobs/{jobId}/lines/PersonalAutoLine/vehicles/{vehicleId}/coverages
• POST /jobs/{jobId}/lines/PersonalAutoLine/vehicles/{vehicleId}/drivers
• GET /jobs/{jobId}/lines/PersonalAutoLine/modifiers
The LOB-specific endpoints are discussed in later topics in this section.
LOB-specific endpoints are not present in the base configuration of Cloud API for PolicyCenter. These endpoints must
be generated by the insurer for each product. They reflect the structure of that product as defined by the insurer. The
examples in this topic all come from LOB-specific endpoints generated for the base configuration version of Personal
Auto.
• For general information on how to generate LOB-specific endpoints for any product, see the Cloud API Developer
Guide.
• For information on how to generate the endpoints for the base configuration Personal Auto product, see the Cloud
API Developer Guide.
LOB-generic endpoints
Most of the endpoints that advance a job's state are not specific to any LOB. This includes endpoints such as:
• POST /job/v1/jobs/{jobId}/quote
• POST /job/v1/jobs/{jobId}/bind-and-issue
These endpoints are discussed in the topics on each job type, such as the “Submissions” on page 193 topic.
There are also endpoints that work with objects available to all jobs, regardless of its LOB. This includes endpoints for
working with objects such as:
• Contacts
• Locations
Lines
A line is a set of LOB-specific resources owned by a job or policy.
For most types of resources, every resource has a unique ID. However, the value of a line instance's ID is set to the
LOB's identifier as specified in the product definition. For example, suppose there is a personal auto line whose
identifier is set to "PersonalAutoLine". This means that, for every personal auto job and policy, the ID of the line
resource is "PersonalAutoLine".
A line resource can have the following direct descendent children:
• Line-level coverages
• Coverables
• Other line-specific objects, such as exposures and exclusions (For example, a person auto line could include driver
exposures)
"attributes": {
"coverableJurisdiction": {
"code": "CA",
"name": "California"
},
"numAddInsured": 0,
"pattern": {
"displayName": "Personal Auto Line",
"id": "PersonalAutoLine"
},
"patternCode": "PersonalAutoLine"
},
Every job and every policy is associated with a specific type of product. A product is a type of policy offered by an
insurer. For example, an insurer may have a "Personal Auto" product that is used to create personal auto policies.
A line of business (LOB) is a set of information that is used to define a type of product offered by an insurer. For
example, "Personal Auto Line" is a line of business used to define the "Personal Auto" product.
Most products have a single line of business. For example, an insurer could offer a Commercial Property product that
consists of a single line of business - the "Commercial Property Line". For these types of products, the product and the
underlying LOB are often discussed interchangeably.
However, some products have multiple lines of business. For example, an insurer could offer a Commercial Package
product that consists of two lines of business, the "Commercial Property Line" and the "General Liability Line". Note
that these types of products are referred to as both multi-line products and package products.
Note that a given LOB could be:
• Used by only one product (which could be a single line or multi-line product)
• Used by multiple products (each of which could be a single line or multi-line product)
Overview of coverables
A coverable is something on a policy to which coverages are attached, such as a vehicle or a building.
• PATCH /jobs/{jobId}/lines/{lineId}
• DELETE /jobs/{jobId}/lines/{lineId}
For example, for a personal auto line, the endpoints might be:
• GET /jobs/{jobId}/lines/PersonalAutoLine
• PATCH /jobs/{jobId}/lines/PersonalAutoLine
• DELETE /jobs/{jobId}/lines/PersonalAutoLine
For information on how to generate LOB-specific endpoints, see the Cloud API Developer Guide. The examples in this
section of the documentation use endpoints from the base configuration Personal Auto product. For information on
how to generate these endpoints, see the Cloud API Developer Guide.
Hierarchical coverables
Some lines of business may define a hierarchy of parent and child coverables. For example, a Commercial Property
line may have building coverables, and within each building there could be equipment coverables. For this LOB, there
would be hierarchical endpoints for each coverable, such as the following POST endpoints:
• POST /jobs/{jobId}/lines/CommercialPropertyLine/locations/{locationId}/buildings
• POST /jobs/{jobId}/lines/CommercialPropertyLine/locations/{locationId}/buildings/
{buildingId}/equipment
Adding coverables
Coverables are added using the appropriate LOB-specific endpoints. The information that can and must be included in
the request will vary based on the coverable. Keep in mind that some values may not be required to create the
coverable but may be required later to quote or bind the job.
For the base configuration Personal Auto product, there are no required fields for creating a vehicle. However, the
following fields are required to quote the policy: costNew, licenseState, make, model, modelYear, vin. The
following request payload is an example of creating a vehicle with fields that will pass validation for quoting.
POST /job/v1/jobs/pc:4040/lines/PersonalAutoLine/vehicles
{
"data": {
"attributes": {
"costNew": {
"amount": "33000",
"currency": "usd"
},
"licenseState": {
"code": "CA"
},
"make": "Toyota",
"model": "Tercel",
"modelYear": 2010,
"vin": "459DEF32PO98Q1121"
}
}
}
Overview of coverages
A coverage is a specific type of loss covered on the policy. From a policy structure standpoint, there are two types of
coverages: line-level coverages and coverable-level coverages.
• GET /jobs/{jobId}/lines/PersonalAutoLine/coverages/{coverageId}
• PATCH /jobs/{jobId}/lines/PersonalAutoLine/coverages/{coverageId}
• DELETE /jobs/{jobId}/lines/PersonalAutoLine/coverages/{coverageId}
For example, for a personal auto line, the endpoints might be:
• GET /jobs/{jobId}/lines/PersonalAutoLine/vehicles/{vehicleId}/coverages
• POST /jobs/{jobId}/lines/PersonalAutoLine/vehicles/{vehicleId}/coverages
• GET /jobs/{jobId}/lines/PersonalAutoLine/vehicles/{vehicleId}/coverages/{coverageId}
• PATCH /jobs/{jobId}/lines/PersonalAutoLine/vehicles/{vehicleId}/coverages/{coverageId}
• DELETE /jobs/{jobId}/lines/PersonalAutoLine/vehicles/{vehicleId}/coverages/{coverageId}
Adding coverages
Automatically added coverages
For installed products, when a line or coverable is created, the PolicyCenter default behavior is to create all associated
coverages that meet the following criteria:
• They are available when the call is made.
• They have an existence type of "Required" or "Suggested".
For example, in the base configuration Personal Auto product, the PACollisionCov coverage is required on a vehicle.
Thus, whenever you create a vehicle, PolicyCenter automatically adds a PACollisionCov coverage to it (provided it is
available).
(For visualized products, no coverages are added automatically.)
Caller applications with sufficient authorization can disable this automatic creation of coverages and child objects. For
more information, see “Synchronization and deferred validation” on page 283.
POST /job/v1/jobs/pc:4040/lines/PersonalAutoLine/coverages
{
"data": {
"attributes": {
"pattern": {
"id": "PALiabilityCov"
}
}
}
}
POST /job/v1/jobs/pc:4040/lines/PersonalAutoLine/vehicles/103/coverages
{
"data": {
"attributes": {
"pattern": {
"id": "PACollisionCov"
}
}
}
}
Coverage terms
A coverage term is a value associated with a coverage that further defines the extent of the coverage. They are also
commonly referred to as "covterms". The most common examples of coverage terms are deductibles and limits, such
as:
• A $1000 deductible on collision coverage, which stipulates that if a vehicle is damaged by collision, the insured
must pay the first $1000 of repair.
• A $100,000 third-party injury liability limit, which stipulates that if the insured is responsible for injuries to a third
party, the coverage pays only up to $100,000.
A coverage can have zero, one, or many coverage terms. Each coverage term can be optional or required. Each
coverage term can have a default value.
{
"data": {
"attributes": {
"id": "<coverageId>",
"terms": {
"<covTermId>": {
"covTermType": "<value>",
"displayValue": "<value>",
"decimalValue": "<value>",
"booleanValue": <value>,
"choiceValue": {
"code": "<valueFromPreductDefinition>"
},
"dateValue": "<value>",
"directValue": "<value>",
"stringValue": "<value>",
"typekeyValue": {
"code": "<valueFromTypelist>"
},
}
}
},
Note that even though the covTerm schema has multiple ...Value fields, for a given covTerm only one of them will
have a value. The other ...Value fields will be null.
{
"data": {
"attributes": {
"id": "PARentalCov",
"terms": {
"PARental": {
"covTermType": "choice",
"displayValue": "30 days x 25/day",
"choiceValue": {
"code": "30/25"
}
}
}
},
...
POST /job/v1/jobs/pc:4040/lines/PersonalAutoLine/vehicles/103/coverages
{
"data": {
"attributes": {
"pattern": {
"id": "PARentalCov"
},
"terms": {
"PARental": {
"choiceValue": {
"code": "60/20"
}
}
}
}
}
}
Scheduled items
Sometimes, an account holder wants a policy to cover a specific item that has unusual value. There is a generic
coverage on the policy that could apply to the item. But because of the item's unusual value, it ought to be covered by
its own coverage. The insurer may require additional information, such as the item's value and how this value was
determined. The item's coverage may also require a deductible or limit that is outside the range of what is allowed by
the more generic coverage. These types of "unusual value" items appear on the policy in a list that is called a schedule.
Thus, the items themselves are called scheduled items.
For example, suppose that a homeowners line of business has a Personal Property coverage. This coverage covers
personal property in the home and has a limit of up to $10,000. It is intended for generic and easily replaceable items,
such as clothing, furniture, or appliances. Ray Newton has a homeowners policy with Personal Property coverage. But
he recently acquired a painting of a Dutch sailboat whose appraised value is $40,000. He wants this item covered by
the policy for its appraised value. Therefore, the painting is added to the policy as a scheduled item. Information about
the painting, its value, its appraisal method, and the limit of its coverage are included in the policy.
From a data perspective, a scheduled item is a child object of a coverage. But it is unlike other coverage children in that
it contains information normally associated with coverables (such as item type or item description) as well as
information normally associated with coverage terms (such as an item-specific deductible or limit).
The nature of scheduled items varies across LOBs. Similar scheduled items from different LOBs may have
significantly different definitions in their products. Some LOBs may not have any scheduled items. And in some cases,
an LOB from one source (such as an SBT-based LOB) may have them when that same LOB from a different source
(such as an APD-native version of that LOB) may not.
For example, suppose you have a homeowners product with dwelling coverables that can have coverages attached to
them. Some coverages can have scheduled items. The LOB endpoints for this product would include the following:
• GET /jobs/{jobId}/lines/HOPLine/coverage-parts/{coveragePartId}/dwellings/{dwellingId}/
coverages/{coverageId}/scheduled-items
• POST /jobs/{jobId}/lines/HOPLine/coverage-parts/{coveragePartId}/dwellings/{dwellingId}/
coverages/{coverageId}/scheduled-items
• GET /jobs/{jobId}/lines/HOPLine/coverage-parts/{coveragePartId}/dwellings/{dwellingId}/
coverages/{coverageId}/scheduled-items/{scheduledItemId}
• PATCH /jobs/{jobId}/lines/HOPLine/coverage-parts/{coveragePartId}/dwellings/{dwellingId}/
coverages/{coverageId}/scheduled-items/{scheduledItemId}
• DELETE /jobs/{jobId}/lines/HOPLine/coverage-parts/{coveragePartId}/dwellings/{dwellingId}/
coverages/{coverageId}/scheduled-items/{scheduledItemId}
{
"data": {
"attributes": {
"id": ...,
"properties": ...
}
}
}
The properties field is a map. Every member of the map is a scheduled item property whose name is a
ScheduledItemPropertyPattern (such as "Description"). The property is set to a JSON object that specifies the
property's value, such as "Painting: Dutch sailboat".
The ScheduledItemPropertyPattern must be a ScheduledItemPropertyPattern from the product definition for this
type of scheduled item. For example, suppose you have a scheduled item for the homeowners
HOPScheduledPersonalProperty coverage from the previous example. The following table identifies the
ScheduledItemPropertyPattern (and its data type) for each piece of information to specify about the scheduled item.
{
"data": {
"attributes": {
"properties": {
"Description":
...,
"HOPScheduledPersonalPropertyItemType":
...,
"DateOfAppraisal":
...,
"HOPScheduledPersonalPropertyItemAppraisedValue":
...
}
}
}
}
Each ScheduledItemPropertyPattern must be set to a JSON object that specifies the pattern's value, such as "Painting:
Dutch sailboat". The JSON object must contain one of the following "<X>value" fields:
• booleanValue
• choiceValue (for choice values defined in the product definition)
• dateOnlyValue
• dateTimeValue
• decimalValue
• integerValue
• locationValue (for values set to a Location)
• partyValue (for values set to an involved party, such as the insured)
• stringValue
• typekeyValue (for typecode values)
For each property, the "<X>value" field must correspond to the data type for the ScheduledItemPropertyPattern . For
example, if the ScheduledItemPropertyPattern specifies a string value (such as for Description), then the JSON object
must include the stringValue field. If the ScheduledItemPropertyPattern specifies a date value (such as for
DateOfAppraisal), then the JSON object must include the dateOnlyValue field.
Suppose you have a scheduled item from the previous JSON payload with the following values:
• Description: Painting: Dutch sailboat
• Property type: Fine art
• Date of appraisal: February 2, 2020
• Appraised value: $40,000
The payload for the properties map would look like this:
{
"data": {
"attributes": {
"properties": {
"Description": {
"stringValue": "Painting: Dutch sailboat"
},
"HOPScheduledPersonalPropertyItemType": {
"choiceValue": {
"code": "fine_arts"
}
},
"DateOfAppraisal": {
"dateOnlyValue": "2020-02-02"
},
"HOPScheduledPersonalPropertyItemAppraisedValue": {
"decimalValue": "40000"
}
}
}
}
For most of the "<X>value" fields, the value itself is specified in the JSON payload as a string. There are a few
exceptions:
• choiceValue and typekeyValue values are specified as JSON objects with a child code field
locationValue and partyValue values are specified as JSON objects with a child id value
{
"data": {
"attributes": {
"properties": {
"Description": {
"displayValue": "Painting: Dutch sailboat",
"stringValue": "Painting: Dutch sailboat",
"valueType": "string"
},
"HOPScheduledPersonalPropertyItemType": {
"choiceValue": {
"code": "fine_arts"
},
"displayValue": "Fine arts",
"valueType": "choice"
},
...
GET /job/v1/jobs/pc:505/lines/HOPLine/coverages/HOPScheduledPersonalProperty/scheduled-items
Response body
{
"count": 1,
"data": [
{
"attributes": {
"id": "101",
"properties": {
"Appraiser": {
"displayValue": "Cranleigh's Fine Arts",
"stringValue": "Cranleigh's Fine Arts",
"valueType": "string"
},
"DateOfAppraisal": {
"dateOnlyValue": "2020-02-02",
"displayValue": "Feb 2, 2020",
"valueType": "date"
},
"Description": {
"displayValue": "Painting: Dutch sailboat",
"stringValue": "Painting: Dutch sailboat",
"valueType": "string"
},
"HOPScheduledPersonalPropertyItemAppraisedValue": {
"decimalValue": "40000.0000",
"displayValue": "$40,000.00",
"valueType": "decimal"
},
"HOPScheduledPersonalPropertyItemLimit": {
"decimalValue": "40000.0000",
"displayValue": "$40,000.00",
"valueType": "decimal"
},
"HOPScheduledPersonalPropertyItemType": {
"choiceValue": {
"code": "fine_arts",
"name": "Fine Arts"
},
"displayValue": "Fine Arts",
"valueType": "choice"
},
"HOPScheduledPersonalPropertyItemValuation": {
"choiceValue": {
"code": "ACV",
"name": "Actual cash value"
},
"displayValue": "Actual cash value",
"valueType": "choice"
},
"SerialNo": {
"displayValue": "1",
"stringValue": "1",
"valueType": "string"
}
}
},
...
GET /productdefinition/v1/lines/HOPLine/coverages
If a coverage includes scheduled items, it has a scheduledItemProperties array. For example, the following is a
snippet of the product definition for the Scheduled Personal Property coverage.
{
"attributes": {
"clauseType": "coverage",
"description": "Scheduled Personal Property",
"id": "HOPScheduledPersonalProperty",
"name": "Scheduled Personal Property",
"scheduledItemProperties": [
<ScheduledItemPropertyPatterns are defined here>
]
This array contains every defined ScheduledItemPropertyPattern for the coverage. In most cases, the most relevant
fields are the id, name, and valueType.
{
"attributes": {
"clauseType": "coverage",
"description": "Scheduled Personal Property",
"id": "HOPScheduledPersonalProperty",
"name": "Scheduled Personal Property",
"scheduledItemProperties": [
{
"id": "Description",
"name": "Description",
"valueType": "shorttext"
},
{
"id": "SerialNo",
"name": "Serial No",
"valueType": "shorttext"
},
{
"id": "Appraiser",
"name": "Appraiser",
"valueType": "shorttext"
},
{
"id": "AppraisalInfo",
"name": "Appraisal Information",
"valueType": "shorttext"
},
{
"id": "DateOfAppraisal",
"name": "Date Of Appraisal",
"valueType": "dateonly"
},
{
"id": "HOPScheduledPersonalPropertyItemLimit",
"name": "Limit",
"valueType": "Decimal"
},
{
"id": "HOPScheduledPersonalPropertyItemAppraisedValue",
"name": "Appraised Value",
"valueType": "Decimal"
},
...
]
There is no single set of property values that are required for all scheduled items. Both the required and possible values
vary based on the structure of the line of business. In some cases, a scheduled item may have no required values.
As an example, suppose PolicyCenter requires the following values for a HOPScheduledPersonalProperty scheduled
item from the previous example: Description, HOPScheduledPersonalPropertyItemType. The following request
would create a minimal scheduled item of a 10-carat diamond appraised at $5000 for policy pc:505.
Command
POST /job/v1/jobs/pc:505/lines/HOPLine/coverages/HOPScheduledPersonalProperty/scheduled-items
Request body
{
"data": {
"attributes": {
"properties": {
"Description": {
"stringValue": "10-carat diamond",
},
"HOPScheduledPersonalPropertyItemType": {
"choiceValue": {
"code": "jewelry"
}
},
"HOPScheduledPersonalPropertyItemAppraisedValue": {
"decimalValue": "5000"
}
}
}
}
}
Coverage validation
Default validation for coverages
In most cases, PolicyCenter restricts the following behaviors:
• Coverages
◦ Cannot create an unavailable coverage
◦ Cannot delete a required coverage
• Coverage terms
◦ Cannot set the value for an unavailable coverage term
◦ Cannot set the value for a read-only coverage term
◦ Cannot set the value for a hidden coverage term
◦ Cannot set the value to an unavailable option or package
◦ Cannot set the value to an unavailable typekey
◦ Cannot set the value outside of the min/max range
Some of these behaviors may be the result of the submission becoming out of sync. In these cases, you can rectify the
situation by calling the appropriate /sync-coverages endpoint. For more information, see “Synchronization and
deferred validation” on page 283.
Deferring validation
For Cloud API, the default validation behavior is referred to as immediate validation. In this approach, validation is
provided with each call. A validation error in one call can prevent later calls from executing. This approach is
appropriate for caller application the build submissions interactively, such as those backing a user interface.
There is a second behavior called deferred validation. In this approach, validation takes place only once the caller
application has put the submission into what it believes to be a consistent state. This is an option for non-interactive
caller applications with sufficient authorization. This approach can simplify submission processing by preventing
validation checks when the submission is known to potentially be in an inconsistent state. This approach can also
reduce the need to determine if coverages need to be synchronized.
For more information on deferred validation, see “Synchronization and deferred validation” on page 283.
Modifiers
A modifier, also referred to as a rate modifier, is a value used by the rating engine to adjust the policy premium (or
some portion of it). There are multiple types of modifiers, many of which are specific to a jurisdiction. Modifiers can
be at the product level or the product line level. Modifiers added to a product affect ratings for all lines in that product.
Modifiers added to a product line affect only that line.
Guidewire provides endpoints for accessing modifiers at different levels.
• “Modifier product definitions”: Retrieve the modifiers defined for the installed products and product lines.
• “Line-level modifiers”: For a specific job, retrieve and set values on modifiers attached to the line, such as a
MultiPolicyDiscount modifier on a PersonalAutoLine.
• “Object-level modifiers”: For a specific job, retrieve and set values on modifiers attached to an object on a line,
such as a vehicle AntiLockBrakes discount on a PersonalAutoLine.
See "Quoting and rating overview" in the Application Guide for more information on rating.
Not all the modifier functionality available through these endpoints is currently supported in Advanced Product
Designer (APD). For example, APD does not support creation of modifiers under coverables, or split modifiers.
However, products built through other means might have these modifiers, and they can be retrieved with these
endpoints. For more information see APD Rate modifiers.
Modifiers 265
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Responses
Endpoint responses include a variety of information about the modifiers, including the modifier type:
"modifierDataType": {
"code": "boolean",
"name": "boolean"
},
Modifiers can be of type Boolean, date, rate, or typekey. If the modifier is a typekey, the response will also include the
name of the typelist:
"modifierDataType": {
"code": "typekey",
"name": "typekey"
},
…
"typeList": "ProfessionalDiscount"
For modifiers of type rate, rate factors are included in the response:
"modifierDataType": {
"code": "rate",
"name": "#notnull"
},
…
"rateFactors": [
{
"defaultMaximum": "0.05",
"defaultMinimum": "-0.05",
"id": "z0hi6ldfeujdpddo0f1hjou9r49",
"name": "#notnull",
"priority": 1,
"rateFactorType": {
"code": "Building",
"name": "#notnull"
}
},
The type is used to specify a value when the modifier is added to a job. See “Line-level and object-level modifiers” on
page 268 for more information.
If a modifier is a scheduled modifier, a value of true will be returned in the scheduledRate property:
"scheduleRate": true
See Rate modifiers for more information on scheduled and unscheduled rate modifiers.
Examples
This first example retrieves modifiers that apply to all lines for the CommercialPackage product.
Command
GET /productdefinition/v1/products/CommercialPackage/modifiers
Response
{
"data": [
{
"attributes": {
"defaultMaximum": "0.25",
"defaultMinimum": "-0.25",
"description": "#notnull",
"descriptionKey": "Product_CommercialPackage.Modifier_CPPIRPM.Description",
"displayJustification": true,
"displayRange": true,
"displayValueFinal": true,
"id": "CPPIRPM",
"modifierDataType": {
"code": "rate",
"name": "#notnull"
},
"name": "#notnull",
"nameKey": "Product_CommercialPackage.Modifier_CPPIRPM.Name",
266 Modifiers
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
"priority": -1,
"rateFactors": [
{
"defaultMaximum": "0.05",
"defaultMinimum": "-0.05",
"id": "z0hi6ldfeujdpddo0f1hjou9r49",
"name": "#notnull",
"priority": 1,
"rateFactorType": {
"code": "Building",
"name": "#notnull"
}
},
{
"defaultMaximum": "0.03",
"defaultMinimum": "-0.03",
"id": "zo8h89djdetef2d1nfvvjst1r3a",
"name": "#notnull",
"priority": 2,
"rateFactorType": {
"code": "Employees",
"name": "#notnull"
}
},
{
"defaultMaximum": "0.07",
"defaultMinimum": "-0.07",
"id": "zsrha43mufo20ahpqut8gs8mk4a",
"name": "#notnull",
"priority": 3,
"rateFactorType": {
"code": "Location",
"name": "#notnull"
}
},
{
"defaultMaximum": "0.08",
"defaultMinimum": "-0.08",
"id": "zuch6p28k1rjbf4n29m29fqbg69",
"name": "#notnull",
"priority": 4,
"rateFactorType": {
"code": "Management",
"name": "#notnull"
}
},
{
"defaultMaximum": "0.05",
"defaultMinimum": "-0.05",
"id": "zo0i2mgj33jnberjeomo2fcdd3a",
"name": "#notnull",
"priority": 5,
"rateFactorType": {
"code": "Premises",
"name": "#notnull"
}
},
{
"defaultMaximum": "0.02",
"defaultMinimum": "-0.02",
"id": "z91j6pugcp57188kedd1ko0e7d8",
"name": "#notnull",
"priority": 6,
"rateFactorType": {
"code": "Protection",
"name": "#notnull"
}
}
],
"scheduleRate": true
}
},
…
To retrieve the modifiers that apply to the HOPLine (which is a line under the HOPHomeowners product in the base
configuration), use the following command:
Command
GET /productdefinition/v1/lines/HOPLine/modifiers
Response
{
"data": [
Modifiers 267
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
{
"attributes": {
"description": "",
"descriptionKey": "PolicyLine_HOPLine.Modifier_HOPMultiPolicy.Description",
"id": "HOPMultiPolicy",
"modifierDataType": {
"code": "boolean",
"name": "boolean"
},
"name": "Multi Policy",
"nameKey": "PolicyLine_HOPLine.Modifier_HOPMultiPolicy.Name",
"priority": 100,
"referenceDateByType": {
"code": "PolicyTerm",
"name": "Policy Term"
}
}
},
…
],
You can also retrieve the modifiers for the coverables on a line. The following example retrieves the modifiers for the
HOPDwelling coverable on the HOPLine LOB.
Command
GET /productdefinition/v1/lines/HOPLine/coverables/HOPDwelling/modifiers
Response
{
"data": [
{
"attributes": {
"description": "",
"descriptionKey": "PolicyLine_HOPLine.Modifier_HOPMannedSecurity.Description",
"id": "HOPMannedSecurity",
"modifierDataType": {
"code": "boolean",
"name": "boolean"
},
"name": "Manned Security",
"nameKey": "PolicyLine_HOPLine.Modifier_HOPMannedSecurity.Name",
"priority": 200,
"referenceDateByType": {
"code": "PolicyTerm",
"name": "Policy Term"
}
}
},
…
Modifier endpoints
Every line has endpoints to get a collection of modifiers, and to get or modify a modifier element. These endpoints
follow these patterns:
• Line-level modifiers
◦ GET /jobs/{jobId}/lines/{lineId}/modifiers
◦ GET /jobs/{jobId}/lines/{lineId}/modifiers/{modifierId}
◦ PATCH /jobs/{jobId}/lines/{lineId}/modifiers/{modifierId}
• Object-level modifiers
◦ GET /jobs/{jobId}/lines/{lineId}/{objectName}/{objectNameId}/modifiers
◦ GET /jobs/{jobId}/lines/{lineId}/{objectName}/{objectNameId}/modifiers/{modifierId}
268 Modifiers
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
◦ PATCH /jobs/{jobId}/lines/{lineId}/{objectName}/{objectNameId}/modifiers/{modifierId}
For example, personal auto lines can have line-level modifiers and modifiers attached to vehicles. For a personal auto
line, the endpoints to work with modifiers might be:
• Line-level modifiers
◦ GET /jobs/{jobId}/lines/PersonalAutoLine/modifiers
◦ GET /jobs/{jobId}/lines/PersonalAutoLine/modifiers/{modifierId}
◦ PATCH /jobs/{jobId}/lines/PersonalAutoLine/modifiers/{modifierId}
• Object-level modifiers
◦ GET /jobs/{jobId}/lines/PersonalAutoLine/vehicles/{vehicleId}/modifiers
◦ GET /jobs/{jobId}/lines/PersonalAutoLine/vehicles/{vehicleId}/modifiers/{modifierId}
◦ PATCH /jobs/{jobId}/lines/PersonalAutoLine/vehicles/{vehicleId}/modifiers/{modifierId}
Creating modifiers
When a line or modifiable object is created, a set of modifier objects is automatically created. Thus, there are no
POST /modifiers or DELETE /modifiers endpoints.
You cannot specify defaults in the product definition. Modifiers might have built-in default values, depending on the
type:
• For Boolean modifiers, PolicyCenter defaults them value to false.
• For schedule rate modifiers, PolicyCenter defaults the rateOverride to $0.
• For all other modifiers, there are no default values.
Modifier values are always expressed as one of the following datatypes: Boolean, date, rate (decimal), or typekey.
"attributes": {
"id": "PAMultiPolicyDiscount",
"modifierType": {
"code": "<modifierTypeCode>"
},
"booleanModifier": <value>,
"dateModifier": "<value">,
"rateModifier": "<value>",
"typekeyModifier": {
"code": "<value>"
}
},
For any given modifier, the id and modifierType are always included in the response. If the modifier has been set to a
value, then the corresponding *Modifier property is also included. If the modifier is a typekey modifier, the typelist
that defines its values is specified in the product definition. If the modifier has not been set, the response has no
*Modifier property.
Modifiers 269
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Note that even though the Modifier schema has multiple *Modifier fields, for a given modifier only one of them will
have a value. The other *Modifier fields will be null.
For example, the following are modifiers for a Personal Auto vehicle. Note the following:
• The first modifier is a Boolean modifier and has been set to false.
• The second modifier is a typekey modifier and has been set to alarmonly. (Based on the product definition, this
modifier uses the AntiTheftType typelist.)
• The third modifier is also a typekey modifier, but its value has not been set.
{
"attributes": {
"id": "PAAntiLockBrakes",
"modifierType": {
"code": "boolean"
}
"booleanModifier": false,
}
},
{
"attributes": {
"id": "PAAntiTheft",
"modifierType": {
"code": "typekey"
},
"typekeyModifier": {
"code": "alarmonly"
}
}
},
{
"attributes": {
"id": "PAPassiveRestraint",
"modifierType": {
"code": "typekey",
"name": "typekey"
}
}
}
...
For example, the following call sets the value of the PAPassiveRestraint modifier on vehicle 505 to "Driver Side Only"
(code driver from the PassiveRestraintType typelist).
Command
PATCH /job/v1/jobs/pc:1111/lines/PersonalAutoLine/vehicles/505/modifiers/PAPassiveRestraint
Response
{
"data": {
"attributes": {
"typekeyModifier": {
"code": "driver"
}
}
}
}
270 Modifiers
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Modifier validation
Default validation for modifiers
In most cases, PolicyCenter does not allow the following behaviors:
• Setting the values for an unavailable modifier.
• Setting the value for the rateModifier field outside of the min/max range.
• Setting the value for rate factors on the modifier outside of the min/max range.
Some of these behaviors may occur as the result of a submission becoming out of sync. In these cases, you can rectify
the situation by calling the appropriate /sync-modifiers endpoint. For more information, see “Synchronization and
deferred validation” on page 283.
Deferring validation
For Cloud API, the default validation behavior is referred to as immediate validation. In this approach, validation is
provided with each call. A validation error in one call can prevent later calls from executing. This approach is
appropriate for caller applications that build submissions interactively, such as those backing a user interface.
There is a second behavior called deferred validation. In this approach, validation takes place only after the caller
application has put the submission into what it believes to be a consistent state. This is an option for non-interactive
caller applications with sufficient authorization. This approach can simplify submission processing by preventing
validation checks when the submission is known to potentially be in an inconsistent state. This approach can also
reduce the need to determine whether modifiers need to be synchronized.
For more information on deferred validation, see “Synchronization and deferred validation” on page 283.
Modifiers 271
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
272 Modifiers
chapter 27
Questions
Overview of questions
From an LOB perspective, a question is a prompt for information that can be used to pre-qualify an account holder or
obtain additional information for rating a policy.
Questions are grouped together into question sets. There are three elements of a product that a question set can be
associated with:
• The policy period
• The line
• A policy location
Questions 273
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
When a policy period, line, or policy location is created, a set of QuestionAnswers are created for any associated
questions as defined in the product definition. Each QuestionAnswer stores a question and its answer, if an answer has
been provided.
Answering questions
Use the following endpoints to retrieve all questions and their answers for a policy period, line, or policy location.
Structure of a QuestionAnswer
A QuestionAnswer is a resource that stores a single question for a job or policy and its answer, if any.
The datatype of a question's answer depends on the nature of the question itself. For example, "Is the driver legally
blind?" has a Boolean answer, but "What was the date of the most recent safety course completed?" has a datetime
answer.
To accommodate the varying datatype of an answer, a QuestionAnswer has a questionType property. This identifies
the datatype of the answer. It is set to one of the following: Boolean, Choice, Date, Integer, String.
There are also a set of datatype-specific ...Value properties: booleanValue, choiceValue, dateValue,
integerValue, textValue. For a given QuestionAnswer, the answer is stored in the ...Value property that
corresponds to the questionType. The ...Value properties that are not relevant are set to null.
274 Questions
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Some questions do not require an answer. If a question has no answer, there is still a QuestionAnswer for it, but all of
its ...Value properties are null.
There is also a displayValue property. This stores the question's answer, if any, converted to a string.
"<questionId>": {
"question": {
"displayName": "<displayText>"
"id": "<questionId>"
},
"questionType": {
"code": "<questionTypeCode>",
},
"displayValue": "<value>",
"booleanValue": <value>,
"choiceValue": {
"code": "<choiceValueCode",
},
"dateValue": "<value>",
"integerValue": <value>,
"textValue": "<value>",
},
For any given question, some values are always set and some values are always null. If a property has a null value, it is
not included in the response. The following table defines how each value is set.
Note that for any given question that has an answer, there are four values that are included:
• question (the question id)
• questionType (the datatype of the answer)
• displayValue (the answer, rendered as a string)
• The ...Value field corresponding to the questionType (the answer, rendered as its native datatype)
Even though the QuestionAnswer schema has multiple ...Value fields, for a given QuestionAnswer that has an
answer, only one of them has a value. The other ...Value fields are null. (If the question has no answer, all of
the ...Value fields are null.)
Questions 275
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
{
"data": {
"attributes": {
"answers": {
"MovingViolations2": {
"question": {
"displayName": "Any drivers with convictions for moving traffic violations within
the past 3 years? If 'Yes' please explain.",
"id": "MovingViolations2"
},
"questionType": {
"code": "Boolean"
},
"displayValue": "true",
"booleanValue": true
},
...
The second question, DriverNameConviction, is a string question. Its answer is "Driving without a license".
...
"DriverNameConviction": {
"question": {
"displayName": "Please provide the driver name and explain the conviction.",
"id": "DriverNameConviction"
},
"questionType": {
"code": "String"
},
"displayValue": "Driving without a license",
"textValue": "Driving without a license"
},
...
The third question, PACurrentlyInsured, is a choice question. Its answer is a question-specific code from the product
design (newdriver, which has a display value of "No - New driver").
...
"PACurrentlyInsured": {
"question": {
"displayName": "Is the applicant currently insured?",
"id": "PACurrentlyInsured"
},
"questionType": {
"code": "Choice"
},
"displayValue": "No - New Driver",
"choiceValue": {
"code": "newdriver",
"name": "No - New Driver"
}
},
...
The fourth question, CurrentSuspense, is a Boolean question. It has not been answered, so its displayValue and
booleanValue properties are null and therefore not included in the response.
...
"CurrentSuspense": {
"question": {
"displayName": "Is the applicant's license currently suspended, canceled, or revoked?",
"id": "CurrentSuspense"
},
"questionType": {
"code": "Boolean"
}
},
...
Specifying answers
To specify a question answer, use the following endpoints.
276 Questions
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
You can specify one or more answers. Each answer must have the following syntax:
"<questionId>": {
"booleanValue": <value>,
"choiceValue": {
"code": "<choiceValueCode",
},
"dateValue": "<value>",
"integerValue": <value>,
"textValue": "<value>",
},
You must provide the ...Value property whose type matches the question type, and no other ...Value property. For
example, to answer a Boolean question, you must specify booleanValue and only booleanValue.
The following is an example of providing two answers to the job in the previous example.
PATCH /job/v1/jobs/pc:1111/questions
{
"data": {
"attributes": {
"answers": {
"CurrentSuspense": {
"booleanValue": true
},
"PACurrentlyInsured": {
"choiceValue": {
"code": "notknown"
}
}
}
}
}
}
Question validation
Default validation for questions
In most cases, PolicyCenter restricts the following behavior:
• Cannot set the value for an unavailable Question
This behavior may be the result of the submission becoming out of sync. In these cases, you can rectify the situation by
calling the appropriate /sync-questions endpoint. For more information, see “Synchronization and deferred
validation” on page 283.
Deferring validation
For Cloud API, the default validation behavior is referred to as immediate validation. In this approach, validation is
provided with each call. A validation error in one call can prevent later calls from executing. This approach is
appropriate for caller application the build submissions interactively, such as those backing a user interface.
Questions 277
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
There is a second behavior called deferred validation. In this approach, validation takes place only once the caller
application has put the submission into what it believes to be a consistent state. This is an option for non-interactive
caller applications with sufficient authorization. This approach can simplify submission processing by preventing
validation checks when the submission is known to potentially be in an inconsistent state. This approach can also
reduce the need to determine if questions need to be synchronized.
For more information on deferred validation, see “Synchronization and deferred validation” on page 283.
278 Questions
chapter 28
Unlike coverables, coverages, modifiers, and questions, there is no data structure or behavior common to all exposures
or to all exclusions or to all conditions. Each type of object has different implications for the legal extent of the policy
or how it is rated. But from a technical perspective, they behave in a similar way.
The following request payload is an example of creating a driver for the vehicle in the previous example. The driver is
Bill Preston (pc:78) who drives the previously created Toyota Tercel (103) 100% of the time.
POST /job/v1/jobs/pc:4040/lines/PersonalAutoLine/vehicles/103/drivers
{
"data": {
"attributes": {
"percentageDriven": 100,
"policyDriver": {
"id": "pc:78"
}
}
}
}
POST /job/v1/jobs/pc:6788/lines/CommercialLiabilityLine/coverages/GLUndergroundResources
{
"data": {
"attributes": {
}
}
}
POST /job/v1/jobs/pc:6788/lines/CommercialLiabilityLine/coverages/GLUseOfExplosives
{
"data": {
"attributes": {
}
}
}
one another. Rather, the product definition defines logic that identifies how the state of one object can determine
whether another object must or must not exist.
This type of logic typically falls into two categories: availability logic and requiredness logic.
Availability logic identifies when a given object is available or unavailable, depending on the state of another object.
For example, a Personal Auto product for the US could have logic that states a "PIP - Oregon" coverage is available for
a vehicle only if the vehicle is garaged in Oregon. Thus:
• The coverage is available if the vehicle is in Oregon.
• The coverage is not available if the vehicle is not in Oregon.
Requiredness logic identifies when a given object is required, depending on the state of another object. For example, a
Personal Auto product could have logic that states if the value of a vehicle is over $50,000, then a "no drivers under the
age of 25" exclusion is required. Thus:
• The exclusion is required if the vehicle's value is over $50,000.
• The exclusion is not required if the vehicle's value is $50,000 or less.
Out-of-sync policies
When you create a policy through Cloud API, there is no requirement as to the order in which objects are created or
modified. As a result, the structure of a policy may become out-of-sync. An out-of-sync policy is a policy which has
objects or logic that are inconsistent with each other.
There are two primary ways in which a policy can become out-of-sync: inconsistency with availability logic, and
inconsistency with requiredness logic.
Endpoint behavior
When you execute a POST /sync-coverages, Cloud API:
• Adds missing available-and-required coverages, conditions, and exclusions
• Removes unavailable coverages, conditions, and exclusions
• Adds missing covterms to coverages, conditions, and exclusions
• Removes unavailable covterms from coverages, conditions, and exclusions
• Resets the value if a covterm has an unavailable option, unavailable package, or unavailable or retired typekey as its
current value. (The value is set to the default, or null if there is no default.)
If the data model entity for the coverable of exposure does not implement the SyncableAdapter interface, the /sync-
fields endpoints are not generated. This can occur in the following circumstances:
• In some releases prior to the current release, Cloud API did not add the SyncableAdapter interface to new
coverables and exposures. Thus, the code generation for those releases did not create /sync-fields endpoints.
(Regenerating the LOB-specific endpoints on the current release will most likely generate the /sync-fields
endpoints.)
• Lines of business that are not native to APD (such as base configuration LOBs or SBT lines) typically have
coverables and exposures that do not implement the SyncableAdapter interface. Therefore, LOB-specific
endpoints for these LOBs do not have /sync-fields endpoints.
Endpoint behavior
When you execute a POST /sync-fields, Cloud API:
• "Adds" missing available fields
• "Removes" unavailable fields
• Nulls out the value of any fields that have unavailable typekeys as their value
Endpoint behavior
When you execute a POST /sync-modifiers, Cloud API:
• Adds missing available modifiers
• Removes unavailable modifiers
• Updates the state on modifiers to make sure it matches the state of the parent entity
• Adds missing available rate factors to modifiers
• Removes unavailable rate factors from modifiers
Endpoint behavior
When you execute a POST /sync-questions, Cloud API:
• Adds answer entities to hold the answer for any missing available questions
• Removes answers for any unavailable questions
Deferring validation
During submission processing, PolicyCenter executes validation to ensure a submission meets all requirements. For
example, suppose an insurer has a rule stating that all Personal Auto vehicles must have collision coverage. As the
submission is being created, PolicyCenter identifies any vehicles without collision coverage and prevents further
processing until the coverage is added.
For Cloud API, this default validation behavior is referred to as immediate validation. In this approach, validation is
provided with each call. A validation error in one call can prevent later calls from executing. This approach is
appropriate for caller applications that build submissions interactively, such as those backing a user interface.
There is a second behavior called deferred validation. In this approach, validation takes place only after the caller
application has put the submission into what it believes to be a consistent state. This is an option for non-interactive
caller applications with sufficient authorization. This approach can simplify submission processing by preventing
validation checks when the submission is known to be in an inconsistent state.
POST /job/v1/jobs/pc:6066/lines/PersonalAutoLine/vehicles/103/coverages?deferValidation=true
You cannot defer validation when quoting a job. Validation is always executed when the job is quoted.
However, the query parameter may not entirely eliminate the need to call the /sync endpoints. For example, suppose
you are modifying a job using deferred validation. Initially, there is a coverage that is unavailable. Later, the state of the
job data causes the coverage to become available, and the coverage is required when it is available. Because validation
has been deferred, there is no indication that a required coverage is missing until you attempt to quote the job. Once the
quote fails validation, you will still need to call the appropriate /sync endpoint.
POST /job/v1/jobs/pc:6066/lines/PersonalAutoLine/vehicles
In contrast, the following call will also create the vehicle, but with no default coverages.
POST /job/v1/jobs/pc:6066/lines/PersonalAutoLine/vehicles?createDefaultCoverages=false
This query parameter does not have special permissions. Any caller that can access coverable endpoints can also use
this query parameter.
Policy contacts
Some policy contact roles are LOB-specific. For example, in the base configuration Personal Auto product, adding a
contact to a job's underlying policy using the POST /vehicle-drivers endpoint adds the "driver" role to the contact.
The behavior of LOB-specific roles is dependent on how the product is modeled.
The remainder of this topic discusses how to manage policy contacts and the LOB-agnostic policy contact roles.
{
"data": {
"attributes": {
"displayName": "Ray Newton",
"taxId": "***-**-6789"
}
}
}
For some callers, such as internal or external users, the masking of tax ID is appropriate as it protects personally
identifiable information. For other callers, such as services, this masking may cause a problem as the callers may
reference contacts internally using the tax ID.
There are two ways that the taxId field can be unmasked:
• You can configure the field so that it is always unmasked. For information on how to configure this, see the Cloud
API Developer Guide.
• You can grant the caller the restunmasktaxid system permission. Any caller who has a role with this permission
will get responses with unmasked tax IDs. For information on how to configure this, see the section on API role
special permissions in the Cloud API Developer Guide.
The preceding address information is required only if you’re not creating a contact with a linked address. See
“Linking policy contact addresses” on page 295 below for more information.
Use the following endpoint to add a new policy contact:
• POST /job/v1/jobs/{jobId}/contacts
For example:
Command
POST /job/v1/jobs/pc:101/contacts
Request Body
{
"data": {
"attributes": {
"contactSubtype": "Person",
"firstName": "Samantha",
"lastName": "Stewart",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
}
}
}
POST /job/v1/jobs/pc:5000/contacts
Request Body
{
"data": {
"attributes": {
"accountContact": {
"id": "pc:97"
}
}
}
}
• PATCH /job/v1/jobs/{jobId}/contacts
• DELETE /job/v1/jobs/{jobId}/contacts
PATCH /job/v1/jobs/pc:1001/contacts/pc:44
Request Body
{
"data": {
"attributes": {
"emailAddress1": "[email protected]"
}
}
}
Note that much of the information about an account contact and a policy contact are stored in the same data model
entity - the Contact entity. Therefore, when you PATCH a policy contact, changes to values stored in the Contact
entity will also be reflected in the account contact.
DELETE /job/v1/jobs/pc:1001/contacts/pc:44
◦ unlink: Updates the address only on the contact being updated. When an address is updated with this option
specified, that contact no longer has a linked address. This option removes the link, making this a stand-alone
address on the contact.
After an address has been linked, it includes the following property:
• isLinked: A Boolean value automatically set to true when an address is linked. When this value is true, updates to
the address must include the linkedAddressUpdateMode property.
The following example creates a new contact with a linked address. In this example, the contact is created with the
same address as the account holder. Here is the account holder information:
{
"data": {
"attributes": {
"accountContactRoles": [
{
"code": "NamedInsured",
"name": "NamedInsured"
}
],
...
"firstName": "Mike",
"id": "pc:577",
"lastName": "Sherman",
...
"primaryAddress": {
"CEDEX": "11",
"addressLine1": "2304 Market St.",
"addressLine2": "Floor 0000",
"addressLine3": "Developer Unit Habitation Cube #0000",
"addressType": {
"code": "business",
"name": "Business"
},
"city": "San Francisco",
"country": "US",
"county": "San Mateo",
"description": "Created by the Address Builder with code 0",
"displayName": "2304 Market St., Floor 0000, Developer Unit Habitation Cube #0000, San Francisco, CA
94114",
"id": "pc:123",
"postalCode": "94114",
"state": {
"code": "CA",
"name": "California"
}
},
...
}
Create the contact using the account holder contact id (pc:577) and address id (pc:123) in the request.
Command
POST /job/v1/jobs/pc:202/contacts
Request
{
"data": {
"attributes": {
"contactSubtype": "Person",
"firstName": "Samantha",
"lastName": "Stewart",
"primaryAddress": {
"linkedAddress": {
"addressId": "pc:123",
"contactId": "pc:577"
}
}
}
}
}
Response
{
"data": {
"attributes": {
...
"firstName": "Samantha",
"id": "pc:892",
"lastName": "Stewart",
...
"primaryAddress": {
"CEDEX": "11",
"addressLine1": "2304 Market St.",
"addressLine2": "Floor 0000",
"addressLine3": "Developer Unit Habitation Cube #0000",
"addressType": {
"code": "business",
"name": "Business"
},
"city": "San Francisco",
"country": "US",
"county": "San Mateo",
"description": "Created by the Address Builder with code 0",
"displayName": "2304 Market St., Floor 0000, Developer Unit Habitation Cube #0000, San Francisco, CA
94114",
"id": "pc:125",
"isLinked": true,
"postalCode": "94114",
"state": {
"code": "CA",
"name": "California"
}
}
},
...
}
The response shows that the contact has been created with a primaryAddress that is identical to the linked address.
Notice the isLinked property is set to true. If you also retrieve the contact to which you linked and view the address
you linked to, you’ll see that the primaryAddress has an isLinked value of true for that contact also.
Command
GET /account/v1/accounts/pc:202/contacts/pc:577
Response
{
"data": {
"attributes": {
...
"firstName": "Mike",
"id": "pc:577",
"lastName": "Sherman",
...
"primaryAddress": {
"CEDEX": "11",
"addressLine1": "2304 Market St.",
"addressLine2": "Floor 0000",
"addressLine3": "Developer Unit Habitation Cube #0000",
"addressType": {
"code": "business",
"name": "Business"
},
"city": "San Francisco",
"country": "US",
"county": "San Mateo",
"description": "Created by the Address Builder with code 0",
"displayName": "2304 Market St., Floor 0000, Developer Unit Habitation Cube #0000, San Francisco, CA
94114",
"id": "pc:123",
"isLinked": true,
"postalCode": "94114",
"state": {
"code": "CA",
"name": "California"
}
},
...
}
This next example updates the address for an existing contact that has a linked address. If a contact has a linked address
(isLinked is set to true), you must include a linkedAddressUpdateMode value to update the address.
Command
PATCH /job/v1/jobs/pc:202/contacts/pc:892
Request
{
"data": {
"attributes": {
"primaryAddress": {
"linkedAddressUpdateMode": "update",
"addressLine1": "1234 Main St",
"addressLine2": "Apt 2B",
"addressLine3": null
}
}
}
}
Response
{
"data": {
"attributes": {
...
"firstName": "Samantha",
"id": "pc:892",
"lastName": "Stewart",
...
"primaryAddress": {
"CEDEX": "11",
"addressLine1": "1234 Main St",
"addressLine2": "Apt 2B",
"addressType": {
"code": "business",
"name": "Business"
},
"city": "San Francisco",
"country": "US",
"county": "San Mateo",
"description": "Created by the Address Builder with code 0",
"displayName": "1234 Main St, Apt 2B, San Francisco, CA 94114",
"id": "pc:125",
"isLinked": true,
"postalCode": "94114",
"state": {
"code": "CA",
"name": "California"
}
}
},
...
}
Because we set the linkedAddressUpdateMode to update, the linked contact’s address has also been changed:
{
"data": {
"attributes": {
"firstName": "Mike",
"id": "pc:577",
"lastName": "Sherman",
...
"primaryAddress": {
"CEDEX": "11",
"addressLine1": "1234 Main St",
"addressLine2": "Apt 2B",
"addressType": {
"code": "business",
"name": "Business"
},
"city": "San Francisco",
"country": "US",
"county": "San Mateo",
"description": "Created by the Address Builder with code 0",
"displayName": "1234 Main St, Apt 2B, San Francisco, CA 94114",
"id": "pc:123",
"isLinked": true,
"postalCode": "94114",
"state": {
"code": "CA",
"name": "California"
}
},
...
}
For example, the following changes the primary named insured from Ray Newton to Helena Newton (test_pp:3):
PATCH /job/v1/jobs/pc:4477/change-primary-named-insured
{
"data": {
"attributes": {
"primaryNamedInsured": {
"id": "test_pp:3"
}
}
}
}
Request body
{
"data": {
"attributes": {
"secondaryNamedInsured": {
"id": "test_pp:4"
}
}
}
}
Optionally, you can include the relationship between the secondary primary named insured and the primary named
insured.
{
"data": {
"attributes": {
"secondaryNamedInsured": {
"id": "test_pp:4".
"relationship": "spouse"
}
}
}
}
GET /job/v1/jobs/pc:4477/additional-named-insured
{
"count": 1,
"data": [
{
"attributes": {
"accountContact": {
"displayName": "Helena Newton",
"id": "test_pp:3"
},
"id": "test_pp:707",
"relationship": "wife"
}
}
]
...
POST /job/v1/jobs/pc:4477/additional-named-insured
{
"data": {
"attributes": {
"accountContact": {
"id": "pc:4533"
},
"relationship": "sister"
}
}
}
PATCH /job/v1/jobs/pc:4477/additional-named-insured/309
{
"data": {
"attributes": {
"relationship": "roommate"
}
}
}
DELETE /job/v1/jobs/pc:4477/additional-named-insured/309
An additional named insured on a job or policy cannot be deleted while it is in use by a policy location. See “Location
named insureds” on page 304 for more information.
GET /job/v1/jobs/pc:4477/lines/BusinessAutoLine/additional-insureds
Response
{
"data": [
{
"attributes": {
"additionalInsuredType": {
"code": "LESSOR",
"name": "Lessor"
},
"contact": {
"displayName": "EverReady Rentals",
"id": "pc:1234",
"type": "PolicyContact",
…
},
"id": "1"
}
},
…
Before modifying the job, it must be in a Draft state. If the job has been quoted, you can revert its state to Draft
by running the following command:
POST /job/v1/jobs/{jobId}/make-draft
The request must include the following properties:
• additionalInsuredType: A typecode specifying the relationship of the contact.
• contact: The ID of an existing contact on the policy.
• additionalInformation: A string with additional information. This property is required only for insured types
that have been configured to accept additional information. If the insured type has not been configured for
additional information, this property is unavailable. See the note at the end of this section for more information.
For example, the following request adds the existing account contact pc:4533 as an additional insured of type Lessor to
job pc:4477 on the BusinessAutoLine line.
Command
POST /job/v1/jobs/pc:4477/lines/BusinessAutoLine/additional-insureds
Request
{
"data": {
"attributes": {
"additionalInsuredType": {
"code": "LESSOR"
},
"contact": {
"id": "pc:4533"
}
}
}
}
Note:
The additionalInformation property is never optional, it’s either required or it’s not available. Each
additional insured type is defined in the AddtionalInsuredType.XX.ttx typelist configuration file (with XX
being the code for the LOB, such as BA for the BusinessAutoLine). If additional information is required, there
will be a matching entry in the AdditionalInformationType.XX.ttx file.
PATCH /job/v1/jobs/pc:4477/lines/BusinessAutoLine/additional-insured/309
Request
{
"data": {
"attributes": {
"additionalInsuredType": {
"code": "VENDOR"
}
}
}
}
DELETE /job/v1/jobs/{jobId}/lines/{lineId}/additional-insured/{additionalInsuredId}
Creating an association
To create an association between a contact and a policy location, use the following command:
• POST /job/v1/jobs/{jobId}/locations/{locationId}/named-insureds
The following restrictions apply to creating an association between a contact and a policy location:
• The contact and the location must already exist on the job or policy to associate them. You cannot use these
endpoints to create either a contact or a policy location. (See “Policy contacts” on page 291 and “Creating policy
locations” on page 308 for creating policy contacts and locations.)
• The contact cannot be the primary or secondary named insured on the policy.
• You cannot create an association on a bound or quoted policy job. The job must be in draft status.
If the contact does not have the role of additional named insured on the policy, associating it with the policy location
will give it that role.
The following example associates contact pc:200 with location 101 on job pc:50:
Command
POST /job/v1/jobs/pc:50/locations/101/named-insureds
Request
{
"data": {
"attributes": {
"contact": {
"id": "pc:200"
}
}
}
}
• GET /job/v1/jobs/{jobId}/locations/{locationId}/named-insureds
• GET /job/v1/jobs/{jobId}/locations/{locationId}/named-insureds/{locationNamedInsuredId}
• GET /policy/v1/policies/{policyId}/locations/{locationId}/named-insureds
• GET /policy/v1/policies/{policyId}/locations/{locationId}/named-insureds/
{locationNamedInsuredId}
The following example retrieves all location named insureds for location 101 on job pc:50.
Command
GET /job/v1/jobs/pc:50/locations/101/named-insureds
Response
{
"data": [
{
"attributes": {
"contact": {
"displayName": "Mike Sherman",
"id": "pc:201",
"type": "PolicyContact",
"uri": "/job/v1/jobs/pc:50/contacts/pc:200"
},
"id": "1"
},
This example retrieves the location named insureds from policy pc:123 for location 101.
Command
GET /policy/v1/policies/pc:123/locations/101/named-insureds
Response
{
"data": [
{
"attributes": {
"contact": {
"displayName": "Mike Sherman",
"id": "pc:200",
"type": "PolicyContact",
"uri": "/policy/v1/policies/pc:123/contacts/pc:200"
},
"id": "1"
},
Policy locations
POST /job/v1/jobs/pc:25/locations
{
"data": {
"attributes": {
"accountLocation": {
"id": "pc:881"
}
}
}
}
To create a policy location by specifying a new PolicyLocation, the POST specifies information about the new
location. The required information for a location varies based on the locale. For example, for US locations, the
minimum amount of information you must specify is:
• addressLine1
• city
• state
• postalCode
Whenever you specify a new location, PolicyCenter:
• Creates a new AccountLocation
• Creates a PolicyLocation that is linked to the new account location
For example, the following specifies a new policy location for job pc:25.
POST /job/v1/jobs/pc:25/locations
{
"data": {
"attributes": {
"addressLine1": "1414 Ming Ave",
"city": "Bakersfield",
"state": {
"code": "CA"
},
"postalCode": "90604"
}
}
}
PATCH /job/v1/jobs/pc:25/locations/201
{
"data": {
"attributes": {
"addressLine2": "Suite 505"
}
}
}
DELETE /job/v1/jobs/pc:25/locations/201
Note that you cannot delete a location that is designated as the primary location. If you want to delete a primary
location, you must first PATCH the policy and designate some other location as the primary location.
This topic discusses how to assign users to jobs with specific roles on that job, such as "Underwriter".
"roles": [
{
"group": "<groupId>",
"role": {
"code": "<UserRolesCode>",
"name": "<UserRolesName>"
},
"user": "<userId>"
},
For example, the following roles array identifies Alice Applegate (pc:8) from the Los Angeles Branch UW group (pc:
55) as the Creator and Underwriter for the job.
"roles": [
{
"group": "pc:55",
"role": {
"code": "Creator",
"name": "Creator"
},
"user": "pc:8"
},
{
"group": "pc:55",
"role": {
"code": "Underwriter",
"name": "Underwriter"
},
"user": "pc:8"
}
]
{
"data": {
"attributes": {
"group": "<groupId>",
"role": {
"code": "<UserRolesCode>"
},
"user": "<userId>"
}
}
}
Each call consist of one role being assigned to a group and user. If that role was already assigned to another user, it is
reassigned to the specified user. Beyond that, other assignments on the job are not affected.
For example, the following assigns the role of Auditor to Betty Baker (pc:220) from Eastern Region Underwriting (pc:
1117) on job pc:9.
POST /job/v1/jobs/pc:9/user-roles/assign
{
"data": {
"attributes": {
"group": "pc:1117",
"role": {
"code": "Auditor"
},
"user": "pc:220"
}
}
}
• Adds the role of Auditor to Betty Baker (pc:220) from Eastern Region Underwriting (pc:1117).
• Unassigns the role of Customer Rep. (This is done by omitting it from the roles array.)
• Makes no changes to the Creator or Underwriter roles. (They are included in the roles array with their original
data.)
PATCH /job/v1/jobs/pc:9/user-roles
{
"data": {
"attributes": {
"group": "pc:1117",
"role": {
"code": "Auditor"
},
"user": "pc:220"
},
{
"group": "pc:55",
"role": {
"code": "Creator"
},
"user": "pc:8"
},
{
"group": "pc:55",
"role": {
"code": "Underwriter"
},
"user": "pc:8"
}
}
}
The Product Definition API supports a set of endpoints for querying audit schedule patterns, lines, products, and
reference code data. The endpoints return JSON representations of the product data models for the specified type.
• “Product definitions for audit schedule patterns” on page 315
• “Product definitions for lines” on page 317
• “Product definitions for products” on page 317
• “Product definitions for reference code data” on page 318
GET /productdefinition/v1/audit-schedule-patterns
Response
{
"data": [
{
"attributes": {
"auditMethod": {
"code": "Phone",
"name": "Phone"
},
"description": "",
"descriptionKey": "AuditSchedule_CancellationPhone.Description",
"dueBusinessDayAdjustment": {
"code": "NextBusinessDay",
"name": "Next Business Day"
},
"dueDelayAmount": 15,
"dueDelayDirection": {
"code": "After",
"name": "after"
},
"dueDelayUnit": {
"code": "CalendarDays",
"name": "Calendar Days"
},
"id": "CancellationPhone",
"initBusinessDayAdjustment": {
"code": "NextBusinessDay",
"name": "Next Business Day"
},
"initDelayAmount": 0,
"initDelayDirection": {
"code": "Before",
"name": "before"
},
"initDelayUnit": {
"code": "CalendarDays",
"name": "Calendar Days"
},
"isSeries": false,
"name": "Cancellation Audit by Phone",
"nameKey": "AuditSchedule_CancellationPhone.Name",
"type": {
"code": "FinalAudit",
"name": "Final Audit"
}
},
…
{
"attributes": {
"auditMethod": {
"code": "Voluntary",
"name": "Voluntary"
},
"calendarMonthRoundDate": 15,
"description": "",
"descriptionKey": "AuditSchedule_ReportCalendarMonthExclLast.Description",
"dueBusinessDayAdjustment": {
"code": "NextBusinessDay",
"name": "Next Business Day"
},
"dueDelayAmount": 15,
"dueDelayDirection": {
"code": "After",
"name": "after"
},
"dueDelayUnit": {
"code": "CalendarDays",
"name": "Calendar Days"
},
"excludeLastAuditPeriod": true,
"frequency": {
"code": "Monthly",
"name": "Monthly"
},
"id": "ReportCalendarMonthExclLast",
"initBusinessDayAdjustment": {
"code": "NextBusinessDay",
"name": "Next Business Day"
},
"initDelayAmount": 5,
"initDelayDirection": {
"code": "Before",
"name": "before"
},
"initDelayUnit": {
"code": "CalendarDays",
"name": "Calendar Days"
},
"intervalComputationType": {
"code": "CalendarMonth",
"name": "Calendar Month"
},
"isSeries": true,
"minimumAuditPeriodLength": 15,
"name": "Monthly Reports by calendar month, exclude last month",
"nameKey": "AuditSchedule_ReportCalendarMonthExclLast.Name",
"paymentPlanCode": "ReportingPlanId",
"reportingDefaultDepositPct": "10",
"type": {
"code": "PremiumReport",
"name": "Premium Report"
}
},
• POST /productdefinition/v1/lines/{lineId}/activate-edition
See Cloud API Developer Guide for more information on this endpoint.
Products endpoints
The /productdefinition/v1/products/* endpoints can be used to query products and their associated lines, questions,
modifiers, and editions. Use the following endpoints to retrieve the data models for each product type:
• GET /productdefinition/v1/products
• GET /productdefinition/v1/products/{productId}
• GET /productdefinition/v1/products/{productId}/editions
• GET /productdefinition/v1/products/{productId}/modifiers
• GET /productdefinition/v1/products/{productId}/lines
• GET /productdefinition/v1/products/{productId}/questions
Product editions
You can retrieve summary information for all editions of a product by using the following endpoint:
• GET /productdefinition/v1/products/{productId}/editions
For example, to retrieve the edition codes for the PersonalAuto product, use the following command:
Command
GET /productdefinition/v1/products/PersonalAuto/editions
Response
{
"data": [
{
"attributes": {
"code": "BaseEdition",
"description": "Base Product",
"id": "BaseEdition",
"name": "Base Product"
}
}
PATCHing jobs
This topic discusses changes you can make to a job directly on the Job resource.
Read-only fields
Once a job has been created, some fields are read-only and cannot be changed. This includes the following fields:
• account
• createdDate
• id
• jobNumber
• jobStatus
• jobType
• organization and organizationOfService
• periodStart and periodEnd
• producerCode
• quoteType
Note that organization, producerCode, and organizationOfService can be modified indirectly by changing the
job's producerCodeofService. For more information, see “Policy producers” on page 170.
PATCH /job/v1/jobs/pc:4477
{
"data": {
"attributes": {
"baseState": {
"code": "WA"
},
"termType": {
"code": "Annual"
},
"uwCompany": {
"id": "uwc:1"
}
}
}
}
PATCH /job/v1/jobs/pc:4477/change-effective-date
{
"data": {
"attributes": {
"jobEffectiveDate": "2024-01-01"
}
}
}
To change the primary insured, use the POST /jobs/{jobId}/change-primary-named-insured endpoint. The
POST requires a body with a primaryNamedInsured property whose ID is set to the ID of another contact on the
account.
For example, the following changes the primary named insured from Ray Newton to Helena Newton (test_pp:3):
PATCH /job/v1/jobs/pc:4477/change-primary-named-insured
{
"data": {
"attributes": {
"primaryNamedInsured": {
"id": "test_pp:3"
}
}
}
}
Versions are used for quoting multi-version policies. For information on how to change the selected version of a job,
see “Multi-version quoting” on page 381.
The InsuranceSuite Cloud API is a set of RESTful system APIs that expose functionality in PolicyCenter so that caller
applications can request data from or initiate action within PolicyCenter.
The following topics discuss how caller applications can use PolicyCenter functionality that supports multiple types of
jobs. This includes:
• “Affinity groups”
• “Archiving”
• “Contingencies”
• “Form patterns”
• “Job searches”
• “Out-of-sequence conflicts”
• “Policy compare”
• “Policy holds”
• “Quoting” (including multi-version quoting and cost overrides)
• “Reinsurance risks”
• “Streamlined account and submission creation”
• “Underwriting issues”
Affinity groups
The following topic covers how affinity groups can be managed through Cloud API.
GET /admin/v1/affinity-groups/pc:707
{
"data": {
"attributes": {
"affinityGroupType": {
"code": "Open",
"name": "Open"
},
"id": "pc:707",
"jurisdictions": [
{
"code": "CA",
"name": "California"
}
],
"name": "West Coast WC Affinity Group",
"primaryContactFirstName": "Rochelle",
"primaryContactLastName": "Nwodim",
"primaryContactPhone": {
"countryCode": {
"code": "US",
"name": "United States (1)"
}
},
"products": [
"WorkersComp"
],
"startDate": "2020-09-09T00:00:00.000Z"
},
....
POST /admin/v1/affinity-groups
{
"data": {
"attributes": {
"affinityGroupType": {
"code": "Open"
},
"name": "Cloud API Affinity Group 1"
}
}
}
POST /admin/v1/affinity-groups
{
"data": {
"attributes": {
"affinityGroupType": {
"code": "Closed"
},
"jurisdictions": [
{
"code": "NY"
}
],
"name": "Cloud API Affinity Group 2",
"organization": {
"id": "pc:5"
},
"primaryContactFirstName": "Elizabeth",
"primaryContactLastName": "Madison",
"products": [
"WorkersComp"
],
"startDate": "2022-10-18T00:00:00.000Z"
}
}
}
PATCH /admin/v1/affinity-groups/pc:707
{
"data": {
"attributes": {
"description": "Affinity group for WC policies in the Western region"
}
}
}
GET /admin/v1/affinity-groups/pc:909
{
"count": 2,
"data": [
{
"attributes": {
"id": "pc:6",
"producerCode": {
"displayName": "100-002541",
"id": "pc:6"
}
},
...
},
{
"attributes": {
"id": "pc:7",
"producerCode": {
"displayName": "501-002542",
"id": "pc:7"
}
},
...
}
}
],
...
}
POST /admin/v1/affinity-groups/pc:909/producer-codes
{
"data": {
"attributes": {
"producerCode": {
"id": "pc:8"
}
}
}
}
A closed affinity group can have multiple producer codes. However, each POST can associate only one producer code
with the affinity group.
DELETE /admin/v1/affinity-groups/pc:909/producer-codes/pc:8
Comparing jobs
PolicyCenter supports the ability to compare different jobs for the same policy so that you can see how each job is
modifying the base policy.
• You can compare an unbound job to the policy it is based on.
• You can compare jobs for the same policy.
You can also compare jobs through Cloud API.
The organization of LOB-specific information shown on this tab is determined by an LOB-specific "DiffTree" XML
file. For example, the organization of information for Personal Auto policies is defined in the PADiffTree.XML file. For
more information on DiffTree XML files and how to configure them, see the Configuration Guide.
◦ Hierarchical information about the differences between the bound policy and the current job
Within the diffTree section, some of the information may be LOB-agnostic. For example, there could be diffTree
sections for "Policy Info" (changes at the policy level) or "Line Coverages". Other information may be LOB-specific.
This information is defined by the DiffTree XML file for the line of business. For example, for a Personal Auto policy,
there could be a diffTree section for "Vehicles".
Every node in the diffTree has a changeType field, which can have one of four values:
• Add - The node defines an entity not present on the policy that is being added by the job.
• Remove - The node defines an entity present on the policy that is being removed by the job.
• Change - The node defines a field whose value is being changed by the job.
• Window - The node defines an entity whose effective window is being changed.
In the base configuration, changes of type Add, Remove, and Change can be made through the user interface and can be
done for any type of job. Changes of type Window cannot be made through the user interface (though they can be made
through Gosu), and can only be done for certain types of jobs, such as General Liability and Worker's Compensation.
"attributes": {
"basedOnJob": {
...
},
"diffTree": {
"children": [
{
"children": [
...
],
"label": "Policy Info"
},
{
"children": [
...
],
"label": "Vehicles"
},
{
"children": [
...
],
"label": "Line Coverages"
},
],
"label": "Difference Tree Root"
}
}
The first part of the response provides information about the original job that the current job is based on.
The second part of the response is the diffTree.
"basedOnJob": {
"displayName": "47586734721",
"id": "pc:818",
"type": "Job",
"uri": "/job/v1/jobs/pc:818"
},
"children": [
{
"changeType": "Change",
"entity": {
"displayName": "P000143542, 04/23/2022, 10/23/2022, 0003800396",
"id": "pc:S7YjIyCbFh-UcbMSCMlrZ",
"type": "Job",
"uri": "/job/v1/jobs/pc:S7YjIyCbFh-UcbMSCMlrZ"
},
"field": "writtenDate",
"label": "Written Date",
"value1": "05/23/2022",
"value2": "05/25/2022"
}
],
"label": "Policy Info"
In this example, value1 identifies the effective date of the underlying policy (05/23/2022) and value2 identifies the
effective date of the policy change (05/25/2022).
{
"children": [
{
"changeType": "Add",
"children": [
{
"children": [
{
"changeType": "Add",
"entity": {
"displayName": "Collision",
"id": "38"
},
"label": "Collision"
},
...
],
"label": "Coverages"
},
{
"children": [
{
"changeType": "Add",
"entity": {
"displayName": "Anti Theft Discount (California)",
"id": "57"
},
"label": "Anti Theft Discount (California)"
},
...
],
"label": "Modifiers"
},
{
"changeType": "Add",
"entity": {
"displayName": "Ray Newton",
"id": "11"
},
The Vehicles section continues with the vehicle being removed (the 2005 Buick LaCrosse). The changeType fields
are set to Remove.
{
"changeType": "Remove",
"children": [
{
"children": [
{
"changeType": "Remove",
"entity": {
"displayName": "Collision",
"id": "4"
},
"label": "Collision"
},
...
],
"label": "Coverages"
},
{
"children": [
{
"changeType": "Remove",
"entity": {
"displayName": "Anti Theft Discount (California)",
"id": "6"
},
"label": "Anti Theft Discount (California)"
},
...
],
"label": "Modifiers"
},
{
"changeType": "Remove",
"entity": {
"displayName": "Ray Newton",
"id": "2"
},
"label": "Assigned Driver: Ray Newton"
}
],
"entity": {
"displayName": "2005 Buick LaCrosse in California",
"id": "2"
},
"label": "2005 Buick LaCrosse in California"
}
],
"label": "Vehicles"
},
{
"children": [
{
"children": [
{
"changeType": "Remove",
"entity": {
"displayName": "Mexico Coverage - Limited",
"id": "5"
},
"label": "Mexico Coverage - Limited Coverage"
}
],
{
"data": {
"attributes": {
"job1": {
"id": "<id-of-first-job>"
},
"job2": {
"id": "<id-of-second-job>"
}
}
}
}
The /compare-jobs endpoint returns a CompareJobAttributes resource. For this endpoint, the resource details the
differences that job2 introduces assuming that job1 has been bound.
• The diffTree section may have information that is LOB-agnostic (such as "Policy Info" or "Line Coverages")
and/or information that is LOB-specific (such as "Vehicles").
• Every node in the diffTree has a changeType field, which can have one of four values:
◦ Add - The node defines an entity not present in the policy or the first job that is being added by the second job.
◦ Remove - The node defines an entity present in the policy or the first job that is being removed by the second
job.
◦ Change - The node defines a field whose value is either in the policy or is being set by the first job and is then
being changed by the second job.
◦ Window - The node defines an entity whose effective window is being changed.
• In the base configuration, changes of type Add, Remove, and Change can be made through the user interface and can
be done for any type of job. Changes of type Window cannot be made through the user interface (though they can be
made through Cloud API), and can only be done for certain types of jobs, such as General Liability and Worker's
Compensation.
POST /policy/v1/policies/pc:202/compare-jobs
{
"data": {
"attributes": {
"job1": {
"id": "pc:addSienna"
},
"job2": {
"id": "pc:removeLaCrosse"
}
}
}
}
The output defines all changes present either in the policy or the first job that are not present in the second job. This
means:
• The Mazda Rx-8 and its driver are not referenced. (Neither job affects this vehicle.)
• The Buick LaCrosse and its driver will be marked as removed. (The second job is removing this vehicle.)
• The Toyota Sienna and its driver will also be marked as removed. (This is added by the first job, but not referenced
in the second job. Therefore, from the second job's perspective, this vehicle is not on the policy.)
The following is a snippet of the response:
{
"data": {
"attributes": {
"diffTree": {
"children": [
{
"children": [
{
"changeType": "Remove",
"children": [
{
"changeType": "Remove",
"entity": {
"displayName": "Ray Newton",
"id": "14"
},
"label": "Assigned Driver: Ray Newton"
}
],
"entity": {
"displayName": "2002 Toyota Sienna in California",
"id": "22"
},
"label": "2002 Toyota Sienna in California"
},
{
"changeType": "Remove",
"children": [
{
"changeType": "Remove",
"entity": {
"displayName": "Ray Newton",
"id": "2"
},
"label": "Assigned Driver: Ray Newton"
}
],
"entity": {
"displayName": "2005 Buick LaCrosse in California",
"id": "2"
},
"label": "2005 Buick LaCrosse in California"
}
],
"label": "Vehicles"
}
],
"label": "Difference Tree Root"
},
"job1": {
"job": {
"displayName": "0003903670",
"id": "pc:addSienna"
},
"jobEffectiveDate": "2022-07-21T00:01:00.000Z",
"jobNumber": "0003903670",
"jobStatus": {
"code": "Draft",
"name": "Draft"
},
"jobType": {
"code": "PolicyChange",
"name": "Policy Change"
}
},
"job2": {
"job": {
"displayName": "0004002589",
"id": "pc:removeLaCrosse"
},
"jobEffectiveDate": "2022-07-21T00:01:00.000Z",
"jobNumber": "0004002589",
"jobStatus": {
"code": "Draft",
"name": "Draft"
},
"jobType": {
"code": "PolicyChange",
"name": "Policy Change"
}
}
}
}
}
POST /policy/v1/policies/pc:202/compare-jobs
{
"data": {
"attributes": {
"job1": {
"id": "pc:removeLaCrosse"
},
"job2": {
"id": "pc:addSienna"
}
}
}
}
The output still defines all changes present either in the policy or the first job that are not present in the second job.
With the jobs listed in this order:
• The Mazda Rx-8 and its driver are not referenced. (Neither job affects this vehicle.)
• The Buick LaCrosse and its driver will be marked as added. (The second job (pc:addSienna) is adding this vehicle.)
• The Toyota Sienna and its driver will also be marked as added. (This is removed by the first job
(pc:removeLaCrosse), but is not referenced in the second job. Therefore, from the second job's perspective, this
vehicle is still on the policy.)
The following is a snippet of the response:
{
"data": {
"attributes": {
"diffTree": {
"children": [
{
"children": [
{
"changeType": "Add",
"children": [
{
"changeType": "Add",
"entity": {
"displayName": "Ray Newton"
},
"label": "Assigned Driver: Ray Newton"
}
],
"entity": {
"displayName": "2002 Toyota Sienna in California",
"id": "22"
},
"label": "2002 Toyota Sienna in California"
},
{
"changeType": "Add",
"children": [
{
"changeType": "Add",
"entity": {
"displayName": "Ray Newton"
},
"label": "Assigned Driver: Ray Newton"
}
],
"entity": {
"displayName": "2005 Buick LaCrosse in California",
"id": "2"
},
"label": "2005 Buick LaCrosse in California"
}
],
"label": "Vehicles"
}
],
"label": "Difference Tree Root"
},
"job1": {
"job": {
"displayName": "0004002589",
"id": "pc:removeLaCrosse"
}
...
},
"job2": {
"job": {
"displayName": "0003903670",
"id": "pc:addSienna"
}
...
}
}
}
}
Contingencies
In some situations, an insurer may need to identify that a job that is in progress has an issue to resolve, but it might be
appropriate to resolve the issue after the job is bound. Similarly, an insurer may need to identify that a policy has an
issue to resolve, even though there are no active jobs on the policy. For example, the rating for a personal auto
submission may include a good driver discount that requires a report on the driver's driving history. The insurer could
choose to bind the policy before the driving history has been received.
When situations like this occur, these outstanding issues can be managed through contingencies. A contingency is an
object that identifies an issue affecting a job or policy that must be resolved by a particular date. Depending on the
outcome, the insurer may opt to change or cancel the policy. Contingencies can have associated activities, documents,
and notes.
For more information on the business functionality of contingencies, refer to the Application Guide.
Cloud API provides a set of endpoints for managing contingencies. These endpoints exist in both the Job API and the
Policy API.
Endpoint Description
GET /jobs/{jobId}/contingencies Retrieve all contingencies for the given job
GET /jobs/{jobId}/contingencies/{contingencyId} Retrieve the given job contingency
GET /policies/{policyId}/contingencies Retrieve all contingencies for the given policy
GET /policies/{policyId}/contingencies/{contingencyId} Retrieve the given policy contingency
There is a single schema for contingencies. It is used by both contingencies associated with jobs and contingencies
associated 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",
Contingencies 339
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Endpoint Description
GET /jobs/{jobId}/contingencies/{contingencyId} Retrieve the given activity associated with the given contingency
/activities on the given job
GET /jobs/{jobId}/contingencies/{contingencyId} Retrieve the given document associated with the given
/documents contingency on the given job
GET /jobs/{jobId}/contingencies/{contingencyId} Retrieve the given note associated with the given contingency on
/notes the given job
Endpoint Description
GET /policies/{policyId}/contingencies/ Retrieve the given activity associated with the given contingency
{contingencyId}/activities on the given policy
GET /policies/{policyId}/contingencies/ Retrieve the given document associated with the given
{contingencyId}/documents contingency on the given policy
GET /policies/{policyId}/contingencies/ Retrieve the given note associated with the given contingency on
{contingencyId}/notes the given policy
For more information on working with activities, documents, or notes, see the following:
• “Activities” on page 421
• “Documents” on page 429
• “Notes” on page 437
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
340 Contingencies
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
• A title
• A description
• A dueDate
• An action, which must be set to a typecode from the ContingencyAction 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"
}
}
}
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} Create a document associated with the given contingency on
/documents the given job
POST /jobs/{jobId}/contingencies/{contingencyId} Create a note associated with the given contingency on the
/notes given job
Endpoint Description
POST /policies/{policyId}/contingencies/ Create an activity associated with the given contingency on the
{contingencyId}/activities given policy
POST /policies/{policyId}/contingencies/ Create a document associated with the given contingency on the
{contingencyId}/documents given policy
POST /policies/{policyId}/contingencies/ Create a note associated with the given contingency on the given
{contingencyId}/notes 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:
• “Activities” on page 421
• “Documents” on page 429
• “Notes” on page 437
Contingencies 341
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Closing contingencies
Initially, the status of each contingency is set to "Pending". While the status is pending, the contingency is considered
to be open.
A contingency can be closed either by resolving it or by waiving it. You can both resolve and waive contingencies
through Cloud API. Except for the endpoint paths and the final status of the contingency, the behaviors of the two
operations are the same.
Resolving contingencies
To resolve a contingency, use one of the following endpoints as appropriate:
• POST /jobs/{jobId}/contingencies/{contingencyId}/resolve
• POST /policies/{policyId}/contingencies/{contingencyId}/resolve
The /resolve endpoints do not require a request body.
When you resolve a contingency:
• status is set to "Resolved".
• closedDate is set to the current time.
• closedUser is set to the API call's session user.
For more information on how the session user is determined, see the Cloud API Developer Guide.
Waiving contingencies
To waive a contingency, use one of the following endpoints as appropriate:
• POST /jobs/{jobId}/contingencies/{contingencyId}/waive
• POST /policies/{policyId}/contingencies/{contingencyId}/waive
The /waive endpoints do not require a request body.
When you waive a contingency:
• status is set to "Waived".
• closedDate is set to the current time.
• closedUser is set to the API call's session user.
For more information on how the session user is determined, see the Cloud API Developer Guide.
342 Contingencies
chapter 38
Form patterns
For the insured, the physical representation of an insurance policy is a collection of policy forms. Policy forms define
aspects of the policy such as coverages, exposures, exclusions, and government regulations. The forms themselves are
not stored in PolicyCenter; they’re stored in an external documentation management system and are typically accessed
through integration with an external forms printing service. PolicyCenter stores form patterns, a set of information used
to identify each form.
For detailed information on forms, see the Application Guide.
For more information on external forms printing service integration, see Plugins, Prebuilt Integrations, and SOAP
APIs.
The information retrieved by these endpoints includes everything located on all tabs of the Form Pattern
screen in the user interface except jurisdiction availability. See ““Form patterns lookups”” below for
information on retrieving jurisdiction availability. See Application Guide for user interface information.
The following retrieves all available form patterns:
Command
GET /admin/v1/form-patterns
Response
{
"data": [
{
"attributes": {
"code": "DecSheet",
"customFormInference": true,
"edition": "0100",
"endorsementNumbered": false,
"formNumber": "PA 00DS",
"id": "pc:101",
"inferenceTime": {
"code": "bind",
"name": "Bind Time"
},
"jobTypes": [
{
"code": "PolicyChange",
"name": "Policy Change"
},
{
"code": "Renewal",
"name": "Renewal"
},
{
"code": "Rewrite",
"name": "Rewrite"
},
{
"code": "Submission",
"name": "Submission"
}
],
"name": "Dec Sheet",
"policyLine": {
"displayName": "Personal Auto Line",
"id": "PersonalAutoLine"
},
"priority": 0,
"products": [
{
"displayName": "Personal Auto",
"id": "PersonalAuto"
}
],
"reissueOnChange": true,
"removalEndorsement": false
},
…
},
{
"attributes": {
"code": "FormCPP01",
"edition": "00 00",
"endorsementNumbered": true,
"formNumber": "CPP 01",
"genericFormInference": {
"code": "GenericAlwaysAddedForm",
"displayName": "No additional criteria"
},
"id": "pc:102",
"inferenceTime": {
"code": "quote",
"name": "Quote Time"
},
"jobTypes": [
{
"code": "PolicyChange",
"name": "Policy Change"
},
{
"code": "Renewal",
"name": "Renewal"
},
{
"code": "Rewrite",
"name": "Rewrite"
},
{
"code": "Submission",
"name": "Submission"
}
],
"name": "Commercial Package Policy Definition",
"priority": 1,
"products": [],
"reissueOnChange": false,
"removalEndorsement": false
},
…
code string The form pattern code. This value must be globally unique. PolicyCenter
uses this value to link the form to a form pattern. This value cannot
contain spaces.
edition string The form edition. PolicyCenter uses this value, in conjunction with the
formNumber field, to indicate that two or more patterns are different
editions of the same form. Similar to formNumber, this is an arbitrary
string, but typically it is the edition used by the issuance system.
Note: If you add a new edition, you must also update the availability
dates of the old and new patterns. Merely setting the edition is not
sufficient.
endorsementNumbered Boolean True if this form must have an endorsement number assigned to it at
inference time.
The endorsement number indicates the order in which the form is added
to the policy. The insurer decides whether the form requires an
endorsement number.
Some insurers require an endorsement number for forms added after
issuing the policy. For example, a form added in a policy change could
require an endorsement number.
formNumber string The form number. This is an arbitrary string, but it typically is the form
number used by the issuance system. This field is the form label that
shows in the PolicyCenter user interface.
genericFormInference string The string must be the name of a class that implements the gw.forms.
GenericFormInference interface. Depending on the value, other
fields could be required. See “Form inference” on page 347 below for
more details.
Note: This property is not required if you’re using a custom inference
class. See “Form inference” on page 347 below for details.
inferenceTime FormInferenceTime Forms cannot be assigned directly to policies. They are applied
Typekey automatically at a specified stage of the policy creation process, such as
when the policy is quoted or bound. This field specifies the stage at
which the form is applied to the policy.
jobTypes Typekey from the An array of job types that use this form pattern.
FormPatternJobs
typefilter on the Jobs
typelist
products array of Product code ids The products to which this form pattern applies.
The following example creates a new form pattern for the PersonalAuto product that gets applied to a policy when a
submission or policy change is quoted:
Command
POST /admin/v1/form-patterns
Request
{
"data": {
"attributes": {
"code": "Code001",
"edition": "0001",
"endorsementNumbered": true,
"formNumber": "Test001",
"genericFormInference": {
"code": "GenericRemovalAndReplacementEndorsementForm"
},
"inferenceTime": {
"code": "quote"
},
"jobTypes": [
{
"code": "PolicyChange"
},
{
"code": "Submission"
}
],
"name": "Test Form 001",
"products": [
{
"id": "PersonalAuto"
}
]
}
}
}
PATCH /admin/v1/form-patterns/pc:910
Request
{
"data": {
"attributes": {
"jobTypes": [
{
"code": "Renewal"
}
]
}
}
}
Note that in this example the Renewal job type is not added to existing job types for this form; all existing job types on
form pattern pc:910 are replaced with the value specified in the PATCH request. This is due to the fact that PATCH on
an array in Cloud API is destructive, not additive. When you PATCH an array, the new content replaces the previous
content. If you want to add to an array, the PATCH request must contain all current members of the array as well as the
member being added.
To delete the form pattern in the preceding example, use the following command:
DELETE /admin/v1/form-patterns/pc:910
Note: DELETE works only in development mode. The command will throw an exception if you try to delete a
form pattern when the server is in production mode.
Form inference
When you create a new form pattern, you can use custom form inference or generic form inference. This section
describes using generic form inference. To use custom form inference, see "Adding a custom inference class for form
patterns" in the Application Guide and "Configuring custom form inference" in the Application Guide for more
information.
If you use generic form inference, you must include a value for the genericFormInference property. The code is a
string that contains the name of a class that implements the gw.forms.GenericFormInference interface.
Depending on the value of the genericFormInference property, there could be properties required for form pattern
creation in addition to those specified in the table above. The following table lists the additional required properties for
each base configuration generic form inference condition.
GenericAdditionalInsuredForm policyLine
GenericAdditionalInterestForm policyLine
GenericAlwaysAddedEveryJobForm none
GenericAlwaysAddedForm none
GenericClauseNonExistenceForm clause
policyLine
GenericClauseSelectionForm clause
policyLine
GenericCovTermSelectionForm clause
policyLine
selectedCovTerm
GenericCoverableTypeKeyForm coverableType
coverableTypeKey
coverableTypeKeyExistsOnAll
coverableTypeList
policyLine
GenericRemovalAndReplacementEndorsementForm none
GenericRemovalEndorsementForm none
You might have a form that requires inference logic beyond what you can specify with the base configuration classes.
In this case, you can either configure a new generic forms inference class or specify a custom form inference class. The
custom form inference class overrides the base configuration settings.
Forms can be designated as being explicitly available or unavailable in certain jurisdictions. With Cloud API, you can
retrieve, add, and update jurisdiction availability information through the form patterns lookups endpoints.
Note: The information accessed by these endpoints corresponds to the information in the Availability table
under the Jurisdictions tab in the user interface.
GET /admin/v1/form-patterns/pc:102/lookups
Response
{
"data": [
{
"attributes": {
"availability": {
"code": "Unavailable",
"name": "Unavailable"
},
"id": "pc:909",
"jurisdiction": {
"code": "OK",
"name": "Oklahoma"
},
"startEffectiveDate": "1989-12-01T08:00:00.000Z"
},
…
},
{
"attributes": {
"availability": {
"code": "Available",
"name": "Available"
},
"id": "pc:910",
"jurisdiction": {
"code": "MT",
"name": "Montana"
},
"startEffectiveDate": "1989-12-01T08:00:00.000Z"
},
…
}
POST /admin/v1/form-patterns/pc:910/lookups
Request
{
"data": {
"attributes": {
"availability": {
"code": "Unavailable"
},
"startEffectiveDate": "20240726",
"jurisdiction": {
"code": "FL"
}
}
}
}
Command
PATCH /admin/v1/form-patterns/pc:910/lookups/pc:90001
Request
{
"data": {
"attributes": {
"availability": {
"code": "Available"
}
}
}
}
The following command deletes jurisdiction availability pc:90001 from form pattern pc:910:
DELETE /admin/v1/form-patterns/pc:910/lookups/pc:90001
POST /admin/v1/form-patterns
Request
{
"data": {
"attributes": {
"code": "Code002",
"edition": "0001",
"endorsementNumbered": true,
"formNumber": "Test002",
"genericFormInference": {
"code": "GenericAlwaysAddedForm"
},
"inferenceTime": {
"code": "quote"
},
"jobTypes": [
{
"code": "PolicyChange"
},
{
"code": "Submission"
}
],
"name": "Test Form 002",
"products": [
{
"id": "PersonalAuto"
}
]
}
},
"included": {
"FormPatternLookup": [
{
"attributes": {
"availability": {
"code": "Available"
},
"endEffectiveDate": "2024-01-01",
"jurisdiction": {
"code": "CA"
},
"startEffectiveDate": "2022-01-01"
},
"method": "post",
"uri": "/admin/v1/form-patterns/this/lookups"
}
]
}
}
Job search
Out-of-sequence conflicts
Out-of-sequence policy transactions are policy transactions with an effective date that is before the effective date of a
previous policy transaction on the same policy. Insurers sometimes call these situations out-of-sequence endorsements.
PolicyCenter uses the term out-of-sequence.
An out-of-sequence conflict occurs when a policy change has a transaction date later than another policy transaction,
but an effective date earlier than that other policy transaction.
The Job API provides endpoints that can be used to identify and resolve out-of-sequence conflicts on policy
transactions.
For a job that has out-of-sequence conflicts, the response body will contain a conflicts property, which is an array
holding one or more conflict objects.
The following example shows an out-of-sequence conflict for date of birth values set for Bill Preston:
{
"data": {
"attributes": {
"conflicts": [
{
"conflictValues": [
{
"displayValue": "01/01/1975",
"effectiveDate": "2019-03-01T00:01:00.000Z"
},
{
"displayValue": "01/01/1977",
"effectiveDate": "2019-04-01T00:01:00.000Z"
}
],
"entity": {
"displayName": "Bill Preston",
"id": "pc:703",
"type": "PolicyContact",
"uri": "/job/v1/jobs/pc:204/contacts/pc:703"
},
"field": "dateOfBirthInternal",
"id": "b0aca4bc",
"originalValue": "01/01/1970",
"yourValue": "01/01/1980"
}
]
},
. . .
}
}
{
"data": {
"attributes": {
"overrides": [ ]
}
}
}
If the caller wishes to keep one or more changes to any conflicted fields, then the request body must explicitly declare
value selections for all fields that are in conflict. In this case, the
overrides
array must contain an object for each conflict, each having the following properties:
• id: The conflict ID, as a string
• resolution: A string value of either acceptYours or discardYours
As previously mentioned, each conflict object contains an originalValue and yourValue field. When resolving
conflicts, a caller must choose which of those values to retain. To keep the original value, the caller would apply the
discardYours value to the resolution property. Otherwise, the caller would apply the acceptYours value to the
property.
In the following example request body, the conflicting birthdates for Bill Preston are resolved by choosing the value
indicated by the yourValue field in the initial conflict object:
{
"data": {
"attributes": {
"overrides": [
"id": "b0aca4bc",
"resolution": "acceptYours"
]
}
}
}
After these changes have been submitted, a call to /job/v1/jobs/{jobId}/oss-conflicts returns the following
response:
{
"data": {
"attributes": {
"conflicts": [
{
"conflictValues": [
{
"displayValue": "01/01/1975",
"effectiveDate": "2019-03-01T00:01:00.000Z"
},
{
"displayValue": "01/01/1977",
"effectiveDate": "2019-04-01T00:01:00.000Z"
}
],
"entity": {
"displayName": "Bill Preston",
"id": "pc:703",
"type": "PolicyContact",
"uri": "/job/v1/jobs/pc:204/contacts/pc:703"
},
"field": "dateOfBirthInternal",
"id": "b0aca4b",
"originalValue": "01/01/1970",
"yourValue": "01/01/1980"
},
{
"conflictValues": [
{
"displayValue": "Address Line 1; Future Change",
"effectiveDate": "2019-03-01T00:01:00.000Z"
},
{
"displayValue": "Address Line 1; Future Change",
"effectiveDate": "2019-04-01T00:01:00.000Z"
}
],
"entity": {
"displayName": "1: Address Line 1; OOS Change, CA",
"id": "201",
"type": "PolicyLocation",
"uri": "/job/v1/jobs/pc:204/locations/201"
},
"field": "addressLine1Internal",
"id": "df78662",
"originalValue": "",
"yourValue": "Address Line 1; OOS Change"
},
{
"conflictValues": [
{
"displayValue": "2",
"effectiveDate": "2019-04-01T00:01:00.000Z"
}
],
"entity": {
"displayName": "1: Address Line 1; OOS Change, CA",
"id": "201",
"type": "PolicyLocation",
"uri": "/job/v1/jobs/pc:204/locations/201"
},
"field": "employeeCountInternal",
"id": "47761d4",
"originalValue": "0",
"yourValue": ""
}
]
},
. . .
}
{
"data": {
"attributes": {
"conflicts": [
{
"field": "dateOfBirthInternal",
"id": "b0aca4b",
"originalValue": "01/01/1970",
"yourValue": "01/01/1980"
},
{
"field": "addressLine1Internal",
"id": "df78662",
"originalValue": "",
"yourValue": "88 Maple Lane"
},
{
"field": "employeeCountInternal",
"id": "47761d4",
"originalValue": "0",
"yourValue": ""
}
]
}
}
}
Note that in the response object the JSON null type is represented by an empty string.
To resolve these conflicts, choices must be made between the original values and the most recent values, and this
information must be passed in the request body to POST /job/v1/jobs/{jobId}/oss-conflicts/resolve:
{
"data": {
"attributes": {
"overrides": [
{
"id": "b0aca4b",
"resolution": "acceptYours"
},
{
"id": "df78662",
"resolution": "acceptYours"
},
{
"id": "47761d4",
"resolution": "discardYours"
}
]
}
}
}
Following this post, Bill's birthdate will be January 1, 1980, his address will be 88 Maple Lane, and the number of
employees at his company will be set to "0".
Policy archiving
The topics in this section describe how to use Cloud API to work with archived policies in PolicyCenter. To get a full
understanding of how archiving works in PolicyCenter, review the Data Archiving documentation.
The following are the Cloud API endpoints (all of which are located in the policy API) specific to archiving:
• GET /bulk-policy-archive-retrievals
• POST /bulk-policy-archive-retrievals
• GET /bulk-policy-archive-retrievals/{bulkPolicyArchiveRetrievalRecordId}
• DELETE /bulk-policy-archive-retrievals/{bulkPolicyArchiveRetrievalRecordId}
• POST /policies/{policyId}/retrieve-from-archive
• POST /policies/{policyId}/set-do-not-archive
In addition, you can filter on policies to find archiving information.
The following sections describe how to use Cloud API for policy archiving actions.
• “Determine whether archiving is enabled” on page 359
• “List archived policies” on page 360
• “Set policies to Do Not Archive” on page 361
• “Retrieve an archived policy” on page 362
• “Bulk policy archive retrieval” on page 362
{
"status": 400,
"errorCode": "gw.api.modules.rest.framework.v1.exceptions.OperationNotCurrentlyAllowedException",
"userMessage": "The operation is not currently allowed for this resource",
"details": [
{
"message": "Cannot perform this action because Archiving is not enabled"
}
]
}
If you attempt to access the bulk-policy-archive-retrievals endpoint when archiving is disabled you receive a
“404 no resource found” error.
GET /policy/v1/policies?fields=id,policyNumber,archived&filter=archived:eq:true
Response
{
"data": [
{
"attributes": {
"archived": true,
"id": "pc:10",
"policyNumber": "1012345678"
}
},
{
"attributes": {
"archived": true,
"id": "pc:12",
"policyNumber": "2712345678"
}
}
…
}
}
Policies that are not archived could have an archived value of false or the value could be null. Therefore, to find all
jobs with policies that are not archived, filter for policies where archived is not true (rather than filtering for false):
GET /policy/v1/policies?fields=id,policyNumber,archived&filter=archived:ne:true
Note:
It’s possible that a policy could be returned that doesn’t seem to match the filter criteria. For example, you
could filter for policies where archived is set to true and see a policy in the return data that does not have that
property set to true. This can happen when an older term on the policy is archived, but the most recent term is
not. The query will return the policy because at least one of the terms on the policy is archived, but it will not
show the archived property as true because by default it’s showing data for only the most recent term. See
“Retrieve an archived policy” later in this topic for information on using the asOfDate parameter to track
policies by policy term.
GET /job/v1/jobs?fields=id,policyNumber,archived&filter=archived:eq:true
Response
{
"data": [
{
"attributes": {
"archived": true,
"id": "pc:101",
"policyNumber": "1012345678"
}
},
{
"attributes": {
"archived": true,
"id": "pc:105",
"policyNumber": "2712345678"
}
},
{
"attributes": {
"archived": true,
"id": "pc:320",
"policyNumber": "2712345678"
}
},
...
}
}
Policies that are not archived could have an archived value of false or the property could be null. Therefore, to find all
jobs with policies that are not archived, filter for policies where archived is not true (rather than filtering for false):
GET /job/v1/jobs?fields=id,policyNumber&filter=archived:ne:true
POST /policies/pc:310/set-do-not-archive
Request
{
"data": {
"attributes": {
"doNotArchive": true
}
}
}
{
"data": {
"attributes": {
"doNotArchive": true,
"comment": "This policy should not be archived"
}
}
}
To allow a policy that has been set to Do Not Archive to be archived, call set-do-not-archive with doNotArchive
set to false in the request body.
If you set this property to true on a policy that has already been archived, that policy will not automatically be
retrieved, it will remain archived until you retrieve it.
POST /policies/pc:320/retrieve-from-archive
A request body is not required, but optionally you can include a reason for the retrieval.
Request
{
"data": {
"attributes": {
"reason": "This policy needs to be unarchived"
}
}
}
There is no response body on a successful retrieval. However, the response header provides information about the
policy that can be useful when tracking the policy term that was retrieved. Look for the “Location” URL in the
response header, which includes the asOfDate:
Location: /policy/v1/policies/pc:320?asOfDate=2023-05-08T07:01:00.000Z
Running a GET on this URL will ensure you retrieve information for this policy term in the case where a policy
changes after this date.
Note:
PolicyCenter does not retrieve the policy immediately. Policies are retrieved when the Restore Policy Term
work queue runs. Typically, this process runs at scheduled times throughout the day. Users with certain
administrative privileges can run the RestorePolicyTerm process manually from the user interface in the Server
Tools Work Queue Info screen.
See Data Archiving for information on retrieving archived policies from previous versions of PolicyCenter.
POST /policy/v1/bulk-policy-archive-retrievals
For example:
Command
POST /policy/v1/bulk-policy-archive-retrievals
Request
{
"data": {
"attributes": {
"policyNumbers": ["7890123456","P012345678"],
"policyTermRetrievalFilter": "AllTerms",
"title": "Bulk Retrieval 1"
}
}
}
PolicyCenter does not retrieve the policies immediately. Policies are retrieved when the Restore Policy Term
work queue runs. Typically, this process runs at scheduled times throughout the day. Users with certain
administrative privileges can run the RestorePolicyTerm process manually from the UI in the Server Tools
Work Queue Info screen.
Bulk archive retrieval status
You can use Cloud API endpoints to determine the status of a bulk retrieval.
To retrieve a list of all bulk retrieval records, use the following command:
Command
GET /policy/v1/bulk-policy-archive-retrievals
Response
{
"data": [
{
"attributes": {
"createdDate": "2023-06-12T21:53:25.621Z",
"id": "pc:789",
"title": "Bulk Retrieval 1"
},
…
}
}
Append fields=*all to see the status of all policies within each retrieval batch:
Command
GET /policy/v1/bulk-policy-archive-retrievals?fields=*all
Response
{
"data": [
{
"attributes": {
"createdDate": "2023-06-12T21:53:25.621Z",
"id": "pc:789",
"policyTermRetrievalStatuses": [
{
"policyNumber": "P012345678",
"status": "Archived",
"uri": "/policy/v1/policies/pc:110?asOfDate=2023-05-08T07:01:00.000Z"
},
{
"policyNumber": "7890123456",
"status": "Retrieved",
"uri": "/policy/v1/policies/pc:122?asOfDate=2021-03-09T08:01:00.000Z"
}
],
"policyTermsInArchive": 1,
"policyTermsRetrieved": 1,
"policyTermsRetrieving": 0,
"title": "Bulk Retrieval 1"
},
…
You can check on the status of an individual bulk retrieval by including the id of the retrieval. For example:
Command
GET /policy/v1/bulk-policy-archive-retrievals/pc:789
Response
{
"data": {
"attributes": {
"createdDate": "2023-06-12T21:53:25.621Z",
"id": "pc:789",
"policyTermsInArchive": 0,
"policyTermsRetrieved": 2,
"policyTermsRetrieving": 0,
"title": "Bulk Retrieval 1"
},
…
}
Policy holds
The purpose of a policy hold is to allow insurers to temporarily prevent certain transactions from taking place on
policies within one or more geographic regions. There are two types of policy holds: underwriting and regulatory.
Underwriting holds are put in place to account for natural disasters. For example, insurers may not want to allow users
to create or update policies in a region that is predicted to be hit by a hurricane in the near future.
Regulatory holds are put in place when regulations, such as rate or coverage changes, are in process. Insurers might not
want to begin creating or updating a policy only to have to update it again when the change becomes official or is
entered into the system.
GET /admin/v1/policy-holds
{
"data": [
{
"attributes": {
"description": "UW Hold 5",
"displayName": "UW Hold 5",
"holdType": {
"code": "UWHold",
"name": "Underwriting Hold"
},
"id": "pc:105",
"policyHoldCode": "uw-hold-5",
"startDate": "2023-03-30",
"uwIssueLongDescription": "UW policy hold 5",
"uwIssueType": {
"code": "UWPolicyHold",
"displayName": "UW Policy Hold"
}
},
...
},
{
"attributes": {
"description": "UW Hold 4",
"displayName": "UW Hold 4",
"endDate": "2023-09-10",
"holdType": {
"code": "UWHold",
"name": "Underwriting Hold"
},
"id": "pc:104",
"policyHoldCode": "uw-hold-4",
"startDate": "2023-03-30",
"uwIssueLongDescription": "UW policy hold 4",
"uwIssueType": {
"code": "UWPolicyHold",
"displayName": "UW Policy Hold"
}
},
...
To retrieve a single policy hold, include the policy hold ID with the endpoint.
GET /admin/v1/policy-holds/{policyHoldId}
For example, the following query returns information about the policy hold with the id pc:104:
GET /admin/v1/policy-holds/pc:104
{
"count": 1,
"data": [
{
"attributes": {
"description": "UW Hold 4",
"displayName": "UW Hold 4",
"endDate": "2023-09-10",
"holdType": {
"code": "UWHold",
"name": "Underwriting Hold"
},
"id": "pc:104",
"policyHoldCode": "uw-hold-4",
"startDate": "2023-03-30",
"uwIssueLongDescription": "UW policy hold 4",
"uwIssueType": {
"code": "UWPolicyHold",
"displayName": "UW Policy Hold"
}
},
...
The following examples show how to create new underwriting and regulatory policy holds.
POST /admin/v1/policy-holds
Request body
{
"data": {
"attributes": {
"description": "UW Hold 1",
"holdType": {
"code": "UWHold"
},
"policyHoldCode": "uw-hold-1",
"startDate": "2023-03-30",
"uwIssueLongDescription": "Underwriting policy hold 1",
"uwIssueType": {
"code": "UWPolicyHold"
}
}
}
}
Request body
{
"data": {
"attributes": {
"description": "Reg Hold 1",
"holdType": {
"code": "RegulatoryHold"
},
"policyHoldCode": "reg-hold-1",
"startDate": "2023-03-30",
"uwIssueLongDescription": "Regulatory policy hold 1",
"uwIssueType": {
"code": "RegulatoryPolicyHold"
}
}
}
}
PATCH /admin/v1/policy-holds/pc:101
Request body
{
"data": {
"attributes": {
"endDate": "2023-05-30"
}
}
}
DELETE /admin/v1/policy-holds/pc:101
IMPORTANT: If you create a policy hold without creating any rules, the policy hold will not take effect even
if you’ve reached the start date.
See “Adding policy hold rules” on page 370 for more information.
Note: If you create a policy hold without creating any rules for that hold, in addition to the policy hold not
taking effect, the details of that policy hold will not be updateable in the user interface until policy hold
rules are added, either through the UI or the Cloud API.
• Policy hold geographic zones: Defines the geographic regions to which the hold applies. If you create a policy hold
without defining at least one geographic zone, the policy hold will apply to all geographic zones.
See “Policy hold geographic zones” on page 373 for more information.
• GET /admin/v1/policy-holds/{policyHoldId}/rules/{policyHoldRuleId}
• POST /admin/v1/policy-holds/{policyHoldId}/rules
• PATCH /admin/v1/policy-holds/{policyHoldId}/rules/{policyHoldRuleId}
• DELETE /admin/v1/policy-holds/{policyHoldId}/rules/{policyHoldRuleId}
GET /admin/v1/policy-holds/pc:101/rules
{
"count": 2,
"data": [
{
"attributes": {
"id": "pc:10001",
"jobDateType": {
"code": "Effective",
"name": "Effective Date"
},
"jobType": {
"code": "Renewal",
"name": "Renewal"
},
"policyLineType": {
"code": "PersonalAutoLine",
"name": "Personal Auto"
}
},
...
},
{
"attributes": {
"coveragePattern": {
"displayName": "Underinsured Motorist - Bodily Injury",
"id": "PAUIMBICov"
},
"id": "pc:10002",
"jobDateType": {
"code": "Effective",
"name": "Effective Date"
},
"jobType": {
"code": "Issuance",
"name": "Issuance"
},
"policyLineType": {
"code": "PersonalAutoLine",
"name": "Personal Auto"
}
},
...
}
To retrieve a single policy hold rule, include the policy hold rule ID.
GET /admin/v1/policy-holds/{policyHoldId}/rules/{policyHoldRuleId}
For example:
GET /admin/v1/policy-holds/pc:101/rules/pc:10002
{
"count": 1,
"data": [
{
"attributes": {
"coveragePattern": {
"displayName": "Underinsured Motorist - Bodily Injury",
"id": "PAUIMBICov"
},
"id": "pc:10002",
"jobDateType": {
"code": "Effective",
"name": "Effective Date"
},
"jobType": {
"code": "Issuance",
"name": "Issuance"
},
"policyLineType": {
"code": "PersonalAutoLine",
"name": "Personal Auto"
}
},
...
}
GET /common/v1/typelists/JobDateType
policyLineType A typekey containing the line of business. Use the following command to retrieve the available Yes
values:
GET /common/v1/typelists/PolicyLine?fields=typeKeys
coveragePattern The type of coverage the rule applies to. See “Adding policy hold rule coverages” on page No
371 for more information.
Command
POST /admin/v1/policy-holds/pc:101/rules
Request body
{
"data": {
"attributes": {
"jobDateType": {
"code": "Reference"
},
"jobType": {
"code": "Rewrite"
},
"policyLineType": {
"code": "PersonalAutoLine"
}
}
}
}
GET productdefinition/v1/lines/PersonalAutoLine/coverages?fields=id,name,clauseType
{
"data": [
{
"attributes": {
"clauseType": "exclusion",
"id": "PAExcludeFedEmployeeUse",
"name": "Exclude Federal Employee Use"
}
},
{
"attributes": {
"clauseType": "coverage",
"id": "PALiabilityCov",
"name": "Liability - Bodily Injury and Property Damage"
}
},
{
"attributes": {
"clauseType": "coverage",
"id": "PAMedPayCov",
"name": "Medical Payments"
}
},
...
The coverages you can use in your rule have a clauseType of coverage.
You can then retrieve all coverables for that line type, and then retrieve the coverages for each coverable.
Retrieve the coverables for PersonalAutoLine:
GET productdefinition/v1/lines/PersonalAutoLine/coverables?fields=id
{
"data": [
{
"attributes": {
"id": "PersonalVehicle"
}
}
...
GET productdefinition/v1/lines/PersonalAutoLine/coverables/PersonalVehicle/coverages?fields=id,name,clauseType
{
"count": 7,
"data": [
{
"attributes": {
"clauseType": "coverage",
"id": "PAComprehensiveCov",
"name": "Comprehensive"
}
},
{
"attributes": {
"clauseType": "coverage",
"id": "PACollisionCov",
"name": "Collision"
}
},
...
After finding the coverage you want to add to your policy rule, you can include the coverage ID when you add or
update your rule. In this example, collision coverage is included with the rule.
Command
POST /admin/v1/policy-holds/pc:101/rules
{
"data": {
"attributes": {
"jobDateType": {
"code": "Effective"
},
"jobType": {
"code": "Issuance"
},
"policyLineType": {
"code": "PersonalAutoLine"
},
"coveragePattern": {
"code": "PACollisionCov"
}
}
}
}
PATCH /admin/v1/policy-holds/pc:101/rules/pc:10001
Request body
{
"data": {
"attributes": {
"jobType": {
"code": "Renewal"
}
}
}
}
DELETE /admin/v1/policy-holds/pc:101/rules/pc:10001
GET /admin/v1/policy-holds/pc:101/geographic-zones
{
"count": 2,
"data": [
{
"attributes": {
"code": "OR:Wasco",
"country": {
"code": "US",
"name": "United States"
},
"id": "pc:12001",
"zoneType": {
"code": "county",
"name": "County"
}
},
...
},
{
"attributes": {
"code": "CA",
"country": {
"code": "US",
"name": "United States"
},
"id": "pc:12002",
"zoneType": {
"code": "state",
"name": "State"
}
},
...
To retrieve only a single geographic zone, include the zone ID with the GET endpoint.
GET /admin/v1/policy-holds/{policyHoldId}/geographic-zones/{policyHoldZoneId}
For example:
GET /admin/v1/policy-holds/pc:101/geographic-zones/pc:12001
{
"count": 1,
"data": [
{
"attributes": {
"code": "OR:Wasco",
"country": {
"code": "US",
"name": "United States"
},
"id": "pc:12001",
"zoneType": {
"code": "county",
"name": "County"
}
},
...
}
It's best practice to always include filters in your command when searching for a geographic zone due to the large
number of zones available. For example, if you want to retrieve the ID for the U.S. state of California, use the
following command:
GET /admin/v1/geographic-zones?filter=country:eq:US&filter=zoneType:eq:state&filter=code:eq:CA
{
"count": 1,
"data": [
{
"attributes": {
"code": "CA",
"country": {
"code": "US",
"name": "United States"
},
"displayName": "CA",
"id": "US:SbytI2CuZcXKoqyOiaSxI",
"name": "CA",
"zoneType": {
"code": "state",
"name": "State"
}
},
...
}
POST /admin/v1/policy-holds/pc:101/geographic-zones
Request body
{
"data": {
"attributes": {
"geographicZone": {
"id": "US:S3_ouEweXXJCd6rFBcPnk"
}
}
}
}
DELETE /admin/v1/policy-holds/pc:101/geographic-zones/pc:12001
POST /admin/v1/policy-holds
Request body
{
"data": {
"attributes": {
"description": "UW hold 1",
"holdType": {
"code": "UWHold"
},
"policyHoldCode": "uw-hold-1",
"startDate": "2023-04-10",
"uwIssueLongDescription": "Underwriting policy hold 1",
"uwIssueType": {
"code": "UWPolicyHold"
}
}
}
}
Request response
{
"data": {
"attributes": {
...
"description": "UW hold 1",
"displayName": "UW hold 1",
"holdType": {
"code": "UWHold",
"name": "Underwriting Hold"
},
"id": "pc:101",
"policyHoldCode": "uw-hold-1",
"startDate": "2023-04-10",
...
"uwIssueLongDescription": "Underwriting policy hold 1",
"uwIssueType": {
"code": "UWPolicyHold",
"displayName": "UW Policy Hold"
}
},
...
}
Make note of the id returned in the response, in this case pc:101. You’ll need this value to add rules and geographic
zones in the next two sections.
IMPORTANT: If you don’t add at least one rule to the policy hold, the hold will not take effect even if you’ve
reached the start date.
In this example, we’re going to add the following rule to our policy hold:
• Line of Business: Personal Auto
• Policy Transaction Type: Submission
• Transaction Date Type: Effective Date
In the Cloud API, the attributes for these values are the following:
• policyLineType: PersonalAutoLine
• jobType: Submission
• jobDateType: Effective
In our endpoint we’ll use the policy hold ID we captured from the response in the previous step.
Command
POST /admin/v1/policy-holds/pc:101/rules
Request body
{
"data": {
"attributes": {
"jobDateType": {
"code": "Effective"
},
"jobType": {
"code": "Submission"
},
"policyLineType": {
"code": "PersonalAutoLine"
}
}
}
}
PATCH /admin/v1/policy-holds/pc:101/rules/pc:10001
{
"data": {
"attributes": {
"coveragePattern": {
"code": "PACollisionCov"
}
}
}
}
IMPORTANT: If you don’t add a geographic zone, the hold will be applied to all policies that match the
associated policy hold rules, regardless of the geographic region the policy is in.
GET /admin/v1/geographic-zones?filter=country:eq:US&filter=zoneType:eq:state&filter=code:eq:CA
{
"count": 1,
"data": [
{
"attributes": {
"code": "CA",
"country": {
"code": "US",
"name": "United States"
},
"displayName": "CA",
"id": "US:SbytI2CuZcXKoqyOiaSxI",
"name": "CA",
"zoneType": {
"code": "state",
"name": "State"
}
},
...
}
We can now see that the id for the geographic zone covering the state of California is US:SbytI2CuZcXKoqyOiaSxI.
Save this value, we’ll use it in the next section.
{
"data": {
"attributes": {
"geographicZone": {
"id": " US:SbytI2CuZcXKoqyOiaSxI"
}
}
}
}
This policy hold ID goes in the endpoint command to specify the policy hold to which this zone is being added.
Command
POST /admin/v1/policy-holds/pc:101/geographic-zones
You’ve now created a policy hold that will become active as soon as the start date is reached.
For more information on policy holds, see “Policy holds” on page 365.
Quoting
Cloud API for PolicyCenter supports several PolicyCenter features that provide greater control over the quoting
process. This includes the following:
• Multi-version quoting (where multiple quotes are generated simultaneously for the same job)
• Rating overrides (where the amount for a given Cost is manually overridden)
Retrieving costs
Use the following endpoints to retrieve costs associated with a job or a policy:
• GET /job/v1/jobs/{jobId}/costs
• GET /policy/v1/policies/{policyId}/costs
For example:
Command
GET /policy/v1/policies/pc:101/costs
Response
{
"data": [
{
"attributes": {
"amount": {
"amount": "84066.00",
"currency": "usd"
},
"chargePattern": {
"code": "Premium",
"name": "Premium"
},
"coverable": {
"displayName": "California",
Quoting 379
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
"id": "1"
},
"effectiveDate": "2023-11-16T08:01:00.000Z",
"expirationDate": "2024-11-16T08:01:00.000Z",
"id": "2",
"policyLine": {
"displayName": "Workers' Comp Line",
"id": "WorkersCompLine",
"uri": "/policy/v1/policies/pc:101/lines/WorkersCompLine"
},
"rateAmountType": {
"code": "StdPremium",
"name": "Standard premium"
},
"termAmount": {
"amount": "84066.00",
"currency": "usd"
}
},
Retrieving transactions
Use the following endpoint to retrieve a list of transactions on a job:
• GET /job/v1/jobs/{jobId}/transactions
For example:
Command
GET /job/v1/jobs/pc:500/transactions
Response
{
"data": [
{
"attributes": {
"amount": {
"amount": "84066.00",
"currency": "usd"
},
"amountBilling": {
"amount": "84066.00",
"currency": "usd"
},
"charged": false,
"cost": {
"displayName": "Emp liab increased limits",
"id": "pc:890"
},
"displayName": "Emp liab increased limits",
"effectiveDate": "2023-11-16",
"expirationDate": "2024-11-16",
"id": "107",
"postedDate": "2023-11-28T19:19:00.976Z",
"toBeAccrued": false,
"written": true,
"writtenDate": "2023-11-28"
},
…
},
{
"attributes": {
"amount": {
"amount": "-24361.00",
"currency": "usd"
},
"amountBilling": {
"amount": "-24361.00",
"currency": "usd"
},
"charged": false,
"cost": {
"displayName": "Emp liab increased limits",
"id": "pc:978"
},
"displayName": "Emp liab increased limits",
"effectiveDate": "2023-11-16",
"expirationDate": "2024-11-16",
"id": "106",
"postedDate": "2023-11-28T19:19:00.976Z",
"toBeAccrued": false,
"written": true,
"writtenDate": "2023-11-28"
380 Quoting
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
},
…
},
Multi-version quoting
Multi-version quoting is a PolicyCenter feature that is available on submission, policy change, renewal, and rewrite
policy transactions. Within a single policy transaction, multiple quotes can be generated and compared. The Job API
supports this functionality. For details on multi-version quoting and other policy transactions in PolicyCenter, see the
Application Guide.
Multi-version quoting is supported through the following Job API endpoints:
• /job/v1/jobs/{jobId}/versions
• /job/v1/jobs/{jobId}/versions/{versionId}
• /job/v1/jobs/{jobId}/change-version
• /job/v1/jobs/{selectedJobId}?jobVersion={unselectedJobId}
{
"count": 1,
"data": [
{
"attributes": {
"id": "pc:401",
"name": "Version #1",
"number": 1,
"selected": true,
"status": {
"code": "Draft",
"name": "Draft"
}
},
. . .
}
],
. . .
}
Quoting 381
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
{
"data": {
"attributes": { }
}
}
{
"data": {
"attributes": {
"name": "My new version"
}
}
}
On creation, the new job version is in Draft status, it is not selected, and the version number is incremented by one. The
ID value is specific to the version.
{
"data": {
"attributes": {
"id": "pc:402",
"name": "My new version",
"number": 2,
"selected": false,
"status": {
"code": "Draft",
"name": "Draft"
}
},
. . .
}
}
{
"data": {
"attributes": {
"selectedVersion": {
"id": "pc:402"
}
}
}
}
In the payload above, the selectedVersion.id value is set to the ID value of the job version that was created in the
previous section. This job version will now be selected, and the all other job versions will be in a deselected state.
Alternatively, a caller can modify or quote an deselected job version that is in Draft status by applying the jobVersion
query parameter to the request. These calls have the following patterns:
382 Quoting
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
• /job/v1/jobs/{selectedJobId}?jobVersion={unselectedJobId}
• /job/v1/jobs/{selectedJobId}/{businessAction}?jobVersion={unselectedJobId}
Typically, each version is modified until considered done and then quoted. The quoted versions can then be offered for
side-by-side comparison. To further modify a quoted version, a caller can apply the /make-draft business action to
that version, make the modification, and then re-quote.
Rating overrides
When you quote a job, PolicyCenter rates the job to determine the cost of each coverage. This information is stored in
a series of Cost objects. The Cost objects are then used to calculate the quote.
PolicyCenter also provides the ability to manually override the rating for one or more specific Costs. When you
override rating, you can change exactly one of the following Cost values:
• Base rate
• Adjusted rate
• Amount
• Term amount
You cannot override costs on a job until the job has been quoted. Overriding a cost does not change the status of the
job. It remains with its status of "Quoted". Also, some cost types may be designated as not allowing overrides. For
example, tax costs may not allow overrides as they must always reflect a fixed percent of some other cost.
In the base application, the only lines of business that support rating overrides are: Worker’s Compensation, Inland
Marine, and Commercial Property. However, any line of product could be configured to support rating overrides.
For more information on the business functionality of rating overrides, see the Application Guide.
Quoting 383
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
GET job/v1/jobs/pc:S99/costs
{
"count": 5,
"data": [
{
"attributes": {
"adjustedRate": "0.1148",
"amount": {
"amount": "11.00",
"currency": "usd"
},
"baseRate": "0.1500",
"coverable": {
"displayName": "1: Building # 1",
"id": "14"
},
"coverage": {
"displayName": "Business Personal Property Coverage",
"id": "CPBPPCov"
},
"id": "49",
"termAmount": {
"amount": "11.00",
"currency": "usd"
}
}
},
{
"attributes": {
"adjustedRate": "0.0822",
"amount": {
"amount": "8.00",
"currency": "usd"
},
"baseRate": "0.1500",
"coverable": {
"displayName": "1: Building # 1",
"id": "14"
},
"coverage": {
"displayName": "Business Personal Property Coverage",
"id": "CPBPPCov"
},
"id": "50",
"termAmount": {
"amount": "8.00",
"currency": "usd"
}
}
},
...
384 Quoting
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
(The OverrideCostsAttributes schema also includes two deprecated fields: overrideAmount and
overrideTermAmount. These fields have been included for backwards compatibility. However, Guidewire recommends
using overrideAmountBilling and overrideTermAmountBilling, respectively, as the latter fields use the policy's
settlement currency.)
You can optionally provide an overrideReason, which must be defined as a string.
The response to the /override-rating call contains the Costs for the entire job.
POST job/v1/jobs/pc:S99/override-rating
{
"data": {
"attributes": {
"overrides": [
{
"costId": "49",
"overrideBaseRate": ".2",
"overrideReason": "Greater risk level at this location"
},
{
"costId": "50",
"overrideTermAmountBilling": "10",
"overrideReason": "Greater risk level at this location"
}
]
}
}
}
Quoting 385
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
386 Quoting
chapter 44
Reinsurance risks
Reinsurance is insurance for insurance companies. A direct policy insurer will bundle risk coverages in a way that
allows them to share those risks with other insurers. Those shared risks can be described as reinsurance risks, or
reinsurables. For a complete description and details of reinsurance, see the Application Guide .
The following endpoints retrieve the reinsurance risks that are associated with a job or policy:
• GET /job/v1/jobs/{jobId}/reinsurables
• GET /job/v1/jobs/{jobId}/reinsurables/{reinsurableId}
• GET /policy/v1/policies/{policyId}/reinsurables
• GET /policy/v1/policies/{policyId}/reinsurables/{reinsurabldId}
Reinsurables details
Applicable reinsurance risks are automatically attached to the job (and by extension the policy) when the job is quoted.
Therefore, there are no endpoints that create or update reinsurables on policies and jobs; it’s an automatic process.
Because reinsurables are assigned when a job is quoted, if a job is in Draft mode the reinsurables endpoints will return
an empty data set for that job.
The base configuration comes with two types of reinsurables, policyRisk and locationRisk. (A policy risk reinsurable is
any risk associated with the policy other than location. A location risk reinsurable is associated with a specific location,
such as the home in a homeowners policy.)
Keep in mind that the reinsurables returned in the responses to these endpoints are reinsurance risks that are capable of
being reinsured; they haven’t necessarily been reinsured. To determine whether a particular reinsurable has been
reinsured, check the riskNumber property in the response:
"riskNumber": "100"
If the riskNumber contains a value (as it does here), the reinsurable is reinsured. If the riskNumber is null, the
reinsurable is capable of being reinsured, but has not yet been reinsured.
Examples
The following examples demonstrate how to retrieve reinsurables for a policy and a job, respectively. Both the policy
and job have a Workers’ Comp coverage reinsurable.
Command
GET /policy/v1/policies/pc:100/reinsurables
Response
{
"data": [
{
"attributes": {
"displayName": "Policy-level",
"id": "101",
"reinsuranceCurrency": {
"code": "usd",
"name": "USD"
},
"riCoverageGroupType": {
"code": "WorkersComp",
"name": "Workers Comp"
},
"riskNumber": "100"
},
Command
GET /job/v1/jobs/pc:500/reinsurables
Response
{
"data": [
{
"attributes": {
"displayName": "Policy-level",
"id": "101",
"reinsuranceCurrency": {
"code": "usd",
"name": "USD"
},
"riCoverageGroupType": {
"code": "WorkersComp",
"name": "Workers Comp"
},
"riskNumber": "100"
},
This example retrieves reinsurables for policy pc:101, which has an Auto Liability coverage reinsurable with a Total
Insured Value of $600,000 USD:
Command
GET /policy/v1/policies/pc:101/reinsurables
Response
{
"data": [
{
"attributes": {
"displayName": "Policy-level",
"id": "2",
"reinsuranceCurrency": {
"code": "usd",
"name": "USD"
},
"riCoverageGroupType": {
"code": "AutoLiability",
"name": "Auto Liability"
},
"riskNumber": "1",
"totalInsuredValue": {
"amount": "600000.00",
"currency": "usd"
}
},
Accounts and submissions are hierarchical entities with multiple levels of information. For example, you create an
account, then add contacts to the account, then add additional locations, and so on. Request inclusion and composite
requests give you the ability to combine those calls into a single request, but you still have to build the object one call
at a time. Furthermore, you never get a single response that contains the entire hierarchy; each piece of the hierarchy is
returned from a separate call.
For some caller applications, such as those involved in High Volume Quoting (see Configuration Guide), it’s more
convenient to build an entire account or submission in a single call, and then process the single set of results returned
from those calls. The endpoints in the Graph API give you the ability to do this.
In this section:
• “Understanding the Graph API” on page 389
• “Example: Creating a policy using the graph endpoints” on page 393
endpoints, including any LOB-specific endpoints. So, any field available to those schemas is available to the POST /
graph/v1/submissions endpoint.
The responses from these endpoints include the entire hierarchy of the account and submission resources. This
complete response provides a consistent and ordered set of information so caller applications know what to expect. It
also allows caller applications to more easily pass data back to PolicyCenter if necessary without having to first
determine the ordering.
These endpoints are similar to the POST /account/v1/accounts and POST /job/v1/submissions endpoints, but
there are some key differences, discussed in the next section.
For more on the /account/v1/accounts endpoint see “Creating an account” on page 147
For more on the /job/v1/submissions endpoint see “Submissions” on page 193
Streamlined process
The Account and Job APIs have separate endpoints to access the child elements of account and job. The Graph API
endpoints do not have separate endpoints for child elements because they're not needed. All account and job
information, including all child resources, are included within the requests and responses for the Graph API endpoints.
For example, a request to POST /graph/v1/accounts can contain all account information, including child information
such as contacts and locations.
Note:
Keep in mind that while POST /graph/v1/submissions creates an entire job and submission, it does not quote
or bind the submission.
No pagination
When you run an Account or Job API endpoint, pagination is in place that by default restricts the number of elements
returned at once. With the Graph API endpoints, all the account and submission information is included in the POST
command response. The Graph API overrides any specified pagination values and returns all elements of each
collection.
See “The pagination query parameters” on page 58 for more information on pagination.
POST only
The purpose of the Graph API endpoints is to produce an entire account and submission that can be passed along for
processing by the caller application. So unlike the Account and Job API endpoints, the Graph API /accounts and /
submissions endpoints provide only POST commands. Updates cannot be made that will produce a modified version
of the entire account or submission graph response. However, you can use the the Account and Job API endpoints to
modify the data that was created with the Graph API endpoints.
returned from the call to the graph /submissions endpoint. See “Example: Creating a policy using the graph
endpoints” on page 393 for an example.
Note:
You can produce the same results by using composite requests with the Account and Job APIs to manually
build out the entire string of commands required to create a submission. However, you typically need to do this
only if you require an especially fine-tuned order of operations.
Order of operations
If you use the Account and Job API endpoints to create a submission, you need to carefully keep track of the order in
which to make the requests, being sure to pass the appropriate IDs from one request to another. One of the biggest
advantages to using the Graph API is that the endpoints know how to carry out operations in an order that makes sense.
By default, the Graph API will process the list of children for a given resource based on the alphabetical ordering of the
properties defined in the graph schema. For example, if a policy line has children named coverages and locations in
the graph schema, the coverages children will be processed first.
In some cases, you may want to change this order, generally to ensure that resources are created before other resources
attempt to reference them. For example, the base configuration overrides the ordering so that contacts and locations
are both processed before any other entities on the Job schema, so that PolicyContacts and PolicyLocations are created
before any LOB resources that may need to refer to them are processed.
You might have a case, such as a custom extension with top-level children that are referenced elsewhere in the graph,
where you need to control the processing order. You can do this by adding the graphUpdateOrder extension to the
appropriate property in the graph schema file. For example:
...
"x-gw-extensions": {
"graphUpdateOrder": 1
}
...
See Cloud API Developer Guide for information on the graph schema file.
In Cloud API, refid is typically used for request inclusion (Cloud API Business Flows and Configuration
Guide). When used for request inclusion, separate data and inclusion sections are required. For use in Graph
API, the refid is used inline with the element’s other properties.
For example, you might create a contact that you want to designate as the account holder. You can include a refid on
the contact. Then add that same refid to the accountHolder. Graph API will first create the contact, then, using the
refid, will add that contact as the account holder when it creates the account. Here’s an example:
{
"data": {
"attributes": {
...
"accountHolder": {
"refid": "newperson"
},
"contacts": [
{
"refid": "newperson",
"contactSubtype": "Person",
"firstName": "August",
"lastName": "Joseph",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
}
],
...
In the response, the accountHolder is the contact that was created with that refid:
"accountHolder": {
"displayName": "August Joseph",
"id": "pc:120"
},
...
"contacts": [
{
...
"displayName": "August Joseph",
"id": "pc:120",
...
],
See Cloud API Business Flows and Configuration Guide for more information on request inclusions.
Sort order
Most of the resources in the graph for accounts and submissions are returned as collections. As with other API
endpoints, the response from each Graph API endpoint returns data in the default sort order for each resource. This
means that, for example, the /accounts endpoint might return a list of contacts in the response in a different order than
they were listed in the request.
Response output
If you call GET /job/v1/jobs, the response by default will include a summary list of each job that is returned.
However, if you call GET /job/v1/jobs/{jobID} to retrieve a single job, the response will by default include more
details about the specified job than the collection-level command response. The response for all POST operations in the
Graph API will by default return the detailed list for all collection items.
deferValidation In some cases you might want to defer See “Deferring validation” on
validations, such as availability checks. To page 287 for more on deferring
defer validations on a submission, set this validation.
parameter to true. Default is false.
fields As with other endpoints, you can override See “The fields query
the default set of returned values by using parameter” on page 51 for
the fields query parameter. more information.
Authorization
As with other Cloud API endpoints, in order to call endpoints in the Graph API the caller must have permission to
those endpoints in their role.yaml file and the appropriate access.yaml file.That includes endpoint-level permission (via
role.yaml files), resource-level permissions (via the access.yaml files), and field-level permissions (via the role.yaml
files).
In addition to the standard endpoint permissions, Graph API permissions also depend on the endpoint-level, resource-
level, and field-level permissions for the corresponding endpoints within the Account and Job APIs. These permissions
are applied to the creation during the POST, and are also used to filter what is returned on the response. Here are some
examples.
Creation Authorization
Every graph schema property maps to an Account or Job API endpoint. For example, contacts on the Account maps
to /account/v1/accounts/{accountId}/contacts. Adding an element to the contacts array in the request requires
exactly the same permissions as a POST to that Account API endpoint would require: if the POST to the Account API
would fail, the POST to the Graph API will fail the same way. This applies to field-level edits as well: if you can't edit
a field in the Account API, you can't include that field in a Graph API request.
Response
Response rules are similar to the creation rules. If you can't view the response from the /account/v1/accounts/
{accountId}/contacts endpoint in the Account API, the contacts property won't appear on the /graph/v1/
accounts response. Similarly, if you can't view a particular set of contact fields in the Account API, those fields won't
appear in the Graph API response either. The Graph API is designed to give callers the same permissions as to the
Account and Job APIs.
Overview
The examples presented here demonstrate the process of creating a complete account and submission using the Graph
API.
• The first example creates an account. The account includes an initial account holder, primary location, and an
additional locaction.
• The next example creates a submission. The submission includes several pieces of information that would require
calls to multiple child endpoints if you were to use the Job API to complete a similar task. This example shows how
to create the entire submission in one step.
• The final example creates a composite request that strings together the commands from the preceding examples to
create an account and a submission, and quote the submission. It then shows binding and issuing the submission.
POST /graph/v1/accounts
The required request fields are the same for posting a Graph API account as for posting to an Account API account
(see “Creating an account” on page 147).
In addition to the required and other top-level account fields, you can include fields that are considered children of the
account, such as contacts and locations. The following request creates an account and includes an additional location.
Request
{
"data": {
"attributes": {
"producerCodes": [{
"id": "pc:6"
}],
"initialAccountHolder": {
"contactSubtype": "Person",
"firstName": "August",
"lastName": "Joseph",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
},
"initialPrimaryLocation": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
},
"locations": [{
"active": true,
"addressLine1": "1234 Main St.",
"city": "San Diego",
"country": "US",
"postalCode": "91911",
"state": {
"code": "CA"
}
}]
}
}
}
Response
{
"data": {
"attributes": {
"accountHolder": {
POST /graph/v1/submissions
The request for this POST command can contain all information included in the job hierarchy, such as answers,
locations, and all the submission details.
The following request performs these actions:
1. Creates a submission from an existing account (id: pc:120).
2. Answers the question “Is the applicant currently insured” with “No - New Driver” (newdriver).
3. Creates a new contact. Assigns a refid to the contact.
4. Includes a new PersonalAutoLine with the following (only one LOB can be specified, multiple lines in a request
are not supported):
a. Answers two questions (q1 and q3) on the line
b. Adds liability coverage
c. Adds a vehicle
d. Adds a driver to the vehicle. Driver is the contact with the refid defined earlier.
Note:
The POST /graph/v1/submissions endpoint does not quote the submission. To quote the submission you need
to call POST /job/v1/jobs/quote.
Request
{
"data": {
"attributes": {
"account": {
"id": "pc:120"
},
"baseState": {
"code": "CA"
},
"jobEffectiveDate": "2023-09-01",
"producerCode": {
"id": "pc:6"
},
"product": {
"id": "PersonalAuto"
},
"answers": {
"PACurrentlyInsured": {
"choiceValue": {
"code": "newdriver"
}
}
},
"contacts": [{
"contactSubtype": "Person",
"firstName": "Samantha",
"lastName": "Stewart",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
},
"refid": "testUser"
}],
"lines": {
"PersonalAutoLine": {
"answers": {
"q1": {
"booleanValue": false
},
"q3": {
"choiceValue": {
"code": "no"
}
}
},
"coverages": {
"PALiabilityCov": {
"terms": {
"PALiability": {
"choiceValue": {
"code": "100/200/50"
}
}
}
}
},
"numAddInsured": 1,
"vehicles": [{
"annualMileage": 10000,
"bodyType": {
"code": "convertible"
},
"color": "Yellow",
"commutingMiles": 50,
"costNew": {
"amount": "25000.00",
"currency": "usd"
},
"coverages": {
"PACollisionCov": {
"terms": {
"PACollDeductible": {
"choiceValue": {
"code": "1000"
}
}
}
},
"PARentalCov": {
"pattern": {
"id": "PARentalCov"
},
"terms": {
"PARental": {
"choiceValue": {
"code": "30/15"
}
}
}
}
},
"drivers": [{
"percentageDriven": 100,
"policyDriver": {
"refid": "testUser"
}
}],
"make": "NewMake",
"model": "NewModel",
"modelYear": 2015,
"modifiers": {
"PAAntiLockBrakes": {
"booleanModifier": true,
"eligible": false,
"valueFinal": false
}
},
"vin": "1234567890"
}]
}
}
}
}
}
Response
{
"data": {
"attributes": {
"account": {
"displayName": "12345678",
"id": "pc:120",
"type": "Account",
"uri": "..."
},
"answers": {
...
"PACurrentlyInsured": {
"choiceValue": {
"code": "newdriver",
"name": "No - New Driver"
},
"displayValue": "No - New Driver",
"question": {
"displayName": "Is the applicant currently insured?",
"id": "PACurrentlyInsured"
},
"questionType": {
"code": "Choice",
"name": "Choice"
}
},
...
},
"contacts": [{
"accountContact": {
"displayName": "August Joseph",
"id": "pc:110",
"type": "AccountContact",
"uri": "..."
},
...
"jobStatus": {
"code": "Draft",
"name": "Draft"
},
"jobType": {
"code": "Submission",
"name": "Submission"
},
"lines": {
"PersonalAutoLine": {
"answers": {
"q1": {
"booleanValue": false,
"displayValue": "false",
"question": {
"displayName": "Have you been convicted for a moving traffic violation within the past 3 years?",
"id": "q1"
},
"questionType": {
"code": "Boolean",
"name": "Boolean"
}
},
"q2": {
"question": {
"displayName": "Has any policy or coverage been declined, canceled, or non-renewed during the prior 3
years?",
"id": "q2"
},
"questionType": {
"code": "Boolean",
"name": "Boolean"
}
},
"q3": {
"choiceValue": {
"code": "no",
"name": "No - previous policy did not renew"
},
"displayValue": "No - previous policy did not renew",
"question": {
"displayName": "Has your license ever been canceled, suspended or revoked?",
"id": "q3"
},
"questionType": {
"code": "Choice",
"name": "Choice"
}
},
...
"coverages": {
"PALiabilityCov": {
"clauseType": "coverage",
"id": "PALiabilityCov",
"pattern": {
"displayName": "Liability - Bodily Injury and Property Damage",
"id": "PALiabilityCov"
},
"selected": true,
"terms": {
"PALiability": {
"choiceValue": {
"code": "100/200/50",
"name": "100/200/50"
},
"covTermType": "choice",
"displayValue": "100/200/50",
"pattern": {
"displayName": "Auto Liability Package",
"id": "PALiability"
}
}
}
},
"PALimitedMexicoCov": {
"clauseType": "coverage",
"id": "PALimitedMexicoCov",
"pattern": {
"displayName": "Mexico Coverage - Limited",
"id": "PALimitedMexicoCov"
},
"selected": true,
"terms": {}
},
"PAMedPayCov": {
"clauseType": "coverage",
"id": "PAMedPayCov",
"pattern": {
"displayName": "Medical Payments",
"id": "PAMedPayCov"
},
"selected": true,
"terms": {
"PAMedLimit": {
"choiceValue": {
"code": "5000",
"name": "5,000"
},
"covTermType": "choice",
"displayValue": "5,000",
"pattern": {
"id": "PACollDeductible"
}
}
}
},
"PAComprehensiveCov": {
"clauseType": "coverage",
"id": "PAComprehensiveCov",
"pattern": {
"displayName": "Comprehensive",
"id": "PAComprehensiveCov"
},
"selected": true,
"terms": {
"PACompDeductible": {
"choiceValue": {
"code": "500",
"name": "500"
},
"covTermType": "choice",
"displayValue": "500",
"pattern": {
"displayName": "Comprehensive Deductible",
"id": "PACompDeductible"
}
}
}
},
"PARentalCov": {
"clauseType": "coverage",
"id": "PARentalCov",
"pattern": {
"displayName": "Rental Reimbursement",
"id": "PARentalCov"
},
"selected": true,
"terms": {
"PARental": {
"choiceValue": {
"code": "30/15",
"name": "30 days x 15/day"
},
"covTermType": "choice",
"displayValue": "30 days x 15/day",
"pattern": {
"displayName": "Rental Package",
"id": "PARental"
}
}
}
}
},
"drivers": [{
"id": "301",
"percentageDriven": 100,
"policyDriver": {
"displayName": "Samantha Stewart",
"id": "pc:145",
"type": "PolicyContact",
"uri": "..."
}
}],
"garageLocation": {
"displayName": "1: 2850 S. Delaware St., San Mateo, CA",
"id": "501",
"type": "PolicyLocation",
"uri": "..."
},
"id": "301",
"leaseOrRent": false,
"make": "NewMake",
"model": "NewModel",
"modelYear": 2015,
...
"locations": [{
"accountLocation": {
"displayName": "1: 2850 S. Delaware St., San Mateo, CA",
"id": "pc:Sro4vpAp3iD5oMrD7SqwF",
"type": "AccountLocation",
"uri": "..."
},
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"country": "US",
"displayName": "1: 2850 S. Delaware St., San Mateo, CA",
"id": "501",
"locationNum": 1,
"postalCode": "94403",
"primary": true,
"state": {
"code": "CA",
"name": "California"
},
"territoryCodes": {
"PersonalAutoLine": {
"code": "31"
}
}
}],
...
"producerCode": {
"displayName": "100-000001",
"id": "pc:6"
},
"producerCodeOfService": {
"displayName": "100-000001",
"id": "pc:6"
},
"product": {
"displayName": "Personal Auto",
"id": "PersonalAuto"
},
"quoteType": {
"code": "Full",
"name": "Full Application"
},
"termType": {
"code": "HalfYear",
"name": "6 months"
},
...
}
}
}
}
POST /composite/v1/composite
This example combines the examples in the preceding sections into one composite request. It also performs the
additional step of quoting the submission, then binds and issues the submission.
The composite request performs the following steps:
1. Calls POST /graph/v1/accounts to create an account
2. Saves the account ID from the account that was created to be passed into the body of the next sub-request.
3. Calls POST /graph/v1/submissions to create a submission
4. Saves the job ID from the submission to be passed into the body of the next sub-request
5. Calls POST /job/v1/jobs/{jobId}/quote to quote the job
When the composite request completes, you can then call POST /job/v1/jobs/{jobId}/bind-and-issue to bind and
issue the job.
Request
{
"requests": [{
"method": "post",
"uri": "/graph/v1/accounts",
"body": {
"data": {
"attributes": {
"producerCodes": [{
"id": "pc:6"
}],
"initialAccountHolder": {
"contactSubtype": "Person",
"firstName": "August",
"lastName": "Joseph",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
},
"initialPrimaryLocation": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
},
"locations": [{
"active": true,
"addressLine1": "1234 Main St.",
"city": "San Diego",
"country": "US",
"postalCode": "91911",
"state": {
"code": "CA"
}
}]
}
}
},
"vars": [{
"name": "accountId",
"path": "$.data.attributes.id"
}]
},
{
"method": "post",
"uri": "/graph/v1/submissions",
"body": {
"data": {
"attributes": {
"account": {
"id": "${accountId}"
},
"baseState": {
"code": "CA"
},
"jobEffectiveDate": "2023-09-01",
"producerCode": {
"id": "pc:6"
},
"product": {
"id": "PersonalAuto"
},
"answers": {
"PACurrentlyInsured": {
"choiceValue": {
"code": "newdriver"
}
}
},
"contacts": [{
"contactSubtype": "Person",
"firstName": "Samantha",
"lastName": "Stewart",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
},
"refid": "testUser"
}],
"lines": {
"PersonalAutoLine": {
"answers": {
"q1": {
"booleanValue": false
},
"q3": {
"choiceValue": {
"code": "no"
}
}
},
"coverages": {
"PALiabilityCov": {
"terms": {
"PALiability": {
"choiceValue": {
"code": "100/200/50"
}
}
}
}
},
"numAddInsured": 1,
"vehicles": [{
"annualMileage": 10000,
"bodyType": {
"code": "convertible"
},
"color": "Yellow",
"commutingMiles": 50,
"costNew": {
"amount": "25000.00",
"currency": "usd"
},
"coverages": {
"PACollisionCov": {
"terms": {
"PACollDeductible": {
"choiceValue": {
"code": "1000"
}
}
}
},
"PARentalCov": {
"pattern": {
"id": "PARentalCov"
},
"terms": {
"PARental": {
"choiceValue": {
"code": "30/15"
}
}
}
}
},
"drivers": [{
"percentageDriven": 100,
"policyDriver": {
"refid": "testUser"
}
}],
"make": "NewMake",
"model": "NewModel",
"modelYear": 2015,
"modifiers": {
"PAAntiLockBrakes": {
"booleanModifier": true,
"eligible": false,
"valueFinal": false
}
},
"vin": "1234567890"
}]
}
}
}
}
},
"vars": [{
"name": "jobId",
"path": "$.data.attributes.id"
}]
},
{
"method": "post",
"uri": "/job/v1/jobs/${jobId}/quote"
}
]
}
The response from the composite request contains sub-responses with the results of each of the calls within the request.
IMPORTANT: The response shown here is only a very small sample of the graph that will actually be returned.
Shown here is just enough to demonstrate that responses have been returned from the three separate POST
commands, and that the submisson has successfully moved through creation of an account and a submission to
a quoted state.
Response
{
"responses": [{
"body": {
"data": {
"attributes": {
"accountHolder": {
"displayName": "August Joseph",
"id": "pc:120"
},
"accountNumber": "12345678",
"accountStatus": {
"code": "Pending",
"name": "Pending"
},
...
"status": 201
},
{
"body": {
"data": {
"attributes": {
"account": {
"displayName": "12345678",
"id": "pc:130",
"type": "Account",
"uri": "..."
},
...
"id": "pc:150",
"jobEffectiveDate": "2023-09-01T07:01:00.000Z",
"jobNumber": "0000123456",
"jobStatus": {
"code": "Draft",
"name": "Draft"
},
"jobType": {
"code": "Submission",
"name": "Submission"
},
"lines": {
"PersonalAutoLine": {
"answers": {
"q1": {
"booleanValue": false,
"displayValue": "false",
...
"status": 201
},
{
"body": {
"data": {
"attributes": {
"account": {
"displayName": "12345678",
"id": "pc:120",
"type": "Account",
"uri": "..."
},
"id": "pc:150",
"jobEffectiveDate": "2023-09-01T07:01:00.000Z",
"jobNumber": "0000123456",
"jobStatus": {
"code": "Quoted",
"name": "Quoted"
},
"jobType": {
"code": "Submission",
"name": "Submission"
},
...
"status": 200
}
]
}
At this point you can perform the additional step of binding and issuing the submission:
Command
POST /job/v1/jobs/pc:150/bind-and-issue
Response
{
"data": {
"attributes": {
"account": {
"displayName": "12345678",
"id": "pc:120",
...
"id": "pc:150",
"jobEffectiveDate": "2023-09-01T07:01:00.000Z",
"jobNumber": "0000123456",
"jobStatus": {
"code": "Bound",
"name": "Bound"
},
"jobType": {
"code": "Submission",
"name": "Submission"
},
...
}
}
}
Underwriting issues
When processing a job, an issue can occur that requires additional review by an underwriter. This review can determine
if and how to complete the job. To manage these circumstances, PolicyCenter provides underwriting issues.
An underwriting issue is an object attached to a job or policy that tracks an issue that may require underwriter review.
For detailed information on the business functionality of underwriting issues, see the Application Guide.
Cloud API provides endpoints for managing underwriting issues and related functionality. Most of these endpoints are
in the Job API, though there are a few in the Policy API.
Underwriting conditions
Some underwriting issues simply identify a situation. For example, an insurer may have an expectation that all insured
motorcycles have an anti-theft device. If a motorcycle is added to a personal auto submission without an anti-theft
device, the submission must be reviewed and approved. In this case, the underwriting issue identifies that there is a
motorcycle without an anti-theft device.
Other underwriting issues identify that a given value is above or below an expected threshold. For example, an insurer
may have a requirement for all drivers to be at or above the age of 25. If a driver under the age of 25 is added to a
submission, the submission must be reviewed and approved. In this case, the underwriting issue identifies a given value
(driver's age) with a comparator (under) and an expected threshold (25).
Blocking points
Typically, underwriting issues block the progress of the job at some point. For example, if a given type of underwriting
issue blocks job progress at quoting, then you cannot quote the job until the underwriting issue is resolved. The most
commonly used blocking points are Quoting, Binding, and Issuance.
Underwriting issues can also exist as informational only. These types of underwriting issues do not block job progress.
While a policy is in force, an insurer may become aware of information that has implications for the policy's renewal.
This information may require underwriter approval, but it is discovered before the start of the renewal job. Because
there is no active job, the information cannot be captured as an underwriting issue. To address these situations,
PolicyCenter supports referral reasons. Like underwriting issues, a referral reason is a flag that indicates an issue may
require underwriter review. However, referral reasons are attached only to policies. The next time a job is created for
the policy, the referral reason may trigger the creation of an underwriting issue.
Endpoint Response
GET /job/v1/jobs/{jobId}/uw-issues A collection of underwriting issues associated with the given job
GET /job/v1/jobs/{jobId}/uw-issues/ The specified underwriting issue
{uwIssueId}
GET /job/v1/jobs/{jobId}/uw-issues/ A collection of UWIssueHistory resources that trace the state history
{uwIssueId}/history of the specified underwriting issue.
When a job is bound, approved and informational underwriting issues are copied over to the policy.
To request information about underwriting issues associated with policies, use the following endpoints from the Policy
API:
Endpoint Response
GET /policy/v1/policies/{policyId}/uw-issues A collection of underwriting issues associated with the given policy
GET /policy/v1/policies/{policyId}/uw-issues/ A collection of UWIssueHistory resources that trace the state history
{uwIssueId}/history of the specified underwriting issue.
There are two ways you can retrieve a list of existing issue types and their codes: through Cloud API and through
PolicyCenter.
• GET /productdefinition/v1/reference-data/uw-issue-types
The following is a snippet of the output when executing this endpoint from the base configuration. It includes the
response for two issue types: UWManagerReviewBlocksQuoteRelease and TSTManualMonetaryAmount.
{
"data": [
{
"attributes": {
"checkingSet": {
"code": "Manual",
"name": "Manual"
},
"code": "UWManagerReviewBlocksQuoteRelease",
"comparator": {
"code": "None",
"name": "None"
},
"description": "To be reviewed by underwriting manager, blocking quote release",
"name": "To be reviewed by underwriting manager, blocking quote release",
"valueFormatterType": {
"code": "Unformatted",
"name": "Unformatted"
}
},
},
{
"attributes": {
"checkingSet": {
"code": "Manual",
"name": "Manual"
},
"code": "TSTManualMonetaryAmount",
"comparator": {
"code": "Monetary_LE",
"name": "At most (monetary)"
},
"description": "Test manually triggered issue with monetary amount format",
"name": "Test manually triggered issue with monetary amount format",
"valueFormatterType": {
"code": "MonetaryAmount",
"name": "MonetaryAmount"
}
}
...
<UWIssueType public-id="pc:ScEwfrYMvGZSphmhfSCtk">
<CheckingSet>Manual</CheckingSet>
<Code>UWManagerReviewBlocksQuoteRelease</Code>
<Comparator>None</Comparator>
<Description>To be reviewed by underwriting manager, blocking quote release</Description>
<Name>To be reviewed by underwriting manager, blocking quote release</Name>
<ValueFormatterType>Unformatted</ValueFormatterType>
</UWIssueType>
<UWIssueType public-id="pc:S6FIzWqP5JFpEaPvDURH5">
<CheckingSet>Manual</CheckingSet>
<Code>TSTManualMonetaryAmount</Code>
<Comparator>Monetary_LE</Comparator>
<Description>Test manually triggered issue with monetary amount format</Description>
<Name>Test manually triggered issue with monetary amount format</Name>
<ValueFormatterType>MonetaryAmount</ValueFormatterType>
</UWIssueType>
{
"data": {
"attributes": {
"issueType": {
"code": "<issue_type_code>"
},
"decimalValue": "<decimal>",
"integerValue": "<integer>
"moneyValue": {
"currency": "<currency>",
"amount": "<decimal>"
},
"stateSetValue": {
"inclusionType": "inclusive",
"states": [
"<code_from_State_typelist>",
"<code_from_State_typelist>"
]
}
}
}
}
POST /job/v1/jobs/pc:707/uw-issues
{
"data": {
"attributes": {
"issueType": {
"code": "UWManagerReviewBlocksQuoteRelease"
}
}
}
}
The following code creates a test underwriting issue for job pc:707 that specifies a monetary condition (underwriting
issue type TSManualMonetaryAmount). The monetary amount used in the condition is $1000 USD.
POST /job/v1/jobs/pc:707/uw-issues
{
"data": {
"attributes": {
"issueType": {
"code": "TSTManualMonetaryAmount"
},
"moneyValue": {
"currency": "usd",
"amount": "1000.00"
}
}
}
}
Approval endpoints
To approve an underwriting issue, use one of the following endpoints:
• POST /job/v1/jobs/{jobId}/uw-issues/{uwIssueId}/approve
• POST /job/v1/jobs/{jobId}/uw-issues/{uwIssueId}/special-approve
These endpoints do not require a request body.
When you either approve or "special approve" an underwriting issue:
• currentBlockingPoint is set to NonBlocking if the issue is fully approved
• hasApprovalOrRejection is set to true
• The duration of the approval, both as a stage of job processing and as a timeframe.
When approving an underwriting issue through Cloud API, you do not need to specify this information. However, you
can override the defaults by including the following properties in the approval request.
Money default moneyApprovalValue, which must include currency must be the value from the Value
a currency and amount value Currency typelist that matches the issue's
currency. amount must be a string.
State default stateSetValue object, which must include inclusionType is typically set to Value
an inclusionType and a states array inclusive. Members of the state array must
come from the State typelist and there must
be at least one value.
Approval canEditApprovalBeforeBind Boolean Allow Edit?
editability
Duration by job approvalBlockingPoint From the UWIssueBlockingPoint typelist Through
stage
Duration by approvalDurationType From the UWApprovalDurationType Valid until
time frame typelist which
The following example approves underwriting issue pc:2177 for job pc:707 with overrides for the default values.
POST /job/v1/jobs/pc:707/uw-issues/pc:2177/approve
{
"data": {
"attributes": {
"moneyApprovalValue": {
"currency": "usd",
"amount": "500.00"
},
"canEditApprovalBeforeBind": false,
"approvalBlockingPoint": {
"code": "BlocksIssuance"
},
"approvalDurationType": {
"code": "ThreeYears"
}
}
}
}
Job locks
A job can be locked to indicate that there are associated underwriting issues to review and the job ought to remain
unchanged while the issues are resolved. By default:
• A job in a draft state is unlocked.
• A job in a quoted state is locked.
Locking jobs
You can lock only jobs that are unlocked. To lock a job, use the following endpoint:
• /job/v1/jobs/{job-id}/edit-lock
The request object does not require a payload.
The /edit-lock endpoint sets the job's editLocked property to true.
Releasing locks
You can release the lock only for jobs that are locked. Note that if a quoted job is returned to a draft state (such as by
executing the POST /make-draft endpoint), it is still locked. You must use the POST /release-edit-lock endpoint
to unlock it.
To release a lock, use the following endpoint:
• /job/v1/jobs/{job-id}/release-edit-lock
The request object does not require a payload.
The /release-edit-lock endpoint sets the job's editLocked property to false.
When you release a lock, PolicyCenter automatically creates an activity using the uw_review_approved activity
pattern ("Underwriter has reviewed this job"). You can also optionally add a note.
When releasing a lock through Cloud API, you can optionally provide a request body with any of the following:
• Overrides of the activity values from the uw_review_approved activity pattern
• Activity assignment information
• A note
The following is an example of releasing a lock with this optional information:
• The priority of the activity is set to low (which overrides any priority value coming from the activity pattern).
• The activity is assigned to the group with id demo_sample:31 and the user with id demo_sample:1.
• There is an attached note.
POST /job/v1/jobs/pc:2277/release-edit-lock
{
"data": {
"attributes": {
"activity": {
"priority": {
"code": "low"
},
"initialAssignment": {
"groupId" : "demo_sample:31",
"userId" : "demo_sample:1"
}
},
"note": {
"body": "Lock release submitted through Cloud API",
"subject": "Lock release submitted through Cloud API"
}
}
}
}
For more information on specifying activity attributes, including activity assignment, see “Activities” on page 421.
For more information on specifying note attributes, see “Notes” on page 437.
Requesting approval
In some situations, a job has underwriting issues that cannot be addressed by the user assigned to the job. In these
situations, the assigned user can request approval from another user (typically a user with a greater level of authority).
For example, suppose there is a personal auto submission with three underwriting issues assigned to Alice Applegate.
Alice is able to approve the first two underwriting issues. But the third underwriting issue relates to a high deductible
and Alice lacks authority to approve this issue. Thus, Alice wishes to request approval from her supervisor.
When a user requests approval for an underwriting issue, PolicyCenter creates an activity using the approve_general
activity pattern ("Review and approve"). The requesting user can optionally:
• Override the default values coming from this activity pattern.
• Specify activity assignment logic
• Add a note
You can execute all of this functionality from Cloud API.
POST /job/v1/jobs/pc:2277/request-approval
{
"data": {
"attributes": {
"activity": {
"priority": {
"code": "low"
},
"initialAssignment": {
"groupId" : "demo_sample:31",
"userId" : "demo_sample:1"
}
},
"note": {
"body": "Requesting approval for high deductible",
"subject": "Requesting approval for high deductible"
}
}
}
}
For more information on specifying activity attributes, including activity assignment, see “Activities” on page 421.
For more information on specifying note attributes, see “Notes” on page 437.
Referral reasons
While a policy is in force, an insurer may become aware of information that has implications for the policy's renewal.
This information may require underwriter approval, but at the time the renewal has not yet been started. Because there
is no active job, the information cannot be captured as an underwriting issue.
To address these situations, PolicyCenter provides referral reasons. Like underwriting issues, a referral reason is an
object that tracks an issue that may require underwriter review. However, referral reasons are attached only to policies.
The next time a job is created for the policy, the referral reason may trigger the creation of an underwriting issue.
• For money referral reasons, a moneyValue object with amount and currency is required
• For stateSet referral reasons, a stateSetValue object with inclusionType and states is required, and states
must have one or more members.
• The LegacyReferralReason issue type is explicitly disallowed by Cloud API.
The following fields are not required to create a referral reason. However, they are displayed in the user interface.
Referral reasons that do not have these fields specified may be difficult to work with in the user interface.
• A shortDescription (displayed when listing referral reasons)
• A longDescription (displayed when providing details about referral reasons)
POST /policy/v1/policies/pc:707/uw-referral-reasons
{
"data": {
"attributes": {
"issueType": {
"code": "ReferralBlockingQuote"
},
"shortDescription": "Potential fraud",
"longDescription": "Potential fraud - verify appraisal values for covered luxury items are accurate"
}
}
}
The InsuranceSuite Cloud API is a set of RESTful system APIs that expose functionality in PolicyCenter so that caller
applications can request data from or initiate action within PolicyCenter.
The following topics discuss how caller applications can initiate business flows related to the Common API and the
Admin API. This includes:
• The Common API
◦ Activities
◦ Documents
◦ Notes
• The Admin API
◦ Users and groups
◦ Security zones
◦ Batch processes
◦ Database consistency checks
◦ Business entity schemas
◦ Testing
◦ Working with organizations
◦ Working with producer codes
Activities
An activity is an action related to the processing of an account, job, or policy that a user must attend to or be aware of.
Activities are ultimately assigned to a group and a user in that group. This user has the primary responsibility for
closing the activity.
Activities are typically created by users or by automatic PolicyCenter processes, and they are typically closed by users.
But, activities can be both created and closed by Cloud API calls.
For a complete description of the functionality of activities in PolicyCenter, see the Application Guide.
Note: Activities exist in all core InsuranceSuite applications. To ensure that activities behave in a common way
across all applications, some activity endpoints, such as the endpoints for querying for or assigning activities,
are declared in the Common API. Activities can also belong to accounts, jobs, and policies. These objects do
not exist in all InsuranceSuite applications. This means that other activity endpoints, such as the endpoint for
creating an activity for a job, are declared in the Account API, Job API, or Policy API. This topic always
identifies the API in which each endpoint is declared.
Note: ContactManager for Cloud API includes the Common API and its endpoints for working with activities.
However, in the base configuration of the ContactManager application, there is no user interface or business
rule support for activities. The activities endpoints have been included in Cloud API for ContactManager
primarily for the sake of consistency, and also to support any insurer who wishes to configure ContactManager
so that it can work with activities.
Endpoint Returns
/common/v1/activities All activities
/common/v1/activities/{activityId} The activity with the given ID
/account/v1/accounts/{accountId}/activities All activities associated with the given account
/job/v1/jobs/{jobId}/activities All activities associated with the given job
/policy/v1/policies/{policyId}/activities All activities associated with the given policy
Activities 421
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Note that the endpoints to retrieve activities exist in different APIs. To get all activities for an account, job, or policy,
you use endpoints in the Account API, Job API, or Policy API. But to get information about all activities (regardless of
parent), or to get information about a specific activity, you use endpoints in the Common API.
For example, the following query retrieves the IDs and subjects of all activities for account pc:101. This endpoint is in
the Account API.
Request
GET account/v1/accounts/pc:101/activities?fields=id,subject
Response
{
"count": 2,
"data": [
{
"attributes": {
"id": "pc:23221",
"subject": "All ordered MVRs received - Clear"
}
},
{
"attributes": {
"id": "pc:40404",
"subject": "Review Risk Information"
}
}
],
...
The following query retrieves activity pc:40404 in detail. This endpoint is in the Common API.
Request
GET /common/v1/activities/pc:40404
Response
{
"data": {
"attributes": {
"activityType": {
"code": "general",
"name": "General"
},
"assignedGroup": {
"displayName": "Los Angeles Branch UW",
"id": "pc:SPMK8WfF0qE3G7erNndfW"
},
"assignedUser": {
"displayName": "Alice Applegate",
"id": "pc:SSmfb1spW-C2IyI8rFOja",
"type": "User",
"uri": "/admin/v1/users/pc:SSmfb1spW-C2IyI8rFOja"
},
"assignmentStatus": {
"code": "assigned",
"name": "Assigned"
},
"createTime": "2023-11-26T08:02:56.607Z",
"description": "Review the risk information for the policy's scheduled items.",
"dueDate": "2023-11-26T08:02:56.604Z",
"escalated": false,
"externallyOwned": false,
"id": "pc:40404",
"mandatory": false,
"priority": {
"code": "normal",
"name": "Normal"
},
"recurring": false,
"status": {
"code": "open",
"name": "Open"
},
"subject": "Review Risk Information"
},
...
422 Activities
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Creating activities
Activities must be created from an existing account, job, or policy using one of the following endpoints:
• POST account/v1/accounts/{accountId}/activities
• POST job/v1/jobs/{jobId}/activities
• POST policy/v1/policies/{policyId}/activities
Activity patterns
Activities are created from activity patterns. An activity pattern is a set of default values for fields in the activity (such
as description, subject, and priority). Every activity pattern has a code, such as contact_insured or legal_review.
When creating an activity through Cloud API, the only required field is activityPattern, which must specify the
activity pattern's code. Because the activity pattern typically contains all the necessary default values, the activity
pattern is often the only field the caller application needs to specify.
You can retrieve a list of activity patterns using the following:
• GET /account/v1/accounts/{accountId}/activity-patterns
• GET /job/v1/jobs/{jobId}/activity-patterns
• GET /policy/v1/policies/{policyId}/activity-patterns
You can optionally specify values for the following fields, each of which overrides the value coming from the activity
pattern:
POST /account/v1/accounts/pc:10/activities
Activities 423
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Request
{
"data": {
"attributes": {
"activityPattern": "contact_insured"
}
}
}
The following is an example of creating a legal_review activity for account pc:10. In this case, two activity pattern
values are overridden: the activity is mandatory (it cannot be skipped) and the priority is urgent.
Command
POST /account/v1/accounts/pc:10/activities
Request
{
"data": {
"attributes": {
"activityPattern": "legal_review",
"mandatory": true,
"priority": {
"code": "urgent"
}
}
}
}
Assigning activities
Ultimately, every activity is assigned to a group and a user in that group. This user has the primary responsible for
closing the activity.
Activities can be temporarily assigned to queues. A queue is a repository belonging to a group which contains activities
assigned to the group but not yet to any user in that group. Users in the group can then take ownership of activities
manually as desired.
When you create an activity through Cloud API, PolicyCenter automatically executes the activity assignment rules to
initially assign the activity to a group and user. You can use the /{activityId}/assign endpoint to reassign the
activity as needed.
Assignment options
An activity can be assigned through Cloud API in the following ways:
• To a specific group and user in that group
• To a specific group only (and then PolicyCenter uses assignment rules to select a user in that group)
• To a specific group and queue
• To the user who holds a given role on the parent account, job, or policy
• By re-running the activity assignment rules
◦ This can be appropriate if you have modified the activity since the last time assignment rules were run and the
modification might affect who the activity would be assigned to.
The root resource for the /{activityId}/assign endpoint is Assignee. This resource specifies assignment criteria.
The Assignee schema has the following fields:
424 Activities
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Assignment examples
When assigning activities to users, the user must be active and must have the "own activity" system permission.
POST /common/v1/activities/xc:1/assign
{
"data": {
"attributes" : {
"groupId" : "demo_sample:31",
"userId" : "demo_sample:1"
}
}
}
The following payload assigns activity xc:1 to group demo-sample:31. Because no user has been specified,
PolicyCenter will execute assignment rules to assign the activity to a user in group demo-sample:31.
POST /common/v1/activities/xc:1/assign
{
"data": {
"attributes" : {
"groupId": "demo_sample:31"
}
}
}
POST /common/v1/activities/xc:1/assign
{
"data": {
"attributes" : {
"queueId": "cc:32"
}
}
}
For example, if an account activity is to be assigned to Underwriter and the underwriter for the account is Bruce
Baker, the activity is assigned to Bruce Baker.
If you attempt to assign an activity by role and there is no user on the parent object with the given role, PolicyCenter:
• Identifies the user that created the object (This is the user with the Creator role.)
Activities 425
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
POST /common/v1/activities/xc:1/assign
{
"data": {
"attributes" : {
"role" : {
"code" : "Underwriter"
}
}
}
}
POST /common/v1/activities/xc:1/assign
{
"data": {
"attributes": {
"autoAssign" : true
}
}
}
For more information on assignment rules, see the Gosu Rules Guide.
Endpoint Returns
/common/v1/activity/{activityId}/assignees The list of suggested assignees for this activity
/account/v1/accounts/{accountId}/activity-assignees The list of suggested assignees for activities on this account
The following is a portion of an example response from the Common API's /assignees endpoint.
GET /common/v1/activities/pc:301/assignees
RESPONSE:
{
"count": 5,
"data": [
{
"attributes": {
"name": "Creator",
426 Activities
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
"role": {
"code": "Creator",
"name": "Creator"
}
}
},
{
"attributes": {
"groupId": "systemTables:1",
"name": "Edward Lee (Enigma Fire & Casualty)",
"userId": "pc:23"
}
},
{
"attributes": {
"groupId": "systemTables:1",
"name": "Alice Applegate (Enigma Fire & Casualty)",
"userId": "pc:8"
}
},
...
],
...
Closing activities
An activity is closed either by completing it or skipping it. In order to be closed, the activity must be opened and
assigned to a user.
When closing an activity, there are two options for the request payload:
• An empty payload
• A payload with an included note. (This option is used when you want to create a note while you close the activity.
The payload has no data section, but it does have an included section.)
All endpoints for closing activities are in the Common API.
Completing an activity
Completing an activity indicates that the corresponding action has been taken or the assignee is aware of the
corresponding issue.
The following payload completes activity xc:1.
POST /common/v1/activities/xc:1/complete
POST /common/v1/activities/xc:1/complete
{
"included": {
"Note": [
{
"attributes": {
"body": "This activity was completed through a system API call."
},
"method": "post",
"uri": "/common/v1/activities/xc:1/notes"
}
]
}
}
Skipping an activity
Skipping an activity indicates that there is no longer a need to take the action that the activity originally identified.
Activities have a mandatory Boolean field. If this is set to true, the activity cannot be skipped.
Activities 427
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
POST /common/v1/activities/xc:1/skip
POST /common/v1/activities/xc:1/skip
{
"included": {
"Note": [
{
"attributes": {
"body": "This activity was skipped by a system API call."
},
"method": "post",
"uri": "/common/v1/activities/xc:1/notes"
}
]
}
}
PATCHing activities
• PATCH /activities/{activityId}
428 Activities
chapter 48
Documents
In PolicyCenter, a document is an electronic file (such as a PDF, Word document, or digital photograph) which
contains information relevant to an account, job, or policy. Examples of documents could include photographs of
covered jewelry, assessments from property inspectors, or correspondences with the insured. (Note that documents do
not contain contractual parts of the policy. The policy contract is specified in PolicyCenter forms, not PolicyCenter
documents.)
For a complete description of the functionality of documents in PolicyCenter, see the Application Guide.
Note: Documents exist in all core InsuranceSuite applications. To ensure that documents behave in a common
way across all applications, some document endpoints, such as the endpoints for querying for document
metadata or contents, are declared in the Common API. Documents can also belong to accounts, jobs, and
policies. These objects do not exist in all InsuranceSuite applications. This means that other document
endpoints, such as the endpoint for creating a document for a job, are declared in the Account API, Job API, or
Policy API. This topic always identifies the API in which each endpoint is declared.
Note: ContactManager provides the ability to attach documents to contacts. However, the contact must have the
"vendor" tag. Documents cannot be attached to non-vendor contacts.
Overview of documents
Document owners
Documents cannot exist on their own. They must be attached to a parent object. From a Cloud API perspective,
PolicyCenter documents are always attached to an account, a job, or a policy.
In ContactManager, documents can be attached only to vendor contacts (contacts with the "vendor" tag).
Documents can exist in an InsuranceSuite application with metadata but no contents. For example, this may be
appropriate when a document is a physical piece of paper retained by the insurer. The insurer may want to track the
existence of the document and metadata about the document, even though the contents are not in the Document
Management System.
Documents cannot exist in an InsuranceSuite application with contents but no metadata.
docUIDs
When a document is stored in a Document Management System, it is assigned a DOCument Unique IDentifier, or
docUID. This value can be set through Cloud API when the document is POSTed. Some Document Management
Systems may modify the docUID of an existing document. Therefore, Cloud API also supports the ability to change
docUIDs in PATCHes.
Endpoint Returns
/common/v1/documents/{documentId} Metadata for the given document
/account/v1/accounts/{accountId}/documents Metadata for documents on the given account
/job/v1/jobs/{jobId}/documents Metadata for documents on the given job
/policy/v1/policies/{policyId}/documents Metadata for documents on the given policy
GET /common/v1/documents/xc:101
{
"data": {
"attributes": {
"author": "Sue Smith",
"dateModified": "2020-12-07T23:40:23.534Z",
"docUID": "2020/11/7/235-53-425892/Legal Ownership of Property",
"id": "xc:101",
"inbound": false,
"mimeType": "text/plain",
"name": "Legal Ownership of Property",
"obsolete": false,
"section": {
"code": "legal",
"name": "Legal"
},
"status": {
"code": "final",
"name": "Final"
},
"type": {
"code": "other",
"name": "Other"
}
},
...
430 Documents
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
The following is a portion of an example response from the Common API's /documents/{documentId}/content
endpoint.
GET /common/v1/documents/xc:101/content
RESPONSE:
{
"data": {
"attributes": {
"contents": "REVWIEJVSUxEDQoNCklmIHRoZXJlIGlzIG9ubHkgYSB2aXN1YWxp
emVkIHByb2R1Y3QNCiAgQU5EIHRoZSAiRW5hYmxlZCBmb3IgUmVzdCBBUEkiIGZpZWxkIGlzIGlua
XRpYWxseSBzZXQgdG8gRW5hYmxlZA0KICBBTkQgeW91IGNoYW5nZSB0aGUgZmllbGQgdG8gRGlzYW
JsZWQNCiAgVEhFTiB0aGUgcHJvZHVjdCBpcyBpbW1lZGlhdGVseSB1bmF2YWlsYWJsZSB0byB0aGU
gc3lzdGVtIEFQSXMNCg0KSWYgdGhlcmUgaXMgYSB2aXN1YWxpemVkIHByb2R1Y3QgYW5kIGEgZmlu
YWxpemVkIHByb2R1Y3QNCiAgQU5EIHRoZSAiRW5hYmxlZCBmb3IgUmVzdCBBUEkiIGZpZWxkIGlzI
GluaXRpYWxseSBzZXQgdG8gRW5hYmxlZA0KICBBTkQgeW91IGNoYW5nZSB0aGUgZmllbGQgdG8gRG
lzYWJsZWQNCiAgVEhFTiB0aGUgZmluYWxpemVkIHByb2R1Y3QgaXMgaW1tZWRpYXRlbHkgYXZhaWx
hYmxlIHRvIHRoZSBzeXN0ZW0gQVBJcw0KDQpDVVNUT01FUiBCVUlMRA0KDQpJZiB0aGVyZSBpcyBv
bmx5IGEgdmlzdWFsaXplZCBwcm9kdWN0DQogIEFORCB0aGUgIkVuYWJsZWQgZm9yIFJlc3QgQVBJI
iBmaWVsZCBpcyBpbml0aWFsbHkgc2V0IHRvIEVuYWJsZWQNCiAgQU5EIHlvdSBjaGFuZ2UgdGhlIG
ZpZWxkIHRvIERpc2FibGVkDQogIFRIRU4gdGhlIHByb2R1Y3QgaXMgaW1tZWRpYXRlbHkgdW5hdmF
pbGFibGUgdG8gdGhlIHN5c3RlbSBBUElzDQooSSBhc3N1bWUgdGhpcyBpcyB0aGUgc2FtZSBhcyAN
Cg0KSWYgdGhlcmUgaXMgYSB2aXN1YWxpemVkIHByb2R1Y3QgYW5kIGEgZmluYWxpemVkIHByb2R1Y
3QNCiAgQU5EIHRoZSAiRW5hYmxlZCBmb3IgUmVzdCBBUEkiIGZpZWxkIGlzIGluaXRpYWxseSBzZX
QgdG8gRW5hYmxlZA0KICBBTkQgeW91IGNoYW5nZSB0aGUgZmllbGQgdG8gRGlzYWJsZWQNCiAgVEh
FTiB0aGUgZmluYWxpemVkIHByb2R1Y3QgaXMgaW1tZWRpYXRlbHkgYXZhaWxhYmxlIHRvIHRoZSBz
eXN0ZW0gQVBJcw==",
"responseMimeType": "text/plain"
},
...
POSTing documents
Use the following endpoints to POST documents:
• POST /account/v1/accounts/{accountId}/documents
• POST /job/v1/jobs/{jobId}/documents
• POST /policy/v1/policies/{policyId}/documents
• (ContactManager) POST /contact/v1/contacts/{contactId}/documents
◦ In ContactManager, documents can be posted only to contacts with the "vendor" tag.
FormData objects
For most Cloud API endpoints, the request has a body with a single string of JSON text. However, this format is not
sufficiently robust for documents. When working with documents, the caller application typically sends two sets of
data: the document metadata and the document contents. This is accomplished using FormData objects.
FormData is an industry-standard interface that constructs an object as a set of key/value pairs. When a caller
application is constructing a POST /documents call, the request has a FormData object with the following keys:
• metadata, whose value is a JSON string identifying the document metadata
• content, whose value is the contents of the document (and whose format varies based on the document type)
Documents 431
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
• You can POST information about a document that is not yet in the Document Management System.
• You can POST information about a document that is already in the Document Management System but is not yet
known to PolicyCenter.
• You can POST information about a document that will never be in the Document Management System (such as a
physical piece of paper that must be tracked by PolicyCenter).
POST /account/v1/accounts/pc:10/documents
METADATA:
{
"data": {
"attributes": {
"name": "Property Assessment Report",
"status": {
"code": "draft"
},
"type": {
"code": "letter_received"
}
}
}
}
CONTENTS:
<contents of "Property Assessment Report.pdf" file>
POST /account/v1/accounts/pc:10/documents
METADATA:
{
"data": {
"attributes": {
"docUID": "doc:11-31",
"name": "Property Assessment Report",
"status": {
"code": "draft"
},
"type": {
"code": "letter_received"
}
}
}
}
CONTENTS:
<no content specified>
432 Documents
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
If a POST /documents call needs to specify document metadata only, it can be executed using a request body that is
formatted as JSON (as opposed to FormData). For more information, see “Sending document metadata only using
JSON” on page 435.
POST /account/v1/accounts/pc:10/documents
METADATA:
{
"data": {
"attributes": {
"name": "Printout of email from auto dealership",
"status": {
"code": "final"
},
"type": {
"code": "letter_received"
}
}
}
}
CONTENTS:
<no content specified>
If a POST /documents call needs to specify document metadata only, it can be executed using a request body that is
formatted as JSON (as opposed to FormData). For more information, see “Sending document metadata only using
JSON” on page 435.
Procedure
1. Identify the files needed for the FormData object. This includes:
• A JSON file that contains the metadata. (The file extension must be .json.)
• The document file that has the content.
2. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
3. Under the Untitled Request label, select POST.
4. In the Enter request URL field, enter the URL for the server and the endpoint.
• For example, to POST a document to an account on an instance of PolicyCenter on your machine, enter:
http://localhost:8180/pc/rest/account/v1/accounts/{accountId}/documents
5. On the Authorization tab, specify authorization information as appropriate.
Documents 433
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
PATCHing documents
Use the following to PATCH documents:
• PATCH /common/v1/documents/{documentId}
Logically speaking, a PATCH call can modify only the metadata of a document, only the content of a document, or
both.
PATCH /common/v1/documents/xc:127
METADATA:
{
"data": {
"attributes": {
"status": {
"code": "final"
}
}
}
}
You can also submit a metadata-only PATCH using a request body that is formatted as JSON (as opposed to
FormData). For more information, see “Sending document metadata only using JSON” on page 435.
PATCHes to content are destructive, not additive. If you specify content, the new content replaces the previous
content entirely.
For example, the following call updates the entire content for document xc:127 (without changing any of the
metadata).
PATCH /common/v1/documents/xc:127
METADATA:
434 Documents
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
{
"data": {
"attributes": {
}
}
}
}
PATCH /common/v1/documents/xc:127
METADATA:
{
"data": {
"attributes": {
"status": {
"code": "final"
}
}
}
}
PATCH /account/v1/accounts/pc:102/documents/pc:555
{
"data": {
"attributes": {
"status": {
"code": "final"
}
}
}
}
DELETEing documents
Use the following to DELETE documents:
• /common/v1/documents/{documentId}
For example, the following request DELETEs document xc:101:
PATCH /common/v1/documents/xc:101
Documents 435
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
436 Documents
chapter 49
Notes
A note is a free-form record of the actions or thinking of a user or process. Notes are typically used to capture
information that cannot be easily captured in some other way on some other business object. Notes are typically
created by users, but they can be created by batch processes or other system behavior within PolicyCenter. They can
also be created by caller applications using Cloud API.
Through Cloud API, a note can be attached to an account, a job, or a policy. Notes can also be attached to activities.
For a complete description of the functionality of notes in PolicyCenter, see the Application Guide.
Note: Notes exist in all core InsuranceSuite applications. To ensure that notes behave in a common way across
all applications, some note endpoints, such as the endpoints for querying for a note with a given ID, are
declared in the Common API. Notes can also belong to accounts, jobs, and policies. These objects do not exist
in all InsuranceSuite applications. This means that other note endpoints, such as the endpoint for querying for
notes related to a given job, are declared in the Account API, Job API, or Policy API. This topic always
identifies the API in which each endpoint is declared.
Note: ContactManager for Cloud API includes the Common API and its endpoints for working with notes.
However, in the base configuration of the ContactManager application, there is no user interface or business
rule support for notes. The notes endpoints have been included in Cloud API for ContactManager primarily for
the sake of consistency, and also to support any insurer who wishes to configure ContactManager so that it can
work with notes.
Endpoint Returns
/common/v1/notes/{noteId} The note with the given ID (see below)
/account/v1/accounts/{accountId}/notes All notes associated with the given account
/job/v1/jobs/{jobId}/notes All notes associated with the given job
/policy/v1/policies/{policyId}/notes All notes associated with the given policy
/common/v1/activities/{activityId}/notes All notes associated with the given activity
By default, the GET /notes/{noteId} endpoint returns the body field, but the GET /notes endpoints do not. This is
because of the potentially large size of the body field. To prevent overly large payloads, Guidewire recommends that
you retrieve the body field only if the body is needed. The body can be retrieved using the ?fields=body query
parameter.
Notes 437
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
The /common/v1/notes/{noteId} endpoint can be used to retrieve any note in PolicyCenter. This includes notes that
are attached to a parent object other than an account, job, or policy.
Minimal notes
The following is an example of creating a note for account pc:10.
POST /account/v1/accounts/pc:10/notes
{
"data": {
"attributes": {
"body": "The insured's last name, Cahill, is pronounced 'KAH-hill', not 'KAY-hill'."
}
}
}
POST /account/v1/accounts/pc:10/notes
{
"data": {
"attributes": {
"body": "The insured's last name, Cahill, is pronounced 'KAH-hill', not 'KAY-hill'." ,
"confidential": false,
"securityType": {
"code": "unrestricted"
},
"subject": "Pronunciation note",
"topic": {
"code": "general"
}
}
}
}
POST /common/v1/activities/xc:22/notes
438 Notes
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
{
"data": {
"attributes": {
"body": "This activity was completed during a telephone call with the insured on 11/17."
}
}
}
PATCHing notes
• PATCH common/v1/notes/{noteId}
DELETEing notes
• DELETE common/v1/notes/{noteId}
Notes 439
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
440 Notes
chapter 50
Cloud API provides endpoints in the Admin API to support several of the tasks associated with user and group
management.
Users
In most cases, a user is a person who is known to PolicyCenter and who is listed in the PolicyCenter database (such as
policy underwriters, claims adjusters, and billing clerks). Within the context of Cloud API authentication, this is also
referred to as an internal user.
In some cases, a user can represent a service. This occurs for caller applications which are services which are mapped
to user accounts for the purpose of managing access.
Do not confuse internal users with external users. External users are users known to PolicyCenter but who are not
listed in the PolicyCenter database (such as account holders, policy holders, and service vendors).
For information on working with services and external users, see the Cloud API Developer Guide.
Note: Be aware that Cloud API enforces application constraints specified in internal code, but it does not
enforce constraint specified in the user interface. This is because internal code constraints cannot be modified or
removed, but user interface constraints can. As a result of this, there may be actions you can execute through
Cloud API that you cannot execute through the base configuration user interface.
For example, there is no internal code that requires a user to have a phone number. Therefore, you can create
and modify a user through Cloud API without ever specifying a primary phone number. However, the base
configuration user interface does require you to specify a phone number. Therefore, any user that you modify
through the base configuration user interface must have a phone number, even when that user was created
through Cloud API without a phone number.
If there is a desire to have the constraints of the two environments match, insurers can add constraints to Cloud
API and/or remove them from the user interface.
Note:
By default, only users in the requesting user’s organization will be returned. To retrieve users in all
organizations, include the following filter query parameter:
GET /admin/v1/users?filter=*none
Command
GET /admin/v1/users/pc:S-sAtIMQDbK0z3b2E7Mvw
Response
{
"data": {
"attributes": {
"active": true,
"displayName": "Alice Applegate",
"externalUser": false,
"firstName": "Alice",
"groups": [
{
"displayName": "Los Angeles Branch UW",
"id": "pc:SSXQ8EaLxQq4LZ33Ia76r"
},
{
"displayName": "Eastern Region Underwriting",
"id": "pc:SVZTqTgdrHJKYQV9aGCbN"
}
],
"id": "pc:S-sAtIMQDbK0z3b2E7Mvw",
"lastName": "Applegate",
"organization": {
"displayName": "Enigma Fire & Casualty",
"id": "systemTables:1",
"type": "Organization",
"uri": "/admin/v1/organizations/systemTables:1"
},
"roles": [
{
"displayName": "Reinsurance Manager",
"id": "reinsurance_manager",
"type": "Role"
},
{
"displayName": "Underwriter",
"id": "underwriter",
"type": "Role"
}
],
"useOrgAddress": true,
"useProducerCodeSecurity": false,
"userType": {
"code": "underwriter",
"name": "Underwriter"
},
"username": "aapplegate",
"uwAuthorityProfiles": [
{
"displayName": "Underwriter 1",
"id": "pc:underwriter1",
"type": "UWAuthorityProfile",
"uri": "/admin/v1/uw-authority-profiles/pc:underwriter1"
}
],
"vacationStatus": {
"code": "atwork",
"name": "At work"
},
"workPhone": {
"displayName": "213-555-8164",
"number": "2135558164"
}
}
}
}
Creating users
To create a user, use the following endpoint:
• POST /admin/v1/users
Note: When a user is created through Cloud API, the user's password is set to a value that cannot be used for
authentication. (The password is set to a value that is not a valid Base64 string, but the authentication
framework can authenticate passwords only when they are valid Base64 strings.) In order for the new user to
authenticate, the password must first be changed to a valid Base64 string through some other method, such as
through the user interface.
{
"data": {
"attributes": {
"username": "amartin"
}
}
}
POST /admin/v1/users
{
"data": {
"attributes": {
"active": true,
"displayName": "",
"externalUser": false,
"id": "pc:SatEdbNuwVSfc2BvbG4g4",
"organization": {
"displayName": "Enigma Fire & Casualty",
"id": "systemTables:1",
"type": "Organization",
"uri": "/admin/v1/organizations/systemTables:1"
},
"useOrgAddress": true,
"useProducerCodeSecurity": false,
"userType": {
"code": "other",
"name": "Other"
},
"username": "amartin",
"vacationStatus": {
"code": "atwork",
"name": "At work"
}
},
"checksum": "8b01f84c8076ba3f8c235cb2483cdbfb",
"links": {
"self": {
"href": "/admin/v1/users/pc:SatEdbNuwVSfc2BvbG4g4",
"methods": [
"get",
"patch"
]
}
}
}
}
POST /admin/v1/users
{
"data": {
"attributes": {
"firstName": "Adriana",
"lastName": "Diaz",
"username": "adiaz",
"employeeNumber": "ACME-02027",
"roles" : [
{
"id": "audit_examiner"
},
{
"id": "audit_supervisor"
}
]
}
}
}
When you create a user, you can also specify the user's roles, authority profile, and producer codes (if the user is bound
by producer code security).
• For more information on working with user roles, see “User roles” on page 450.
• For more information on working with authority profiles, see “Authority profiles” on page 453.
• For more information on working with a user's producer codes, see “Producer codes” on page 465.
Updating users
Use the following endpoint to modify an existing user:
• PATCH /admin/v1/users/{userId}
For example, the following request updates the first name of user xc:2156
PATCH /admin/v1/users/xc:2156
{
"data": {
"attributes": {
"firstName": "Alex"
}
}
}
Deleting users
Use the following endpoint to delete an existing user:
• DELETE /admin/v1/users/{userId}
For example, the following request deletes user xc:2156:
DELETE /admin/v1/users/xc:2156
Groups
A group is a set of users who represent a single business unit or who are assigned a single body of work.
GET /admin/v1/users/demo_sample:31
{
"data": {
"attributes": {
"displayName": "Alexandria Branch",
"groupType": {
"code": "branch",
"name": "Branch office"
},
"id": "demo_sample:31",
"name": "Alexandria Branch",
"parent": {
"displayName": "Eastern Region",
"id": "demo_sample:29",
"type": "Group",
"uri": "/admin/v1/groups/demo_sample:29"
},
"securityZone": {
"displayName": "Auto and Property",
"id": "default_data:1"
},
"supervisor": {
"displayName": "Sue Smith",
"id": "demo_sample:2",
"type": "User",
"uri": "/admin/v1/users/demo_sample:2"
}
},
...
}
}
Creating groups
To create a group, use the following endpoint:
• POST /admin/v1/groups
When creating a group, you must specify the following values:
• groupType - a value from the GroupType typelist, such as general
• name - a string value
• parent - A JSON object with an id field that references the id of the parent group
• securityZone - A JSON object with an id field that references the id of the group's security zone
• supervisor - A JSON object with an id field that references the id of the user who is the supervisor
As of this release, there is no endpoint for retrieving information about security zones. To identify the ID of the desired
security zone, you must use some other method.
The user who is designated as the supervisor of the group is not required to be a member of the group. Also, designated
a user as the supervisor does not automatically add the user to the group as a member.
For example, the following request creates a new group:
POST /admin/v1/groups
{
"data": {
"attributes": {
"groupType": {
"code": "general"
},
GET /admin/v1/users/demo_sample:31/users
"count": 12,
"data": [
{
"attributes": {
"id": "cc:SfZwdri9ldAAUgR46xZT7",
"manager": false,
"member": true,
"user": {
"displayName": "Andy Applegate",
"id": "demo_sample:1",
"type": "User",
"uri": "/admin/v1/users/demo_sample:1"
}
},
...
},
{
"attributes": {
"id": "cc:SZPhG_CUIA3E1sO2AiZ_s",
"manager": false,
"member": true,
"user": {
"displayName": "Betty Baker",
"id": "demo_sample:8",
"type": "User",
"uri": "/admin/v1/users/demo_sample:8"
}
},
...
},
...
POST /admin/v1/groups/demo_sample:31/users
{
"data": {
"attributes": {
"user": {
"id": "demo_sample:18"
}
}
}
}
This assigns user demo_sample:18 to group demo_sample:31 as a member. The user is not a manager of the group and
has a null load factor. (If a field’s value is null, the field is not included in Cloud API responses.)
PATCH /admin/v1/groups/demo_sample:31/users/xc:55
"data": {
"attributes": {
"manager": true,
"member": false
}
}
}
DELETE /admin/v1/groups/demo_sample:31/users/xc:55
Updating groups
Use the following endpoint to modify an existing group:
• PATCH /admin/v1/groups/{groupId}
For example, the following request updates the supervisor of group xc:202:
PATCH /admin/v1/groups/xc:202
{
"data": {
"attributes": {
"supervisor": {
"id": "demo_sample:6"
}
}
}
}
Deleting groups
Use the following endpoint to delete an existing group:
• DELETE /admin/v1/groups/{groupId}
For example, the following request deletes group xc:202:
DELETE /admin/v1/groups/xc:202
Queues
A queue is a named repository that belongs to a specific group and that contains activities assigned to the group but not
yet to any user in the group. Users who belong to the group can assign activities in a queue to themselves. Queues are
often used to allow users in a group to take ownership of activities as their workload or expertise permits.
In the data model, queues are managed using the AssignableQueue data model entity.
In order to work with queues in the base configuration, the following must exist:
• Support for queues in the data model
• Assignment methods that let activities be assigned to queues
• Rules that create queues automatically, and/or user interface controls that let administrators create queues manually
• User interface screens to let users view queues and the activities assigned to them, and to take ownership of
activities in the queue
The base configuration of ClaimCenter has all of the above items. Thus, the base configuration of ClaimCenter
supports queues.
The base configuration of PolicyCenter and BillingCenter have the first two items only. PolicyCenter and BillingCenter
can support queues, but further configuration is required.
GET /admin/v1/groups/cc:118/queues/cc:790
{
"data": {
"attributes": {
"description": "Auto-created FNOL queue for group",
"id": "xc:790",
"name": "FNOL",
"subGroupVisible": false
},
...
Creating queues
Use the following endpoint to create queues:
• POST /admin/v1/groups/{groupId}/queues
When creating queues, the only required values are:
• name - A string
• subGroupVisible - A Boolean indicating whether the queue is visible from sub-groups of the group to which it
belongs
For example, the following request creates a new queue for group cc:118:
POST /admin/v1/groups/cc:118/queues
{
"data": {
"attributes": {
"name": "Damaged vehicle evaluations",
"subGroupVisible": true
}
}
}
• PATCH /admin/v1/groups/{groupId}/queues/{queueId}
For example, the following request PATCHES queue cc:990 for group cc:118:
PATCH /admin/v1/groups/cc:118/queues/cc:990
{
"data": {
"attributes": {
"description": "Queue for activities to process evaluations of damaged vehicles"
}
}
}
DELETE /admin/v1/groups/cc:118/queues/cc:990
User roles
A system permission is a granular permission that identifies something a user can view, edit, create, or otherwise work
with.
A user role is a named group of system permissions. User roles simplify the work of granting access by allowing a set
of related system permissions to be assigned to a user. (Note that in most Guidewire documentation, user roles are
referred to simply as "roles". The Cloud API documentation uses the term "user role" to help distinguish them from
"API roles", which is a feature with a similar purpose but different underlying functionality.)
GET /admin/v1/roles?pageSize=4
{
"count": 5,
"data": [
{
"attributes": {
"carrierInternal": true,
"description": "Permissions for account admin",
"displayName": "Account Manager",
"id": "account_manager",
"name": "Account Manager"
}
},
{
"attributes": {
"carrierInternal": true,
"description": "All permissions related to activity rules",
"displayName": "Activity Rules Admin",
"id": "activity_rules_admin",
"name": "Activity Rules Admin"
}
},
{
"attributes": {
"carrierInternal": true,
"description": "Permissions to edit activity rules",
"displayName": "Activity Rules Editor",
"id": "activity_rules_editor",
"name": "Activity Rules Editor"
}
},
{
"attributes": {
"carrierInternal": true,
"description": "Permissions to view activity rules",
"displayName": "Activity Rules Viewer",
"id": "activity_rules_viewer",
"name": "Activity Rules Viewer"
}
}
]
}
GET /admin/v1/roles/claims_adjuster/permissions
{
"count": 25,
"data": [
{
"attributes": {
"id": "sample_data:213",
"permission": {
"code": "lvprint",
"name": "Print listviews"
}
},
...
},
{
"attributes": {
"id": "sample_data:222",
"permission": {
"code": "searchpols",
"name": "Search related policies"
}
},
...
},
{
"attributes": {
"id": "sample_data:210",
"permission": {
"code": "actview",
"name": "View activities"
}
},
...
},
...
• name
• roleType
roleType must be a value from the RoleType typelist. The following table summarizes the role types available in
InsuranceSuite.
For example, the following creates a new user role for users named "finance_admin".
POST /admin/v1/roles
{
"data": {
"attributes": {
"roleType": {
"code": "user"
},
"name": "finance_admin"
}
}
}
POST /admin/v1/roles/xc:222/permissions
{
"data": {
"attributes": {
"permission": {
"code": "notecreate"
}
}
}
}
There is no way to specify multiple permissions in a single call to the /permissions endpoint. You must invoke the /
permissions endpoint once for each permission to be added to a role.
POST /admin/v1/roles
{
"data": {
"attributes": {
"roleType": {
"code": "user"
},
"name": "finance_admin"
}
},
"included": {
"RolePermission": [
{
"attributes": {
"permission": {
"code": "noteview"
}
},
"method": "post",
"uri": "/admin/v1/roles/this/permissions"
}
]
}
}
Endpoint Description
PATCH /admin/v1/roles/{roleId} Modify attributes about the role, such as its name or description
DELETE /admin/v1/roles/{roleId}/permissions/ Remove a permission from a role
{permissionId}
DELETE /admin/v1/roles/{roleId} Delete a role
PATCH /admin/v1/roles/xc:222
{
"data": {
"attributes": {
"name": "Finance Administrator",
"description": "User role for finance administrators"
}
}
}
DELETE /admin/v1/roles/xc:222/permissions/xc:515
DELETE /admin/v1/roles/xc:222
Authority profiles
An underwriting issue is an object attached to a policy transaction that indicates some aspect of the transaction requires
review and approval by an underwriter. Underwriting issues are created automatically by underwriting rules.
An authority profile is a collection of authority grants that can be associated with one or more users. Each authority
grant lists a type of underwriting issue, with an optional condition, that the associated users can approve. For example,
a given authority profile could grant the ability to approve the following types of underwriting issues:
• Producer code changed (issue type with no condition)
• Claim total incurred is greater than $10,000 (issue type with a "> 10000" condition)
Through Cloud API, you can retrieve information about authority profiles and assign them to users. You can also
create, update, and delete them.
GET /admin/v1/uw-authority-profiles/
{
"count": 9,
"data": [
{
"attributes": {
"description": "Agent 1",
"displayName": "Agent 1",
"id": "pc:agent1",
"name": "Agent 1"
}
},
{
"attributes": {
"description": "Agent 2",
"displayName": "Agent 2",
"id": "pc:SFWdb3rRQxDA9AyksL1p_",
"name": "Agent 2"
}
},
{
"attributes": {
"description": "External User Profile",
"displayName": "External User Profile",
"id": "authorityprofile:extuser",
"name": "External User Profile"
},
},
{
"attributes": {
"description": "Service User Profile",
"displayName": "Service User Profile",
"id": "authorityprofile:serviceuser",
"name": "Service User Profile"
}
},
{
"attributes": {
"description": "Unauthenticated User Profile",
"displayName": "Unauthenticated User Profile",
"id": "authorityprofile:uauser",
"name": "Unauthenticated User Profile"
}
},
{
"attributes": {
"description": "Underwriter 1",
"displayName": "Underwriter 1",
"id": "pc:underwriter1",
"name": "Underwriter 1"
}
},
{
"attributes": {
"description": "Underwriter 2",
"displayName": "Underwriter 2",
"id": "pc:underwriter2",
"name": "Underwriter 2"
}
},
{
"attributes": {
"description": "Underwriter Manager",
"displayName": "Underwriter Manager",
"id": "pc:SeOY1PmQwKcwQnuWvmCOy",
"name": "Underwriter Manager"
}
},
{
"attributes": {
"description": "internet portal",
"displayName": "internet portal",
"id": "pc:SZ6snOkKD_qhPHsqGgGwy",
"name": "internet portal"
}
}
]
}
POST /admin/v1/users
{
"data": {
"attributes": {
"firstName": "Devon",
"lastName": "Byrne",
"username": "dbyrne",
"roles": [
{
"id": "underwriter"
}
],
"uwAuthorityProfiles": [
{
"id": "pc:underwriter1"
}
]
}
}
}
PATCH /admin/v1/users/pc:235
{
"data": {
"attributes": {
"uwAuthorityProfiles": [
{
"id": "pc:underwriter1"
},
{
"id": "pc:underwriter2"
}
]
}
}
}
POST /admin/v1/uw-authority-profiles
{
"data": {
"attributes": {
"name": "Underwriter 3"
}
}
}
PATCH /admin/v1/uw-authority-profiles/pc:112
{
"data": {
"attributes": {
"description": "Profile 3 for underwriters"
}
}
}
DELETE /admin/v1/uw-authority-profiles/pc:112
"data": {
"attributes": {
"approveAnyValue": false,
"comparator": {
"code": "Monetary_LE",
"name": "At most (monetary)"
},
"id": "pc:SdRrdafrc_csBc6qMX2Wp",
"issueType": {
"code": "HOPCondoCovALimit",
"displayName": "HOP: Condo Coverage A limit value"
},
"moneyValue": {
"amount": "200000",
"currency": "usd"
},
"valueType": "money"
},
...
Creating grants
Use the following endpoint to create a new grant for an existing underwriting authority profile:
• POST /admin/v1/uw-authority-profiles/{uwAuthorityProfileId}/grants
{
"data": [
{
"attributes": {
"checkingSet": {
"code": "Manual",
"name": "Manual"
},
"code": "UWManagerReviewBlocksQuoteRelease",
"comparator": {
"code": "None",
"name": "None"
},
"description": "To be reviewed by underwriting manager, blocking quote release",
"name": "To be reviewed by underwriting manager, blocking quote release",
"valueFormatterType": {
"code": "Unformatted",
"name": "Unformatted"
}
},
},
{
"attributes": {
"checkingSet": {
"code": "Manual",
"name": "Manual"
},
"code": "TSTManualMonetaryAmount",
"comparator": {
"code": "Monetary_LE",
"name": "At most (monetary)"
},
"description": "Test manually triggered issue with monetary amount format",
"name": "Test manually triggered issue with monetary amount format",
"valueFormatterType": {
"code": "MonetaryAmount",
"name": "MonetaryAmount"
}
}
...
<UWIssueType public-id="pc:ScEwfrYMvGZSphmhfSCtk">
<CheckingSet>Manual</CheckingSet>
<Code>UWManagerReviewBlocksQuoteRelease</Code>
<Comparator>None</Comparator>
<Description>To be reviewed by underwriting manager, blocking quote release</Description>
<Name>To be reviewed by underwriting manager, blocking quote release</Name>
<ValueFormatterType>Unformatted</ValueFormatterType>
</UWIssueType>
<UWIssueType public-id="pc:S6FIzWqP5JFpEaPvDURH5">
<CheckingSet>Manual</CheckingSet>
<Code>TSTManualMonetaryAmount</Code>
<Comparator>Monetary_LE</Comparator>
<Description>Test manually triggered issue with monetary amount format</Description>
<Name>Test manually triggered issue with monetary amount format</Name>
<ValueFormatterType>MonetaryAmount</ValueFormatterType>
</UWIssueType>
Note that you cannot have two or more grants in the same authority profile with the same UWIssueType. If you attempt
to add a grant whose UWIssueType is used by an existing grant, you will get a validation error. For example, attempting
to create a second grant of type ChangedProducerOrg results in this error:
"UWIssueTypes on grants must have unique code values. This underwriting authority profile has
more than one grant where the UWIssueType code is 'ChangedProducerOrg'."
Integer integerValue
"integerValue": "22"
MonetaryAmount moneyValue
"moneyValue": {
"amount": "200000",
"currency": "usd"
}
Number decimalValue
"decimalValue": "4"
StateSet stateSetValue
"stateSetValue": {
"inclusionType": "exclusive",
"states": ["CA","OR"]
}
Unformatted none
For example, the following request creates a new grant for underwriting authority profile pc:agent1 whose issueType
is ChangedProducerOrg. This issue type is unformatted.
POST /admin/v1/uw-authority-profiles/pc:agent1/grants
{
"data": {
"attributes": {
"issueType": {
"code": "ChangedProducerOrg"
}
}
}
}
For example, the following request creates a new grant for underwriting authority profile pc:agent1 whose issueType
is ClaimTotalIncurred. This issue type is monetary amount, so there is an additional moneyValue attribute that
specifies $200,000 USD.
POST /admin/v1/uw-authority-profiles/pc:agent1/grants
{
"data": {
"attributes": {
"issueType": {
"code": "ClaimTotalIncurred"
},
"moneyValue": {
"amount": "200000",
"currency": "usd"
}
}
}
}
POST /admin/v1/uw-authority-profiles/pc:agent1/grants
{
"data": {
"attributes": {
"issueType": {
"code": "IncidenceOfClaims"
},
"decimalValue": "4"
}
}
}
◦ inclusive (if the value must be within one of the states listed)
◦ exclusive (if the value cannot be within one of the state listed)
• states, which must be a JSON string array of codes from the States typelist
For example, the following request creates a new grant for underwriting authority profile pc:agent1 whose issueType
is PAGargeState. This issue type is StateSet, so there is an additional stateSetValue attribute that specifies the
garage state cannot be California or Oregon.
POST /admin/v1/uw-authority-profiles/pc:agent1/grants
{
"data": {
"attributes": {
"issueType": {
"code": "PAGarageState"
},
"stateSetValue": {
"inclusionType": "exclusive",
"states": ["CA","OR"]
}
}
}
}
POST /admin/v1/uw-authority-profiles
{
"data": {
"attributes": {
"name": "Agent 3",
"description": "Profile 3 for agents"
}
},
"included": {
"UWAuthorityGrant": [
{
"attributes": {
"issueType": {
"code": "ChangedProducerOrg"
}
},
"method": "post",
"uri": "/admin/v1/uw-authority-profiles/this/grants"
},
{
"attributes": {
"issueType": {
"code": "ClaimTotalIncurred"
},
"moneyValue": {
"amount": "200000",
"currency": "usd"
}
},
"method": "post",
"uri": "/admin/v1/uw-authority-profiles/this/grants"
}
]
}
}
Modifying grants
You can use the following endpoints to PATCH or DELETE grants:
• PATCH /uw-authority-profiles/{uwAuthorityProfileId}/grants/{grantId}
• DELETE /uw-authority-profiles/{uwAuthorityProfileId}/grants/{grantId}
For example, the following request modifies the moneyValue of grant pc:227:
PATCH /admin/v1/uw-authority-profiles/pc:agent1/grants/pc:227
{
"data": {
"attributes": {
"moneyValue": {
"amount": "100000",
"currency": "usd"
}
}
}
}
DELETE /admin/v1/uw-authority-profiles/pc:agent1/grants/pc:227
Producers
Producer is a generic term for a third party who connects people and businesses seeking insurance with insurance
companies. Producers often work with multiple insurers and know which one is best for applicant's needs.
There are two data model entities that track the fundamental information for producers: Organization and
ProducerCode.
• An organization represents a business entity. Most organizations in an instance of PolicyCenter are producers.
• A producer code is a unique alphanumeric id assigned to a producer. Producer codes are also assigned to policies to
identify the producer associated with the policy.
For a complete description of the functionality of organizations and producer codes in PolicyCenter, see the
Application Guide.
Cloud API provides support for both organization and producer codes. This topic identifies how to query for, create,
and modify them.
Organizations
In PolicyCenter, an organization represents a business entity. Typically:
• There is one organization that represents the insurer itself. (In the bootstrap data, this is the "Enigma Fire &
Casualty" organization.)
• All other organizations represent third-party entity that supports the insurer's business. Most of them are producers,
such as agencies or brokers.
GET /admin/v1/organizations/pc:1
{
"data": {
"attributes": {
"contact": {
"companyName": "Armstrong and Sons",
Producers 463
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
Creating organizations
Use the following endpoint to create an organization:
• POST /admin/v1/organizations
464 Producers
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
For example, the following request creates a new producer agency organization:
POST /admin/v1/organizations
{
"data": {
"attributes": {
"name": "Floodzone Specialists",
"type": {
"code": "agency"
},
"producerStatus": {
"code": "Active"
}
}
}
}
Updating organizations
Use the following endpoint to modify an organization:
• PATCH /admin/v1/organizations
For example, the following request sets the security zone for producer organization pc:202 to security zone pc:SR3:
PATCH /admin/v1/organizations/pc:202
{
"data": {
"attributes": {
"groupSecurityZone": {
"id": "pc:SR3"
}
}
}
}
Producer codes
A producer code is a unique alphanumeric id assigned to a producer. Producer codes are also assigned to policies to
identify the producer associated with the policy.
For example, the producer Allrisk Insurance may have a producer code of AI-50701. Whenever a policy is issued that
must be associated with Allrisk Insurance, the policy is given the producer code AI-50701.
A producer may have multiple producer codes so that a given policy can be associated with a specific section of the
producer's business or a specific tier. For example, Armstrong and Company could have the following producer codes:
• 100-002541 - For Armstrong premier clients
• 501-002542 - For Armstrong's Los Angeles branch
• 501-002543 - For Armstrong's San Diego branch
• 501-002544 - For Armstrong Professional Liability Services
• 501-002545 - For Armstrong Employer Services
• 501-002546 - For Armstrong Caymen Captive Services
A policy associated with Armstrong and Company for premier clients would have a producer code of 100-002541. A
policy associated with Armstrong and Company's Professional Liability Services would have a producer code of
501-002544.
Producers 465
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
For example, the following call retrieves information about all producer codes using the Admin API endpoint:
GET /admin/v1/producer-codes
{
"count": 25,
"data": [
{
"attributes": {
"branch": {
"branchCode": "301",
"displayName": "Minneapolis Branch UW",
"id": "pc:S17f59YeYbDQEVkdUiua9"
},
"code": "301-008578",
"description": "ACV Property Insurance",
"displayName": "301-008578",
"id": "pc:16",
"organization": {
"displayName": "ACV Property Insurance",
"id": "pc:4",
"type": "Organization",
"uri": "/admin/v1/organizations/pc:4"
},
"producerStatus": {
"code": "Active",
"name": "Active"
}
},
...
The following call retrieves information about the producer codes for organization pc:1.
GET /admin/v1/organizations/pc:1/producer-codes
{
"count": 6,
"data": [
{
"attributes": {
"branch": {
"branchCode": "501",
"displayName": "Los Angeles Branch UW",
"id": "pc:SKLwZJB_J2trSnepw0UsV"
},
"code": "100-002541",
"description": "Armstrong (Premier)",
"displayName": "100-002541",
"id": "pc:6",
"organization": {
"displayName": "Armstrong and Company",
"id": "pc:1",
"type": "Organization",
"uri": "/admin/v1/organizations/pc:1"
},
"producerStatus": {
"code": "Active",
"name": "Active"
}
466 Producers
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
},
...
Producer roles
In PolicyCenter, a producer can have one or more users who are able to log on to PolicyCenter and execute work on
behalf of the insurer, such as creating accounts or quoting submissions for policies that the producer will help to
service.
Typically, users that work for producers do not have the same range of capabilities as a user who works for the insurer.
PolicyCenter uses roles to define what a user can and cannot do. A role is a set of system permissions that define user
capabilities, such as "create account" or "quote job".
Roles are not associated with organizations (producers). Rather, they are associated with producer codes. When you
create a producer code, you must specify the id of one or more roles. Users who work for the producer are then
associated with one or more producer codes. This defines what each producer user is capable of doing.
POST /admin/v1/producer-codes
{
"data": {
"attributes": {
"code": "301-008579",
"organization": {
"id": "pc:4"
},
"roles": [
{
"id": "producer"
}
]
}
}
}
{
"data": {
"attributes": {
"appointmentDate": "2022-07-09"
}
Producers 467
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
}
}
Similarly, groups and producer codes are tracked as separate entities. The GroupProducerCode is a third entity that
tracks information about one association between a group and a producer code.
When you call an endpoint that ends with "/{userId}/producer-codes " or "/{groupId}/producer-codes ", you
are retrieving, creating, or modifying instances of UserProducerCode or GroupProducerCode. Note the following:
• The id field in a UserProducerCode/GroupProducerCode instance is the id of the association.
• When you create or delete a UserProducerCode/GroupProducerCode instance, you are not creating or deleting
producer codes. You are only creating or deleting associations between users or groups and producer codes.
The UserProducerCode and endpoints can be used only on users that are subject to producer code security.
{
"count": 1,
"data": [
{
"attributes": {
"id": "pc:707",
"producerCode": {
"displayName": "301-008578",
"id": "pc:535"
},
"roles": [
{
"displayName": "Producer Code - Submissions",
"id": "producercode_submission",
"type": "Role",
"uri": "/admin/v1/roles/producercode_submission"
}
]
468 Producers
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
}
...
Similarly, the following is the snippet of the response payload when retrieving producer codes for group pc:669:
GET /admin/v1/users/pc:669/producer-codes
{
"count": 1,
"data": [
{
"attributes": {
"branch": {
"branchCode": "301",
"displayName": "Minneapolis Branch UW",
"id": "pc:SsUrnb0oJPcQaFYvQOGH4"
},
"code": "301-008578",
"description": "ACV Property Insurance",
"id": "pc:16",
"producerCode": {
"displayName": "301-008578",
"id": "pc:16"
},
"producerStatus": {
"code": "Active",
"name": "Active"
}
},
...
Creating an association
To associate a producer code with a user or group, use the following endpoint:
• POST /admin/v1/users/{userId}/producer-codes
• POST /admin/v1/groups/{groupId}/producer-codes
The only required field is the id of the producer code to be associated with the user or group.
For example, the following request associates producer code pc:535 with user pc:310.
POST /admin/v1/users/pc:310/producer-codes
{
"data": {
"attributes": {
"producerCode": {
"id": "pc:535"
}
}
}
}
Similarly, the following request associates producer code pc:17 with group pc:669.
POST /admin/v1/groups/pc:669/producer-codes
{
"data": {
"attributes": {
"producerCode": {
"id": "pc:17"
}
}
}
}
Deleting an association
To remove the association between a producer code and a user or group, use the following endpoint:
• DELETE /admin/v1/users/{userId}/producer-codes/{producerCodeId}
Producers 469
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
• DELETE /admin/v1/groups/{groupId}/producer-codes/{producerCodeId}
For example, the following request disassociates producer code pc:535 with user pc:310.
DELETE /admin/v1/users/pc:310/producer-codes/pc:535
Similarly, the following request disassociates producer code pc:17 with group pc:669:
DELETE /admin/v1/groups/pc:669/producer-codes/pc:17
470 Producers
chapter 52
Security zones
A security zone is a set of business objects whose access is restricted to the users in a user group. Security zones are
used to define access to specific sets of business objects.
At a high level, the process of limiting access through security zones is implemented in these steps:
1. A security zone is created.
2. The security zone is associated with a set of business objects, such as accounts, policies, or claims.
3. The security zone is also associated with a user group.
By default, the only users who can view or edit the business objects in the security zone are the users in the group
associated with the security zone.
For example, suppose there is a security zone named "Security Zone A" that contains an account named "Big Lake
Bakery". The "Western Region" group is also added to "Security Zone A". Now, the Big Lake Bakery account can be
viewed and modified only by users who belong to the Western Region group.
The functionality of security zones, including the business objects that can be added to them, varies between
applications. For more information on the business functionality of security zones in PolicyCenter, see the Application
Guide.
The endpoints for working with security zones are available in Cloud API for ClaimCenter, Cloud API for
PolicyCenter, and Cloud API for BillingCenter. They are not available in Cloud API for ContactManager.
{
"data": {
"attributes": {
"description": "Default Security Zone",
"displayName": "Default Security Zone",
"id": "default_data:1",
"name": "Default Security Zone"
},
...
{
"data": {
"attributes": {
"name": "Cloud API security zone"
}
}
}
Note that there are differences between security zone functionality in the base configuration of the different
applications.
• In ClaimCenter and BillingCenter, users can create security zones. This is done from the Admin tab's Security Zones
screen in the Users & Security group.
• In PolicyCenter, users cannot create security zones. (There is no Security Zones screen.) However, users can import
security zones through the Import Administrative Data screen in the Utilities group.
PATCH /admin/v1/security-zones/xc:111
{
"data": {
"attributes": {
"description": "Security zone created using Cloud API"
}
}
}
Note that there are differences between security zone functionality in the base configuration of the different
applications.
• In ClaimCenter and BillingCenter, users can edit security zones. This is done from the Admin tab's Security Zones
screen in the Users & Security group.
• In PolicyCenter, users cannot edit security zones.
DELETE /admin/v1/security-zones/xc:111
In PolicyCenter and BillingCenter, users cannot delete security zones, either through the user interface or through
Cloud API. The DELETE /security-zones/{securityZoneId} endpoint is exposed in Cloud API for PolicyCenter
and Cloud API for BillingCenter. But if you attempt to use it, Cloud API returns the following error. This is true even
for the super user "su", who is not bound by permissions.
{
"status": 403,
"errorCode": "gw.api.rest.exceptions.NotAuthorizedException",
"userMessage": "You do not have permission to delete this resource"
}
{
"data": {
"attributes": {
"securityZone": {
"id": "bc:222"
}
}
}
}
Similarly, the following request PATCHes BillingCenter group bc:555 so that it is associated with security zone bc:222.
PATCH /admin/v1/groups/bc:555
{
"data": {
"attributes": {
"securityZone": {
"id": "bc:222"
}
}
}
}
As a result of the two queries in the previous examples, account bc:101 is now restricted to only users in group bc:555.
Geographic zones
The geographic zone endpoint is used to retrieve information about a predefined geographic region. That information
can then be associated with InsuranceSuite features where a geographic region is needed.
Geographic zone endpoint:
GET /admin/v1/geographic-zones
GET is the only method available for geographic zones; you cannot add, update, or delete geographic zones through
the Cloud API.
The base configuration of InsuranceSuite includes over 1,000 geographic zones, so Guidewire provides several fields
you can filter on to make retrieving geographic zones more efficient.
Filters:
• id: The unique ID of the zone.
• country: The typecode for the country you want to filter on. Use the Country typekey to find available country
codes:
GET /common/v1/typelists/Country?fields=typeKeys
• zoneType: A typekey that varies by country. For example, if the country is US (United States) the zoneType could
be state, whereas a country value of CA (Canada) could have a zoneType of province. Use the ZoneType typekey
to find available zone types:
GET /common/v1/typelists/ZoneType?fields=typeKeys
• code: A value associated with the zoneType. For example, if the zoneType is state, the code could be OR
(Oregon).
This example retrieves information for the geographic zone that includes the U.S. state of Oregon:
GET /admin/v1/geographic-zones?filter=country:eq:US&filter=zoneType:eq:state&filter=code:eq:OR
{
"count": 1,
"data": [
{
"attributes": {
"code": "OR",
"country": {
"code": "US",
"name": "United States"
},
"displayName": "OR",
"id": "US:S4MEjnBYkBZqD_nWzarTl",
"name": "OR",
"zoneType": {
"code": "state",
"name": "State"
}
},
...
}
Here’s another example, this time with a broader search. This example will return a list of all provinces in Canada:
GET /admin/v1/geographic-zones?filter=country:eq:CA&filter=zoneType:eq:province
{
"data": [
{
"attributes": {
"code": "BC",
"country": {
"code": "CA",
"name": "Canada"
},
"displayName": "BC",
"id": "CA:SNAwbKcTW2uiIdv0FGcd0",
"name": "BC",
"zoneType": {
"code": "province",
"name": "Province"
}
},
},
{
"attributes": {
"code": "NL",
"country": {
"code": "CA",
"name": "Canada"
},
"displayName": "NL",
"id": "CA:SGVv0UjgB0_EJCt80VU1K",
"name": "NL",
"zoneType": {
"code": "province",
"name": "Province"
}
},
...
Typelist metadata
There may be situations where a caller application needs to retrieve information about PolicyCenter typelists. For
example, a caller application may need to know:
• The code for a specific typecode
• A list of all typecodes for a typelist
• A list of all typecodes for a typelist associated with a given typekey filter
The Common API contains two /typelist endpoints to help retrieve this information.
where:
• relatedTypelistX is the name of the Nth related typelist.
• TypecodeX is the Nth typecode to use as a filter
Examples
No filter parameter
This call does not use the typekeyFilter query parameter. Therefore, it retrieves all typecodes in the
ActivityCategory typelist:
GET /common/v1/typelists/ActivityCategory
Associated with one category
This call retrieves only the typecodes in the ActivityCategory typelist that are associated with the ActivityType of
General:
GET /common/v1/typelists/ActivityCategory?typekeyFilter=category:in:ActivityType.general
Associated with any of the listed categories
This call retrieves only the typecodes in the ActivityCategory typelist that are associated with the ActivityType of
either General or Approval:
GET /common/v1/typelists/ActivityCategory?
typekeyFilter=category:in:ActivityType.general,ActivityType.approval
GET /common/v1/typelists/ActivityCategory?
typekeyFilter=category:ni:ActivityType.general,ActivityType.approval
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
2. Specify Basic Auth authorization using user su and password gw.
3. Enter the following call and click Send:
• GET http://localhost:8180/pc/rest/common/v1/typelists/VehicleType
4. The response payload contains all non-retired vehicle types. Verify that the first three codes in the payload are:
Commercial, PP, PublicTransport.)
5. Modify the call by adding the following query parameter to the end, and then click Send:
• ?typekeyFilter=category:cn:PolicyLine.PersonalAutoLine
6. The response payload now contains only vehicle types relevant to personal auto policies. Verify that there are
only two codes in the payload now: auto, other. (Commercial, PP, and PublicTransport no longer appear
because they are not valid vehicle types for a personal auto policy.)
Batch processes
The PolicyCenter base configuration comes with a set of batch processes that can be scheduled to run maintenance
tasks periodically. You can also run batch processes on demand.
Cloud API provides support for batch processes. This includes retrieving the status of a batch process, and starting and
stopping a batch process. Third-party batch process schedulers can also use the batch process endpoints to manage
batch process scheduling externally.
For more information on the base configuration functionality of batch processes, see the Administration Guide.
The information in the response varies based on whether the batch process has completed, is running, or has never been
run.
GET /systemtools/v1/batch-processes/ActivityEsc
{
"data": {
"attributes": {
"distributed": false,
"status": {
"dateCompleted": "2022-09-19T17:30:00.021Z",
"dateCreated": "2022-09-19T17:30:00.003Z",
"failedOps": 0,
"opsCompleted": 0,
"serverId": "55d109613ac9",
"startDate": "2022-09-19T17:30:00.011Z",
"type": "ActivityEsc"
},
"type": {
"code": "ActivityEsc",
"name": "Activity Escalation"
}
},
...
GET /systemtools/v1/batch-processes/ActivityEsc
{
"data": {
"attributes": {
"distributed": false,
"status": {
"dateCreated": "2022-09-19T17:30:00.003Z",
"failedOps": 0,
"opsCompleted": 0,
"opsExpected": 0,
"progress": "1 out of 3",
"serverId": "55d109613ac9",
"startDate": "2022-09-19T17:30:00.011Z",
"type": "ActivityEsc"
},
"type": {
"code": "ActivityEsc",
"name": "Activity Escalation"
}
},
...
GET /systemtools/v1/batch-processes/ActivityEsc
{
"data": {
"attributes": {
"distributed": false,
"status": {
"failureReason": "This batch process type has never run",
"type": "ActivityEsc"
},
"type": {
"code": "ActivityEsc",
"name": "Activity Escalation"
}
},
...
A batch process can be categorized as MaintenanceOnly, which means the batch process is not available if the server's
run level is above NODAEMONS mode. The /start endpoint is not available for MaintenanceOnly batch processes
when the server's run level is above NODAEMONS mode.
Batch processes can also be categorized as APIRunnable. This setting impacts whether the batch process can be run
from the Guidewire SOAP-based MaintenanceToolsAPI. It does not impose any limitation on whether Cloud API can
start the batch process.
POST /systemtools/v1/batch-processes/ActivityEsc/start
RESPONSE:
{
"data": {
"attributes": {
"distributed": true,
"processId": 4055,
"status": {
"dateCreated": "2022-09-19T17:54:19.929Z",
"failedOps": 0,
"opsCompleted": 0,
"serverId": "55d109613ac9",
"type": "ActivityEsc"
},
"type": {
"code": "ActivityEsc",
"name": "Activity Escalation"
},
"workQueueStatus": {
"numActiveExecutors": 1,
"numActiveWorkItems": 0
}
},
...
{
"data": {
"attributes": {
"<batchProcessFieldName>": {
"<argument1>": <values>,
"<argument2>": <values>,
...
}
}
}
}
For example, the PurgeAsyncApiRequests object has one integer field, purgeDaysOld. The following request starts
the Purge Async API Requests batch process and passes in a purgeDaysOld value of 3.
POST /systemtools/v1/batch-processes/PurgeAsyncApiRequests/start
{
"data": {
"attributes": {
"purgeAsyncApiRequests": {
"purgeDaysOld": 3
}
}
}
}
Note that the structure of the JSON object varies based on the datatype of the arguments. For example, the following is
an example of starting the Database Consistency Check batch process with arguments. Note that one of the arguments,
tableNames, is an array, whereas the other, description, is a string.
POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
{
"data": {
"attributes": {
"dbconsistencycheck": {
"tableNames": [
"cc_activity",
"cc_address"
],
"description": "Start of Q1 maintenance"
}
}
}
}
If the attributes section contains any property with an unexpected name, Cloud API returns a 400 error.
RESPONSE:
{
"data": {
"attributes": {
"distributed": true,
"status": {
"dateCompleted": "2022-09-19T18:00:51.304Z",
"dateCreated": "2022-09-19T18:00:51.291Z",
"failedOps": 0,
"opsCompleted": 0,
"serverId": "55d109613ac9",
"startDate": "2022-09-19T18:00:51.298Z",
"type": "ActivityEsc"
},
"type": {
"code": "ActivityEsc",
"name": "Activity Escalation"
},
"wasStopped": true,
"workQueueStatus": {
"numActiveExecutors": 1,
"numActiveWorkItems": 0
}
},
A database consistency check (DBCC) is a check that PolicyCenter executes to verify that data in the database is
consistent.
Cloud API provides support for DBCCs. This includes running DBCCs, retrieving information about DBCCs, and
downloading DBCC reports in a zip file format.
DBCC runs
A DBCC run refers to the execution of a DBCC. DBCC run information is stored in the PolicyCenter database. Each
DBCC run is assigned an id, the dbccId, which can be used to access that information any time after the DBCC was
run.
DBCC scopes
DBCC runs can execute every type of check on every table in the database. DBCC runs can also be limited to a
specific set of tables, and/or a specific set of check types, such as assignment checks. The complete list of DBCC check
types is defined in the ConsistencyCheckType typelist.
If you run the DBCCs only for the cc_activity table (but for all check types), then the description is:
If you run only the assignment check DBCCs (on all tables), then the description is:
If you run only the assignment check DBCCs for only the cc_activity table, then the description is:
Running DBCCs
Use the following endpoint to run database consistency checks:
• POST /systemtools/v1/batch-processes/{batchProcessType}/start
The value of {batchProcessType} must be: DBConsistencyCheck.
POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
For example, the following request runs all DBCCs for the cc_activity and cc_address tables.
POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
{
"data": {
"attributes": {
"dbconsistencycheck": {
"tableNames": [
"cc_activity",
"cc_address"
]
}
}
}
}
Note that PolicyCenter does not perform any validation to ensure that there are tables in the database with the specified
names. If there is no table corresponding to a provided table name, PolicyCenter ignores the name.
For example, the following request runs all DBCCs whose check type is either 0lengthstringcheck or
assignmentcheck.
POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
{
"data": {
"attributes": {
"dbconsistencycheck": {
"checkTypes": [
"0lengthstringcheck",
"assignmentcheck"
]
}
}
}
}
Note that PolicyCenter does not perform any validation to ensure that there are check types in the data model with the
specified names. If there is no check type corresponding to provided check type name, PolicyCenter ignores the name.
POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
{
"data": {
"attributes": {
"dbconsistencycheck": {
"description": "Start of Q1 maintenance"
}
}
}
}
POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
{
"data": {
"attributes": {
"dbconsistencycheck": {
"tableNames": [
"cc_activity",
"cc_address"
],
" checkTypes ": [
"0lengthstringcheck",
"assignmentcheck"
],
"description": "Start of Q1 maintenance"
}
}
}
}
checks endpoint. Note that the Key value is expressed as an integer. For more information on this endpoint, see
“Querying for DBCC run information” on page 490.
For example, suppose you ran a DBCC that had errors. The GET /systemtools/v1/database-consistency-checks
endpoint identifies the Key for this run is 21. You have fixed the errors and now want to rerun the same DBCC. The
following request does this.
POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
{
"data": {
"attributes": {
"dbconsistencycheck": {
"rerunKey": 21
}
}
}
}
PolicyCenter reruns a DBCC run only when the original DBCC run reported errors. If you provide a Key value that
does not correspond to a previous run with errors, PolicyCenter ignores the request.
GET /systemtools/v1/database-consistency-checks/cc:303
{
"data": {
"attributes": {
"description": "Tables: cc_activity, cc_address; Checks: All.",
"duration": "0.151",
"endTime": "2022-09-19T22:23:23.163Z",
"errors": 1,
"extensionsSchemaVersion": 508,
"id": "cc:303",
"key": 16,
"majorSchemaVersion": 50,
"minorSchemaVersion": 603,
"platformMajorSchemaVersion": 50,
"platformMinorSchemaVersion": 605,
"startTime": "2022-09-19T22:23:23.012Z",
"totalChecks": 17
},
The key value is needed to rerun DBCCs that report consistency errors on their first run.
The response does not include endTime if the DBCC is in progress.
Note that when you run a DBCC using the POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
endpoint, the response does not include the dbccId value. This is because, for most batch processes, the results are not
stored in the database. Therefore, there is no "ID value" that can be provided for all batch process types. If you want to
run a DBCC and then download the report through Cloud API, you must execute three calls:
1. Execute the batch process with POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
2. Retrieve the dbccID value with GET /systemtools/v1/database-consistency-checks
3. Get the DBCC report with GET /systemtools/v1/database-consistency-checks/{dbccId}/report
Note: The data destruction features described in this topic provide a set of features that help enable insurers to
comply with some of their data destruction requirements. These requirements may be driven by insurers’
policies and practices, as well as by their interpretation of various regulatory requirements. Such regulatory
requirements may come from, for example, the European Union General Data Protection Regulation (GDPR) or
the New York State Cybersecurity Requirements for Financial Services Companies law.
PolicyCenter supports destruction of some kinds of data. Destruction can mean either purging the data completely from
the database or it can mean obfuscating data, making the original contents permanently unreadable.
Obfuscation might be required if destroying the data affects contacts that cannot be destroyed. For example, purging
user data for a former employee could affect hundreds or even thousands of contacts. Therefore it makes more sense to
obfuscate the data for the user and leave the other data alone.
Guidewire provides several Cloud API endpoints that obfuscate or purge personally identifiable information (PII). Note
that while the terms destruction and destroy encompass both obfuscating and purging, in Cloud API the destroy
endpoints perform a purge.
PolicyCenter provides the following endpoints for data destruction:
• POST /admin/v1/users/{userId}/obfuscate
• POST /common/v1/contacts/{contactId}/destroy
• POST /account/v1/accounts/{accountId}/destroy
• POST /policy/v1/policies/{policyId}/destroy
The following supporting endpoints are also discussed in this topic:
• POST /common/v1/contacts/{contactId}/do-not-destroy
• POST /common/v1/search/contacts
Note: For detailed information on data destruction, refer to the following resources:
• Application Guide
• Configuration Guide
System configuration
In the PolicyCenter base configuration, data destruction is not enabled by default. If you attempt to run the obfuscate or
destroy endpoints you’ll receive one or both of the following errors:
Cannot purge 'Node = [C000000001 NotPurgeable]' because the DoNotDestroy flag is set
To enable data destruction, you must update certain configuration parameters. For complete details on these settings,
refer to the Configuration Guide
{
"data": {
"attributes": {
"active": false,
"displayName": "Ronald Rutherford",
"externalUser": false,
"firstName": "Ronald",
"id": "pc:120",
"lastName": "Rutherford",
"username": "rrutherford",
…
},
You can then use the following endpoint to obfuscate the record for user pc:120:
POST/admin/v1/users/pc:120/obfuscate
{
"data": {
"attributes": {
"active": false,
"displayName": "71633b5ed0dba332f1f4b645682c6d 71633b5ed0dba332f1f4b645682c6d",
"externalUser": false,
"firstName": "71633b5ed0dba332f1f4b645682c6d",
"id": "pc:120",
"lastName": "71633b5ed0dba332f1f4b645682c6d",
"username": "80aef0777aa07c8cf79b454bab2df5",
…
},
After obfuscation, you can still retrieve the user record based on ID, but there is no way to personally identify that user.
Destroying a contact
Destroying, or purging, is a form of data destruction that completely removes contact data and policy or account data
from PolicyCenter. There can be multiple objects associated with the contact, account, or policy that are also removed
as they are detected by traversing the entity domain graph.
POST /common/v1/search/contacts
Request
{
"data": {
"attributes": {
"lastName": "Smith",
"firstName": "John"
}
}
}
{
"data": {
"attributes": {
"companyName": "Wright Construction"
}
}
}
destroy all data in the queue. See the Administration Guide for information on the DestroyContactForPersonalData
work queue.
Use the following endpoint to destroy a contact:
• POST /common/v1/contacts/{userId}/destroy
The following example destroys the contact with user ID pc:234.
Command
POST /common/v1/contacts/pc:234/destroy
The request contains only the ID of the requester. This requester ID does not have to match the ID of a user in
PolicyCenter.
Request
{
"data": {
"attributes": {
"requesterId": "5678"
}
}
}
GET /systemtools/v1/personal-data-destruction-requests
Response
{
"data": [
{
"attributes": {
"allRequestsFulfilled": false,
"destructionRequestStatus": {
"code": "Unprocessed",
"name": "Unprocessed"
},
"displayName": "PersonalDataDestructionRequest pc:234",
"id": "pc:234",
"requesterIds": [
"5678"
]
},
...
GET /systemtools/v1/personal-data-destruction-requests?filter=requeterIds:in:5678
Destroying an account
When you run the destroy endpoint on an account, destruction happens immediately. This differs from running the
destroy endpoint on a contact, where the actual destruction of data doesn’t happen until a scheduled batch process has
run.
POST /account/v1/accounts/pc:987/destroy
The request contains only the ID of the requester. The requester ID does not have to match the ID of a user in
PolicyCenter.
Request
{
"data": {
"attributes": {
"requesterId": "5678"
}
}
}
Destroying a policy
When you run the destroy endpoint on a policy, destruction happens immediately. This differs from running the destroy
endpoint on a contact, where the actual destruction of data doesn’t happen until a scheduled batch process has run.
Use the following endpoint to destroy a policy:
• POST /policy/v1/policies/{policyId}/destroy
This example immediately removes policy pc:5454 from the database:
Command
POST /policy/v1/policies/pc:5454/destroy
The request contains only the ID of the requester. The requester ID does not have to match the ID of a user in
PolicyCenter.
Request
{
"data": {
"attributes": {
"requesterId": "5678"
}
}
}
Set the doNotDestroy attribute to either true or false in the request body. For example, use the following command and
request to specify that contact pc:234 cannot be destroyed:
Command
POST /common/v1/contacts/pc:234/do-not-destroy
Request
{
"data": {
"attributes": {
"doNotDestroy": true
}
}
}
For some use cases, it’s necessary to have a schema with detailed graph and entity information. For this purpose,
PolicyCenter provides endpoints that retrieve schema information that can be used to navigate the graph structure for
various purposes and to build out custom user interfaces.
The schema endpoints return metadata about the business entities that are exposed by the API (such as Users and
Contacts) as normal JSON schema documents. In addition to standard JSON Schema properties, the schema endpoints
can also return additional application-specific metadata. This additional metadata is returned in the form of x-gw-*
properties.
The topics in this section describe the endpoints and query parameters for retrieving schemas. They also describe
properties that are specific to entity and graph schemas and not found in the standard business schemas (such as
OpenAPI).
GET /common/v1/entity-schemas/User
The schema returned by the entity-schemas/{entityId} endpoint returns the schema for the specified entity and
other schemas transitively referenced from that entity. In the preceding example, in the base configuration the returned
entity schema would include User, plus related schemas such as UserGroupReference and UserRoleReference.
However, it won’t return the schemas for any child entities. Instead it will return a list of children (if any) in the x-gw-
children property for each entity. (See “Child entities” in “Schema properties usage” on page 506 for more
information.)
To retrieve a specific entity along with the complete schema information for all its children, filter the entity-schemas
endpoint on rootEntity:
Business entity schemas 499
Guidewire PolicyCenter for Guidewire Cloud 2024.02 Cloud API Consumer Guide
GET /common/v1/entity-schemas?filter=rootEntity:eq:{entityId}
Filtering on rootEntity retrieves a more detailed schema than using the entity-schemas/{entityId} endpoint by
traversing the entity graph tree and including all the child entities of the specified entity.
includeLocalizations Include localization strings in the schema for • {language code} none
all localizable strings for the specified
• {language-region
installed languages.
code}
• *all (all installed
languages)
product Return the schema for the specified product • {productId} none
and any non-product specific entities. Use
• null (all non-LOB
null to retrieve only non-product schema
entities)
entities.
editionCode
Use the editionCode query parameter to enrich the schema with additional information based on the rules for that
edition. When fetching the schema with an edition specified, the schema properties are adjusted based on changes that
have been made in that edition, such as to whether coverage options are available or what a field's maximum value can
be. For changes made in the edition that do not have any rule conditions, the associated schema element will be
changed directly. For example, if an integer field has a maximum set to 10000 for a given edition, the schema property
for that field will have "maximum": 10000 added to it. If the change is conditional, it will result in a rule added to the
x-gw-rules schema property. See “Rules” on page 520 for more details.
The product parameter must also be included in the query string, because editions are tied to products. (For more
information on editions, see "Editons for product lines" in "Advanced Product Designer in PolicyCenter".)
• GET /common/v1/entity-schemas?editionCode={editionId}&product={productId}
For example, to retrieve the entity schema for the BaseEditon edition of the PersonalAuto product, use the following
command:
GET /common/v1/entity-schemas?editionCode=BaseEdition&product=PersonalAuto
If the specified edition doesn’t match a valid edition for the requested product, the request will fail.
To allow for testing of existing products that have been defined with rules but no editions, the edition code BaseEdition
is a valid code for visualized products. In that case, the main template serves as the base edition. The BaseEdition code
is also accepted for cloud-synced installed lines managed via Advanced Product Designer (APD), since APD always
creates a base edition.
To retrieve a list of editions available for a product, use the productdefinition API:
• GET /productdefinition/v1/products/{productId}/editions
See “Product definitions for products” on page 317 for more details on the productdefinition API.
includeLocalizations
The includeLocalizations query parameter includes localized versions of all strings in the schema response. Any
element that can be localized will include an x-gw-localizations property containing localized versions of the
associated schema property. (If no localized version for a given language exists, the value will be provided in the
default language.)
The localized languages that are displayed depend on the value assigned to the parameter. You can retrieve localized
strings for all installed languages (languages in the LangaugeType typelist) by assigning the *all value to the
parameter.
To retrieve localized strings for only specific languages, include the language code as the value. The language code can
be in any of the following formats:
• Language code, such as fr (French).
• Language and region, such as fr-CA (French, Canada) or fr-FA (French, France).
• Language and region with either a hyphen or an underscore. Both fr-CA and fr_CA will return French (Canada)
localized strings.
Note that the value is case-sensitive; you’ll receive an error if the installed language is en_US and you specify en_us.
Only installed languages can be specified. If you set a value to a language that is not installed you’ll receive an error.
The following examples show different options for calling includeLocalizations:
Retrieve localized values for all installed languages:
GET /common/v1/entity-schemas?includeLocalizations=*all
GET /common/v1/entity-schemas?includeLocalizations=en_US
GET /common/v1/entity-schemas?includeLocalizations=fr
GET /common/v1/entity-schemas?includeLocalizations=en,fr_CA
inlineProductDefinition
Setting the inlineProductDefinition query parameter to true will cause information about coverages, answers, and
scheduled items to be inlined into the returned schema. The product parameter must also be included in the query
string.
• GET /common/v1/entity-schemas?inlineProductDefinition=true&product={productId}
The top-level properties x-gw-coverages, x-gw-answers, and x-gw-scheduledItems are returned in the schema.
These function as if they were schema property definitions, with a $ref property that references the appropriate
schema definition.
See “Product definition properties” on page 519 for more information.
inlineTypelists
The inlineTypelists query parameter is used to include typelist metadata for each typekey field or term so that
typelist metadata doesn’t need to be fetched separately. Set inlineTypelists to true to enable this feature.
• GET /common/v1/entity-schemas?inlineTypelists=true
See “Choice values” on page 508 for more information and schema examples.
onlyReturnChangedSchemas
This query parameter cannot be used without also specifying the editionCode and product query parameters. If
onlyReturnChangedSchemas is set to true, only schema definitions that have changed between the edition specified
by the editionCode and the base product are returned.
• GET /common/v1/entity-schemas?
editionCode={editionId}&product={productId}&onlyReturnChangedSchemas=true
product
The product query parameter filters the returned schema entities based on the product specified.
GET /common/v1/entity-schemas?product={productId}
If product is set to a non-null value, entities that match the specified product and all non-product specific entities will
be returned. If product is set to null, only non-product-specific entities will be returned. Here are some examples.
Return only non-product specific entities:
GET /common/v1/entity-schemas?product=null
GET /common/v1/entity-schemas?product=PersonalAuto
If product is used along with the inlineProductDefintion parameter, the product value will be used to determine
which product to use for Job, PolicyLocation, and PolicyLine questions (and anything else that attaches to the product).
ETag support
The business entity schema endpoints support the use of ETags. An ETag response header is returned with every
request. The ETag acts as a checksum of schema content, so it changes depending on which query parameters you use.
Use the ETag with the If-None-Match request header. If this matches the current checksum, you’ll receive a “304 not
modified” response. If it doesn’t match, the request will be processed normally.
ETag is a standard HTTP header. More information can be found by doing an internet search.
CreateSubmissionAttributes schema
When a new submission is generated (such as through a call to POST /job/v1/submissions), the special schema
definition CreateSubmissionAttributes is used. When retrieving the entity schema, the
CreateSubmissionAttributes schema definition is included anytime the Job schema is retrieved. This means that
any results that include the Job schema will also include the schema definition needed to know how to create a
submission.
For example, the following commands will return the CreateSubmissionAttributes schema:
GET /common/v1/entity-schemas/Job
GET /common/v1/entity-schemas
GET /common/v1/entity-schemas?rootEntity:eq:Job
Response
…
"CreateSubmissionAttributes": {
"description": "Details of the `Submission` job to create",
"properties": {
account": {
"$ref": "#/definitions/SimpleReference",
"description": "A reference to the `Account` that the policy is being created for",
"title": "Account"
},
"baseState": {
"$ref": "#/definitions/TypeKeyReference",
"description": "The state or jurisdiction that the policy is based on",
"title": "Base state",
"x-gw-typelist": "Jurisdiction"
},
"dateQuoteNeeded": {
"description": "The date that a quote for this submission is needed by",
"format": "date",
"nullable": true,
"title": "Date quote needed",
"type": "string"
},
…
Schema properties
The InsuranceSuite business entity schemas are returned as JSON documents using the JSON Schema Draft-7
specification. In addition to standard JSON schema properties, the business entity schemas include a number of
additional schema properties that include metadata about the entities and their representation in APIs and AppEvents.
• “Schema properties overview” on page 503
• “Schema properties usage” on page 506
x-gw-actions A list of logical actions that you can take on an entity. This “Cloud API endpoint
encompasses standard HTTP operations on the element or elements” on page 511
collection, as well as custom actions.
x-gw-after Applies to properties of format date or date-time. Indicates a “Date and date-time fields”
date or date-time that the value must be later than. on page 514
x-gw-answers A product definition property that references the answer “Product definition
schema definition. Only available when the properties” on page 519
inlineProductDefinition query parameter is set to
true.
x-gw-before Applies to properties of format date or date-time. Indicates a “Date and date-time fields”
date or date-time that the value must be earlier than. on page 514
x-gw- For entities that can be accessed through a Cloud API “Cloud API endpoint
canonicalCollectionUri endpoint, this object contains the URI to the collection elements” on page 511
endpoint.
x-gw-canonicalElementUri For entities that can be accessed through a Cloud API “Cloud API endpoint
endpoint, this object contains the URI to the individual elements” on page 511
element endpoint.
x-gw-canonicalParent For entities that can be accessed through a Cloud API “Cloud API endpoint
endpoint, this object contains the ID of the parent entity. elements” on page 511
x-gw-calculatedValues An object whose keys represent schema properties that have “Calculated values” on page
dynamic values. Dynamic values are calculated based on 506
evaluation of static values retrieved through JsonLogic.
x-gw-children An object containing information about child objects of an “Child entities” on page 507
entity.
x-gw-choices This property contains typelist values associated with the “Choice values” on page 508
entity objects. It is included in the schema response when the
inlineTypelists query parameter is set to true.
x-gw-coverageCategory A property attached to the coverage in the schema. It “Coverage category” on page
provides a coverage code, description, name, and sort order. 513
x-gw-coverages A product definition property that references the coverage “Product definition
schema definition. Only available when the properties” on page 519
inlineProductDefinition query parameter is set to
true.
x-gw-coveredLocationField This property differentiates address information for a covered “Covered location field” on
location from LOB-specific additions. page 514
x-gw-createOnly Indicates that a property can be set when creating the entity “Update restrictions” on page
(during an initial POST), but not modified. 524
x-gw-defaultValues An array of strings that indicate what default views a property “Cloud API responses” on
will appear in. Possible values include detail, summary, and page 511
none.
x-gw-dynamicProperties An object where each key in the map represents a named “Rules” on page 520
rule. The values of such keys have a jsonLogic object
defining the rules.
x-gw-entityId A marker on every schema that corresponds to an entity that “Entity ID” on page 515
contains the id of that entity.
x-gw-filterBy Applies to typekey properties that have typelists that are “Typekey references” on page
filtered by categories from other typelists represented on the 524
same object. This property is an array of schema property
names for the filtering typekey properties.
x-gw-forbidden This property contains an array of one or more values that • “Forbidden fields” on
indicate properties that are forbidden for use in a particular page 515
context. Often used within an x-gw-rules object to identify
fields that cannot be used in certain situations. • “Country-specific fields”
on page 512
• “Coverage parent/child
dependencies” on page
514
x-gw-minimum Used to represent a minimum value for a property that is not “Numeric values” on page
a standard JSON integer or decimal, such as a gw- 518
bigdecimal or MonetaryAmount object.
x-gw-owningPolicyLine If an entity is associated with a policy line, this property “Owning policy line” on page
contains the ID and name of the policy line. 518
x-gw-owningProducts If an entity is LOB-specific, this property will display an ID and “Owning products” on page
name of all products associated with the entity. 518
x-gw-patchOnly Indicates that the value can be set only during updates “Update restrictions” on page
(PATCH requests), not during the initial creation (POST 524
request).
x-gw-precision The precision of a fixed-point decimal value (the total number “Numeric values” on page
of digits allowed in a number). 518
x-gw-reference-schema The name of the schema definition associated with a given “References” on page 519
type when a property is a reference (such as
SimpleReference).
x-gw-referenceType The name of the referenced entity type when a property is a “References” on page 519
reference (such as SimpleReference).
x-gw-requiredForBind An array of property names for properties whose values must “Required properties” on
be specified in order to bind a job. page 519
x-gw-requiredForCreate An array of property names for properties whose values must “Required properties” on
be specified as part of POST requests to create a new entity. page 519
x-gw-requiredForQuote An array of property names for properties whose values must “Required properties” on
be specified in order to quote a job. page 519
x-gw- This property identifies fields that are required for a particular • “Required properties” on
requiredForValidation entity to be valid. A typical use case is to define required page 519
fields in an address.
• “Country-specific fields”
on page 512
x-gw-rules This property contains a jsonLogic attribute where you can • “Rules” on page 520
apply conditional rules to various schema elements.
• “Country-specific fields”
on page 512
• “Coverage parent/child
dependencies” on page
514
• “Tags” on page 523
x-gw-scale The scale of a fixed-point decimal value (the number of digits “Numeric values” on page
allowed to the right of the decimal point). 518
x-gw-scheduledItems A product definition property that references the scheduled “Product definition
items schema definition. Only available when the properties” on page 519
inlineProductDefinition query parameter is set to
true.
x-gw-segmentField Contains a Boolean value specifying whether the entity is “Segments” on page 522
based off of a segment field in APD.
x-gw-sortOrder The sequence number of coverable fields defined in APD. • “Sort order” on page 522
• “Choice values” on page
508
x-gw-tags This object represents tags that have been attached to “Tags” on page 523
clauses, clause terms, and so on in APD.
x-gw-typelist The name of the typelist when the property is a reference to “Typekey references” on page
a TypeKeyReference. 524
x-gw-valueProperty This property provides the name of the property that stores a “Value properties” on page
term, scheduled item property, or answer value. 525
Calculated values
APD supports calculated values for coverage terms on a parent coverage where the minimum or maximum are
calculated based on terms on the child coverages. For example, the parent coverage can have a limit whose minimum
value is the sum of the limits of a set of child coverages. Calculated values can use a sum, min, or max across the child
terms, or be a direct reference to a child term.
The entity schema provides the x-gw-calculatedValues property to support this type of scenario. This property is an
object whose keys represent schema properties that have dynamic values rather than static values. Each schema
property will have a value with a jsonLogic property that can be evaluated, resulting in the concrete value to attach to
that schema property.
The x-gw-calculatedValues property is primarily intended for use by client code that uses schema-based validation.
In order to interpret the calculated values at runtime, a client needs to iterate through each property on the x-gw-
calculatedValues object, evaluate the JsonLogic expression for that property, and then attach the resulting value to
the containing schema definition.
See https://jsonlogic.com/ for more information on using JsonLogic.
The following is an example of a calculated value. This is a simple example where the value must be retrieved from
another entity:
"x-gw-calculatedValues": {
"x-gw-maximum": {
"jsonLogic": {
"+": {
"uri": "/jobs/{jobId}/lines/TSTLine/test-coverables/{testCoverableId}/coverages/TSTChildCov/
terms.TSTChildCovPackageTerm.choiceValue.values[0].value"
}
}
}
}
Child entities
An entity can (but doesn’t have to) have child objects. These child objects are returned in the x-gw-children schema
object. The following properties can be included with the x-gw-children object:
• childType: The type related to certain product model metadata. See “Special child types” below.
• description: A description of the children.
• graphProperty: The property used to attach these children in the schema.
• id: The id of the child entity.
• title: The title for the children.
• urlPart: The URL fragment used for the collection of child entities in the API.
The following example shows some of the children for the Account entity in the base configuration:
"x-gw-children": [
{
"id": "Activity",
"urlPart": "activities"
},
{
"id": "Assignee",
"urlPart": "activity-assignees"
},
{
"id": "ActivityPattern",
"urlPart": "activity-patterns"
},
"Job": {
...
{
"id": "Note",
"urlPart": "notes"
},
...
, {
"childType": "questions",
"id": "PolicyQuestions",
"urlPart": "questions"
},
...
Notice that the child PolicyQuestions has a childType property. There is no childType property on Notes because
Notes are not among the types of children requiring special components.
"Job": {
...
"x-gw-children": [
...
{
"description": "Personal Auto",
"graphProperty": "PersonalAutoLine",
"id": "PersonalAutoLine",
"title": "Personal Auto Line",
"urlPart": "lines/PersonalAutoLine"
},
Choice values
For entities that contain choice values, the entity schema returns the x-gw-choices object. You must include the query
parameter inlineTypelists set to true to retrieve this object. The object contains the following properties:
sortOrder The canonical sort order for the choice, relative to other choices in the same list. • Typelists
• Option/package choices
• Coverage term choices
categories A list of strings that indicate the categories the typekey belongs to. Categories are • Option/package choices
presented in the form Typelist.Code, such as Country.US.
• Coverage term choices
values An array of additional values relating to coverage terms. • Coverage term choices
"accountStatus": {
"$ref": "#/definitions/TypeKeyReference",
"description": "The current status of this account",
"readOnly": true,
"title": "Account status",
"x-gw-typelist": "AccountStatus"
},
This example shows that accountStatus is a typelist of type AccountStatus, but the values of that typelist are not
displayed. When you add inlineTypelists=true to the endpoint query string, the individual values are included in
the schema in the x-gw-choices object:
"accountStatus": {
"$ref": "#/definitions/TypeKeyReference",
"description": "The current status of this account",
"readOnly": true,
"title": "Account status",
"x-gw-choices": [
{
"code": "Active",
"description": "The account is fully ready and open, and submissions have been created for it.",
"name": "Active",
"sortOrder": 0
},
{
"code": "Merged",
"description": "The account has been merged into another account and is available for read only access.",
"name": "Merged",
"sortOrder": 1
},
{
"code": "Pending",
"description": "The account is ready for data entry, but data entry is still ongoing and the account is not
considered fully open.",
"name": "Pending",
"sortOrder": 2
},
{
"code": "Withdrawn",
"description": "The account has been withdrawn from consideration for business with the carrier.",
"name": "Withdrawn",
"sortOrder": 3
}
],
"x-gw-typelist": "AccountStatus"
Notice the sortOrder value under each choice. This ordering can be used to ensure the desired order of user interface
elements. See “Sort order” on page 522 for more information.
Coverage term choices
When the inlineProductDefinition query parameter is set to true, additional values are returned in the schema for
coverage term choices. Coverage terms include option and package terms that offer choices in the form of numerical
values. For an option term, there's one numerical value per choice, whereas for a package term there can be more than
one. In addition, a package term such as "100/250" might represent the numbers 100 and 250, or they might actually be
100,000 and 250,000.
To distinguish between option terms and package terms, the x-gw-choiceType field is included on the choiceValue
property. Possible values are option and package.
"choiceValue": {
"$ref": "#/definitions/ProductModelChoice",
"description": "The value of this term as an enumerated choice. Only applicable if the `covTermType` is `choice`.",
"nullable": true,
"title": "Choice value",
"x-gw-choiceType": "option",
Because the coverage terms typically involve monetary amounts, the currency field is included on each x-gw-
choices array element.
"x-gw-choices": [
{
"code": "00",
"currency": "usd",
"name": "No Deductible",
Each x-gw-choices array element also includes a values array. For option terms there will only ever be one value in
the array. Package terms can have multiple values. Each value in the array can have the following fields:
aggregationModel A typecode value that indicates how a limit or • pp (per person) Option and package
deductible needs to be aggregated during claims terms
• ea (each)
handling.
name The name of the value. The name explains what Bodily injury per-person Package terms
that part of a package value means. limit
restrictionModel A typecode value that indicates what sort of • bi (bodily injury) Option and package
exposure the term applies to. terms
• pd (property damage)
value A string containing the actual value. • 5000.0000 Option and package
terms
• 0
valueType What the value number represents • money Option and package
terms
• count
• other
The following are examples of option and package term choice values.
Option term values:
"x-gw-choiceType": "option",
"x-gw-choices": [
{
"code": "00",
"currency": "usd",
"name": "No Deductible",
"sortOrder": 0,
"values": [
{
"aggregationModel": "po",
"restrictionModel": "prp",
"value": "0",
"valueType": "money"
}
]
},
"x-gw-choiceType": "package",
"x-gw-choices": [
{
"code": "0/0/5",
"currency": "usd",
"name": "0/0/5",
"sortOrder": 5,
"values": [
{
"aggregationModel": "pp",
"name": "PA_person_agglimit",
"restrictionModel": "bi",
"value": "0",
"valueType": "money"
},
{
"aggregationModel": "ea",
"name": "PA_accident_agglimit",
"restrictionModel": "bi",
"value": "0.0000",
"valueType": "money"
},
{
"aggregationModel": "ea",
"name": "PA_property_agglimit",
"restrictionModel": "pd",
"value": "5000.0000",
"valueType": "money"
}
]
},
This example shows that you can take the following actions on the RolePermission entity through Cloud API:
• GET a collection of role permissions. (GET /admin/v1/roles/{roleId}/permissions)
• Create a new role permission with the POST command on the permissions collection. (POST /admin/v1/roles/
{roleId}/permissions)
• DELETE a single role permission. (DELETE /admin/v1/roles/{roleId}/permissions/{permissionId})
• GET a single role permission. (GET /admin/v1/roles/{roleId}/permissions/{permissionId})
Note that the x-gw-canonicalParent identifies the Role entity as the canonical parent of RolePermissions.
"AccountContact": {
...
"properties": {
"accountContactRoles": {
...
"x-gw-defaultViews": [
"detail"
],
...
},
The following command retrieves a single account contact, and therefore displays the accountContactRoles property:
Command
GET /account/v1/accounts/pc:Su4p27AlTSug_SWq-8koA/contacts/pc:S9rwT9nWtFBArb3GFDwkc
Response
{
"data": {
"attributes": {
"accountContactRoles": [
{
"code": "AccountHolder",
"name": "AccountHolder"
}
],
"active": true,
"authorizationID": "S5qmqyeE_7azM0VwejF2r",
"cellPhone": {
"countryCode": {
"code": "US",
"name": "United States (1)"
},
However, when the collection of account contacts is retrieved, account contact roles is not included:
Command
GET /account/v1/accounts/pc:Su4p27AlTSug_SWq-8koA/contacts
Response
{
"count": 5,
"data": [
{
"attributes": {
"authorizationID": "S5qmqyeE_7azM0VwejF2r",
"cellPhone": {
"countryCode": {
"code": "US",
"name": "United States (1)"
},
Country-specific fields
Entity schemas use JSON logic conditional rules to define whether certain fields are forbidden or required based on the
country. In some cases a field might be forbidden for use in a particular county. In other cases, such as addresses,
required fields differ by country. These rules are specified in the x-gw-rules property.
Note: See “Rules” on page 520 and “Forbidden fields” on page 515 for more information.
In this example, there is a rule on PolicyLocation that makes certain location fields forbidden and others required for
the US:
"x-gw-entityId": "PolicyLocation",
"x-gw-rules": [
{
"jsonLogic": {
"if": [
{
"===": [
{
"var": "country"
},
"US"
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-forbidden": [
"CEDEX",
"addressLine1Kanji",
"addressLine2Kanji",
"area",
"cityKanji",
"department",
"emirate",
"island",
"oblast",
"parish",
"prefecture",
"province"
],
"x-gw-requiredForValidation": [
"addressLine1",
"city",
"postalCode",
"state"
]
},
In some cases the same set of rules apply to multiple countries. In those cases, all countries are listed in an array using
in logic on the rules, as shown here:
"x-gw-rules": [
{
"jsonLogic": {
"if": [
{
…
},
{
"in": [
{
"var": "country"
},
[
"AS",
"AU",
"FM",
"GU",
"IN",
"MH",
...
Coverage category
The x-gw-coverageCategory property is attached to the coverage in the schema. It provides the following information
about the coverage category:
• code: The coverage category code.
• description: A description of the coverage category.
• name: The name of the coverage category.
• sortOrder. The sort order. See “Sort order” on page 522 for more information.
The following is an example of a coverage category as it appears in the schema. In this case, it describes the coverage
category in the base configuration Personal Auto line for collision (PACollisionCov) coverage.
"x-gw-coverageCategory": {
"code": "PAPPhysDamGrp",
"description": "Personal Auto Physical Damage Group",
"name": "Personal Auto Physical Damage Group",
"sortOrder": 50
}
This property is included with the schema only when the inlineProductDefinition query string is set to true.
"x-gw-rules": [
{
"jsonLogic": {
"if": [
{
"!==": [
{
"var": "TSTParentCov.selected"
},
true
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-forbidden": [
"TSTChildCov"
]
}
]
}
},
In this example, the rule is checking to see if the selected property on the parent entity (TSTParentCov) is not true
(meaning the parent clause has not been selected). If that’s the case, the child coverage (TSTChildCov) is listed as
forbidden.
See “Rules” on page 520 for more information on working with rules. See “Forbidden fields” on page 515 for more
information on the x-gw-forbidden property.
"x-gw-coveredLocationField": true
"dateOfBirth": {
"description": "The person's date of birth. Only applicable for an `AccountContact` that represents a person.",
"format": "date",
"nullable": true,
"title": "Date of birth",
"type": "string",
"x-gw-before": "now"
},
Entity ID
Every schema that contains an entity has a corresponding entity ID. For example, the User schema has an entity ID of
User:
"x-gw-entityId": "User"
In contrast, the SimpleReference schema is not an entity, and therefore does not have an x-gw-entityId property.
Note that the x-gw-entityId property is available only when a schema is retrieved through the entity-schemas
endpoints.
Forbidden fields
The schema can include the x-gw-forbidden property. This property is an array used to indicate that one or more
properties are not allowed or available under certain conditions. It is often defined inside JsonLogic decisions that
provide the conditions under which something is forbidden. (See https://jsonlogic.com/ for more information on using
JsonLogic.)
This example shows a section of the schema that indicates certain properties are forbidden based on a contact subtype:
"x-gw-rules": [
{
"jsonLogic": {
"if": [
…
{
"in": [
{
"var": "contactSubtype"
},
[
"Adjudicator",
"Person",
"PersonVendor",
"UserContact"
]
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-forbidden": [
"companyName"
]
},
{
"in": [
{
"var": "contactSubtype"
},
[
"LegalVenue",
"Place"
]
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-forbidden": [
"applicableGoodDriverDiscount",
"cellPhone",
"companyName",
…
]
},
The x-gw-forbidden property is used in several contexts. It is used to designate forbidden fields for things such as:
• Subtype-specific fields.
• Product edition rules that indicate that a given element is unavailable for that edition.
• Choices on options, packages, or typekeys. In these cases, x-gw-forbidden is an array of objects, where each
object has a code and name for the forbidden choice.
See “Country-specific fields” on page 512 for more examples of x-gw-forbidden.
Localizations
When you call the schema retrieval endpoint with the includeLocalizations parameter set to true, the returned
schema will contain localized versions of all localizable strings in the schema. (See “includeLocalizations” on page 501
for information on using this parameter.) If you also specify the inlineTypelists parameter, localized strings will be
included for typelist values. Similarly, if you specify the inlineProductDefinition parameter, localized strings will
be included for localizable product model elements such as coverage names and descriptions.
Localization strings are returned on the x-gw-localizations property on the associated element. The value of x-gw-
localizations is an object with a key for each localized property, such as title or description. The values of those
keys are another object with key/value pairs for each requested language and the localized value for those languages.
For example, suppose you have two languages configured, English (US) and French (France). You also have a schema
object on an entity named username. The object looks like this:
"username": {
"description": "The username for the user",
"maxLength": 30,
"minLength": 1,
"pattern": "\\S",
"title": "Username",
"type": "string",
GET /common/v1/entity-schemas?includeLocalizations=*all
Schema example
"x-gw-localizations": {
"description": {
"en_US": "The username for the user",
"fr_FR": "Le nom d’utilisateur de l’utilisateur"
},
"title": {
"en_US": "Username",
"fr_FR": "Nom d’utilisateur"
}
}
GET /common/v1/entity-schemas?includeLocalizations=en_US
Schema example
"x-gw-localizations": {
"description": {
"en_US": "The username for the user"
},
"title": {
"en_US": "Username"
}
}
GET /common/v1/entity-schemas?includeLocalizations=en_US&inlineTypelists=true
Schema example
"vacationStatus": {
"$ref": "#/definitions/TypeKeyReference",
"description": "Indicates whether the user is considered to be on vacation",
"title": "Vacation status",
"x-gw-choices": [
{
"code": "atwork",
"description": "The user is at work",
"name": "At work",
"sortOrder": 0,
"x-gw-localizations": {
"description": {
"en-US": "The user is at work"
},
"name": {
"en-US": "At work"
}
}
},
{
"code": "onvacation",
"description": "The user is on vacation",
"name": "On vacation",
"sortOrder": 1,
"x-gw-localizations": {
"description": {
"en-US": "The user is on vacation"
},
"name": {
"en-US": "On vacation"
}
}
},
…
],
"x-gw-localizations": {
"description": {
"en-US": "Indicates whether the user is considered to be on vacation"
},
"title": {
"en-US": "Vacation status"
}
},
"x-gw-typelist": "VacationStatusType"
},
A value will always be included in x-gw-localizations for each installed language. If the value has not been
localized for a language, normal localization fallback rules will apply. If a language code and region are specified, the
first fallback will be to language code, then to the default language. For example, suppose fr_CA (Frech, Canada) is an
installed language. If there is no localization for a particular property for fr_CA, it will fall back to a value specified for
fr (French). If there is no localized value for fr, the value will be the default language (if the default language is not
fr_CA or fr).
Command
GET /common/v1/entity-schemas?includeLocalizations=en_US,fr_FR
Schema example
"x-gw-localizations": {
"description": {
"en_US": "The username for the user",
"fr_FR": "The username for the user"
},
"title": {
"en_US": "Username",
"fr_FR": "Username"
}
}
Numeric values
Properties that are numeric types can have additional defining properties depending on the type of value.
Fixed-point decimal values
Certain decimal values need to be restricted as to the maximum number of digits allowed in the value. This is depicted
in the schema through the x-gw-precision and x-gw-scale properties:
• x-gw-precision: The maximum number of digits allowed for a value.
• x-gw-scale: The scale of the value, such as the maximum number of digits to the right of a decimal point.
These properties apply only to elements of type gw-bigdecimal and to MonetaryAmount references.
In this example, the cost of a new car can be up to 18 digits, with up to two digits following the decimal point:
"PersonalVehicle": {
"description": "Personal Vehicle",
"properties": {
...
"costNew": {
"$ref": "#/definitions/MonetaryAmount",
"description": "Original retail cost of car.",
"nullable": true,
"title": "Cost New",
"x-gw-precision": 18,
"x-gw-scale": 2,
"x-gw-sortOrder": 6
},
"amount": {
"$ref": "#/definitions/MonetaryAmount",
"description": "The transaction amount for the effective time",
"readOnly": true,
"title": "Amount",
"x-gw-maximum": 5000,
"x-gw-minimum": 250
},
"x-gw-owningPolicyLine": {
"id": "PersonalAutoLine",
"name": "Personal Auto Line"
},
No query parameters are required in the API command to retrieve this property.
Owning products
If an entity is LOB-specific, the x-gw-owningProducts property will contain an array of products that include that
entity. In this example, the entity is part of the PersonalAuto product:
"x-gw-owningProducts": [
{
"id": "PersonalAuto",
"name": "Personal Auto"
}
]
No query parameters are required on the command to retrieve this property. However, if you include the product query
parameter, all entities returned will either not have any owning products or will contain the specified product in the x-
gw-owningProducts array.
"x-gw-coverages": {
"$ref": "#/definitions/PersonalAutoLine_Coverages"
},
References
There are some schema definitions that are references to other entities. Examples are entities such as SimpleReference
and GroupReference. When this is the case, the entity has an x-gw-resourceReference property set to true.
"x-gw-resourceReference": true
For properties that are reference types, such as SimpleReference, the name of the referenced entity type is defined in
the x-gw-referenceType property. The name of the schema definition associated with a given type is specified in the
x-gw-reference-schema property. In this example, accountHolder is a SimpleReference associated with the
AccountContact schema, of type AccountContact:
"accountHolder": {
"$ref": "#/definitions/SimpleReference",
"description": "A reference to the `AccountContact` that represents the owner of the policies for this account",
"title": "Account holder",
"x-gw-reference-schema": "AccountContact",
"x-gw-referenceType": "AccountContact"
},
Required properties
Some entities have a required property. This property is an array containing a list of properties that must have values
on instances of the entity. In addition, there are properties that are required only when certain actions, such as creation
or validation, take place on those entities.
• requiredForBind: The property must have a value for a job to bind.
• requiredForCreate: The property must have a value for an entity to be created.
• requiredForQuote: The property must have a value for a job to be quoted.
• requiredForValidation: The property must have a value for the object to validate.
For example, the following specifies that an address cannot be validated if there are not values for addressLine1,
city, postalCode, and state:
"x-gw-requiredForValidation": [
"addressLine1",
"city",
"postalCode",
"State"
]
Rules
The entity schema applies rules to some entities, both conditional and non-conditional. Rules are required for several
different areas of the schema. For details on some of the specific areas of the entity schema where rules are used, see
the following sections:
• “Country-specific fields” on page 512
• “Coverage parent/child dependencies” on page 514
• “Tags” on page 523
Rules Overview
In some cases there is schema metadata about a business entity, or associated product model entity, that is conditional
rather than static. To support those use cases, where possible the Guidewire schema APIs translate those rules into
conditions using the JsonLogic format. The JsonLogic expressions, when evaluated, will return a JSON object that
might contain additional JSON Schema properties to apply to the attached schema.
For example, if a direct coverage term has a conditional maximum value, the directValue schema property for the
term's schema will have an x-gw-rules array with an object representing this rule. Evaluating the JsonLogic
expression for the associated rule might return a result such as:
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-maximum": "500.00"
}
This means that the x-gw-maximum schema property needs to be applied to the term's schema dynamically, replacing
any value that might already be there. If the result returns null or the empty object, it means no changes to the schema
are needed. (The x-gw-dynamicPropertiesMarker property is a marker property that can be ignored at runtime).
JsonLogic expressions need to be evaluated using the associated root API object's attributes as the context for
evaluation.
See https://jsonlogic.com/ for more information on using JsonLogic.
The following are examples of places where rules can be attached:
• Field existence rules are attached to the containing schema definition.
• Field min/max/default rules are attached to the associated property definition.
• Field typekey existence rules are attached to the associated property definition.
• Clause existence rules are attached to the _Coverages schema definition that defines a container for all coverages
on the coverable.
• Term existence rules are attached to the terms property on the _Coverage schema definition.
• Term min/max/default rules are attached to the Value property for the term, such as directValue.
• Term option/package/typekey existence rules are attached to the choiceValue or typekeyValue property for the
term.
Rules Examples
Conditional rules are provided with JsonLogic. Often (but not always) this logic is nested within the x-gw-rules array.
Here’s an example. (Note that while this example pertains specifically to PolicyCenter, the functionality of x-gw-rules
is the same across all InsuranceSuite products.)
"x-gw-rules": [
{
"jsonLogic": {
"if": [
{
"===": [
{
"uri": "/jobs/{jobId}/lines/PersonalAutoLine/integerProperty"
},
1002
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-maximum": "500.00"
}
},
{
"===": [
{
"uri": "/jobs/{jobId}/lines/PersonalAutoLine/integerProperty"
},
1003
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-maximum": "400.00"
},
In this case, if the property at the specified uri is equal to 1002, the maximum value for this property is 500. But if the
value is 1003, the maximum is 400.
Rules can also exist without conditions. For example, if a direct coverage term always has a maximum of 500.00 for a
particular product edition, fetching the schema in the context of that edition includes the property directly.
"directValue": {
"x-gw-maximum": "500.00",
…
}
The x-gw-rules property is an array of JsonLogic rules. Another property, x-gw-dynamicProperties, is similar to x-
gw-rules, but instead of being an array, it’s an object containing named rules. In this example, there are two named
rules, one for accountHolderCreation and one for primaryLocationCreation:
"x-gw-dynamicProperties": {
"accountHolderCreation": {
"forbiddenError": "Exactly one of either 'accountHolder' or 'initialAccountHolder' is required on creation",
"jsonLogic": {
"if": [
{
"===": [
{
"var": "accountHolder"
},
null
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-requiredForCreate": [
"initialAccountHolder"
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-forbidden": [
"initialAccountHolder"
]
}
]
},
"requiredError": "Exactly one of either 'accountHolder' or 'initialAccountHolder' is required on creation"
},
"primaryLocationCreation": {
"forbiddenError": "Exactly one of either 'primaryLocation' or 'initialPrimaryLocation' is required on creation",
"jsonLogic": {
"if": [
{
"===": [
{
"var": "primaryLocation"
},
null
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-requiredForCreate": [
"initialPrimaryLocation"
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-forbidden": [
"initialPrimaryLocation"
]
}
]
},
"requiredError": "Exactly one of either 'primaryLocation' or 'initialPrimaryLocation' is required on creation"
}
},
Segments
Fields of type "segment" in Advanced Product Designer (APD) are special in that they can cause the product edition to
change. Because of this, a user interface (or any other consumer) might need to treat those fields specially if they're
edited, in case the edition (and thus the appropriate edition-related rules) changes as a result.
Segment fields are shown in the schema with the x-gw-segmentField property set to true.
"x-gw-segmentField": true
Sort order
Sort order is preserved in various situations and can be used to ensure the desired order of user interface elements.
x-gw-sortOrder
APD attaches a sequence number to every coverable field. The entity schema preserves that ordering through the x-
gw-sortOrder property.
In this example, the PersonalVehicle entity has been configured so Annual Mileage is ordered before Basis Amount,
followed by Body Type, and so on.
"PersonalVehicle": {
"description": "Personal Vehicle",
"properties": {
"annualMileage": {
"description": "Annual miles for this vehicle",
"nullable": true,
"title": "Annual Mileage",
"type": "integer",
"x-gw-sortOrder": 1
},
"basisAmount": {
"description": "Basis Amount",
"nullable": true,
"title": "Basis Amount",
"type": "integer",
"x-gw-sortOrder": 2
},
"bodyType": {
"$ref": "#/definitions/TypeKeyReference",
"description": "Body type of the vehicle.",
"nullable": true,
"title": "Body Type",
"x-gw-filterBy": [
"vehicleType"
],
"x-gw-sortOrder": 3,
"x-gw-typelist": "BodyType"
},
sortOrder
In this example, the order of Account Status choices has been preserved through the sortOrder on the choice options,
with Active first, Merged second, and so on. Note that counting starts at 0, so the first choice is sortOrder 0.
"accountStatus": {
"$ref": "#/definitions/TypeKeyReference",
"description": "The current status of this account",
"readOnly": true,
"title": "Account status",
"x-gw-choices": [
{
"code": "Active",
"description": "The account is fully ready and open, and submissions have been created for it.",
"name": "Active",
"sortOrder": 0
},
{
"code": "Merged",
"description": "The account has been merged into another account and is available for read only access.",
"name": "Merged",
"sortOrder": 1
},
{
"code": "Pending",
"description": "The account is ready for data entry, but data entry is still ongoing and the account is not
considered fully open.",
"name": "Pending",
"sortOrder": 2
},
Tags
In APD, you can attach tags to most things that can be modeled, such as:
• Clauses
• Clause terms
• Clause term choices (options, packages, or typekeys)
• Risk object fields
• Risk object field choices (typekeys)
See Product Designer Guide for more information on applying tags in APD.
Tags consist of a particular code that either applies or does not apply. Tags can also have rules, such that they apply
conditionally.
Tags are represented in the entity schema via the x-gw-tags object, where each property is the code for a tag, and the
value of each code is an object with a single applies Boolean property. If a tag has no conditions, x-gw-tags is
attached directly to the resulting schema. If the tags do have conditions, the associated rules are in the x-gw-rules
array, and the tag-related rules produce JSON schema fragments that contain the x-gw-tags object. See “Rules” on
page 520 for more information on working with rules.
Tags are returned with the entity schema only when the editionCode query parameter is included with the command.
(See “Business entity schema query parameters” on page 500 for more information.)
This example shows tags as part of a rule on a coverage. In this case, if this property is less than 100, it’s rateable (rate
is applicable), otherwise it’s not rateable (rate is not applicable).
"x-gw-rules": [
{
"jsonLogic": {
"if": [
{
"<": [
{
"uri": "/jobs/{jobId}/lines/PersonalAutoLine/integerProperty"
},
100
},
{
"x-gw-tags": {
"rate": {
"applies": true
}
}
},
{
"x-gw-tags": {
"rate": {
"applies": false
}
}
"name": {
"description": "Name field",
"maxLength": 255,
"minLength": 1,
"nullable": true,
"x-gw-tags": {
"rate": {
"applies": true
}
}
},
Update restrictions
Some properties can be assigned values only when the entity is first created. In those cases, the property will have a
value of x-gw-createOnly set to true.
For example, an initial account holder can be specified only at the time the account is created (POST), and cannot be
modified later.
"Account": {
...
"initialAccountHolder": {
...
"title": "Initial account holder",
"x-gw-createOnly": true
},
In other cases, a property can be assigned a value only when the entity is updated (PATCH). In those cases, the property
will have x-gw-patchOnly set to true:
"x-gw-patchOnly": true
Typekey references
Some properties in the schema are used to identify typekey properties and behaviors.
Typelist
If an element in the schema is a TypeKeyReference, the applicable typelist is specific in the x-gw-typelist property.
In this example, the organizationType property is a TypeKeyReference to the AccountOrgType typelist:
"organizationType": {
"$ref": "#/definitions/TypeKeyReference",
"description": "The type of organization of the company or person represented by this account, such as `individual`
or `corporation`",
"nullable": true,
"title": "Organization type",
"x-gw-typelist": "AccountOrgType"
},
Filter
Some typelists are filtered by categories from other typelists represented on the same object. The x-gw-filterBy
property contains an array of categories on which to filter. For example, a country typelist might include states,
provinces, islands, and so on. Not all of these options apply to all countries. In these cases, the typelist needs to be
filtered by country, as in the following examples:
"province": {
"$ref": "#/definitions/TypeKeyReference",
"description": "The province of the location's address. Only applicable in certain countries.",
"nullable": true,
"title": "Province",
"x-gw-createOnly": true,
"x-gw-filterBy": [
"country"
],
"x-gw-typelist": "State"
},
"state": {
"$ref": "#/definitions/TypeKeyReference",
"description": "The state of the location's address. Only applicable in certain countries.",
"nullable": true,
"title": "State",
"x-gw-createOnly": true,
"x-gw-filterBy": [
"country"
],
"x-gw-typelist": "State"
}
Value properties
The x-gw-valueProperty property is in the schema attached to terms, scheduled item properties, and answers. This
property provides the name of the property that actually stores the term, scheduled item property, or answer value. This
makes it easier to determine the term, scheduled item property, or answer type without having to parse through the
other properties.
For example, this schema excerpt shows a term named PAMedLimit. The x-gw-valueProperty is set to
“choiceValue”, so you know that for this particular term you need to look for the choiceValue property to get or set the
value of the term.
"terms": {
"description": "The terms of a coverage",
"properties": {
"PAMedLimit": {
"properties": {
…
"choiceValue": {
"$ref": "#/definitions/ProductModelChoice",
…
"x-gw-choices": [
…
],
},
},
},
…
"x-gw-valueProperty": "choiceValue"
},
This property is only relevant to schemas created for product model entities, and therefore it will only appear when the
inlineProductDefinition query parameter is set to true.
To facilitate development, Cloud API includes a Test Util API. The Test Util API is an API that provides functionality
to facilitate testing during development. The API is also sometime referred to by its internal name (testutil).
By default, the Test Util API is not enabled.
WARNING: The Test Util API is intended for use in a development environment only. Do not use the Test Util
API on a production system.
Learn more about the Test Util API and some of the available endpoints:
• “Enabling the Test Util API” on page 527
• “View the Test Util API in Swagger UI” on page 528
• “Test Util API endpoints” on page 528
The Test Util API is enabled using substitution placeholders. A substitution placeholder is a variable that determines
the setting of a specific server property. The value is stored outside of the Guidewire application. During server start-
up, the Guidewire application looks for the property's value in the following places in this order. It uses the first value it
finds.
1. Guidewire Property Services
2. Guidewire Cloud Console environment variables
3. The application's config.properties file
The syntax for a substitution variable varies slightly based on where the value is being set.
published-apis.PUBLISHEDAPIS_testutil_publish = true
PUBLISHEDAPIS_testutil_publish = true
published-apis.PUBLISHEDAPIS_testutil_publish = true
WARNING: The Test Util API is intended for use in a development environment only. Do not use the Test Util
API on a production system.
After you enable Test Util, you can use Swagger UI to view the Test Util API definition. (See “Enabling the Test Util
API” on page 527 for instructions on enabling Test Util.)
Procedure
1. Start PolicyCenter.
2. In a web browser, enter the URL for Swagger UI. This loads the Swagger UI tool.
• The format of the URL is <applicationURL>/resources/swagger-ui/
• For example, for a local instance of PolicyCenter, use: http://localhost:8180/pc/resources/swagger-
ui/
3. In the text field at the top of the Swagger UI interface, enter the following URL:
• <applicationURL>/rest/test-util/v1/swagger.json
4. Click Explore.
WARNING: The Test Util API is intended for use in a development environment only. Do not use the Test Util
API on a production system.
POST /test-util/v1/delete-documents
GET /test-util/v1/jobs/pc:101
Response
{
"data": {
"attributes": {
"id": "pc:101",
"jobStatus": {
"code": "Draft",
"name": "Draft"
}
},
This command retrieves the ID and status of the job. The results are identical to using the Job API with the following
query parameters:
GET /job/v1/jobs/{jobId}?fields=id,jobStatus
Guidewire recommends using the groups endpoint in the admin API rather than the test-util groups endpoint.
The test-util endpoint is available only for backward compatibility. See “Groups” on page 444 for more
information on groups.
You can create a new group for testing purposes using the following endpoint:
POST /test-util/v1/groups
{
"data": {
"attributes": {
"groupType": {
"code": "general"
},
"name": "Cloud API Group 1",
"parent": {
"id": "systemTables:1"
} }
}
}
Using this endpoint is similar to using the groups endpoint in the Admin API, but with test-util there are fewer
fields required to create the group. Guidewire recommends using the Admin API endpoint for both testing and
production purposes.