PC CloudAPIGuide BusinessFlows
PC CloudAPIGuide BusinessFlows
PC CloudAPIGuide BusinessFlows
Contents
Support............................................................................................................................................................ 9
Part 1
Consuming the Cloud API
1 REST API fundamentals in Cloud API...............................................................................................................13
The InsuranceSuite Cloud API.......................................................................................................................... 13
Resources......................................................................................................................................................... 14
Endpoints......................................................................................................................................................... 15
Root resources......................................................................................................................................... 15
Child resources......................................................................................................................................... 15
Operations................................................................................................................................................ 16
Paths......................................................................................................................................................... 17
Requests and responses................................................................................................................................... 17
Testing requests and responses....................................................................................................................... 18
Tutorial: Set up your Postman environment............................................................................................ 19
2 Overview of the system APIs in Cloud API...................................................................................................... 21
The base configuration system APIs................................................................................................................. 21
Cloud API versions.................................................................................................................................... 21
Viewing Cloud API information........................................................................................................................ 22
Swagger UI............................................................................................................................................... 23
View a system API using Swagger UI........................................................................................................ 23
Organization of API information in Swagger UI........................................................................................ 24
The metadata endpoints and Postman.................................................................................................... 24
View a system API using Postman............................................................................................................ 25
Organization of information in metadata endpoint output..................................................................... 26
Beta APIs.......................................................................................................................................................... 26
Published APIs and endpoints.................................................................................................................. 26
Beta APIs and endpoints.......................................................................................................................... 26
Beta APIs for this release..........................................................................................................................27
Additional metadata endpoint functionality.................................................................................................... 27
Functionality for alternate API tools.........................................................................................................27
The /typelists endpoints...........................................................................................................................28
Tutorial: Query for typelist metadata....................................................................................................... 29
Routing related API calls in clustered environments........................................................................................ 30
3 GETs and response payload structures........................................................................................................... 33
Overview of GETs............................................................................................................................................. 33
Standardizing payload structures..................................................................................................................... 33
Viewing response schemas...................................................................................................................... 35
View a response schema in Swagger UI................................................................................................... 35
Sending GETs.................................................................................................................................................... 35
Send a GET using Postman....................................................................................................................... 35
Tutorial: Send a basic Postman request................................................................................................... 36
Payload structure for a basic response............................................................................................................ 36
Structure of a basic response................................................................................................................... 37
Contents 3
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
4 Contents
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
Contents 5
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
Part 2
PolicyCenter business flows
12 Accounts........................................................................................................................................................ 115
Creating an account....................................................................................................................................... 115
Account holder....................................................................................................................................... 115
Primary location..................................................................................................................................... 117
Producer code........................................................................................................................................ 118
Example: Creating an account................................................................................................................ 118
Account search............................................................................................................................................... 119
13 Policy transactions......................................................................................................................................... 123
Initiating the policy transaction......................................................................................................................124
Modifying the job........................................................................................................................................... 125
Quoting the job.............................................................................................................................................. 125
Completing the policy transaction................................................................................................................. 125
LOB-specific endpoints................................................................................................................................... 125
14 Submission..................................................................................................................................................... 129
Initiating the submission policy transaction...................................................................................................129
Modifying the submission job........................................................................................................................ 130
Generating a quote........................................................................................................................................ 133
Completing the submission............................................................................................................................ 133
Tutorial: Submission policy transaction..........................................................................................................134
15 Issuance......................................................................................................................................................... 153
Issue the policy...............................................................................................................................................153
16 Renewal......................................................................................................................................................... 155
Renew the policy............................................................................................................................................ 155
17 Cancellation................................................................................................................................................... 157
Cancel the policy............................................................................................................................................ 157
18 Policy change................................................................................................................................................. 159
Change the policy........................................................................................................................................... 159
19 Reinstatement............................................................................................................................................... 161
Reinstate the policy........................................................................................................................................ 161
20 Rewrite and Rewrite New Account............................................................................................................... 163
Rewrite transaction........................................................................................................................................ 163
Rewrite new account transaction...................................................................................................................164
21 Out-of-sequence conflicts............................................................................................................................. 165
Identifying out-of-sequence conflicts.............................................................................................................165
6 Contents
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
Contents 7
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
Creating users.................................................................................................................................................210
Updating users............................................................................................................................................... 210
Part 3
Configuring the Cloud API
32 Extending system API resources....................................................................................................................213
Schema organization...................................................................................................................................... 213
Extending schema definitions........................................................................................................................ 214
Schema definition extension syntax....................................................................................................... 214
Extending mappers........................................................................................................................................ 218
Mapper extension syntax....................................................................................................................... 218
Extending updaters........................................................................................................................................ 219
Updater extension syntax....................................................................................................................... 220
Tutorial: Create a resource extension............................................................................................................ 221
Providing feedback......................................................................................................................................... 230
33 Obfuscating Personally Identifiable Information (PII).................................................................................. 231
Nullifying PII................................................................................................................................................... 231
Masking PII..................................................................................................................................................... 232
34 APIs for lines of business............................................................................................................................... 235
Generating and installing LOB-specific APIs................................................................................................... 235
Generating LOB-specific APIs through APD............................................................................................ 236
Generating templates from a finalized product..................................................................................... 237
Installing LOB-specific APIs without installing other artifacts................................................................ 238
API codegen configuration..................................................................................................................... 238
Disabling product artifacts during testing...................................................................................................... 240
Determining which product artifacts to use...........................................................................................240
Disable a product's visualized artifacts...................................................................................................240
Enable a product's visualized artifacts................................................................................................... 241
Disable a product's installed artifacts.....................................................................................................241
Managing LOB-specific APIs for testing and integration................................................................................ 241
Importing a product template through the API......................................................................................241
Querying for product templates.............................................................................................................242
Toggling the active state of a visualized product.................................................................................... 243
Generating code from a visualized product........................................................................................... 244
Deleting a product template.................................................................................................................. 244
8 Contents
Support
Guidewire customers
https://community.guidewire.com
Guidewire partners
https://partner.guidewire.com
part 1
The InsuranceSuite Cloud API is a set of RESTful system APIs that caller applications can use to request data from or
initiate action within an InsuranceSuite application. These APIs provide content for the REST API framework that is
present in all InsuranceSuite applications. The APIs are built using the Swagger 2.0 Specification. These are also
referred to as the system APIs.
The following topics discuss how caller applications can consume the system APIs in Cloud API. This includes how
to:
• Construct GET requests to query for data
• Construct POST requests to create new data
• Construct PATCH requests to modify existing data
• Construct DELETE requests to remove data
• Use query parameters to refine response payloads
• Reduce the number of calls needed to accomplish a business flow
• Prevent lost updates using checksums
This topic discusses the fundamental concepts of REST APIs and how those concepts are used in Cloud API. This
topic is intended primarily for developers with minimal experience using REST APIs.
For information on functionality specific to the APIs in the Cloud API (such as the APIs that exist in the base
configuration, the beta APIs, or the openapi.json endpoints), see “Overview of the system APIs in Cloud API” on
page 21.
1. The caller application constructs a request object. The request object consists of:
REST API fundamentals in Cloud API 13
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
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"
}
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, operations, 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:
• An included resource is a resource that appears in the included section at the bottom of the payload, such as an
Activity resource's Notes. These resources are not included in a response by default and must be controlled
through the included query parameters.
For more information on inline and included resources, see “GETs and response payload structures” on page 33.
Operations
An operation is a type of action a caller application can take on a resource through an endpoint. Operations are also
referred to as verbs or methods. The system APIs support the following subset of HTTP operations:
• 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.
• PATCH - Used to update resources.
• DELETE - Used to delete resources.
Every endpoint supports one or more of these operations. For example, in the Common API:
• The notes/{noteId} endpoint supports GET, PATCH, and DELETE.
• The /activities endpoint supports only the GET operation.
The HTTP operations are designed for CRUD operations (Create, Read, Update, Delete). Some business processes in
InsuranceSuite applications are available to the system APIs but do not readily map to any of these operations, such as
assigning objects, closing objects, or approving objects. As a general rule, the custom actions that trigger these
processes use the POST operation.
Paths
Every endpoint has a path. The path is the portion of the URL used by caller applications to identify the specific
endpoint.
For Cloud API, every path consist of the following pattern:
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
• Endpoint path - The path to the specific endpoint that the request is requesting.
◦ This value is required.
◦ Endpoint paths end either with a resource name (such as .../activities) or the ID of a specific element (such
as .../activities/xc:207 in the example above). The ID of a specific element is also referred to as a path
parameter.
• Query parameters - This is a set of query parameters that further defines the data that is desired in the response.
For most endpoints, query parameters are optional.
◦ For example, when you add ?fields=assignedGroup, you are specifying that the only field you want returned
in the response is the assignedGroup field.
◦ 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 and
response payload structures” on page 33.
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:
Note: Swagger UI is also able to send requests to a working API and show responses. However, the system APIs are
significantly robust, and performance time for getting responses to requests can be unacceptably long. Guidewire
recommends using Swagger UI only for viewing system API documentation.
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. Under the Untitled Request label, make sure that GET is selected. (This is the default operation.)
4. In the Enter request URL field, enter the following URL: http://localhost:8180/pc/rest/common/v1/
activities
5. Every tab in Postman requires authorization information to execute the request. To provide sufficient
authorization information:
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.
6. Click the Send button to the right of the request field.
{
"count": 13,
"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/xc:20"
This topic provides an overview of the system APIs in the Cloud APIs. This includes a discussion of the base
configuration APIs, the tools available for viewing API information, and the beta APIs.
You can use the API path to view metadata about the API. This is discussed in detail in the following section.
There are also a minimal set of APIs for ContactManager. For more information, refer to the <appURL>/rest/apis
endpoint for ContactManager.
• January: 1.0.0
• April: 1.1.0
• July: 1.2.0
• October: 2.0.0
Release Month Version # Compared to the previous release, this Major versions in this release
release...
January 1.0.0 ...is identical or additive /common/v1
April 1.0.1 ...is identical or additive /common/v1
July 1.0.2 ...is identical or additive /common/v1
October 2.0.0 ...includes changes to existing functionality /common/v1 (identical or additive to July's release)
and
/common/v2 (containing the changed functionality)
• Swagger UI
• Calling either the /openapi.json endpoint or the /swagger.json directly through a request tool, such as Postman
Swagger UI
There is an open source tool named Swagger UI that automatically presents this information as an interactive web
page. For information on Swagger UI, refer to the Swagger web site: https://swagger.io/tools/swagger-ui/
Swagger UI is automatically bundled with InsuranceSuite applications that have system APIs.
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 expended and
collapsed. Searching through a complex schema is relatively straight-forward 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.
Note: Be aware that Swagger UI also has the capability to send requests to a working API and observe
responses. However, Guidewire recommends using Swagger UI only to view system API documentation. The
system APIs are significantly robust. When sending requests using Swagger UI, the performance time for
getting responses can be unacceptably long. For more information on recommended request tools, see
“Requests and responses” on page 17.
Results
The following screenshot shows the top of the Swagger UI display of the Common API.
color, font, or placement to help separate information. Schema hierarchies are not as readable as in Swagger UI. When
you need to review a schema hierarchy in detail, it may be easier to use Swagger UI.
From a metadata perspective, the OpenAPI 3.0 specification is richer. So whenever either endpoint is an option,
Guidewire recommends using the /openapi.json endpoint. For example, Guidewire-proprietary tags (such as x-gw-
typelist) are listed in the /openapi.json response, but not in the /swagger.json response. However, some tools
used to render API metadata may not be robust enough to process information using the OpenAPI 3.0 specification.
The /swagger.json endpoint is available for these types of circumstances.
In the base configuration, the metadata endpoints are available to any caller, including unauthenticated callers.
Postman
You can call the metadata 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/.
Procedure
1. Identify the path for the API. (For a list of paths for each API, see “The base configuration system APIs” on page
21.)
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"
}
},
...
Beta APIs
Published APIs and endpoints
In future releases, system API functionality is expected to change. To help insurers manage potential future changes,
Guidewire maintains a Schema Backwards Compatibility Contract. This document identifies the rules for what
Guidewire is allowed to change in an API minor or maintenance release while still having that release considered to be
backwards compatible. To request a copy of the Schema Backwards Compatibility Contract, consult your Guidewire
representative.
The Schema Backwards Compatibility Contract applies to published APIs and endpoints. These APIs and endpoints
have been certified to be stable. By default, schema documentation resources (such as Swagger UI or the /
openapi.json endpoints) return only published APIs and endpoints.
WARNING: Guidewire does not support the use of beta APIs or beta endpoints in production.
For some beta APIs and endpoints, the toggle is listed in config.properties, but it is set to false. For other beta APIs
and endpoints, there is no toggle in config.properties. To enable beta APIs and endpoints, you must either set the
existing toggle to true, or add a toggle to config.properties and set it to true. After you modify config.properties in
this way, you must restart the server.
For example, suppose that a release of Guidewire Cloud API included a fictitious set of beta endpoints that managed
insurance metrics. For these endpoints, the following toggle appears in config.properties:
feature.InsuranceMetricsApisBeta = false
To enable these endpoints, you would need to change the line to the following, and then restart the server:
feature.InsuranceMetricsApisBeta = true
"x-gw-beta": true
For beta APIs, the x-gw-beta attribute is listed at the API level. The attribute does not appear at the endpoint level. All
endpoints in a beta API are considered beta endpoints.
For beta endpoints in a published API, the x-gw-beta attribute is listed with each endpoint.
The x-gw-beta attribute appears only for APIs and endpoints that are beta. Published APIs and published endpoints do
not have a listing of "x-gw-beta": false.
Once enabled, beta APIs also appear in Swagger UI. However, Swagger UI does not indicate whether a given API or
endpoint is beta.
WARNING: Swagger UI does not render information from Guidewire proprietary tags, including the x-gw-beta
tag. This means that, once you enable beta APIs, Swagger UI does not distinguish between published APIs and
beta APIs. Guidewire strongly recommends that, if you enable beta APIs on a given development instance, alert
all developers using this instance to the fact that beta APIs have been enabled. Without this alert, other
developers may not be able to distinguish between published APIs and beta APIs.
swagger.json endpoints do not support the following query parameters. They are supported only by the /
openapi.json endpoints.)
?<parameterName>=<value>
To add additional query parameters to an HTTP request, use the following syntax for each query parameter after the
first:
&<parameterName>=<value>
For example, the following HTTP request retrieves the metadata for the Common API. It also enables filterByUser
and prettyPrint.
http://localhost:8180/pc/rest/common/v1/openapi.json?filterByUser=true&prettyPrint=true
?<parameterName>=<value>
For example, the following HTTP request retrieves the metadata for the Common API. It also disables polymorphism.
http://localhost:8180/pc/rest/common/v1/openapi.json?enablePolymorphism=false
(For more information on openapi-generator, see https://github.com/OpenAPITools/openapi-generator/.)
where:
• relatedTypelist is the name of the related typelist.
• Typecode is the typecode to use as a filter
For example, this call retrieves all typecodes in the ActivityCategory typelist:
GET /common/v1/typelists/ActivityCategory
However, this call retrieves only the typecodes in the ActivityCategory typelist that are valid when ActivityType is
General:
GET /common/v1/typelists/ActivityCategory?typekeyFilter=category:cn:ActivityType.general
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.)
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.
Using cookies
Within the context of system 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, 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.
• Session IDs do not require the caller application to identify information in a response header and then manage the
storage that information for later use.
However, Guidewire supports both approaches.
This topic discusses how the GET operation queries for data and the structure of the response payload that contains the
query results. For information on how you can add query parameters to a GET to refine the query, see “Refining
response payloads” on page 45.
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 36
• “Tutorial: Send a Postman request with included resources” on page 41
Overview of GETs
A GET is an HTTP method that is used to retrieve data from an InsuranceSuite application.
In its simplest format, a GET consists of the GET operation and the endpoint, such as GET /activities. A GET can
return either information about a single element (such as GET /activities/{activityId}) or information about a
collection (such as GET /activities/{activityId}/notes).
The response to a GET includes:
• An HTTP response code indicating success or failure.
• A response payload that contains the data that was queried for.
When a developer configures a caller application to query information using a GET, the construction of the API call is
fairly straight-forward. 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 chapter discusses how response
payloads are structured and how developers can learn about response payload formats.
• checksum
• id
• links (for a single element)
• method
• refid
• related
• type
• uri
{
"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)
• total
The format of a payload for a collection 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.
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": ...
}
}
}
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 17.
4. In the Enter request URL field, enter the URL for the server and the endpoint.
• For example, to do a GET /activities on an instance of PolicyCenter on your machine, enter: http://
localhost:8180/pc/rest/common/v1/activities
5. On the Authorization tab, provide sufficient authorization information to execute the request. For example, to set
up basic authentication for aapplegate:
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.
6. Click the Send button to the right of the request field.
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 aapplegate and password gw.
3. Enter the following call and click Send: GET http://localhost:8180/pc/rest/common/v1/
activities
{
"count": 13,
"data": [
{
"attributes": {
"activityPattern": "uw_review_contingency",
"activityType": {
"code": "general",
"name": "General"
},
"assignedByUser": {
"displayName": "Alice Applegate",
"id": "pc:105"
},
(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 “Specifying which fields to GET” on page 48.
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, the system APIs require 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. The system APIs behave this way in
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,
...
},
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
“Specifying which fields to GET” on page 48.
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.
"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.
?include=<resourceName>
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.
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.
2. Specify Basic Auth authorization using user aapplegate and password gw.
3. To get a response payload for Policy 0596932432 (Public ID pc:1) and its contacts, enter the following and click
Send:
GET http://localhost:8180/pc/rest/policy/v1/policies/pc:1?include=contacts
In the response payload:
• In the data section, line 122 identifies a related contact with the ID of test_pp:2
• In the related section, lines 132 to 185 provides the details about contact test_pp:2. (The ID is in the related
section on line 152.)
4. To get a response payload for Policy 0596932432 (Public ID pc:1) and its primary insured, enter the following
and click Send:
GET http://localhost:8180/pc/rest/policy/v1/policies/pc:1?include=primaryInsured
In the response payload:
• In the data section, line 122 identifies a related contact with the ID of test_pp:2
• In the related section, lines 132 to 185 provides the details about contact test_pp:2. (The ID is in the related
section on line 152.)
{
"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
] }
}
{
"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"
},
"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 '[users]' are not valid for this resource. The valid options are [notes]."
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.
If you want to interact directly with the concepts in this topic, go to the following tutorials:
• “Tutorial: Send a GET with the filter parameters” on page 48
• “Tutorial: Send a GET with the fields parameter” on page 50
• “Tutorial: Send a GET with the sort query parameter” on page 52
• “Tutorial: Send a GET with the pageSize and totalCount parameters” on page 55
• “Tutorial: Send a GET with query parameters for included resources” on page 57
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.
"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."
Filtering GETs
You can narrow which resources are returned using the filter keyword followed by one or more criteria. The criteria
are specified using the following syntax:
?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 ?filter=escalated:eq:true ...the escalated field equals true
ne Not equal ?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
values 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, ?filter=subject:sw:Contact%20claimant)
• Specify Booleans as either true or false. (For example, ?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 "::". The first colon
acts as an escape character. 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.
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.
You can also use the filter query for related resources added through the include parameter. For more information, see
“Using query parameters on included resources” on page 55.
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.
?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
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 aapplegate and password gw.
3. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities
4. Open a second request tab and specify Basic Auth authorization using user aapplegate and password gw.
5. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities?filter=priority:eq:high
collection (for example, the default fields for the /accounts/{accountId}/contacts endpoint). Fields included in the
Detail only are in bold:
• Detail: companyName, contactSubtype, displayName, emailAddress1, emailAddress2, id, industryCode,
primaryPhoneType, subtype, taxId
• Summary: companyName, contactSubtype, displayName, emailAddress1, id, industryCode, subtype, taxId
The fields parameter has three options related to these default sets:
• *detail - Returns the fields in the detail list
• *summary - Returns the fields in the summary list
• *default - Returns the fields in the detail list (if the endpoint returns a single element) or the fields in the summary
list (if the endpoint returns a collection)
For endpoints that return a single element:
• ?fields=*default and ?fields=*detail are logically equivalent.
• You can override the default behavior by using ?fields=*summary, which returns the summary fields instead of the
detail fields.
For endpoints that return a collection:
• ?fields=*default and ?fields=*summary are logically equivalent.
• You can override the default behavior by using ?fields=*detail, which returns the detail fields instead of the
summary fields.
Some API calls need a set of fields that is not exactly equivalent to either the detail list or the summary list. These calls
can name specific fields, either on their own or in addition to a default list of fields. They can also specify all fields.
?fields=*default,field_list
?fields=field_list
"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"
}
}
?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.
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 aapplegate and password gw.
3. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities
4. Open a second request tab and specify Basic Auth authorization using user aapplegate and password gw.
5. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities?fields=id,subject
?asOfDate=dateValue
For example, the following query returns policy pc:10 as it existed on January 1, 2019:
GET /policies/pc:10?asOfDate=2019-01-01
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".
?sort=properties_list
where properties_list is a comma-delimited list of properties that support sorting for that endpoint.
For example, the following query returns all activities assigned to the current caller 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
“Using query parameters on included resources” on page 55.
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.
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 aapplegate and password gw.
3. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities
4. Open a second request tab and specify Basic Auth authorization using user aapplegate and password gw.
5. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities?sort=dueDate
Controlling pagination
Some endpoints return collections. However, the entire collection is typically not returned in a single call. Instead, only
the first N resources are returned in the first payload. A caller can use "previous" and "next" links to access additional
payloads with the previous or next "page" of N resources. The practice of separating a list of resources into discrete
groups that can be paged through is referred to as pagination.
Every endpoint that returns a collection has default pagination behaviors. Each payload contains one page of resources.
There are several query parameters that refine these behaviors.
pageSize=n
where n is the maximum number of resources per payload to return. For example:
GET /activities?pageSize=20
Every resource type has a default pageSize. This value is used when the query does not specify a pageSize. You can
specify a pageSize less than or greater than the default pageSize.
Also, every resource has a maximum pageSize, and you cannot execute a query with a pageSize larger than the
maximum.
For example, suppose a given user has 125 activities, and the activities resource has a default pageSize of 25 and
maximum pageSize of 100.
• GET /activities returns the first 25 activities (using the default pageSize value).
• GET /activities?pageSize=10 returns the first 10 activities.
• GET /activities?pageSize=30 returns the first 30 activities.
• GET /activities?pagesize=120 returns an error because the value for pageSize exceeds the maximum for the
resource.
The pageSize values for a resource defaults to defaultPageSize=25 and maxPageSize=100. Individual resources may
override these values in the API's apiconfig.yaml file. (For example, in shared_ext-1.0apiconfig.yaml, the
AccountActivityPatterns resource overrides the default values and uses defaultPageSize=100 and
maxPageSize=500.)
You can also use the pageSize query for related resources added through the include parameter. For more
information, see “Using query parameters on included resources” on page 55.
{
"attributes": {
...
"id": "cc:32",
... },
...
"links": {
...
"self": {
"href": "/common/v1/activities/cc:32",
"methods": [
"get",
"patch"
]
}
}
}
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.
For example, suppose there are 25 activities assigned to the current owner. The response payloads have a pageSize of
5, and a specific payload has the second set of activities (activities 6 through 10). The collection-level links for this
payload would be:
"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, the system APIs use 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.
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.
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 payload.
• 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. If a total value is equal to
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.
You can also use the includeTotal query for related resources added through the include parameter. For more
information, see “Using query parameters on included resources” on page 55.
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 aapplegate and password gw.
3. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities
4. Open a second request tab and specify Basic Auth authorization using user aapplegate and password gw.
5. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities?pageSize=10&includeTotal=true
?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 40.
Most query parameters that can be used on primary resources can also be used on included resources.
GET /accounts?include=accountHolder,contacts
&fields=accountHolder:id,contactSubtype
&fields=contacts:id,contactSubtype
Note that, in this example, the logic to restrict the returned fields to only id and subtype needs to be specified for each
included resource.
• Returns: Policy pc:10 and its included contacts that have a marital status of "S" (single)
• Returns: Policy pc:10 and its included contacts. For the contacts, return only licenseState and licenseNumber.
• 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.
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 aapplegate and password gw.
3. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities?included=notes
4. Open a second request tab and specify Basic Auth authorization using user aapplegate and password gw.
5. Enter the following and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities?
included=notes&fields=id,subject&filter=notes:escalated
This topic discusses the POST operation 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 77.
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 65
• “Tutorial: Create a new note that specifies optional fields” on page 66
Overview of POSTs
A POST is a system API operation that creates a resource or a set of related resources in PolicyCenter. The POST
operation is also used to execute specific business processes, such as assigning an activity.
A POST consists of the POST operation 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 contains 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 to a system 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 completes an activity 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.
{
"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.
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": ...
}
}
}
Required fields
A required field must be included in the request payload. A field can be required for one of several reasons:
• The field is marked as required on the associated schema, and therefore must be included on all POSTs using that
schema.
• The field is not marked as required on the associated schema, but it is always required by PolicyCenter. (For
example, the underlying database column could be marked as non-nullable with no default and the application does
not generate a value for it.)
• The field is not required by the API, but it is sometimes required by PolicyCenter. (For example, there could be a
validation rule in PolicyCenter that says non-confidential documents do not require an author, but confidential
documents do. Therefore, the author field is required only some of the time.)
Whether a field is required or allowed in a POST does not always match the requiredness of the corresponding data
model entity or database column. For example:
• A field may be marked as non-nullable in the database (and therefore "required"). But, PolicyCenter always
generates a value for it. Therefore, the field is marked as read-only and not required in the API schema.
• A field may be marked as non-nullable in the database (and therefore "required") and required when an object is
created. But once the object is created, the value of the field cannot be changed. Therefore, the field is required for
creation, but read-only for updates.
"requiredForCreate": true
For example, the Claim API has a POST claim/{claimId}/contacts endpoint that creates a contact for a given
claim. One of the data envelopes used by this endpoint to define the request schema is the ClaimContact schema. It
contains the following:
contactSubtype string
x-gw-type: typekey.Contact
x-gw-extensions: OrderedMap { "createOnly": true,
"requiredForCreate": true }
dateOfBirth string($date)
x-gw-nullable: true
x-gw-extensions: OrderedMap { "before": "now",
"entitySubtype": "Person" }
Note that the contactSubtype field has the "requiredForCreate": true property, whereas the dateOfBirth field
does not. This means that the API requires a contact subtype for contact creation, but not a date of birth.
{
"status": 400,
"errorCode": "gw.api.rest.exceptions.BadInputException",
"userMessage": "The 'body' field is required when creating notes"
}
Read-only fields
Read-only fields are fields that are set within the application (either by a user or by application logic) and cannot be set
or modified by system API calls. Read-only fields are listed in the request schema as readonly: true. You can view
this information in Swagger UI from the endpoint's Model tab.
For example, this is the Model text for the POST /activity/{activityId}/notes endpoint's createDate field:
createdDate string($date-time)
readOnly: true
You cannot include read-only values in a request payload. If you do, the API returns a BadInputException with an
error message such as:
Optional fields
From a technical perspective, any field that is neither required nor read-only is optional. These fields can be either
include or omitted as appropriate.
{
"data":
{
"attributes": {
<field/value pairs are specified here>
}
}
}
{
"data":
{
"attributes": {
"subject": "Main contact vacation",
"body": "Rodney is on vacation for the entire month of June.
During this time, direct any 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": {
}
}
}
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.
"objectName": {
"field1": value_or_"value",
"field2": value_or_"value",
...
}
For example:
"assignedUser": {
"displayName": "Andy Applegate",
"isActive": true
}
The value of each object's field either uses or does not use quotation marks based on the datatype of the field. (For
example, assignedUser has a displayName field. The value for this field is a string, so the value is specified in quotes.
If assignedUser also had an isActive field, which was a Boolean, the value would be specified as either true or
false without quotes.
Typekeys and money values are expressed in objects. Each of these are specified using a standard pattern.
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",
"currency": "usd"
}
Related objects
For information on how to specify related objects in a request payload, see “Request inclusion” on page 78.
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 17.
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 aapplegate and password gw.
3. Enter the following call and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities
4. Identify the id of the first activity in the payload. (It is pc:101.)
5. Enter the following call, but do not click Send yet:
POST http://localhost:8180/pc/rest/common/v1/activities/pc:101/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"
}
}
}
7. Click Send. The response payload appears below the request payload.
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 aapplegate and password gw.
3. Enter the following call and click Send:
GET http://localhost:8180/pc/rest/common/v1/activities
4. Identify the id of the first activity in the payload. (It is pc:101.)
5. Enter the following call, but do not click Send yet:
POST http://localhost:8180/pc/rest/common/v1/activities/pc:101/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.
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 system 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.
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 operation.
• 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
PATCHes
This topic discusses the PATCH operation, 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 73
Overview of PATCHes
A PATCH is a system API operation that modifies an existing resource or a set of related resources in PolicyCenter.
A PATCH consists of the PATCH operation 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 a system 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. The system APIs support 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 71
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows 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 17.
72 PATCHes
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
• Paste the request payload into the text field underneath the radio buttons.
6. Click Send. The response payload appears below the request payload.
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 aapplegate and password gw.
3. Query for all open activities by entering the following call and clicking Send:
a. GET http://localhost:8180/pc/rest/common/v1/activities?filter=status:eq:open
4. For the first activity in the response payload that is assigned to Andy/Alice Applegate, note the following
information:
a. Activity ID
b. Priority
c. Subject
5. On the same tab, enter the following call, 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 "!".
{
"data": {
"attributes": {
"subject" : "<originalSubject>!",
"priority": {
"code": "low"
}
}
}
}
7. Click Send. The response payload appears below the request payload.
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.
PATCHes 73
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
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.
74 PATCHes
chapter 7
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 tutorials:
• Tutorial: “Tutorial: DELETE a note” on page 75
Overview of DELETEs
Within the context of true REST APIs, 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 system API operation 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 operation 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, create an initial request by:
a. Clicking the + to the right of the Launchpad tab.
b. Specifying Basic Auth authorization using user aclinton and password gw.
2. Enter the following call, but do not click Send yet:
a. POST http://localhost:8180/pc/rest/common/v1/activities/pc:13/notes
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": {
"body": "API tutorial note to be deleted"
}
}
}
{
"status": 404,
"errorCode": "gw.api.rest.exceptions.NotFoundException",
"userMessage": "No resource was found at path /common/v1/notes/xc:301"
}
76 DELETEs
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 discusses these features in detail.
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".
{
"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".
The uri must also 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.
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".
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.
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"
}
]
}
}
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".
The system APIs 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.
Batch requests
From a system 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
response 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 of 25 subrequests. Batch requests with more than 25 subrequests fail with a
BadInputException.
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 operation 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/cc:22/activities/cc:55. The path within a batch is: /policies/cc:22/
activities/cc: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"
}
}
}
}
]
}
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.
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 are limited to a maximum of 25 subrequests. Composite requests with more than 25 subrequests
and/or subselections fail with a BadInputException.
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": {
"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
95.
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 a value from the subrequest's response payload as a JSON path expression.
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": [
{
"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"
}
},
...
"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
95.
Each subselection is independent from the others. You can use different query parameters for each subselection, and
you can have some subselections with query parameters and others without query parameters.
The syntax for adding query parameters to a subselection is as follows:
"selections": [
{
"uri": "<pathForFirstQuery>",
"parameters" : {
"fields" : "<value>",
"filter" : [<value>],
"includeTotal" : <value>,
"pageOffset" : <value>,
"pageSize" : <value>,
"sort" : [<value>]
}
},
....
]
• fields is specified as a single string of one or more fields, delimited by commas. The entire string is surrounded by
quotes.
◦ For example, "assignedUser,dueDate,priority,subject"
• filter and sort are stringified arrays consisting of one or more expressions. Each individual expression is
surrounded by quotes. The list of expressions is then surrounded by [ and ].
◦ For example: ["dueDate:gt:2022-12-20","status:in:open,complete"]
• includeTotal , pageOffset, and pageSize are either Boolean or integer values, and therefore do not use quotes.
For example, when querying for activities, to return only the assigned user, due date, priority and subject fields:
{
"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"]
}
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.
◦ For example, you cannot start with a list of elements and include related resources for each item in that list.
There are also specific business requirements where you cannot use a composite request. For example:
• The only types of jobs you can create in a composite request are Submissions.
• You can modify other job types (such as Policy Change or Renewal) only if the job has already been created outside
of the composite request.
• You cannot create new job versions.
• You cannot quote a job unless that job is a Submission created in the same Composite API 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.
{
"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>
}
]
}
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 99
• “Tutorial: Assign an activity using checksums” on page 100
• “Tutorial: DELETE a note using checksums” on page 101
Lost updates
Business processes often span multiple system API calls. When this occurs, the first call is typically either a GET that
retrieves data or a POST that creates data. A later API call may attempt to modify the resource queried for or created in
the initial GET or POST.
Some other process could potentially 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 the system APIs, 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. The system APIs calculate checksums
as needed based on information about the underlying entities in the PolicyCenter database.
When a process modifies data, either through user action, system APIs, or other process, the system APIs calculate 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"
}
}
In many cases, checksums are simple integer values that are incremented with each update. However, this is not always
the case. For some resources, the checksum is a more complicated string value, such as "fwer:3245-11xwj". Also, when
a checksum is an integer, there is also 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 system API requests to only the checksums returned in previous responses.
"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 (2).
{
"data": {
"attributes": {
"priority": {
"code": "urgent"
}
},
"checksum": "2"
}
}
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:
a. Clicking the + to the right of the Launchpad tab
b. Specifying Basic Auth authorization using user aapplegate and password gw.
2. Query for all activities by entering the following call and clicking Send:
a. GET http://localhost:8180/pc/rest/common/v1/activities
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. Start a second request by:
a. Clicking the + to the right of the Launchpad tab
b. Specifying Basic Auth authorization using user aapplegate and password gw.
5. Enter the following call, 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, query for all open activities by:
a. Clicking the + to the right of the Launchpad tab.
b. Specifying Basic Auth authorization using user aapplegate and password gw.
c. Entering the following call and clicking Send:
• GET http://localhost:8180/pc/rest/common/v1/activities?filter=status:ne:complete
2. 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>".)
3. Start a second request by:
a. Clicking the + to the right of the Launchpad tab
b. Specifying Basic Auth authorization using user aapplegate and password gw.
4. Enter the following call, but do not click Send yet:
a. PATCH http://localhost:8180/pc/rest/common/v1/activities/<ActivityID>/assign
5. 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>"
}
}
6. 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.
7. 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.
Tutorial steps
1. In Postman, create an initial request by:
a. Clicking the + to the right of the Launchpad tab.
b. Specifying Basic Auth authorization using user aclinton and password gw.
2. Enter the following call, but do not click Send yet:
a. POST http://localhost:8180/pc/rest/common/v1/activities/pc:13/notes
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": {
"body": "API tutorial note to be deleted with a checksum"
}
}
}
4. Click Send. In the response payload, identify the note's id and checksum value.
5. Create a second request by:
a. Clicking the + to the right of the Launchpad tab.
b. Specifying Basic Auth authorization using user aclinton and password gw.
6. Enter the following call, but do not click Send yet:
a. DELETE http://localhost:8180/pc/rest/common/v1/notes/<noteID>
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
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 “Policy
transactions” on page 123.
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 used when processing the request.
For more information, see “Globalization” on page 109.
GW-Locale String This sets the locale used when processing the request.
For more information, see “Globalization” on page 109.
GW-UnknownPropertyHandling One of these string values: This specifies the behavior for handling request payloads
• log with unknown properties. The default behavior is
reject.
• reject
• ignore For more information, see “Handling a call with
unknown elements” on page 106.
GW-UnknownQueryParamHandling One of these string values: This specifies the behavior for handling URLs with
• log unknown query parameters. The default behavior is
reject.
• reject
• ignore For more information, see “Handling a call with
unknown elements” on page 106.
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 Authentication
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.
• 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.
The GW-DBTransaction-ID header identifies a transaction ID (a string of up to 128 characters). When submitted with a
system API call, the system 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. The system 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. The system API assumes the transaction has already been
committed, and the call is rejected. The system API returns a 400 status code with an
gw.api.webservice.exception.AlreadyExecutedException error.
For the call to success, 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 system APIs that commit data to the database.
• It only works when the system API commits a single time only. (System APIs 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.
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 system API call may include a URL with a query parameter that is not defined in the associated schema.
By default, the system APIs reject 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.
Globalization
In the context of Guidewire InsuranceSuite applications, globalization refers to the internationalization and localization
aspects of system configuration. The system APIs can work with the globalization settings of your system. For details
on how Guidewire InsuranceSuite applications support globalization, refer to the Globalization Guide.
Globalization 109
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
countries:
. . .
JP:
name: Japan
addressFields: addressLine1, addressLine1Kanji, addressLine2, addressLine2Kanji, addressLine3, city, cityKanji,
prefecture, postalCode
addressRequire: addressLine1, city, prefecture, postalCode
. . .
US:
name: United States
addressFields: addressLine1, addressLine2, addressLine3, city, county, state, postalCode
addressRequire: addressLine1, city, state, postalCode
. . .
The countries field contains a property for each locale, the name of which is derived from the relevant ISO 3166-1
alpha-2 locale code. The previous code block displays two such properties, JP and US, for Japan and the United States,
respectively. Each locale property contains the following fields and values:
• name: The name of the region (typically country or territory)
• addressFields: The address fields from the Address schema that can be included in an address for the locale
• addressRequire: The minimum subset of address fields that must be included in an address for the locale
110 Globalization
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
When starting the server, the addresses.i18n.yaml file is loaded, and its rules are applied to Address resources. The
Address schema contains code that enables this functionality:
"Address": {
"type": "object",
"x-gw-extensions": {
"discriminatorProperty": "country"
},
"properties": {
. . .
}
}
}
In the previous code snippet, the x-gw-extensions.discriminatorProperty field is set to country. As a result,
when setting the country property on an Address resource, the address fields associated with that country will be valid
for that resource, and the fields not associated with the country will be unavailable.
Globalization 111
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
112 Globalization
part 2
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 or interact with
specific types of PolicyCenter resources. This includes:
• Creating accounts
• Working with submissions
• Working with renewals
• Working with cancellations
• Working with policy changes
• Working with reinstatements
• Working with rewrites
Accounts
In PolicyCenter, an account is associated with an individual or company, and is typically created when quoting a policy
for a new prospect. At a minimum, an account must have the name of the account holder, basic location information for
the account holder, and information about the producer associated with the account.
Creating an account
To create a new account in PolicyCenter, a caller can use the POST /account/v1/accounts endpoint from the
Account API. When creating an account, the caller must provide the following data in the request payload:
• An account holder
• A primary location
• A producer code
A caller can provide additional account information in the request payload, as defined by the schema for the Account
resource.
Name clearance
Name clearance is the process of checking against one or more producer/account databases to ensure that a person or
company is not an existing account in PolicyCenter. Because name clearance requirements differ across insurers, it is
not implemented in the system APIs directly. Implementors of services that require name clearance can configure that
functionality in their own code.
Account holder
The account holder indicates the primary contact that will be associated with the account. An account holder can be an
individual or a company, and this information must be specified in the request. Additionally, the request must also
include a name and address for the account holder.
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.
Calls to POST /account/v1/accounts are not idempotent. A caller can create multiple new accounts for the same
person or company.
When setting an account holder, the caller must provide values for the contactSubtype,
primaryAddress.addressLine1, primaryAddress.city, primaryAddress.state, and
primaryAddress.postalCode fields. If the account is for an individual, then the caller must also include the
firstName and lastName fields. If the account is for a company, then the caller must include the companyName field.
In the following example, the necessary fields for an individual account holder are attached to the
initialAccountHolder attribute:
{
"data": {
"attributes": {
"initialAccountHolder": {
"contactSubtype": "Person",
"firstName": "Bill",
"lastName": "Preston",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
},
. . .
}
}
}
The next example demonstrates how to set the account holder for the same individual, using the accountHolder
attribute with an AccountContact include:
{
"data": {
"attributes": {
"accountHolder": {
"refid": "newperson"
},
. . .
}
},
"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": "newperson",
"uri": "/account/v1/accounts/this/contacts"
}
]
}
}
The next example illustrates how to set the account holder for a company, using the initialAccountHolder attribute:
{
"data": {
"attributes": {
"initialAccountHolder": {
"contactSubtype": "Company",
"companyName": "Preston, Inc.",
"primaryAddress": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
},
116 Accounts
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
. . .
}
}
}
Primary location
The primary location indicates the primary address that will be associated with the account.
To set the primary account location, the caller can use the initialPrimaryLocation attribute in the request payload.
Alternatively, the caller can use the primaryLocation attribute in tandem with an include containing an
AccountLocation resource. This latter approach involves request inclusion. For more information, see “Request
inclusion” on page 78.
When creating an account, the account location can be specific or non-specific. A specific account location must
include the street address, city, state or province, and postal code. A non-specific account location must include the
state or province at minimum, as this is necessary to determine several locale-related constraints for the account.
{
"data": {
"attributes": {
. . .
"initialPrimaryLocation": {
"addressLine1": "2850 S. Delaware St.",
"city": "San Mateo",
"state": {
"code": "CA"
},
"postalCode": "94403"
}
}
}
}
The next example accomplishes the same thing with request inclusion, using the primaryLocation attribute with an
AccountLocation include:
{
"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"
}
]
}
}
Accounts 117
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
{
"data": {
"attributes": {
. . .
"initialPrimaryLocation": {
"nonSpecific": true,
"state": {
"code": "CA"
}
}
}
}
}
The next example accomplishes the same thing with request inclusion, using the primaryLocation attribute with an
AccountLocation include:
{
"data": {
"attributes": {
. . .
"primaryLocation": {
"refid": "newlocation"
}
}
},
"included": {
"AccountLocation": [
{
"attributes": {
"nonSpecific": true,
"state": {
"code": "CA"
}
},
"method": "post",
"refid": "newlocation",
"uri": "/account/v1/accounts/this/locations"
}
]
}
}
Producer code
At creation time, an account must be associated with one producer code. This is a PolicyCenter requirement, and
cannot be circumvented by the system APIs.
The request payload must include a producerCodes attribute. This is an array of one object that contains an id field for
the producer code:
{
"data": {
"attributes": {
. . .,
"producerCodes": [
{
"id": "pc:6"
}
]
}
}
}
118 Accounts
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
Account search
Through the Account API, a caller can use the /acccount/v1/search/accounts endpoint to search for accounts. To
execute a search, a caller can submit a POST request to the search endpoint. The request payload must contain one of
the following items:
• accountNumber: Account number
• companyName: Complete company name. When searching by company name, do not include personal name data.
• firstName and lastName: Complete first name and last name of the account holder. When searching by account
holder name, both fields must be included in the request. When searching by personal name, do not include
company name data.
• organization.id: Company identification number
Accounts 119
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
{
"data": {
"attributes": {
"firstName": "Ray",
"lastName": "Newton"
}
}
}
A successful search request returns an array of account objects. For example, a search using the request body above
returns the following:
{
"count": 1,
"data": [
{
"attributes": {
"accountHolder": {
"displayName": "Ray Newton",
"id": "test_pp:2"
},
"accountNumber": "C000143542",
"accountStatus": {
"code": "Active",
"name": "Active"
},
"businessOperationsDescription": "business description",
"createdDate": "2021-04-10T22:12:13.688Z",
"frozen": false,
"id": "pc:2",
"industryCode": {
"code": "0740",
"description": "Veterinarians / Veterinarian / Veterinary Services",
"id": "SIC:0740"
},
"numberOfContacts": "8",
"organizationType": {
"code": "commonownership",
"name": "Common ownership"
},
"preferredCoverageCurrency": {
"code": "usd",
"name": "USD"
},
"preferredSettlementCurrency": {
"code": "usd",
"name": "USD"
},
"primaryLanguage": {
"code": "en_US",
"name": "English (US)"
},
"primaryLocale": {
"code": "en_US",
"name": "United States (English)"
},
"primaryLocation": {
"displayName": "4: 1253 Paloma Ave, Arcadia, CA",
"id": "pc:749",
"type": "AccountLocation",
"uri": "/account/v1/accounts/pc:2/locations/pc:749"
},
"producerCodes": [
{
"displayName": "100-002541",
"id": "pc:6"
}
]
},
. . .
}
120 Accounts
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
{
"data": {
"attributes": {
"firstNameKanji": "太郎",
"firstName": "Taro"
}
}
}
Accounts 121
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
122 Accounts
chapter 13
Policy transactions
Issuance
/policy/v1/policies/{policyId}/issue
Renewal
/policy/v1/policies/{policyId}/renew
Cancellation
/policy/v1/policies/{policyId}/cancel
Policy change
/policy/v1/policies/{policyId}/change
Reinstatement
/policy/v1/policies/{policyId}/reinstate
Rewrite
/policy/v1/policies/{policyId}/rewrite
All policy transactions other than submissions are initiated from an existing policy element through a Policy API call.
The submission policy transaction is initiated using the Job API. In either case, the call returns a response payload that
contains a JSON object for a new job element that is accessible through the Job API. Subsequent actions for the policy
transaction are executed on this job element.
The following example depicts portions of a response payload returned by a call to initiate a submission policy
transaction for a personal auto line:
{
"data": {
"attributes": {
"account": {
"displayName": "0015863842",
"id": "pc:401",
"type": "Account",
"uri": "/account/v1/accounts/pc:401"
},
. . .
"id": "pc:601",
. . .
"jobStatus": {
"code": "Draft",
"name": "Draft"
},
"jobType": {
"code": "Submission",
"name": "Submission"
},
. . .
"product": {
"displayName": "Personal Auto",
"id": "PersonalAuto"
},
. . .
},
. . .
}
}
}
• The id property contains the ID of the new job element, in this case pc:601.
• The account.id property is the ID for the account holder. It is important to not mistake account.id for id.
• The jobStatus property indicates that the job is in Draft state.
• The jobType property shows that the job is for a submission policy transaction.
Subsequent actions for this policy transaction are executed on the /job/v1/jobs/pc:601 element.
Furthermore, some policy transaction types can be completed by being placed in Pending status.
The specific actions available to complete a policy transaction depend on the transaction type. For details, see
subsequent sections for each policy transaction type.
LOB-specific endpoints
Generally speaking, an LOB defines an insurance policy, which provides coverages (risk protection) for coverables
(risk exposures, such as tangible assets). Additionally, an LOB could define other policy features such as modifiers,
exclusions, or pre-qualification questions for underwriting.
After generating LOB-specific APIs using Advanced Product Designer (APD), the LOB-related endpoints are
contained in the Job API. In processing a policy transaction, a caller will add, revise, or remove data related to the
LOB.
The following sections provide general guidance on the data structures that can appear in LOB endpoints.
Products
Every job has at least one product. The available products can be accessed through the /job/v1/jobs/{jobId}/lines
collection. Each product can be found at /job/v1/jobs/{jobId}/lines/{productId}. Here, productId is a
placeholder for a specific product.
For example, on a job for a personal auto line policy, the personal auto line product is accessed through the /job/v1/
jobs/{jobId}/lines/PersonalAutoLine endpoint.
Coverables
Coverables refer to any risk exposures that can be covered by the LOB or product. Coverables are accessible as
collections on LOB endpoints. For example, one of the coverables for the PersonalAutoLine LOB is vehicle. Each
PersonalAutoLine typically has a collection of one or more vehicles. Coverables can also be nested under other
coverables. For example, another one of the coverables for PersonalAutoLine is driver. For each vehicle on a
PersonalAutoLine, there can be a collection of drivers for that vehicle.
Here, coverableType is a placeholder for a collection of some type of coverable, and coverableId refers to a specific
coverable.
For example, in a personal auto line, vehicles and drivers are coverables. In the Jobs API, vehicles can be accessed
through the /job/v1/jobs/{jobId}/lines/PersonalAutoLine/vehicles collection. Drivers associated with a
covered vehicle are can be accessed through the /job/v1/jobs/{jobId}/lines/PersonalAutoLine/vehicles/
{vehicleId}/drivers collection.
Also, the Job API provides a locations coverable type that is associated with the job directly, rather than the LOB.
This collection can be used to define coverables in certain LOBs, such as for commercial property.
Coverages
A coverage is protection from a specific risk. Coverages are attached to coverables. There are two basic types of
coverages: property and liability. A property coverage is a coverage for a tangible asset belonging to the insured, such
as a vehicle. A liability coverage protects the insured, such as covering a driver for damage done to another vehicle.
The available coverages for a product can be accessed through the /job/v1/jobs/{jobId}/lines/{productId}/
coverages collection. Each coverage can be found at /job/v1/jobs/{jobId}/lines/{productId}/coverages/
{coverageId}. Depending on the LOB, coverages could be nested. For example, a location (a coverable) could have a
collection of buildings (child coverables), and a coverage would be applied to each building. For property coverages,
the basic pattern is /job/v1/jobs/{jobId}/lines/{productId}/{coverableType}/{coverableId}/coverages.
For liability coverages, the policy line itself is a coverable, and represents the named insureds. The pattern is /job/v1/
jobs/{jobId}/lines/{productId}/coverages.
For example, the personal auto line has both property (vehicle) and liability (driver) coverages. The vehicle coverages
can be accessed through the /job/v1/jobs/{jobId}/lines/PersonalAutoLine/vehicles/{vehicleId}/
coverages endpoint. The driver coverages cover liability, and thus can be found on the line itself: /job/v1/jobs/
{jobId}/line/PersonalAutoLine/coverages.
Modifiers
Modifiers are factors that are applied as part of a rating algorithm. For example, the personal auto line could have an
"Anti-Lock Breaks Discount" modifier for vehicles that provides a discount on the premium if the vehicle has anti-lock
breaks. Modifiers can be associated with coverables or with the LOB itself.
• /job/v1/jobs/{jobId}/lines/{productId}/modifiers
• /job/v1/jobs/{jobId}/lines/{productId}/{coverableType}/{coverableId}/modifiers
For example, the personal auto line could have an "Anti-Lock Breaks Discount" modifier for vehicles that provides a
discount on the premium if the vehicle has anti-lock breaks.
To illustrate, in a personal auto line, a GET request to /job/v1/jobs/{jobId}/questions could return the following:
{
"data": {
"attributes": {
"answers": {
"q1": {
"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": {
"question": {
"displayName": "Has your license ever been canceled, suspended or revoked?",
"id": "q3"
},
"questionType": {
"code": "Choice",
"name": "Choice"
}
},
"q4": {
"question": {
"displayName": "Are you currently insured?",
"id": "q4"
},
"questionType": {
"code": "Boolean",
"name": "Boolean"
}
}
}
},
"checksum": "*",
"links": "*"
}
}
Submission
In PolicyCenter, all quotes and policies are originated through the submission policy transaction. During this
transaction, an insurer collects and evaluates account holder data for the purpose of quoting and possibly creating a
policy for a specific insurance product. The submission policy transaction is supported by the Job API.
For a general overview of how to conduct policy transactions using the system APIs, see “Policy transactions” on page
123. For details on the business functionality of submissions, see the Application Guide.
Basic process
1. Initiate the submission policy transaction by creating a submission job.
2. Modify the submission job.
• Add coverables
• Apply coverages and modifiers
• Apply exposures, exclusions, or conditions
• Pre-qualify the account holder
3. Generate a quote.
4. Complete the submission policy transaction in one of the following ways:
• Bind the submission
• Reject the submission
• Withdraw the submission
The following example contains a valid request payload for a personal auto line request:
{
"data": {
"attributes": {
"account": {
"id": "pc:401"
},
"baseState": {
"code": "CA"
},
"jobEffectiveDate": "2020-08-01",
"producerCode": {
"id": "pc:6"
},
"product": {
"id": "PersonalAuto"
}
}
}
}
Initiating the submission creates a job element, which is returned in the response payload. All subsequent work in the
transaction is executed on the job element. In the case of this example, that element is /job/v1/jobs/pc:601.
{
"data": {
"attributes": {
"account": {
"displayName": "0015863842",
"id": "pc:401",
"type": "Account",
"uri": "/account/v1/accounts/pc:401"
},
. . .
"id": "pc:601",
. . .
"jobStatus": {
"code": "Draft",
"name": "Draft"
},
"jobType": {
"code": "Submission",
"name": "Submission"
},
. . .
"product": {
"displayName": "Personal Auto",
"id": "PersonalAuto"
},
. . .
},
. . .
}
}
}
Add coverables
A coverable refers to any risk exposure that can be covered by a policy. Coverables are accessible as collections on
LOB endpoints, and can also be nested.
For example, in a personal auto line, vehicles and drivers are coverables. In the Jobs API, vehicles can be added
at /job/v1/jobs/{jobId}/lines/PersonalAutoLine/vehicles, with a request payload that resembles the
following:
{
"data": {
"attributes": {
"annualMileage": 10000,
130 Submission
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
"bodyType": {
"code": "convertible"
},
"color": "Yellow",
"commutingMiles": 50,
"costNew": {
"amount": "25000.00",
"currency": "usd"
},
"leaseOrRent": true,
"lengthOfLease": {
"code": "SixMonthsOrMore"
},
"licensePlate": "123456",
"licenseState": {
"code": "CA"
},
"make": "NewMake",
"model": "NewModel",
"modelYear": 2015,
"primaryUse": {
"code": "pleasure"
},
"statedValue": {
"amount": "20000.00",
"currency": "usd"
},
"vehicleType": {
"code": "PP"
},
"vin": "1234567890"
}
}
}
{
"data": {
"attributes": {
"percentageDriven": 100,
"policyDriver": {
"id": "pc:401"
}
}
}
}
The driver ID value must correspond to the ID of a contact element on the /account/v1/accounts/{accountId}/
contacts collection.
For liability coverages, the policy line itself is the coverable, and represents the named insureds. The pattern
is /job/v1/jobs/{jobId}/lines/{lineId}/coverages.
A submission with multiple coverables and coverages can have implicit but unresolved dependencies. Also, the LOB
product might support policy modifiers. Depending on the LOB, it might be necessary to synchronize the coverages
and modifiers when composing the submission. For this purpose, the Job API provides */sync-coverages and */
sync-modifiers endpoints on jobs that are in Draft state. These endpoints are accessible on the LOB as well as on
each coverable, through the following paths:
• /job/v1/jobs/{jobId}/lines/{productId}/sync-coverages
• /job/v1/jobs/{jobId}/lines/{productId}/{coverableType}/{coverableId}/sync-coverages
• /job/v1/jobs/{jobId}/lines/{productId}/sync-modifiers
Submission 131
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
• /job/v1/jobs/{jobId}/lines/{productId}/{coverableType}/{coverableId}/sync-modifiers
To synchronize coverages and modifiers on a submission, a caller would submit a business action POST to these
endpoints.
For example, in a personal auto line submission, a caller would synchronize vehicle coverages by submitting a business
action POST to the /job/v1/jobs/{jobId}/lines/PersonalAutoLine/vehicles/{vehicleId}/sync-coverages
endpoint. To apply coverages for the driver, a caller would submit a business action POST to the /job/v1/jobs/
{jobId}/lines/PersonalAutoLine/sync-coverages endpoint. Likewise, to synchronize the policy modifiers with
the submission, a caller would submit a business action POST to the /job/v1/jobs/{jobId}/lines/
PersonalAutoLine/sync-modifiers and /job/v1/jobs/{jobId}/lines/PersonalAutoLine/vehicles/
{vehicleId}/sync-modifiers endpoints.
An exclusion is a specific cause of loss that will not be covered. For example, a workers compensation policy might
allow certain workplace locations to be excluded from coverage, and those locations could be accessed at the /job/v1/
jobs/{jobId}/lines/WorkersCompLine/excluded-workplaces endpoint.
Policy conditions are contractual obligations that neither provide nor exclude coverage. Policy conditions are diverse,
and depend on the LOB.
Pre-qualification could involve posing queries that are general to all products as well as specific to LOB, location, or
coverable. As such, depending on the LOB, pre-qualification questions could be accessed through the following
endpoints:
• /job/v1/jobs/{jobId}/questions
• /job/v1/jobs/{jobId}/locations/{locationId}/questions
• /job/v1/jobs/{jobId}/lines/{productId}/questions
• /job/v1/jobs/{jobId}/lines/{productId}/locations/{locationId}/questions
• /job/v1/jobs/{jobId}/lines/{productId}/{coverableType}/{coverableId}/questions
To illustrate, in a personal auto line, a GET request to /job/v1/jobs/{jobId}/questions could return the following:
{
"data": {
"attributes": {
"answers": {
"q1": {
"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?",
132 Submission
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
"id": "q2"
},
"questionType": {
"code": "Boolean",
"name": "Boolean"
}
},
"q3": {
"question": {
"displayName": "Has your license ever been canceled, suspended or revoked?",
"id": "q3"
},
"questionType": {
"code": "Choice",
"name": "Choice"
}
},
"q4": {
"question": {
"displayName": "Are you currently insured?",
"id": "q4"
},
"questionType": {
"code": "Boolean",
"name": "Boolean"
}
}
}
},
"checksum": "*",
"links": "*"
}
}
The Job API only provides endpoints that support pre-qualification. It is up to implementors to write the backing code.
Generating a quote
After applying all necessary modifications to the draft submission, a caller can generate a policy quote. The insurer and
account holder will review the quote to determine how they wish to proceed with the prospective policy.
To generate a quote, a caller can submit a business action POST to the /job/v1/jobs/{jobId}/quote endpoint. This
call will return a response payload containing the quote data, and will set the job to Quoted state.
If a quoted submission needs to be revised, then it must be reverted to draft status. This can be achieved by submitting
a business action POST to the /job/v1/jobs/{jobId}/make-draft endpoint. A job in Draft state can be revised and
re-quoted.
Also, a caller has the option to generate multiple quotes of the same job. This is useful for providing side-by-side
comparison of policy options. For details, see “Multi-version quoting” on page 173.
Alternatively, a submission can be bound only, with issuance postponed to a later time. This scenario can occur when
an account holder must provide additional paperwork, or the insurer is not ready to deliver the policy documentation.
Submission 133
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
To only bind a quoted submission job but not issue it, a caller can submit a business action POST to the /job/v1/
jobs/{jobId}/bind-only endpoint. Following the call, the jobStatus code will be set to Bound.
To later issue a bound-only policy, a caller can execute the issuance policy transaction on the policy. For details, see
“Issuance” on page 153.
If the account holder does not accept the policy quote, a caller would submit a business action POST to the /job/v1/
jobs/{jobId}/not-take endpoint. Following the call, the jobStatus code will be set to NotTaken.
The following table encapsulates the several ways that a quoted submission job can be completed:
134 Submission
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
◦ Synchronize modifiers
• Quote the job
• Bind and issue the policy
• Review the policy
The following code block contains the essential data for creating a new personal account. This example takes
advantage of request inclusion in applying AccountContact and AccountLocation resource data. For details on
request inclusion, see “Request inclusion” on page 78.
{
"data": {
"attributes": {
"accountHolder": {
"refid": "newperson"
},
"organizationType": {
"code": "individual"
},
"primaryLocation": {
"refid": "newloc"
},
"producerCodes": [
{
"id": "pc:6"
}
]
}
},
"included": {
"AccountContact": [
{
"attributes": {
"contactSubtype": "Person",
"firstName": "Bill",
"lastName": "Preston",
"dateOfBirth": "1970-01-01",
"emailAddress1": "bpreston@example.com",
"licenseNumber": "D123456789",
"licenseState": {
"code": "CA"
},
"numberOfAccidents": {
"code": "0"
},
"numberOfViolations": {
"code": "0"
},
"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": {
"nonSpecific": true,
"postalCode": "94403",
"state": {
"code": "CA"
}
},
"method": "post",
"refid": "newloc",
"uri": "/account/v1/accounts/this/locations"
}
]
Submission 135
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
}
}
Submitting the previous payload in a POST request to /account/v1/accounts will return a response payload similar
to the following:
{
"data": {
"attributes": {
"accountHolder": {
"displayName": "Bill Preston",
"id": "pc:697"
},
"accountNumber": "2768207338",
"accountStatus": {
"code": "Pending",
"name": "Pending"
},
"createdDate": "2020-07-23T00:21:48.323Z",
"frozen": false,
"id": "pc:8",
"numberOfContacts": "1",
"organizationType": {
"code": "individual",
"name": "Individual"
},
"preferredCoverageCurrency": {
"code": "usd",
"name": "USD"
},
"preferredSettlementCurrency": {
"code": "usd",
"name": "USD"
},
"primaryLanguage": {
"code": "en_US",
"name": "English (US)"
},
"primaryLocale": {
"code": "en_US",
"name": "United States (English)"
},
"primaryLocation": {
"displayName": "1: CA",
"id": "pc:799",
"type": "AccountLocation",
"uri": "/account/v1/accounts/pc:8/locations/pc:799"
},
"producerCodes": [
{
"displayName": "100-002541",
"id": "pc:6"
}
]
},
"checksum": "0",
"links": {
"activities": {
"href": "/account/v1/accounts/pc:8/activities",
"methods": [
"get",
"post"
]
},
"activity-assignees": {
"href": "/account/v1/accounts/pc:8/activity-assignees",
"methods": [
"get"
]
},
"activity-patterns": {
"href": "/account/v1/accounts/pc:8/activity-patterns",
"methods": [
"get"
]
},
"contacts": {
"href": "/account/v1/accounts/pc:8/contacts",
"methods": [
"get",
"post"
]
},
"documents": {
"href": "/account/v1/accounts/pc:8/documents",
"methods": [
"get",
"post"
136 Submission
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
]
},
"jobs": {
"href": "/account/v1/accounts/pc:8/jobs",
"methods": [
"get"
]
},
"locations": {
"href": "/account/v1/accounts/pc:8/locations",
"methods": [
"get",
"post"
]
},
"notes": {
"href": "/account/v1/accounts/pc:8/notes",
"methods": [
"get",
"post"
]
},
"policies": {
"href": "/account/v1/accounts/pc:8/policies",
"methods": [
"get"
]
},
"self": {
"href": "/account/v1/accounts/pc:8",
"methods": [
"get",
"patch"
]
}
}
}
}
The new account is in Pending status. The ID for this account is pc:8. This value will be used in the later sections.
Add an additional individual to the new account
In this exercise, the new account will include a second individual, who will be the secondary driver. This contact can
be added to the account by submitting the following payload in a POST request to /account/v1/accounts/pc:8/
contacts:
{
"data": {
"attributes": {
"contactSubtype": "Person",
"dateOfBirth": "1971-01-01",
"emailAddress1": "jill@example.com",
"firstName": "Jill",
"lastName": "Preston",
"licenseNumber": "D234567890",
"licenseState": {
"code": "CA"
},
"numberOfAccidents": {
"code": "0"
},
"numberOfViolations": {
"code": "0"
},
"primaryAddress": {
"addressLine1": "2850 S. Delaware St. #400",
"city": "San Mateo",
"postalCode": "94403",
"state": {
"code": "CA"
}
}
}
}
}
The response payload contains data for the new contact element, which is accessible at /account/v1/accounts/pc:8/
contacts/pc:698:
{
"data": {
"attributes": {
"contactSubtype": "Person",
Submission 137
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
"dateOfBirth": "1971-01-01",
"displayName": "Jill Preston",
"emailAddress1": "jill@example.com",
"externalId": "pcext:698",
"firstName": "Jill",
"id": "pc:698",
"lastName": "Preston",
"licenseNumber": "D123456789",
"licenseState": {
"code": "CA",
"name": "California"
},
"numberOfAccidents": {
"code": "0",
"name": "0"
},
"numberOfViolations": {
"code": "0",
"name": "0"
},
"primaryAddress": {
"addressLine1": "2850 S. Delaware St. #400",
"city": "San Mateo",
"country": "US",
"displayName": "2850 S. Delaware St. #400, San Mateo, CA 94403",
"id": "pc:800",
"postalCode": "94403",
"state": {
"code": "CA",
"name": "California"
}
}
},
"checksum": "3df12e427af4fbcc5e92ac25418b18eb",
"links": {
"self": {
"href": "/account/v1/accounts/pc:8/contacts/pc:698",
"methods": [
"get",
"patch"
]
}
}
}
}
{
"data": {
"attributes": {
"account": {
"id": "pc:8"
},
"baseState": {
"code": "CA"
},
"jobEffectiveDate": "2020-08-01",
"producerCode": {
"id": "pc:6"
},
"product": {
"id": "PersonalAuto"
}
}
}
}
138 Submission
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
The call will create a new submission job in Draft status, the data for which will be returned in the response payload:
{
"data": {
"attributes": {
"account": {
"displayName": "2768207338",
"id": "pc:8",
"type": "Account",
"uri": "/account/v1/accounts/pc:8"
},
"baseState": {
"code": "CA",
"name": "California"
},
"createdDate": "2020-07-23T00:25:46.038Z",
"id": "pc:16",
"jobEffectiveDate": "2020-08-01T00:01:00.000Z",
"jobNumber": "0001584961",
"jobStatus": {
"code": "Draft",
"name": "Draft"
},
"jobType": {
"code": "Submission",
"name": "Submission"
},
"organization": {
"displayName": "Armstrong and Company",
"id": "pc:1"
},
"periodEnd": "2021-02-01T00:01:00.000Z",
"periodStart": "2020-08-01T00:01:00.000Z",
"primaryInsured": {
"displayName": "Bill Preston",
"id": "pc:697",
"type": "PolicyContact",
"uri": "/job/v1/jobs/pc:16/contacts/pc:697"
},
"producerCode": {
"displayName": "100-002541",
"id": "pc:6"
},
"product": {
"displayName": "Personal Auto",
"id": "PersonalAuto"
},
"quoteType": {
"code": "Full",
"name": "Full Application"
},
"termType": {
"code": "HalfYear",
"name": "6 months"
}
},
"checksum": "1b6514990bb9746dfaa78fbddef25733",
"links": {
"activities": {
"href": "/job/v1/jobs/pc:16/activities",
"methods": [
"get",
"post"
]
},
"activity-assignees": {
"href": "/job/v1/jobs/pc:16/activity-assignees",
"methods": [
"get"
]
},
"activity-patterns": {
"href": "/job/v1/jobs/pc:16/activity-patterns",
"methods": [
"get"
]
},
"change-version": {
"href": "/job/v1/jobs/pc:16/change-version",
"methods": [
"post"
]
},
"contacts": {
"href": "/job/v1/jobs/pc:16/contacts",
"methods": [
"get",
"post"
]
Submission 139
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
},
"costs": {
"href": "/job/v1/jobs/pc:16/costs",
"methods": [
"get"
]
},
"decline": {
"href": "/job/v1/jobs/pc:16/decline",
"methods": [
"post"
]
},
"documents": {
"href": "/job/v1/jobs/pc:16/documents",
"methods": [
"get",
"post"
]
},
"lines": {
"href": "/job/v1/jobs/pc:16/lines",
"methods": [
"get"
]
},
"locations": {
"href": "/job/v1/jobs/pc:16/locations",
"methods": [
"get",
"post"
]
},
"not-take": {
"href": "/job/v1/jobs/pc:16/not-take",
"methods": [
"post"
]
},
"notes": {
"href": "/job/v1/jobs/pc:16/notes",
"methods": [
"get",
"post"
]
},
"payment-plans": {
"href": "/job/v1/jobs/pc:16/payment-plans",
"methods": [
"get"
]
},
"questions": {
"href": "/job/v1/jobs/pc:16/questions",
"methods": [
"get",
"patch"
]
},
"quote": {
"href": "/job/v1/jobs/pc:16/quote",
"methods": [
"post"
]
},
"self": {
"href": "/job/v1/jobs/pc:16",
"methods": [
"get",
"patch"
]
},
"user-roles": {
"href": "/job/v1/jobs/pc:16/user-roles",
"methods": [
"get",
"patch"
]
},
"versions": {
"href": "/job/v1/jobs/pc:16/versions",
"methods": [
"get",
"post"
]
},
"withdraw": {
"href": "/job/v1/jobs/pc:16/withdraw",
"methods": [
"post"
140 Submission
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
]
}
}
}
}
The id property contains the ID of the new job element that was created by the request. Subsequent actions in the
transaction will occur on the job element, in this case /job/v1/jobs/pc:16.
{
"data": {
"attributes": {
"annualMileage": 10000,
"bodyType": {
"code": "convertible"
},
"color": "Yellow",
"commutingMiles": 50,
"costNew": {
"amount": "25000.00",
"currency": "usd"
},
"leaseOrRent": true,
"lengthOfLease": {
"code": "SixMonthsOrMore"
},
"licensePlate": "7JDX543",
"licenseState": {
"code": "CA"
},
"make": "NewMake",
"model": "NewModel",
"modelYear": 2015,
"primaryUse": {
"code": "pleasure"
},
"statedValue": {
"amount": "20000.00",
"currency": "usd"
},
"vehicleType": {
"code": "PP"
},
"vin": "WDDHF8JB3CA549096"
}
}
}
This call returns the following response payload. The vehicle is now accessible at the /job/v1/jobs/pc:16/lines/
PersonalAutoLine/vehicles/6 endpoint:
{
"data": {
"attributes": {
"annualMileage": 10000,
"bodyType": {
"code": "convertible",
"name": "Convertible"
},
"color": "Yellow",
"commutingMiles": 50,
"costNew": {
"amount": "25000.00",
"currency": "usd"
},
"garageLocation": {
"displayName": "1: CA",
"id": "46"
},
"id": "6",
"leaseOrRent": true,
"lengthOfLease": {
"code": "SixMonthsOrMore",
"name": "6 months or greater"
},
"licensePlate": "7JDX543",
"licenseState": {
Submission 141
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
"code": "CA",
"name": "California"
},
"make": "NewMake",
"model": "NewModel",
"modelYear": 2015,
"primaryUse": {
"code": "pleasure",
"name": "Pleasure"
},
"statedValue": {
"amount": "20000.00",
"currency": "usd"
},
"vehicleNumber": 1,
"vehicleType": {
"code": "PP",
"name": "Passenger Vehicles"
},
"vin": "WDDHF8JB3CA549096"
},
"checksum": "d69df836a5af3ef1cd06d0025694c7bc",
"links": {
"coverages": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/coverages",
"methods": [
"get",
"post"
]
},
"drivers": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/drivers",
"methods": [
"get",
"post"
]
},
"modifiers": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/modifiers",
"methods": [
"get"
]
},
"self": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6",
"methods": [
"delete",
"get",
"patch"
]
},
"sync-coverages": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/sync-coverages",
"methods": [
"post"
]
},
"sync-modifiers": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/sync-modifiers",
"methods": [
"post"
]
},
"vhcle-addl-interests": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/vhcle-addl-interests",
"methods": [
"get",
"post"
]
}
}
}
}
{
"data": {
"attributes": {
"percentageDriven": 75,
"policyDriver": {
"id": "pc:697"
142 Submission
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
}
}
}
}
{
"data": {
"attributes": {
"id": "5",
"percentageDriven": 75,
"policyDriver": {
"displayName": "Bill Preston",
"id": "pc:697",
"type": "PolicyContact",
"uri": "/job/v1/jobs/pc:16/contacts/pc:697"
}
},
"checksum": "109d5f8706f79c9481f6a61738e2b554",
"links": {
"self": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/drivers/5",
"methods": [
"delete",
"get",
"patch"
]
}
}
}
}
{
"data": {
"attributes": {
"percentageDriven": 25,
"policyDriver": {
"id": "pc:698"
}
}
}
}
{
"data": {
"attributes": {
"id": "7",
"percentageDriven": 25,
"policyDriver": {
"displayName": "Jill Preston",
"id": "pc:698",
"type": "PolicyContact",
"uri": "/job/v1/jobs/pc:16/contacts/pc:698"
}
},
"checksum": "e10a37e9890009522fa8fa0c5574c2a0",
"links": {
"self": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/drivers/7",
"methods": [
"delete",
"get",
"patch"
]
}
}
}
}
Submission 143
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
{
"count": 2,
"data": [
{
"attributes": {
"clauseType": "coverage",
"id": "PACollisionCov",
"pattern": {
"displayName": "Collision",
"id": "PACollisionCov"
},
"selected": true,
"terms": {
"PACollDeductible": {
"choiceValue": {
"code": "500",
"name": "500"
},
"covTermType": "choice",
"displayValue": "500",
"pattern": {
"displayName": "Collision Deductible",
"id": "PACollDeductible"
}
}
}
},
"checksum": "006b1f7b0a4a803105eeb6a6e86ee270",
"links": {
"self": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/coverages/PACollisionCov",
"methods": [
"get"
]
}
}
},
{
"attributes": {
"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"
}
}
}
},
"checksum": "77fae36ca9d0dcdc16a1edec63e94877",
"links": {
"self": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/coverages/PAComprehensiveCov",
"methods": [
"get"
]
}
}
}
],
"links": {
"first": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/coverages",
"methods": [
"get"
]
},
144 Submission
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
"self": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/coverages",
"methods": [
"get"
]
}
}
}
{
"count": 3,
"data": [
{
"attributes": {
"booleanModifier": false,
"eligible": true,
"id": "PAAntiLockBrakes",
"modifierType": {
"code": "boolean",
"name": "boolean"
},
"pattern": {
"displayName": "Anti-Lock Brakes Discount",
"id": "PAAntiLockBrakes"
},
"referenceDate": "2020-08-01T00:00:00.000Z",
"state": {
"code": "CA",
"name": "California"
},
"valueFinal": true
},
"checksum": "332014107be09a1a45b46398c2a730ea",
"links": {
"self": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/modifiers/PAAntiLockBrakes",
"methods": [
"get"
]
}
}
},
{
"attributes": {
"eligible": true,
"id": "PAAntiTheft",
"modifierType": {
"code": "typekey",
"name": "typekey"
},
"pattern": {
"displayName": "Anti Theft Discount",
"id": "PAAntiTheft"
},
"referenceDate": "2020-08-01T00:00:00.000Z",
"state": {
"code": "CA",
"name": "California"
},
"valueFinal": true
},
"checksum": "63a2e842883e8993ce10073e4f5a33e7",
"links": {
"self": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/modifiers/PAAntiTheft",
"methods": [
"get"
]
}
}
},
{
"attributes": {
"eligible": true,
"id": "PAPassiveRestraint",
"modifierType": {
"code": "typekey",
"name": "typekey"
Submission 145
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
},
"pattern": {
"displayName": "Passive Restraint System",
"id": "PAPassiveRestraint"
},
"referenceDate": "2020-08-01T00:00:00.000Z",
"state": {
"code": "CA",
"name": "California"
},
"valueFinal": true
},
"checksum": "cc898e3294ba4d68e81518d96e37c985",
"links": {
"self": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/modifiers/PAPassiveRestraint",
"methods": [
"get"
]
}
}
}
],
"links": {
"first": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/modifiers",
"methods": [
"get"
]
},
"self": {
"href": "/job/v1/jobs/pc:16/lines/PersonalAutoLine/vehicles/6/modifiers",
"methods": [
"get"
]
}
}
}
{
"data": {
"attributes": {
"account": {
"displayName": "2768207338",
"id": "pc:8",
"type": "Account",
"uri": "/account/v1/accounts/pc:8"
},
"baseState": {
"code": "CA",
"name": "California"
},
"createdDate": "2020-7-23T00:25:46.038Z",
"id": "pc:16",
"jobEffectiveDate": "2020-08-01T00:01:00.000Z",
"jobNumber": "0001584961",
"jobStatus": {
"code": "Quoted",
"name": "Quoted"
},
"jobType": {
"code": "Submission",
"name": "Submission"
},
"organization": {
"displayName": "Armstrong and Company",
"id": "pc:1"
},
"periodEnd": "2021-02-01T00:01:00.000Z",
"periodStart": "2020-08-01T00:01:00.000Z",
"primaryInsured": {
"displayName": "Bill Preston",
"id": "pc:697",
"type": "PolicyContact",
"uri": "/job/v1/jobs/pc:16/contacts/pc:697"
},
"producerCode": {
"displayName": "100-002541",
"id": "pc:6"
},
"product": {
"displayName": "Personal Auto",
146 Submission
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
"id": "PersonalAuto"
},
"quoteType": {
"code": "Full",
"name": "Full Application"
},
"taxesAndSurcharges": {
"amount": "68.00",
"currency": "usd"
},
"termType": {
"code": "HalfYear",
"name": "6 months"
},
"totalCost": {
"amount": "1012.00",
"currency": "usd"
},
"totalPremium": {
"amount": "944.00",
"currency": "usd"
}
},
"checksum": "a90905400e592b9a525ca94b48ae7a1b",
"links": {
"activities": {
"href": "/job/v1/jobs/pc:16/activities",
"methods": [
"get",
"post"
]
},
"activity-assignees": {
"href": "/job/v1/jobs/pc:16/activity-assignees",
"methods": [
"get"
]
},
"activity-patterns": {
"href": "/job/v1/jobs/pc:16/activity-patterns",
"methods": [
"get"
]
},
"bind-and-issue": {
"href": "/job/v1/jobs/pc:16/bind-and-issue",
"methods": [
"post"
]
},
"bind-only": {
"href": "/job/v1/jobs/pc:16/bind-only",
"methods": [
"post"
]
},
"change-version": {
"href": "/job/v1/jobs/pc:16/change-version",
"methods": [
"post"
]
},
"contacts": {
"href": "/job/v1/jobs/pc:16/contacts",
"methods": [
"get"
]
},
"costs": {
"href": "/job/v1/jobs/pc:16/costs",
"methods": [
"get"
]
},
"decline": {
"href": "/job/v1/jobs/pc:16/decline",
"methods": [
"post"
]
},
"documents": {
"href": "/job/v1/jobs/pc:16/documents",
"methods": [
"get",
"post"
]
},
"lines": {
"href": "/job/v1/jobs/pc:16/lines",
"methods": [
Submission 147
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
"get"
]
},
"locations": {
"href": "/job/v1/jobs/pc:16/locations",
"methods": [
"get"
]
},
"make-draft": {
"href": "/job/v1/jobs/pc:16/make-draft",
"methods": [
"post"
]
},
"not-take": {
"href": "/job/v1/jobs/pc:16/not-take",
"methods": [
"post"
]
},
"notes": {
"href": "/job/v1/jobs/pc:16/notes",
"methods": [
"get",
"post"
]
},
"payment-info": {
"href": "/job/v1/jobs/pc:16/payment-info",
"methods": [
"get",
"patch"
]
},
"payment-plans": {
"href": "/job/v1/jobs/pc:16/payment-plans",
"methods": [
"get"
]
},
"questions": {
"href": "/job/v1/jobs/pc:16/questions",
"methods": [
"get"
]
},
"self": {
"href": "/job/v1/jobs/pc:16",
"methods": [
"get"
]
},
"user-roles": {
"href": "/job/v1/jobs/pc:16/user-roles",
"methods": [
"get"
]
},
"versions": {
"href": "/job/v1/jobs/pc:16/versions",
"methods": [
"get",
"post"
]
},
"withdraw": {
"href": "/job/v1/jobs/pc:16/withdraw",
"methods": [
"post"
]
}
}
}
}
{
"data": {
"attributes": {
"account": {
148 Submission
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
"displayName": "2768207338",
"id": "pc:8",
"type": "Account",
"uri": "/account/v1/accounts/pc:8"
},
"baseState": {
"code": "CA",
"name": "California"
},
"closeDate": "2020-07-23T01:02:02.119Z",
"createdDate": "2020-07-23T00:25:46.038Z",
"id": "pc:16",
"jobEffectiveDate": "2020-08-01T00:01:00.000Z",
"jobNumber": "0001584961",
"jobStatus": {
"code": "Bound",
"name": "Bound"
},
"jobType": {
"code": "Submission",
"name": "Submission"
},
"organization": {
"displayName": "Armstrong and Company",
"id": "pc:1"
},
"periodEnd": "2021-02-01T00:01:00.000Z",
"periodStart": "2020-08-01T00:01:00.000Z",
"policy": {
"displayName": "6036550150",
"id": "pc:7"
},
"policyNumber": "6036550150",
"primaryInsured": {
"displayName": "Bill Preston",
"id": "pc:697",
"type": "PolicyContact",
"uri": "/job/v1/jobs/pc:16/contacts/pc:697"
},
"producerCode": {
"displayName": "100-002541",
"id": "pc:6"
},
"product": {
"displayName": "Personal Auto",
"id": "PersonalAuto"
},
"quoteType": {
"code": "Full",
"name": "Full Application"
},
"taxesAndSurcharges": {
"amount": "68.00",
"currency": "usd"
},
"termType": {
"code": "HalfYear",
"name": "6 months"
},
"totalCost": {
"amount": "1012.00",
"currency": "usd"
},
"totalPremium": {
"amount": "944.00",
"currency": "usd"
}
},
"checksum": "426c4ebf6898be74546b06612523d224",
"links": {
"activities": {
"href": "/job/v1/jobs/pc:16/activities",
"methods": [
"get",
"post"
]
},
"activity-assignees": {
"href": "/job/v1/jobs/pc:16/activity-assignees",
"methods": [
"get"
]
},
"activity-patterns": {
"href": "/job/v1/jobs/pc:16/activity-patterns",
"methods": [
"get"
]
},
"contacts": {
Submission 149
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
"href": "/job/v1/jobs/pc:16/contacts",
"methods": [
"get"
]
},
"costs": {
"href": "/job/v1/jobs/pc:16/costs",
"methods": [
"get"
]
},
"documents": {
"href": "/job/v1/jobs/pc:16/documents",
"methods": [
"get",
"post"
]
},
"lines": {
"href": "/job/v1/jobs/pc:16/lines",
"methods": [
"get"
]
},
"locations": {
"href": "/job/v1/jobs/pc:16/locations",
"methods": [
"get"
]
},
"notes": {
"href": "/job/v1/jobs/pc:16/notes",
"methods": [
"get",
"post"
]
},
"payment-info": {
"href": "/job/v1/jobs/pc:16/payment-info",
"methods": [
"get"
]
},
"payment-plans": {
"href": "/job/v1/jobs/pc:16/payment-plans",
"methods": [
"get"
]
},
"questions": {
"href": "/job/v1/jobs/pc:16/questions",
"methods": [
"get"
]
},
"self": {
"href": "/job/v1/jobs/pc:16",
"methods": [
"get"
]
},
"user-roles": {
"href": "/job/v1/jobs/pc:16/user-roles",
"methods": [
"get"
]
},
"versions": {
"href": "/job/v1/jobs/pc:16/versions",
"methods": [
"get"
]
}
}
}
}
{
"data": {
"attributes": {
"account": {
"displayName": "2768207338",
150 Submission
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
"id": "pc:8",
"type": "Account",
"uri": "/account/v1/accounts/pc:8"
},
"baseState": {
"code": "CA",
"name": "California"
},
"createdDate": "2020-07-23T00:25:46.038Z",
"id": "pc:7",
"organization": {
"displayName": "Armstrong and Company",
"id": "pc:1"
},
"periodEnd": "2021-02-01T00:01:00.000Z",
"periodStart": "2020-08-01T00:01:00.000Z",
"policyNumber": "6036550150",
"primaryInsured": {
"displayName": "Bill Preston",
"id": "pc:697",
"type": "PolicyContact",
"uri": "/policy/v1/policies/pc:7/contacts/pc:697"
},
"producerCode": {
"displayName": "100-002541",
"id": "pc:6"
},
"product": {
"displayName": "Personal Auto",
"id": "PersonalAuto"
},
"taxesAndSurcharges": {
"amount": "68.00",
"currency": "usd"
},
"termType": {
"code": "HalfYear",
"name": "6 months"
},
"totalCost": {
"amount": "1012.00",
"currency": "usd"
},
"totalPremium": {
"amount": "944.00",
"currency": "usd"
}
},
"checksum": "1",
"links": {
"activities": {
"href": "/policy/v1/policies/pc:7/activities",
"methods": [
"get",
"post"
]
},
"activity-assignees": {
"href": "/policy/v1/policies/pc:7/activity-assignees",
"methods": [
"get"
]
},
"activity-patterns": {
"href": "/policy/v1/policies/pc:7/activity-patterns",
"methods": [
"get"
]
},
"cancel": {
"href": "/policy/v1/policies/pc:7/cancel",
"methods": [
"post"
]
},
"change": {
"href": "/policy/v1/policies/pc:7/change",
"methods": [
"post"
]
},
"contacts": {
"href": "/policy/v1/policies/pc:7/contacts",
"methods": [
"get"
]
},
"costs": {
"href": "/policy/v1/policies/pc:7/costs",
"methods": [
Submission 151
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
"get"
]
},
"documents": {
"href": "/policy/v1/policies/pc:7/documents",
"methods": [
"get",
"post"
]
},
"lines": {
"href": "/policy/v1/policies/pc:7/lines",
"methods": [
"get"
]
},
"locations": {
"href": "/policy/v1/policies/pc:7/locations",
"methods": [
"get"
]
},
"notes": {
"href": "/policy/v1/policies/pc:7/notes",
"methods": [
"get",
"post"
]
},
"payment-info": {
"href": "/policy/v1/policies/pc:7/payment-info",
"methods": [
"get"
]
},
"questions": {
"href": "/policy/v1/policies/pc:7/questions",
"methods": [
"get"
]
},
"renew": {
"href": "/policy/v1/policies/pc:7/renew",
"methods": [
"post"
]
},
"rewrite-account": {
"href": "/policy/v1/policies/pc:7/rewrite-account",
"methods": [
"post"
]
},
"self": {
"href": "/policy/v1/policies/pc:7",
"methods": [
"get"
]
}
}
}
}
152 Submission
chapter 15
Issuance
Binding a policy refers to making the policy a legally binding contract between the insurer and the insurer. Issuing a
policy refers to printing the paperwork related to the policy. Policies are often bound and issued at the same time. But
in some situations, an insurer might want to bind a policy without issuing it. This can happen when the insurer wants to
put the policy in force now, but the insurer is still gathering supplemental information and therefore does not yet want
to print the policy documents.
A submission can be bound but not issued through the system APIs using the /bind-only endpoint. When the insurer
is ready to issue the policy, they can do so using the /issue endpoint. For more information on the business
functionality of issuing a bound policy, see Application Guide.
{
"data": {
"attributes": {}
}
}
The response payload contains the associated job. Use the job ID in subsequent calls.
2. Modify the job (optional).
The job is in Draft state, and can be modified. For example, the policy could require a new coverable. Details of
modifying a job depend on the LOB and product.
3. Generate a policy quote.
Submit a business action POST to the /job/v1/jobs/{jobId}/quote endpoint.
4. Complete the issuance policy transaction.
To complete the issuance policy transaction, the quoted job can be bound and issued. If the transaction is to be
discarded, such as for erroneous data, then it can be withdrawn.
The following table illustrates the two ways that a quoted issuance job can be completed:
Issuance 153
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
154 Issuance
chapter 16
Renewal
The renewal process extends the policy for another term beyond the current expiration date. It creates a new policy
period for an existing policy. The renewal policy transaction can be applied to a bound policy. For a general overview
of how to conduct policy transactions using the system APIs, see “Policy transactions”. For details on the business
functionality of renewals and other policy transactions in PolicyCenter, see Application Guide.
{
"data": {
"attributes": {}
}
}
The response payload contains the associated job. Use the job ID in subsequent calls.
2. Modify the job (optional).
The job is in Draft state, and can be modified. For example, the renewed policy could include a new coverable.
Details of modifying a job depend on the LOB and product.
3. Generate a quote.
Submit a business action POST to the /job/v1/jobs/{jobId}/quote endpoint.
4. Complete the policy transaction.
The following table illustrates the various ways that a quoted renewal job can be completed:
Renewal 155
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
156 Renewal
chapter 17
Cancellation
The cancellation policy transaction can be applied to a bound policy that is in force. A cancellation request must
include the requesting source (insurer or insured), a reason for the cancellation, and an effective date. The effective
date of the cancellation will depend on several factors, related to the requesting source and product configuration. For a
general overview of how to conduct policy transactions using the system APIs, see “Policy transactions” on page 123.
For details on cancellations and other policy transactions in PolicyCenter, see Application Guide.
{
"data": {
"attributes": {
"cancellationReasonCode": {
"code": "cancel"
},
"cancellationSource": {
"code": "carrier"
},
"jobEffectiveDate": "2020-08-15"
}
}
}
The response payload contains the associated job, which is in Quoted state. Use the job ID in the subsequent call.
2. Complete the cancellation.
The following table illustrates the various ways that a quoted cancellation job can be completed:
Cancellation 157
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
158 Cancellation
chapter 18
Policy change
A policy change modifies a policy in between the effective and expiration dates. This transaction type can be used to
apply changes to a policy, except for those that involve revising its effective date or the producer of record. For a
general overview of how to conduct policy transactions using the system APIs, see “Policy transactions” on page 123.
For details on the business functionality of policy changes and other policy transactions in PolicyCenter, see
Application Guide.
{
"data": {
"attributes": {
"jobEffectiveDate": "2020-08-18"
}
}
}
The response payload contains the associated job, which is in Draft state. Use the job ID in subsequent calls.
2. Modify the job as necessary.
Modifying actions will depend on the LOB and product. For example, in the case of a personal auto line, a caller
could add a driver or revise driving percentages of a vehicle.
3. Sync coverages and modifiers.
To apply coverages, submit a business action POST to the /job/v1/jobs/{jobId}/lines/{lineId}/sync-
coverages endpoint. To apply modifiers, submit a business action POST to the /job/v1/jobs/{jobId}/lines/
{lineId}/sync-modifiers endpoint.
4. Generate a quote.
Submit a business action POST to the /job/v1/jobs/{jobId}/quote endpoint.
5. Complete the policy change transaction.
The following table illustrates the two ways that a quoted policy change job can be completed:
Reinstatement
The reinstatement policy transaction can only be applied to a cancelled policy. A reinstatement is executed when the
issue causing the cancellaton is rectified. For example, a reinstatement could occur when an insurer receives past-due
payment on a policy but had been cancelled for lack of payment. For a general overview of how to conduct policy
transactions using the system APIs, see “Policy transactions” on page 123. For details on reinstatements and other
policy transactions in PolicyCenter, see Application Guide.
{
"data": {
"attributes": {
"reinstateCode": {
"code": "payment"
}
}
}
}
The response payload contains the associated job, which is in Draft state. Use the job ID in the subsequent call.
2. Generate a quote.
Submit a business action POST to the /job/v1/jobs/{jobId}/quote endpoint. Reinstatement (job effective)
date is automatically set to the cancellation date. Everything else in the original policy remains unchanged.
3. Complete the reinstatement policy transaction.
The following table illustrates the two ways that a quoted reinstatement job can be completed:
Reinstatement 161
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
162 Reinstatement
chapter 20
The rewrite and rewrite new account policy transactions can be applied by an underwriter to a bound policy that is in
force. The rewrite policy transaction can be used to change the effective date of a policy or the producer of record. The
rewrite new account policy transaction can be used to clone an existing policy and assign it to a new account. These
actions cannot be executed in a policy change transaction. For a general overview of how to conduct policy
transactions using the system APIs, see “Policy transactions” on page 123. For details on rewrites and other policy
transactions in PolicyCenter, see 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.
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.
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": "",
{
"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".
The Job and Policy APIs provide endpoints that can be used to search for jobs or policies, respectively:
• /job/v1/search/jobs
• /policy/v1/search/policies
To execute a search, a caller can submit a POST request to a search endpoint. The request payload must contain at least
one of the following properties:
• companyName: Complete company name of the insured
• firstName and lastName: Complete first and last name of the insured
• jobNumber (job search only): The job number
• officialId: Official identification code
• phone: A phone number
• policyNumber: The policy number
• producerCode.id: A valid producer code
When searching for jobs, the caller must also include the jobType.code property, which denotes the type of job (such
as submission or renewal).
The response payload of a search request can be further filtered by adding any of the following properties to the
request:
• city: A city location associated with a job or policy
• inForceOn (policy search only): A date string (YYYY-MM-DD) specifying a date on which the policy is in force
• jurisdiction.code: A jurisdiction code
• postalCode: A postal code associated with a job or policy
• product.id: A product ID for the LOB
• state.code: A state associated with a job or policy
• street: A street address associated with a job or policy
To get a count of the total number of matches for the search, add the query parameter &includeTotal=true to the
request. For more information on controlling pagination, see “Controlling pagination” on page 52.
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
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"
}
},
. . .
}
],
. . .
}
• number : The 1-based index number of the version in the versions collection. The property is syntactic sugar,
providing a handle that applications can use when iterating over a versions array.
• selected : A Boolean value indicating the selected state of the version.
• status : A typekey value indicating the job status. Jobs are in Draft status from time of creation, or in Quoted
status once a quote has been generated.
Other than name, these properties are read-only values.
{
"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 an unselected state.
Alternatively, a caller can modify or quote an unselected job version that is in Draft status by applying the jobVersion
query parameter to the request. These calls have the following patterns:
• /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.
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 responsible 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 system API calls.
For a complete description of the functionality of activities in PolicyCenter, see the Application Guide.
Note: Activities exist in all 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.
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
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
Working with activities 177
Guidewire PolicyCenter for Guidewire Cloud 2021.04 Cloud API Business Flows Guide
• 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 the system APIs, 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
{
"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.
POST /account/v1/accounts/pc:10/activities
{
"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 the system APIs, 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 the system APIs 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:
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"
}
}
}
Note that there is currently no endpoint that returns groups or group IDs. To assign activities to a specific group, the
caller application must determine the group ID using some method other than a groups system API.
POST /common/v1/activities/xc:1/assign
{
"data": {
"attributes" : {
"queueId": "cc:32"
}
}
}
Note that there is currently no endpoint that returns queues or queue IDs. To assign activities to a queue, the caller
application must determine the queue ID using some method other than a queues system API.
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.)
• Adds the given role to this user
• Assigns the activity to this user
For example, suppose there is an account created by Christine Craft. The account has no underwriter. If a system API
attempts to assign an activity for this account to "Underwriter", PolicyCenter will add the underwriter role to
Christine Craft and then assign the activity to her.
The following payload assigns activity xc:1 to the user on the activity parent that has the underwriter role.
POST /common/v1/activities/xc:1/assign
{
"data": {
"attributes" : {
"role" : {
"code" : "Underwriter"
}
}
}
}
POST /common/v1/activities/xc:1/assign
{
"data": {
"attributes": {
"autoAssign" : true
}
}
}
Endpoint Returns
/common/v1/activity/{activityId}/assignee 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 /assignee endpoint.
GET /common/v1/activities/pc:301/assignees
{
"count": 5,
"data": [
{
"attributes": {
"name": "Creator",
"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 corresponding action. Activities have a
mandatory Boolean field. If this is set to true, the activity cannot be skipped.
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}
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 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.
Overview of documents
Document owners
Documents cannot exist on their own. They must be attached to a parent object. From a system API perspective,
PolicyCenter documents are always attached to accounts, jobs, or policies.
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
The following is a portion of an example response from the Common API's /documents/{documentId} endpoint.
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"
}
},
...
GET /common/v1/documents/xc:101/content
{
"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
You can use the following to POST documents.
• /account/v1/accounts/{accountId}/documents
• /job/v1/jobs/{jobId}/documents
• /policy/v1/policies/{policyId}/documents
FormData objects
For most Cloud API resource, the request object is constructed as 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 must send
two sets of data: the document metadata and the document contents. This is accomplished using FormData objects.
FormData is an industry-standard interface that construct an object as a set of key/value pairs. When a caller
application is constructing a POST /documents call, the request object must be 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)
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>
Procedure
1. Identify the files needed for the FormData object. This includes:
• A text file that contains the metadata 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.
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 form-data.
c) On the first line, for KEY, enter: metadata
d) Click outside of the metadata cell. Then, mouse over the right side of the cell. A drop-down list appears.
Change the value from Text to File.
e) For VALUE, click the Select Files button and navigate to the file containing the JSON-formatted metadata.
f) On the second line, for KEY, enter: content
g) Click outside of the content cell. Then, mouse over the right side of the cell. A drop-down list appears.
Change the value from Text to File.
h) For VALUE, click the Select Files button and navigate to the file containing the document content.
7. Click Send. The response payload appears below the request payload.
PATCHing documents
You can use the following to PATCH documents.
• /common/v1/documents/{documentId}
Every document has a status. Once a document's status is set to "final", it can no longer be edited, either from the
PolicyCenter user interface or through the system APIs.
Logically speaking, a PATCH call can modify only the metadata of a document, only the content of a document, or
both.
{
"data": {
"attributes": {
}
}
}
PATCH /common/v1/documents/xc:101
Metadata:
{
"data": {
"attributes": {
"status": {
"code": "final"
}
}
}
}
The following is an example of PATCHing only the contents for document xc:101. Presumably, the contents of
"Property Assessment Report.pdf" are different than the current contents of document xc:101.
PATCH /common/v1/documents/xc:101
Metadata:
{
"data": {
"attributes": {
}
}
}
Contents:
<contents of "Property Assessment Report.pdf" file>
The following is an example of PATCHing both the metadata for document xc:101 and the content.
PATCH /common/v1/documents/xc:101
Metadata:
{
"data": {
"attributes": {
"status": {
"code": "final"
}
}
}
}
Contents:
<contents of "Property Assessment Report.pdf" file>
DELETEing documents
You can use the following to DELETE documents.
• /common/v1/documents/{documentId}
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 system APIs.
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 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.
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
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.
• POST policy/v1/policies/{policyId}/notes
• POST common/v1/activities/{activityId}/notes
Be aware that PolicyCenter supports notes attached to other objects as well, such as PolicyPeriods. However, as of the
current release, Cloud API does not yet support the ability to create notes for parent objects beyond accounts, jobs,
policies, and activities.
The only field required for a note is body, which stores the note's text. You can optionally specify these fields:
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
{
"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}
In the context of the system APIs, an organization represents a third-party entity that supports the insurer's business,
such as a producer.
With the Admin API, callers can create, update, and retrieve organization data through the /admin/v1/organizations
endpoints. Typically, internal services associated with administrator, auditor, or underwriter roles are authorized to
access the /organizations endpoints.
Creating organizations
Authorized internal users can create organizations. To create an organization, callers can submit a POST request to
the /admin/v1/organizations endpoint.
At minimum, the request body must contain the following fields:
• name: Organization name
• type.code: Organization type, from the BusinessType typelist
Optionally, the groupDescription field can be included (why?).
If the organization represents a producer, then the producerStatus.code field must also be included in the request.
This field takes a value from the ProducerStatus typelist. Optionally, the tier.code field can also be included for
producer organizations, and this field takes a value from the Tier typelist.
{
"data": {
"attributes": {
"name": "#(args.name)",
"producerStatus": {
"code": "Active"
},
"type": {
"code": "agency"
}
}
}
}
Updating organizations
Authorized internal users can update organizations. To update an organization, callers can submit a PATCH request to
the /admin/v1/organizations/{organizationId} endpoint.
In PolicyCenter, a producer refers to any third party who brings business to the insurer, such as an agent or broker. A
producer code is an identifier used in Guidewire systems to reference a specific producer.
With the Admin API, callers can create, update, and retrieve producer code data through the /admin/v1/producer-
codes endpoints. Typically, internal services associated with administrator or underwriter roles are authorized to access
the producer-codes endpoints.
{
"data": {
"attributes": {
"code": "301-008578",
"organization": {
"id": "pc:4"
},
"roles": [
{
"id": "producer"
}
]
}
}
}
The request body can also contain the following optional fields:
• address: An Address resource
• appointmentDate: A UTC timestamp indicating appointment date
• branch.id: The ID for the branch office
• description: A string
• parent.id: The ID for the parent organization
• preferredUnderwriter.id: The ID for the preferred underwriter
• producerStatus: The status of the producer
• terminationDate: A UTC timestamp indicating termination date
he Product Definition API supports a set of endpoints for querying products, lines, and reference code data.
The Job API provides endpoints that can be used to get, create, approve, reject, or reopen underwriting issues
associated with a job. The Policy API provides endpoints that can be used to get underwriting issues associated with a
policy.
Underwriting-related endpoints are typically available to callers whose roles pertain to an insurance underwriter or the
producer associated with the target policy or job. The insurance underwriter roles includes such functions as
underwriter, underwriter supervisor, and underwriter assistant.
For general guidance on underwriting processes and configuration in PolicyCenter, see Configuration Guide.
Note:
In PolicyCenter, users with administrator or superuser privileges can access underwriting issue types and their
associated data. From Administration > Export Data > Export Administrative Data select Underwriter Issue
Types, and then click Export. This action returns an XML file that contains an array of <UWissueType>
elements, each of which has a child <Code> element that maps to an underwriting issue resource
issueType.code property.
An underwriting issue resource supports properties associated with issue value types. The value type property used
with a particular resource is determined by the required value type of the associated UWIssue entity.
Possible issue value types are integer, decimal, monetary amount, or states set, which can be declared using the
following resource properties:
• integerValue: An integer value, passed as a string
• decimalValue: A decimal value, passed as a string
• moneyValue: A MonetaryAmount resource, containing currency and amount properties that specify the
appropriate currency and amount
• setStateValue: An ExclusiveStateSet resource, containing the inclusionType and states properties
If the underlying UWIssue entity does not require an issue value type, then the resource will not have one either. In
such cases, the issue value type is considered to be unformatted or none.
Underwriting issue resources can also contain the following properties:
• valueType: A read-only property indicating the issue value type
• comparator: A read-only property indicating the comparator type, if applicable, corresponding to a
ValueComparator typecode. This property is present on issues that require a value to be within some range.
Blocking points
An underwriting issue can have blocking points, meaning the associated job can proceed beyond the specified blocking
point only after the underwriting issue is approved.
Blocking points are set by UWIssueBlockingPoint typecode values, and these are applied to the following underwriting
issue resource properties:
• blockingPoint: The default blocking point set for the underwriting issue
• approvalBlockingPoint: When approving an issue, the blocking point can be reset, such as in the case when
additional approvals are required. When no more approvals are required, this value is set to NonBlocking.
• currentBlockingPoint: The current blocking point for the issue
Resolution properties
Underwriting issues can be resolved through either approval or rejection. Underwriting issue resources that have been
resolved will display properties appropriate for the type of resolution.
For all resolved issues, the hasApprovalOrRejection property will be set to true.
Approved issues have the following properties:
• approvalDurationType: A UWApprovalDurationType typecode value specifying the approval duration
• approvingUser: A SimpleReference for the user who approved the issue
• autoApprovable: Is the issue auto-approvable? (Boolean)
• canEditApprovalBeforeBind: Can the approval be edited before binding? (Boolean)
• currentBlockingPoint: On approval, the current blocking point is set to NonBlocking
When an approval is submitted with a corresponding issue value type, that value can be added to the resource through
one of the following properties:
• integerApprovalValue: The approved integer value
• decimalApprovalValue: The approved decimal value
• moneyApprovalValue: The approved monetary amount
• stateSetApprovalValue: The approved states set
In such cases, the resource will subsequently contain a displayApprovalValue property, showing the approved value
in string format.
Rejected issues have the following properties:
At minimum, the POST request must include the underwriting issue type in the issueType.code field. The request
body can also include a value for the associated underwriting issue value type. For this latter value, the following
properties are supported:
• integerValue: An integer value, passed as a string
• decimalValue: A decimal value, passed as a string
• moneyValue: A MonetaryAmount resource, containing currency and amount properties that specify the
appropriate currency and amount
{
"data": {
"attributes": {
"issueType": {
"code": "TSTManualStateSet"
},
"stateSetValue": {
"inclusionType": "inclusive",
"states": [
"CA"
]
}
}
}
}
{
"data": {
"attributes": {
"active": true,
"autoApprovable": true,
"blockingPoint": {
"code": "BlocksQuote",
"name": "Blocks Quote"
},
"comparator": {
"code": "State_Set",
"name": "In set"
},
"currentBlockingPoint": {
"code": "BlocksQuote",
"name": "Blocks Quote"
},
"displayValue": "CA",
"hasApprovalOrRejection": false,
"id": "45",
"issueKey": "45",
"issueType": {
"code": "TSTManualStateSet",
"displayName": "TST issue with state set format"
},
"shortDescription": "Special Issue",
"stateSetValue": {
"inclusionType": "inclusive",
"states": [
"CA"
]
},
"valueType": "stateSet",
"valueVariesAcrossSlices": false
},
. . .
}
}
This resource represents an open (active) underwriting issue that requires the state value (valueType) to be set to
California (stateSetValue). This issue blocks on quote (blockingPoint), and at present the job associated with this
issue cannot be quoted until the issue is resolved (currentBlockingPoint). The issue has not yet been approved or
rejected (hasApprovalOrRejection).
For details on underwriting resource content, see “Underwriting issue resources” on page 201.
Alternatively, authorized callers can apply special approval permission to an issue by submitting a business action
POST to the /job/v1/jobs/{jobId}/uw-issues/{uwIssueId}/special-approve endpoint.
By default, only the superuser role has authorization to execute the above actions.
Approval types
An approval can be classified into the following four types:
• Full approval: The underwriting issue has been reviewed and approved, and if necessary it contains a value that is
within the expected value range.
• Partial approval: The underwriting issue has been reviewed and approved, but its value is outside of the expected
value range. Typically, a partially approved issue will be forwarded to a higher authority for final approval.
• Automatic approval: The underwriting issue is configured to support automatic approval when specified criteria are
met. Such an issue has its autoApprovable resource property set to true.
• Special approval: Permission is provided for approving an issue regardless of value, as an approval override.
Guidewire recommends that you never use this permission unless there is a time-critical policy that cannot be
advanced by any underwriter.
{
"data": {
"attributes": {
}
}
}
If the underwriting issue expects a formatted value, then the request can include an issue value type of either integer,
decimal, monetary amount, or states set through one of the following properties:
• integerApprovalValue: An integer value, passed as a string
• decimalApprovalValue: A decimal value, passed as a string
• moneyApprovalValue: A MonetaryAmount resource, containing currency and amount properties that specify the
appropriate currency and amount
• stateSetApprovalValue: An ExclusiveStateSet resource, containing the inclusionType and states properties
Optionally, the caller can also set values for the following properties:
• approvalBlockingPoint: A UWIssueBlockingPoint typecode value. This can be applied to set a subsequent
blocking point
• approvalDurationType: A UWApprovalDurationType typecode value. This can be applied if the caller wishes to
change the default duration type.
• canEditApprovalBeforebind: Can the approval be edited before binding? (Boolean)
After a successful call to an approval endpoint, the resource's hasApprovalOrRejection property will be set to true.
The following code block depicts an request for a PAHighValueAuto underwriting issue that approves a monetary
amount of USD$8.50, sets the next blocking point on issuance, rescinds the approval duration, and enables editing of
the underwriting issue prior to binding:
{
"data": {
"attributes": {
"approvalBlockingPoint": {
"code": "BlocksIssuance"
},
"approvalDurationType": {
"code": "Rescinded"
},
"canEditApprovalBeforeBind": true,
"moneyApprovalValue": {
"amount": "8.5",
"currency": "usd"
}
}
}
}
However, the approved monetary amount (USD$8.50) is less than the default threshold for this issue type (USD
$10.00), therefore the issue will be partially approved.
{
"data": {
"attributes": {
"active": true,
"approvalBlockingPoint": {
"code": "BlocksIssuance",
"name": "Blocks Issuance"
},
"approvalDurationType": {
"code": "Rescinded",
"name": "Rescinded"
},
"approvingUser": {
"displayName": "Super User",
"id": "default_data:1",
"type": "User",
"uri": "/admin/v1/users/default_data:1"
},
"autoApprovable": true,
"blockingPoint": {
"code": "BlocksQuote",
"name": "Blocks Quote"
},
"canEditApprovalBeforeBind": true,
"comparator": {
"code": "Monetary_LE",
"name": "At most (monetary)"
},
"currentBlockingPoint": {
"code": "BlocksQuote",
"name": "Blocks Quote"
},
"displayApprovalValue": "$8.50",
"displayValue": "$10.00",
"hasApprovalOrRejection": true,
"id": "407",
"issueKey": "407",
"issueType": {
"code": "PAHighValueAuto",
"displayName": "PA: High value vehicle"
},
"longDescription": "Test long description",
"moneyApprovalValue": {
"amount": "8.50",
"currency": "usd"
},
"moneyValue": {
"amount": "10.00",
"currency": "usd"
},
"shortDescription": "Test short description",
"valueType": "money",
"valueVariesAcrossSlices": false
},
. . .
}
}
A subsequent approval request is necessary in order to fully approve this issue. A caller with sufficiently elevated
authority can approve this issue at the current value by submitting a call with the minimum request body described
above. Alternatively, a caller can submit an approval request that contains a value within the expected range. In either
case, the fully approved issue will return a response body showing that the blocking point has been removed.
{
"data": {
"attributes": {
. . .
"currentBlockingPoint": {
"code": "Rejected",
"name": "Rejected"
},
"hasApprovalOrRejection": true,
. . .
"rejected": true,
"rejectingUser": {
"displayName": "Super User",
"id": "default_data:1",
"type": "User",
"uri": "/admin/v1/users/default_data:1"
},
. . .
},
. . .
}
}
The resource of a locked job has the editLocked property set to true.
To release an editing lock on a job, an authorized caller can submit a business action POST to the /job/v1/jobs/
{jobId}/release-edit-lock endpoint. Calls to this endpoint do not take a request body.
By default, only superuser and underwriter roles are authorized to use these endpoints.
For details on edit locking, see the Configuration Guide.
With the Admin API, authorized callers can create, update, and retrieve system user data through the /admin/v1/
users endpoints.
{
"data": {
"attributes": {
"active": true,
"displayName": "Paulette Benson",
"externalUser": false,
"firstName": "Paulette",
"id": "pc:101",
"lastName": "Benson",
"organization": {
"displayName": "Enigma Fire & Casualty",
"id": "systemTables:1",
"type": "Organization",
"uri": "/admin/v1/organizations/systemTables:1"
},
"useOrgAddress": true,
"useProducerCodeSecurity": false,
"userType": {
"code": "underwriter",
"name": "Underwriter"
},
"username": "pbenson",
"vacationStatus": {
"code": "atwork",
"name": "At work"
},
"workPhone": {
"displayName": "213-555-8164",
"number": "2135558164"
}
},
. . .
}
}
In order to expose the GET /admin/v1/users/{userId} endpoint, the GET /admin/v1/users collection must also be
exposed. However, the latter endpoint is not filterable or sortable, and can possibly return many pages. In light of this
limitation, querying the users collection for a specific user can require an unknown number of calls. Thus Guidewire
recommends that callers do not use the /admin/v1/users collection to find a specific user.
Creating users
Authorized callers can create users. To create a user, callers can submit a POST request to the /admin/v1/users
endpoint.
At minimum, the request body must contain a value for the username field:
{
"data": {
"attributes": {
"firstName": "Alfred",
"lastName": "Martin",
"username": "amartin"
}
}
}
{
"data": {
"attributes": {
"active": true,
"displayName": "Alfred Martin",
"externalUser": false,
"firstName": "Alfred",
"id": "pc:203",
"lastName": "Martin",
"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"
}
},
. . .
}
}
Updating users
Authorized callers can update users. To update a user, callers can submit a PATCH request to the /admin/v1/users/
{userId} endpoint.
The system APIs in InsuranceSuite Cloud API have a set of default behaviors in the base configuration. However,
through configuration, their behaviors can be modified.
The following topics discuss how insurers can configure system API behavior. This includes:
• Extending system API resources
• Obfuscating personally identifiable information (PII)
• Generating LOB-specific APIs
System API resources are defined by a set of schemas. In the base configuration, system API resources expose a subset
of PolicyCenter entities and associated fields through a set of properties. To expose additional entity fields, including
your own customizations, you can extend the schemas for the resource.
A resource is structured by three types of schemas. A schema definition defines the data structure of a resource,
comprising property names and value types. A mapper maps the schema definition to a PolicyCenter entity and its
fields. An updater enables resource data to be written to PolicyCenter, and is only needed for resources that must
support write operations.
The basic workflow for extending a system API resource entails the following:
• Extend the schema definition
• Extend the mapper
• Extend the updater (for POST or PATCH operations only)
For an end-to-end walk-through, see “Tutorial: Create a resource extension” on page 221.
Schema organization
The system APIs are defined by a large collection of Swagger and JSON Schema files that are located in the Project/
configuration/config/Integration directory of Guidewire Studio. That directory includes the following relevant
subdirectories:
• apis contains Swagger files that define the system APIs and their associated endpoints.
• schemas contains schema definitions of the resource types associated with system API endpoints.
• mappings contains mappers that map schema definitions to PolicyCenter entities.
• updaters contains updaters that make resource data writeable to PolicyCenter.
Extension directories
The apis, schemas, mappings, and updaters directories each contain two subdirectories, gw and ext. The gw subdirectory
holds the base configuration files, and users must not alter these. The ext subdirectory contains the extensions
facilities. When extending an API, you will work with files in the ext subdirectories.
Note: While you must not alter the files in gw subdirectories, you might find it helpful to review those files to
gain a deeper understanding of how the API schemas are structured.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"x-gw-combine": [
"gw.content.cc.common.v1.common_content-1.0",
"ext.framework.v1.framework_ext-1.0"
],
"definitions": {}
}
{
. . .
"definitions": {
"Activity": {
"properties": {
"shortSubject_Ext": {
"type": "string"
}
}
}
}
}
• Activity: The name of the schema definition for the resource that is being extended
• shortSubject_Ext: The name of the property extension
• type: A declaration of the property value type
Property names
Guidewire recommends that you render property names in mixed case, with the first letter being lowercase, and that
you append _Ext to the property name. This namespacing is important to avoid upgrade conflicts if a property with the
same name is added to the core product in the future. The _Ext suffix is required even when adding properties from a
base entity.
For example, if a PolicyCenter entity field name is ShortSubject, then the name of the extended resource property
would be shortSubject_Ext.
Scalars
You can declare a property value type for a scalar by adding a type attribute to the resource property and assigning it a
JSON Schema primitive type of either boolean, integer, number, or string. If the scalar is a date or datetime type,
then you would also add a format attribute and give it a value of either date or date-time, respectively.
The following example depicts base resource properties that support PolicyCenter datetime, bit, and varchar value
types:
{
. . .
"definitions": {
"Activity": {
"properties": {
"closeDate": {
"type": "string",
"format": "date-time"
},
"mandatory": {
"type": "boolean"
},
"shortSubject": {
"type": "string"
}
}
}
}
}
Objects
You can declare a property value type for an object by assigning it a URI reference to an inline resource schema.
Typically, objects are formatted through the SimpleReference schema. For further details on inline resources, see the
Cloud API Business Flows Guide.
In the following example, assignedByUser_Ext is a property extension whose value type is object. That value type is
declared through a URI reference to the SimpleReference schema:
{
. . .
"definitions": {
"Activity": {
"properties": {
"assignedByUser_Ext": {
"$ref": "#/definitions/SimpleReference"
}
}
}
}
}
In the schemas generally, property value types that align with PolicyCenter typekeys are formatted as objects. To
declare a property value type for a typekey, assign it a URI reference to the TypeKeyReference schema. It is also
necessary to explicitly associate the typekey with its PolicyCenter typelist through the x-gw-extensions.typelist
attribute.
The example below shows an assignmentStatus_Ext property extension. Its value type is a typekey that is associated
with the AssignmentStatus typelist:
{
. . .
"definitions": {
"Activity": {
"properties": {
"assignmentStatus_Ext": {
"$ref": "#/definitions/TypeKeyReference",
"x-gw-extensions": {
"typelist": "AssignmentStatus"
}
}
}
}
}
}
Arrays
You can declare a property value type for an array by adding a type attribute to the resource property and assigning it
the value of array. It is also necessary to indicate the value type of the array members, which can be done by adding
an items.type attribute for scalars or a URI reference for objects.
The following property declaration is for an array of strings:
{
. . .
"definitions": {
"Activity": {
"properties": {
"exceptionSubtypes_Ext": {
"type": "array",
"items": {
"type": string"
}
}
}
}
}
}
The following property declaration, for the data property of the RelatedCollections resource, uses a URI reference
to set the array member type as an object that conforms to the SimpleReference schema:
{
. . .
"definitions": {
"RelatedCollection": {
"properties": {
. . .
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/SimpleReference"
}
}
}
}
}
}
Virtual properties
Many PolicyCenter entity fields are virtual properties that derive their value through a Gosu method. The value
returned from the method is typically dynamic, such as a concatenation of other fields, or a pointer to a specific
member of an array (such as the member added most recently). In the PolicyCenter Data Dictionary, the field entry for
virtual property lists the return type of the method that underlies the field. That type will be either a scalar, object,
typekey, or array, as described previously. After identifying the return type, you can then follow the specific formatting
guidance as described above.
Foreign keys
PolicyCenter entity fields are frequently based on foreign keys to other entities or typelists. To declare a property value
type for a foreign key, you must first identify the terminating value type of the foreign key reference in the originating
source. That type will be either a scalar, object, typekey, array, or virtual property, as described previously. You can
then follow the specific formatting guidance for the type.
For example, the AccountContact entity has a foreign key to the Contact entity, which has a DisplayName property
that is a string type. The chained name of this property is AccountContact.Contact.DisplayName. The schema
definition for this property is as follows:
"AccountContact": {
"type": "object",
"x-gw-extensions": {
"discriminatorProperty": "contactSubtype"
},
"properties": {
. . .
"displayName": {
"type": "string",
"readOnly": true
},
. . .
}
}
Extending mappers
By extending a mapper, you can associate the schema definition extension of the target resource with the backing data
source, a PolicyCenter entity. This step is necessary in order to expose your resource extensions to PolicyCenter
through the API. To extend a mapper, you must configure a mapper extension in a mapper extension file.
{
"schemaName": "ext.common.v1.common_ext-1.0",`
"combine": [
"gw.content.cc.common.v1.common_content-1.0",
"ext.framework.v1.framework_ext-1.0"
],
"mappers": {}
}
{
. . .
"mappers": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity",
"properties": {
"shortSubject_Ext": {
"path": "Activity.ShortSubject"
}
}
}
}
}
If a property value type is defined by a URI reference in the schema definition extension, then the extended property
must also include a mapper attribute. The syntax for this value is #/mappers/ followed by the schema name. For
example, if the property value type in the schema definition extension is "$ref": "#/definitions/
SimpleReference", then the mapper attribute value would be "mapper": "#/mappers/SimpleReference".
The following listing shows an extended activityClass_Ext resource property that maps to the PolicyCenter
Activity.ActivityClass entity field, which is backed by a typekey. The schema definition extension declares the
property value type as "$ref": "#/definitions/TypeKeyReference". Therefore, it is necessary to include the
mapper attribute:
{
. . .
"mappers": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity",
"properties": {
"activityClass_Ext": {
"path": "Activity.ActivityClass",
"mapper": "#/mappers/TypeKeyReference"
}
}
}
}
}
Extending updaters
When extending a resource that will support POST or PATCH operations, you must also configure a matching updater
extension in an updater extension file. This is necessary in order to make the extended properties writeable to
PolicyCenter.
{
"schemaName": "ext.common.v1.common_ext-1.0",
"combine": [
"gw.content.cc.common.v1.common_content-1.0",
"ext.framework.v1.framework_ext-1.0"
],
"updaters": { }
}
{
. . .
"updaters": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity",
"properties": {
"shortSubject_Ext": {
"path": "Activity.ShortSubject"
}
}
}
}
}
If the property value type of the extended property in the schema definition extension is TypeKeyReference, then in
the updater extension that property must include a valueResolver attribute that sets typeName to
TypeKeyValueResolver:
{
. . .
"updaters": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity",
"properties": {
"activityClass_Ext": {
"path": "Activity.ActivityClass",
"valueResolver": {
"typeName": "TypeKeyValueResolver"
}
}
}
}
}
}
Tools
Over the course of this exercise, you will be using Studio, Swagger UI, and Postman. This tutorial assumes that you are
already familiar with working in Studio. For further information on Swagger UI, or on setting up Postman, see the
Cloud API Business Flows Guide.
Scenario
You have been asked to create a resource extension for the Activity resource in the Common API. That resource is
based on the PolicyCenter Activity entity. You are going to extend resource properties to support the following entity
fields:
Entity field name Resource property name Value type Support POST and
PATCH?
ActivityClass activityClass_Ext typekey to ActivityClass typelist
CreateTime createTime_Ext datetime
CreateUser createUser_Ext foreign key to User entity
ShortSubject shortSubject_Ext varchar (10) yes
IsAutogenerated_Ext (user-created field isAutogenerated_Ext bit yes
extension)
Notice that the last entry is a custom entity field extension. You will begin by creating that field in Studio. You will
then configure the resource, mapping, and updater extensions to make these properties available through the system
API. Lastly, you will verify the resource extension in Swagger UI and Postman.
This file is located at Integration > schemas > ext > common > v1 > common_ext-1.0.schema.json.
{
"$schema": "http://json-schema.org/draft-04/schema#",
"x-gw-combine": [
"gw.content.pc.common.v1.common_content-1.0"
],
"definitions": {}
}
2. In the definitions field, create a schema definition extension for Activity, and add to this a properties
attribute.
{
. . .
"definitions": {
"Activity": {
"properties": {}
}
}
}
3. Within the properties attribute, create fields for each of the resource properties to be extended, as outlined in
the “Scenario” section previously.
{
. . .
"definitions": {
"Activity": {
"properties": {
"activityClass_Ext": {},
"createTime_Ext": {},
"createUser_Ext": {},
"shortSubject_Ext": {},
"isAutogenerated_Ext": {}
}
}
}
}
For guidance on property naming conventions, see the “Property names” section of “Schema definition extension
syntax” on page 214.
4. Within the activityClass_Ext property field, add a property value type for typekey.
The typekey type is defined in the schema by a URI reference. To set the property value type, enter a $ref
attribute and assign it a value of #/definitions/TypeKeyReference.
Additionally, the typekey must be associated with a typelist. To set the typelist, add a x-gw-extensions attribute
to the property, and then assign the appropriate typelist to the typelist field. In this example, the typelist is
ActivityClass.
{
. . .
"definitions": {
"Activity": {
"properties": {
"activityClass_Ext": {
"$ref": "#/definitions/TypeKeyReference",
"x-gw-extensions": {
"typelist": "ActivityClass"
}
},
. . . }
}
}
}
5. In the createTime_Ext property field, add a property value type for datetime.
To set the property value type, enter a type attribute and assign it a value of string. Next, add a format attribute
and assign it a value of date-time.
The following code block depicts the completed property field:
{
. . .
"definitions": {
"Activity": {
"properties": {
. . .
"createTime_Ext": {
"type": "string",
"format": "date-time"
},
. . . }
}
}
}
6. In the createUser_Ext property field, add a property value type for object.
You can declare a property value type for an object by adding a $ref attribute to the resource property and
assigning it a URI reference for an inlined resource (for details, refer to “The attributes section” in this guide). In
this instance, enter a $ref attribute and assign it a value of #/definitions/SimpleReference.
The following code block depicts the completed property field:
{
. . .
"definitions": {
"Activity": {
"properties": {
. . .
"createUser_Ext": {
"$ref": "#/definitions/SimpleReference"
},
. . .
}
}
}
}
7. In the shortSubject_Ext property field, add a property value type for string.
To set the property value type, enter a type attribute and assign it a value of string.
The following code block depicts the completed property field:
{
. . .
"definitions": {
"Activity": {
"properties": {
. . .
"shortSubject_Ext": {
"type": "string"
},
. . .
}
}
}
}
8. In the isAutogenerated_Ext property field, add a property value type for bit.
To set the property value type, enter a type attribute and assign it a value of boolean.
The following code block depicts the completed property field:
{
. . .
"definitions": {
"Activity": {
"properties": {
. . .
"isAutogenerated_Ext": {
"type": "boolean"
}
}
}
}
}
Extend a mapper
1. In Studio, open the mapper extension file associated with the Common API.
This file is located at Integration > mappings > ext > common > v1 > common_ext-1.0.mapping.json.
{
"schemaName": "ext.common.v1.common_ext-1.0",
"combine": [
"gw.content.pc.common.v1.common_content-1.0"
],
"mappers": {}
}
3. In the Activity mapper extension, add a schemaDefinition property and give it the value Activity. This
associates the mapper with the Activity resource.
{
. . .
"mappers": {
"Activity": {
"schemaDefinition": "Activity"
}
}
}
4. Add a root property, and give it the value of entity.Activity. This associates the Activity resource with the
PolicyCenter Activity entity.
{
. . .
"mappers": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity"
}
}
}
5. Add a properties property, and within that create fields for each of the properties that you added previously to
the schema definition extension.
{
. . .
"mappers": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity",
"properties": {
"activityClass_Ext": {},
"createTime_Ext": {},
"createUser_Ext": {},
"shortSubject_Ext": {},
"isAutogenerated_Ext": {}
}
}
}
}
{
. . .
"mappers": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity",
"properties": {
"activityClass_Ext": {
"path": "Activity.ActivityClass",
"mapper": "#/mappers/TypeKeyReference"
},
. . .
}
}
}
}
7. In the createTime_Ext property, add a path attribute and assign it the value Activity.CreateTime.
This maps the resource property to the CreateTime entity field.
The following code block depicts the completed property field:
{
. . .
"mappers": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity",
"properties": {
. . .
"createTime_Ext": {
"path": "Activity.CreateTime"
},
. . .
}
}
}
}
{
. . .
"mappers": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity",
"properties": {
. . .
"createUser_Ext": {
"path": "Activity.CreateUser",
"mapper": "#/mappers/SimpleReference"
},
. . .
}
}
}
}
9. In the shortSubject_Ext property, add a path attribute and assign it the value Activity.ShortSubject.
This maps the resource property to the ShortSubject entity field.
The following code block depicts the completed property field:
{
. . .
"mappers": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity",
"properties": {
. . .
"shortSubject_Ext": {
"path": "Activity.ShortSubject"
},
. . .
}
}
}
}
10. In the isAutogenerated_Ext property, add a path attribute and assign it the value
Activity.IsAutogenerated_Ext.
This maps the resource property to the IsAutogenerated_Ext entity field.
The following code block depicts the completed property field:
{
. . .
"mappers": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity",
"properties": {
. . .
"isAutogenerated_Ext": {
"path": "Activity.IsAutogenerated_Ext"
}
}
}
}
}
{
"schemaName": "ext.common.v1.common_ext-1.0",
"combine": [
"gw.content.pc.common.v1.common_content-1.0"
],
"updaters": {}
}
3. In the Activity updater extension, add a schemaDefinition property and give it the value Activity.
This associates the updater with the Activity resource.
{
. . .
"updaters": {
"Activity": {
"schemaDefinition": "Activity"
}
}
}
This associates the Activity resource with the PolicyCenter Activity entity.
{
. . .
"updaters": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity"
}
}
}
5. Add a properties property, and within that create a field for each of the supported properties as defined in the
schema definition extension.
{
. . .
"updaters": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity",
"properties": {
"shortSubject_Ext": {},
"isAutogenerated_Ext": {}
}
}
}
}
6. In the isAutogenerated_Ext property, add a path attribute and assign it the value
Activity.IsAutogenerated_Ext.
This maps the resource property to the IsAutogenerated_Ext entity field, enabling property data to be written to
the InsuranceSuite database.
The following code block depicts the completed property field:
{
. . .
"updaters": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity",
"properties": {
"isAutogenerated_Ext": {
"path": "Activity.IsAutogenerated_Ext"
},
. . .
}
}
}
}
7. In the shortSubject_Ext property, add a path attribute and assign it the value Activity.ShortSubject.
This maps the resource property to the ShortSubject entity field, enabling property data to be written to the
InsuranceSuite database.
The following code block depicts the completed property field:
{
. . .
"updaters": {
"Activity": {
"schemaDefinition": "Activity",
"root": "entity.Activity",
"properties": {
. . .
"shortSubject_Ext": {
"path": "Activity.ShortSubject"
}
}
}
}
}
You can test the updater by executing a PATCH operation on the same resource:
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
2. Specify Basic Auth authorization using user aapplegate and password gw.
3. Enter the following call, but do not click Send:
PATCH http://localhost:8180/pc/rest/common/v1/activites/pc:105
4. 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": {
"isAutogenerated_Ext": true,
"shortSubject_Ext": "shortsub"
}
}
}
5. Click Send. The response payload appears below the request payload.
{
"data": {
"attributes": {
"activityClass_Ext": {
"code": "task",
"name": "Task"
},
"activityPattern": "premium_report_overdue",
"activityType": {
"code": "general",
"name": "General"
},
"assignedByUser": {
"displayName": "System User",
"id": "systemTables:2"
},
"assignedGroup": {
"displayName": "Los Angeles Branch UW",
"id": "pc:7"
},
"assignedUser": {
"displayName": "Alice Applegate",
"id": "pc:105"
},
"assignmentStatus": {
"code": "assigned",
"name": "Assigned"
},
"createTime_Ext": "2020-04-23T15:28:26.677Z",
"createUser_Ext": {
"displayName": "System User",
"id": "systemTables:2"
},
"description": "Premium report overdue",
"dueDate": "2020-04-27T15:28:26.682Z",
"escalated": true,
"escalationDate": "2020-04-27T15:28:26.682Z",
"externallyOwned": false,
"id": "pc:105",
"isAutogenerated_Ext": true,
"mandatory": true,
"priority": {
"code": "high",
"name": "High"
},
"recurring": false,
"shortSubject_Ext": "shortsub",
"status": {
"code": "open",
"name": "Open"
},
"subject": "Premium report overdue"
},
. . .
}
}
Providing feedback
The system APIs expose a subset of PolicyCenter base entities and associated fields. If there are entities or fields that
you think should be added to system API resources, let your Guidewire representative know. The system APIs are in
active development, and your feedback will be helpful to the system API development team.
Generally, enterprises that handle personal data must abide by the data protection and privacy regulations of the
jurisdictions in which they operate. For example, companies operating in the European Union must abide by the
General Data Protection Regulation (GDPR) within that jurisdiction.
One way to protect the privacy of individuals is to obfuscate Personally Identifiable Information (PII). This approach
limits the exposure of designated PII, and is supported by the system APIs. PII can be obfuscated by either nullifying
or masking. PII is nullified when its value is returned null. PII is masked when a portion of its value is returned with
placeholder characters, such as 'XXXXXXX-3213' as a return value for an account number.
Nullifying PII
You can nullify the return value of PII by modifying the mapper for the relevant resource property. This can be done in
a resource extension. For details on resource extensions, see “Extending system API resources” on page 213.
For example, an account has AccountContacts. Depending on business purposes, it might have been necessary to
obtain tax identification information for an AccountContact. Later, a system API caller could request the
AccountContact and then view the contact's tax ID in the response. To prevent the exposure of this data, you can
nullify the value in the resource mapper.
The schema for the AccountContact resource contains a taxId property:
"AccountContact": {
"type": "object",
"x-gw-extensions": {
"discriminatorProperty": "contactSubtype"
},
"properties": {
. . .
"taxId": {
"type": "string"
},
. . .
}
}
To nullify the value of the taxId property, you can modify that property in the AccountContact mapper as follows:
"AccountContact": {
"schemaDefinition": "AccountContact",
"root": "entity.AccountContact",
"properties": {
. . .
"taxId": {
"path": "null as String",
"predicate": "false"
},
. . .
}
}
Setting the taxId.path property to "null as String" converts the expected value to a null string. Setting
taxId.predicate to false prevents the original value, in this case the PII, from being evaluated.
Masking PII
You can mask the return value of PII by writing a Gosu method and modifying the mapper for the relevant resource
property to use that method. For details on implementing Gosu code, see the Configuration Guide. The mapper can be
modified through a resource extension. For details on extending resources, see “Extending system API resources” on
page 213.
For example, an account has AccountContacts. Depending on business purposes, it might have been necessary to
obtain tax identification information for an AccountContact. Later, a system API caller could request the
AccountContact and then view the contact's tax ID in the response. To limit the exposure of this data, you can mask
that value.
The schema for the AccountContact resource contains a taxId property:
"AccountContact": {
"type": "object",
"x-gw-extensions": {
"discriminatorProperty": "contactSubtype"
},
"properties": {
. . .
"taxId": {
"type": "string"
},
. . .
}
}
This property is mapped to the TaxID field of the AccountContact.Contact entity. You must create a Gosu method
that masks the tax ID string. In this example, the method is named maskTaxId.
You then modify the taxId property in the AccountContact mapper as follows:
"Contact": {
"schemaDefinition": "Contact",
"root": "entity.Contact",
"properties": {
. . .
"taxId": {
"path": "AccountContact.Contact.maskTaxId(AccountContact.Contact.TaxID)"
},
. . .
}
}
Unmasking PII
Conversely, you can unmask PII that has been masked in the base configuration. This can be necessary when you need
to expose the PII to a specific internal role, such as administrator. In such circumstances, Guidewire recommends that
you create a new schema extension for the masked property. For example, if you wish to unmask the taxId property,
you would create a taxIdUnmasked_Ext schema property that is mapped directly to the TaxID entity field. In such a
case, Guidewire recommends that you also allowlist the extended property to make it visible only to authorized roles.
For details on creating resource extensions, see “Extending system API resources” on page 213. For details on
allowlisting fields, see the section on API role files in Cloud API Authentication Guide.
IMPORTANT: Nothing in the Cloud API infrastructure prevents configuration that could expose PII in a
sensitive way. For example, if you specify taxId as a filterable parameter or sortable, it can be included as part
of the URL in a request and is more likely to appear in application logs.
Every product in PolicyCenter consists of one or more lines of business (LOBs). From a technical standpoint, every
line of business is implemented through a set of LOB-specific artifacts. This can include the following:
• Database tables that store LOB-specific information
• LOB-specific PCFs
• LOB-specific reference tables, such as tables that store class codes
When a line of business is exposed to the system APIs, there is an additional set of LOB-specific artifacts: the LOB-
specific APIs. An LOB-specific API is a set of endpoints that can create, read, update, or delete information for a
specific line of business. Every LOB-specific API includes endpoints to work with Line resources. Depending on the
structure of the line of business, the API may include other endpoints, such as:
• Endpoints to work with coverables
• Endpoints to work with locations
Every insurer develops lines of business for their specific needs. This can involve modifying base configuration LOBs
or creating new ones. Because of this, the base configuration does not include any LOB-specific APIs. Insurers must
generate the APIs for themselves after the structure of the line of business has been sufficiently developed.
PolicyCenter provides functionality that lets you generate APIs for the LOBs that support API generation.
Note:
Line of business configuration can vary depending on the LOB. For further assistance, contact Guidewire
Support.
1. The product and its lines of business start as metadata that is captured in either a mind map or a template.
2. The insurer creates a visualized product by importing the LOB metadata into PolicyCenter.
a. During the import, PolicyCenter generates a set of "in memory" APIs that reflect the structure of the LOB.
3. While in Advanced Product Designer, the insurer typically edits the product.
a. This is typically an iterative process where the insurer refines the metadata as needed.
b. Every time the product is modified, the "in memory" APIs are regenerated.
4. Once the refining is complete, the insurer creates a finalized product by installing the product. The finalized
products consists of:
a. The necessary artifacts for the product, including database tables and PCFs.
b. A set of "active" APIs that are now part of the system APIs.
Note: When importing, editing, or installing a line of business through Advanced Product Designer, there is no
separate step to generate LOB-specific APIs. The APIs are generated automatically whenever the product is
imported, edited, or installed.
For more information on Advanced Product Designer, refer to the Advanced Product Designer Guide.
Note:
PolicyCenter upgrades include new features for use with the Cloud APIs. In order to apply these new features
to your LOB-specific APIs, you must update each of those APIs after upgrading PolicyCenter itself.
To execute this task, you must have an APD template for the LOB. If necessary, you can generate an APD template
from the existing visualized product and import the template. For more information, see “Generate a template using the
reverse template generator” on page 237
Procedure
1. In PolicyCenter, set Options > Preferences > Product Design Mode to Developer, and then click Update.
2. To add the template, click Administration > Product Management > Import From Template, browse and select your
template, and then click Update.
3. To generate the API, from the Details pane click Edit Product > Generate Product Code > System APIs > System
APIs - Code
4. Review the model, and if acceptable, click Complete Generation.
5. Click Return to Product Definition, and then click Save.
6. Restart PolicyCenter.
Results
To verify the result, browse to the APD Managed pane on the Product Management page. The LOB product will be
displayed, and the Last Updated column will have a value, indicating that the product has been installed. For details on
viewing the API in Swagger, see “View a system API using Swagger UI” on page 23.
Procedure
1. In PolicyCenter, select Administration > Product Management > Externally Managed. This pane contains a list of
products that have been installed by means other than APD.
2. In the Installed Products pane, select the product for which you wish to generate an APD template.
3. In the Details pane, click Extract APD Representation. PolicyCenter generates the APD template and stores it in
the <USER_HOME>/Downloads directory.
Results
Once the product is imported as a visualized product and any inconsistencies have been corrected, you can install just
the APIs. For details, see “Generate LOB-specific APIs” on page 236.
API codegen configuration can become quite complex, depending on the LOB. For assistance, contact
Guidewire Support.
types:
<TypeNameInProduct>:
nameOverride: <TypeNameInAPDTemplate>
To override one or more field names for the given type, a fields property can be added to the type object. The fields
property expects an array of objects whose names match those of the field overrides for the type. As with the type
name override, the field name must contain a nameOverride property that identifies the field name as used in the APD
template:
types:
<TypeNameInProduct>:
nameOverride: <TypeNameInAPDTemplate>
fields:
<FieldNameInProduct>:
nameOverride: <FieldNameInAPDTemplate>
To give a concrete example, the following code block shows an API codegen configuration for a personal auto line
product that was created outside of APD. This override maps the non-APD line name PALine to the APD-derived line
name PersonalAutoLine. Also, the non-APD field name Year is mapped to the APD-derived product field name
ModelYear:
types:
PALine:
nameOverride: PersonalAutoLine
fields:
Year:
nameOverride: ModelYear
In addition to applying naming overrides, it is also possible to apply or relax type or field constraints enforced in the
APD template that differ from the behavior expected in the originating product.
The following optional properties can be used to override specific aspects of a type or field:
• autonumber: Accepts resource name of the schema and mapping to be used in lieu of the default sorting
• canDelete: Enable or disable DELETE method (Boolean)
• canPatch: Enable or disable PATCH method (Boolean)
• canPost: Enable or disable POST method (Boolean)
• canSplit: Enable or disable the split custom action (Boolean)
• createOnly: Enable or disable modifiers (Boolean)
• identifier: Override default identifying property
• ignored: Hide or expose the field (Boolean)
• nullable:: Allow a null value (Boolean)
• oneToOne: Enforce a one-to-one relationship by removing the ability to add or remove values
• requiredForCreate: Override the APD-derived requiredForCreate value (Boolean)
• resourceName: Override default schema and resource name. Apply this value when the resource name differs from
the nameOverride name.
• toCreateAndAdd: Override default createAndAdd method
• toRemove: Override default remove method
• wizardStepIds: Add or drop wizard step identifiers (Boolean)
The following code block is an example of an API codegen configuration for a personal auto line that includes optional
properties:
types:
PADriver:
fields:
PolicyDriver:
createOnly: true
nameOverride: VehicleDriver
PALine:
nameOverride: PersonalAutoLine
PAPolicyDriverMVR:
# PolicyDriverMVRs are managed implicitly via requests to retrieve an MVR on individual drivers and are readOnly
canDelete: false
canPatch: false
canPost: false
nameOverride: PolicyDriverMVR
PAVehicle:
autonumber: VehicleNumber
fields:
GarageLocation:
requiredForCreate: false
Year:
nameOverride: ModelYear
nameOverride: PersonalVehicle
toCreateAndAdd: createAndAddVehicle
toRemove: removeVehicle
wizardStepIds: false
Procedure
1. Set your Product Design Mode preference to Developer. (You can do this by selecting Preferences from the Options
menu. The Options menu is represented by the gear icon in the upper right corner.)
Results
PolicyCenter immediately disables the product's visualized artifacts.
Procedure
1. Set your Product Design Mode preference to Developer. (You can do this by selecting Preferences from the Options
menu. The Options menu is represented by the gear icon in the upper right corner.)
2. Navigate to the product's Product Definition screen.
3. Set Enabled for REST API to Enabled.
4. Restart PolicyCenter.
Results
PolicyCenter immediately enables the product's visualized artifacts.
Procedure
1. In Windows Explorer, navigate to the integration/apis/installedlob directory.
2. Either rename or delete the product file corresponding to the installed product.
3. Restart PolicyCenter.
Results
PolicyCenter immediately disables the product's installed artifacts.
In the request body, Content-Type must be set to multipart/form-data, and the product template file must be passed
through the content parameter.
The following example shows a partial request header for a call that imports a BPP-PetBusinessOwners-template.xml
file:
> --------iSl9mNZkwq31beJX5v
> Content-Type: text/xml
> Content-Disposition: form-data; content="BPP-PetBusinessOwners-template.xml"
(content of BPP-PetBusinessOwners-template.xml)
> --------iSl9mNZkwq31beJX5v--
{
"data": {
"attributes": {
"id": "Petbusinessowners"
}
}
}
By default, the imported product template is loaded in PolicyCenter as a visualized product, and its LOB-specific APIs
are enabled for inspection.
Product editions
A product edition defines product model properties and subclause relationships for a product line. Product editions can
be used to introduce changes to the product after a product has gone into production. A product edition is packaged as
an APD template, and can be imported as described above, provided the base product is already installed.
To activate the product edition, a caller can submit a POST request to the /productdefinition/v1/lines/{lineId}/
activate-editions endpoint. The request body must contain a lineId property containing the product edition
identifier:
{
"data": {
"attributes": {
"lineId": "Petbusinessowners-2"
}
}
}
For example, a ProductTemplate resource for a Pet Business Owners product appears as follows:
{
"data": {
"attributes": {
"abbreviation": "PBP",
"codeIdentifier": "PetBusinessOwners",
"description": "Pet Business Owners",
"enabled": true,
"id": "Petbusinessowners",
"name": "Petbusinessowners",
"productAccountType": {
"code": "Any",
"name": "Any"
}
},
. . .
"links": {
"codegen": {
"href": "/productdefinition/v1/product-templates/Petbusinessowners/codegen",
"methods": [
"post"
]
},
"disable": {
"href": "/productdefinition/v1/product-templates/Petbusinessowners/disable",
"methods": [
"post"
]
},
"self": {
"href": "/productdefinition/v1/product-templates/Petbusinessowners",
"methods": [
"delete",
"get"
]
}
}
}
}
{
"data": {
"attributes": {
"productId": "Petbusinessowners"
}
}
}
The response body contains the associated ProductTemplate resource. The enabled property displays a Boolean value
indicating whether the product is enabled or disabled.
{
"data": {
"attributes": {
"abbreviation": "PBP",
"codeIdentifier": "PetBusinessOwners",
"description": "Pet Business Owners",
"enabled": false,
"id": "Petbusinessowners",
"name": "Petbusinessowners",
. . .
},
. . .
}
}
({lobId} refers to the three-character abbreviation used in LOB names, such as "BOP")
To generate code from a visualized product, authorized callers can submit a POST request to the /
productdefinition/v1/product-templates/{productId}/codegen endpoint.
The request body can include the generationMode property, set to one of the following values:
• ALL: Generate API and product base code
• API_CODE: Generate code for the API only
• BASE_CODE: Generate product base code only
• EXTERNAL: Generate extensions code only
{
"data": {
"attributes": {
"productId": "Petbusinessowners"
"generationMode": "API_CODE"
}
}
}