CloudAPI Consumer
CloudAPI Consumer
Contents
Support.......................................................................................................................................................... 11
Part 1
Basic REST operations........................................................................................................................ 13
Contents 3
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
4 Contents
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
HTTP headers................................................................................................................................................... 77
Overview of Cloud API headers................................................................................................................ 77
Send a request with a Cloud API header using Postman..........................................................................79
Language and locale......................................................................................................................................... 80
Preventing duplicate database transactions.................................................................................................... 81
Sticky sessions in clustered environments....................................................................................................... 81
Warming up an endpoint................................................................................................................................. 83
Handling a call with unknown elements.......................................................................................................... 83
Validating response payloads against additional constraints........................................................................... 84
Part 2
Optimizing calls.......................................................................................................................................85
Contents 5
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Part 3
Business flows: BillingCenter......................................................................................................... 129
6 Contents
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Contents 7
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Part 4
Business flows: Framework APIs.................................................................................................. 279
8 Contents
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
29 Documents..................................................................................................................................................... 281
Overview of documents................................................................................................................................. 281
Querying for document information.............................................................................................................. 282
Querying for document metadata..........................................................................................................282
Querying for document content.............................................................................................................283
POSTing documents....................................................................................................................................... 283
POSTing documents using Postman....................................................................................................... 286
PATCHing documents..................................................................................................................................... 287
Sending document metadata only using JSON...............................................................................................288
DELETEing documents.................................................................................................................................... 288
30 Users and groups........................................................................................................................................... 291
Users.............................................................................................................................................................. 291
Querying for user information............................................................................................................... 291
Creating users.........................................................................................................................................292
Updating users....................................................................................................................................... 293
Deleting users.........................................................................................................................................294
Groups............................................................................................................................................................ 294
Querying for groups............................................................................................................................... 294
Creating groups...................................................................................................................................... 295
Assigning users to groups....................................................................................................................... 295
Updating groups..................................................................................................................................... 297
Deleting groups...................................................................................................................................... 297
Queues........................................................................................................................................................... 298
Working with queues............................................................................................................................. 298
User roles....................................................................................................................................................... 299
Querying for user roles...........................................................................................................................300
Creating user roles................................................................................................................................. 301
Updating user roles................................................................................................................................ 302
Authority limits and authority limit profiles...................................................................................................303
Querying for authority limits and authority limit profiles...................................................................... 303
Checking authority limits before making transactions........................................................................... 305
31 Security zones................................................................................................................................................ 307
Querying for security zones........................................................................................................................... 307
Creating security zones.................................................................................................................................. 308
Modifying and deleting security zones.......................................................................................................... 308
Associating security zones with other objects............................................................................................... 309
32 Geographic zones.......................................................................................................................................... 311
33 History events................................................................................................................................................ 313
34 Batch processes............................................................................................................................................. 315
Overview of batch processes......................................................................................................................... 315
Querying for batch process information........................................................................................................ 316
Managing batch processes............................................................................................................................. 317
Starting a batch process......................................................................................................................... 317
Starting a batch process with arguments............................................................................................... 318
Stopping a batch process....................................................................................................................... 319
35 Database consistency checks........................................................................................................................ 321
Overview of database consistency checks (DBCCs)........................................................................................321
Running DBCCs............................................................................................................................................... 322
Running a previously run DBCC.............................................................................................................. 323
Querying for DBCC run information............................................................................................................... 324
36 Business entity schemas................................................................................................................................327
Contents 9
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
10 Contents
Support
Guidewire customers
https://community.guidewire.com
Guidewire partners
https://partner.guidewire.com
part 1
The following topics discuss how caller applications can execute fundamental REST operations on Cloud API, and the
Guidewire-specific enhancements to these operations. This includes how to:
• Construct GET requests to query for data
• Use query parameters to refine response payloads
• Construct POST requests to create new data
• Construct PATCH requests to modify existing data
• Construct DELETE requests to remove data
InsuranceSuite Cloud API for BillingCenter is a set of RESTful system APIs that caller applications can use to request
data from or initiate action within BillingCenter. Cloud API is built on top of the Guidewire REST API framework
using the Swagger 2.0 Specification. The APIs in Cloud API are also referred to as the system APIs.
This topic provides an overview of the APIs available in Cloud API and how you can view them.
If you are coding a consumer application and have limited experience with REST APIs, the “REST API fundamentals”
on page 22 section provides a brief overview of how REST APIs work in Cloud API.
Note: The /apis endpoint returns all REST APIs for BillingCenter. This includes some APIs that are not part
of Cloud API, such as /system/v0/database and /system/v0/maintenance. The only APIs that are part of
Cloud API are the ones listed in the previous table. These are the only APIs that have access to Cloud API
features, such as request inclusion and authentication.
Cloud API for ContactManager consists of the following APIs:
Note: The /apis endpoint returns all REST APIs for ContactManager. This includes some APIs that are not
part of Cloud API, such as /system/v0/database and /system/v0/maintenance. The only APIs that are part
of Cloud API are the ones listed in the previous table. These are the only APIs that have access to Cloud API
features, such as request inclusion and authentication.
You can use the API path to view metadata about the API. This is discussed in detail in the following section.
Release numbers
Every release of Cloud API has a three-digit version number. The first digit is the version's major release number. The
second digit is the version's minor release number. For example, suppose the latest release of Cloud API has a version
number of 1.5.0. This release is major release 1 and minor release 5.
The release number can be seen in the API definition. For example, in Swagger UI, when you view an API, the version
number appears in a gray bubble next to the API name. (Note that individual APIs do not have distinct version
numbers. The version numbers that appear in the API definition are for the entire Cloud API release.)
For every API, the major release number is also part of the endpoint path. It is the number that appears after the "/v".
For example, the first major release of the Admin API has a path of /admin/v1. If there was a theoretical ninth major
release of the Admin API, its path would be /admin/v9.
Release Month Version # Compared to the previous release, this Major versions in this release
release...
January 1.0.0 ...is identical or additive /admin/v1
April 1.1.0 ...is identical or additive /admin/v1
July 1.2.0 ...is identical or additive /admin/v1
October 1.3.0 and 2.0.0 ...includes changes to existing functionality /admin/v1 (identical or additive to July's release),
and /admin/v2 (containing the changed
functionality)
Swagger UI
Swagger UI is an open source tool that presents API definitions as interactive web pages. For information on Swagger
UI, refer to the Swagger web site: https://swagger.io/tools/swagger-ui/
Swagger UI is automatically bundled with BillingCenter.
Swagger UI can be helpful when viewing schema information. Swagger UI presents this information hierarchically.
Child schemas are indented with respect to parent schemas, and individual nodes of the hierarchy can be expanded and
collapsed. Searching through a complex schema is relatively straightforward in Swagger UI.
However, Swagger UI strips out some of the metadata that is present in the source files. For example, Guidewire-
proprietary tags are not rendered in Swagger UI. When you need access to all the metadata for an API, it may be better
to call the /openapi.json endpoint directly.
Swagger UI also requires access to a running instance of BillingCenter. If you do not have access to a running instance,
you may want to use the Guidewire API References site.
Note: Swagger UI also has the capability to send requests to a working endpoint and observe responses.
However, Guidewire recommends using Swagger UI only to view API definitions. The APIs in Cloud API are
significantly robust. When sending requests using Swagger UI, the performance time for getting responses can
be unacceptably long. Also, if you attempt to send calls from Swagger UI and log into the BillingCenter user
interface on the same machine, the two systems may attempt to share the same session, and either or both may
stop working. For more information on recommended request tools, see “Requests and responses” on page
26.
Results
The following screenshot shows the top of the Swagger UI display of the Common API.
Information in Swagger UI
The Cloud API version number at the top in a gray bubble after the API name. (Note that individual APIs do not have
distinct version numbers. The version numbers that appear in Swagger UI are for the entire Cloud API release.)
Every endpoint in the API appears in a list. For each API, the following information is shown by default:
• The endpoint's operation (such as GET)
• The endpoint's path (such as /activities)
• An endpoint summary (such as "Returns a list of activities assigned to the current user")
If you click the operation button, additional information about the endpoint appears. This includes:
• A more detailed endpoint description
• A list of query parameters supported by the endpoint
• A hierarchical list of resources and schemas used by the endpoint (This appears in the Responses section on the
Model tab.)
Postman
You can call the API definition endpoints using a request tool. Request tools are not automatically bundled with
InsuranceSuite applications. You must download and install them on your own.
Postman is a request tool that Guidewire recommends. This tool has the ability to:
• Save API calls, including headers and payloads
• Save collections of calls
• Automatically create a collection of calls for a schema's paths by importing the Swagger schema file
• Share collections with other developers on your team
For more information and to download the tool, see https://www.postman.com/.
Procedure
1. Identify the path for the API. (For a list of paths for each API, see “List of APIs in Cloud API” on page 15.)
2. Start BillingCenter.
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 BillingCenter, enter the following:
• http://localhost:8580/bc/rest/common/v1/openapi.json (OR http://localhost:8580/bc/rest/common/v1/
swagger.json)
7. Click the Send button to the right of the request field.
Results
The API information appears in the results pane. For example, the following is the first part of the results when calling
the previously referenced openapi.json endpoint:
{
"components": {
"parameters": {
"activityId": {
"description": "The REST identifier for the activity, as returned via previous requests that return a
list of activities\n",
"in": "path",
"name": "activityId",
"required": true,
"schema": {
"type": "string"
}
},
...
For example, the following HTTP request retrieves the metadata for the Admin API. It also enables filterByUser and
prettyPrint.
http://localhost:8580/bc/rest/admin/v1/openapi.json?filterByUser=true&prettyPrint=true
• An endpoint summary (such as "Returns a list of activities assigned to the current user")
The right pane shows Response samples. You can expand the data.attributes note to see the fields on the parent resource.
If there is an included node, you can expand it to see the child resources for the endpoint.
1. The caller application constructs a request object. The request object consists of:
• A header, which can contain authentication information and other metadata.
• A payload, when necessary.
2. The caller application sends the request to Cloud API using an HTTP command.
• The command calls a specific endpoint.
• The command may include query parameters that further identify the data that is desired.
• The request object is sent with the command.
3. Cloud API processes the request.
• This activity uses all of the InsuranceSuite application logic, such as validation logic and pre-update rules.
• The request is restricted by authorization controls within Cloud API.
4. Cloud API responds with an HTTP response code (such as 200 for success) and a response object. The response
object consists of:
• A header
• A payload, when necessary.
Resources
The primary mechanism for passing information between the caller application and BillingCenter 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 BillingCenter: AccountContact, Contact, and
AccountContactRole.
Resources contain a set of fields. Each field stores information about the resource. Depending on the context, fields are
also referred to as properties or attributes.
Resources are exchanged in the payloads of the request and response objects. The payload is a block of JSON-
formatted text that contains fields from the relevant resources and their values. The following is a portion of the
response payload for an Activity resource.
"attributes": {
"assignedGroup": {
"displayName": "Auto1 - TeamA",
"id": "demo_sample:31"
},
"assignedUser": {
"displayName": "Andy Applegate",
"id": "demo_sample:1"
},
"dueDate": "2020-11-16T08:00:00.000Z",
"id": "xc:20",
"priority": {
"code": "urgent",
"name": "Urgent"
"subject": "Contact claimant"
}
A single resource is called an element. For example, /contact/xc:203 is an element. (In some REST API literature,
this is also referred to as a singleton.)
A set of resources is called a collection. For example, /contact/xc:203/addresses (the addresses associated with
contact xc:203) is a collection.
Endpoints
Every API consists of a set of endpoints. An endpoint is a command that a caller application can use to request data
from or trigger action in BillingCenter. For example, the /common/v1/activities endpoint can be used to either
request data about BillingCenter activities or trigger actions related to BillingCenter activities. When referenced in
documentation, endpoints start with a slash (/), such as the /activities endpoint. Endpoints are defined in Swagger
schema files.
In Cloud API, the endpoint path (the full name of the endpoint) includes the API and the version. For convenience
sake, the documentation often refers to endpoints using only the last part of the endpoint path. For example, the /rest/
common/v1/activities endpoint is often referred to simply as "the /activities endpoint".
Endpoints in Cloud API have four fundamental components: root resources, child resources, methods, and paths.
Root resources
Every endpoint has a root resource. The root resource is the resource which the endpoint creates, updates, deletes, or
queries for. Every call to an endpoint makes use of the root resource.
For example, the root resource for the /common/v1/activities endpoint is Activity. This endpoint is used to
potentially create, update, delete, or queries for activities.
Child resources
Most endpoints also include child resources. A child resource is a resource related to the root resource. Child resources
improve the usability of an endpoint by providing access to information related to the root resource. For example, the /
common/v1/activities endpoint has one child resource - Notes. This means you could use the endpoint to:
Methods
A method is a type of action a caller application can take on a resource through an endpoint. Methods are also referred
to as verbs or operations. Cloud API supports the following subset of HTTP methods:
• GET - Used to request resources.
• POST - Used to create resources. Also used to execute business actions, such as quoting a submission or
submitting a claim.
Paths
Every endpoint has a path. The path is the portion of the URL used by caller applications to identify the specific
endpoint.
rest/<APIname>/<APImajorVersion>/<endpointName>
For most endpoints, the endpoint name is the same as the resource name, with the following conventions and caveats:
• If the endpoint's root resource is an element, the endpoint name ends in a singular noun (such as /activity) or a
resource reference (such as /activity/{activityId}).
• If the endpoint's root resource is a collection, the endpoint name ends in a plural noun (such as /activities).
• If the endpoint executes a business action, the endpoint name ends in a verb (such as /{activityId}/assign).
• The endpoint name is often close to, but not identical to, the resource name.
◦ Endpoint names use lower case, whereas resource names use mixed case (for example, the root resource for
the /activity endpoint is Activity)
◦ Endpoint names use hyphens to separate words, whereas resource names do not (for example, the root resource
for the /accounts/{accountId}/activity-patterns endpoint is ActivityPattern)
◦ In some cases, the endpoint name may differ from the root resource name (for example, the root resource for
the /accounts/{accountId}/contacts endpoint is AccountContact)
https://iap:8880/xc/rest/common/v1/activities/xc:207?fields=assignedGroup
\__________________/\______________________________/\___________________/
application URL endpoint path query parameters
Some requests require a payload. The payload is a block of JSON-formatted text that contains information about one or
more resources associated with the operation. Typically:
• GETs and DELETEs do not require request payloads.
◦ For a GET, you only need to identify the resource you want information about, and this is done in the URL.
◦ For a DELETE, you only need to identify the element to delete, and this is done in the URL.
• POSTs and PATCHes do require request payloads.
◦ For a POST, you must specify data about the element to create.
◦ For a PATCH, you must specify the data about the element that must be updated.
Responses
A response is the set of information returned by an API endpoint for a request to the caller application.
Some responses include a payload. The payload contains information about one or more resources that are returned by
the operation. For example, for a request to get all open activities assigned to a given user, the response includes a
payload with information about the open activities. For more information about the payload structure, see “GETs” on
page 31.
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:
• A default instance of BillingCenter installed on your machine that contains only the sample data set.
• An instance of Postman.
This tutorial walks you through the process of setting up this environment.
If your instance of BillingCenter is installed on a different machine, you will need to adjust the endpoint URLs
provided in the tutorials. Also, if you create data in addition to the sample data, then your responses may differ from
the ones described in the tutorials.
Tutorial steps
1. Install Postman. (For more information, refer to https://www.postman.com/.)
2. Start BillingCenter and load the sample data set.
You can test your environment by sending your first Postman request.
1. Open Postman.
2. Start a new request by clicking the + to the right of the Launchpad tab.
3. Every request in Postman requires some form of authorization:
a. Click the Authorization tab.
b. For the Type drop-down list, select Basic Auth.
c. In the Username field, enter su.
d. In the Password field, enter gw.
4. Under the Untitled Request label, make sure that GET is selected. (This is the default operation.)
5. In the Enter request URL field, enter the following URL: http://localhost:8580/bc/rest/billing/v1/
accounts
6. Click the Send button to the right of the request field.
{
"count": 1,
"data": [
{
"attributes": {
"accountNumber": "Standard Account",
"billDateOrDueDateBilling": {
"code": "BillDateBilling",
"name": "Bill Date"
},
"billingLevel": {
"code": "Account",
"name": "Account/Default Unapplied"
},
"billingPlan": {
"displayName": "Standard Mail",
"id": "bc:SEvJpIXBd_LAUq5VG-62h"
},
...
Troubleshooting: No response
Requests can be sent only to running applications. All of the tutorials in this documentation require that BillingCenter
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 su 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 /billing/v1/accounts"
GETs
This topic discusses how the GET method queries for data and the structure of the response payload. For information
on how you can add query parameters to a GET URL to refine the response, see “Query parameters” on page 43.
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 34
Overview of GETs
A GET is an HTTP method that is used to retrieve data from an InsuranceSuite application.
There are two types of GETs:
• A collection GET is a GET that returns a collection of one or more resources. Collection GETs have paths that end
in a plural noun, such as GET /activities/xc:1227/notes.
• An element GET is a GET that returns a single, specific resource. Element GETs have paths that end in the ID of
the specific resource. For example, GET /activities/xc:1227.
When a GET is successful, the response includes:
• An HTTP response indicating success.
• A response payload that contains the data that was queried for.
When you configure a caller application to send a GET, the construction of the API call is fairly straightforward. The
call may require query parameters, but GETs do not require a request payload. The majority of the work lies in parsing
the response payload. The remainder of this topic discusses how response payloads are structured and how developers
can learn about response payload formats.
• checksum
• id
• links (for a single element)
• method
• refid
• related
• type
• uri
The format of a payload for a single element has the following structure:
{
"data": {
"checksum": ...,
"id": ...,
"links": ...,
"method": ...,
"refid": ...,
"related": ...,
"type": ...,
"uri": ...
}
}
}
DataListEnvelope standardizes the format of information for collections. It specifies the following properties, which
are siblings to the data section:
• count
• links (for a collection)
• total
The format of a payload for a collection has the following structure:
{
"count" ...,
"data": [
{ properties_for_element_1 },
{ properties_for_element_2 },
...
],
"links": ...,
"total": ...
}
Every property does not appear in every payload. There are different reasons why a property may not appear in a given
payload. For example:
• Some properties, such as refid, apply only to requests and do not appear in response payloads.
• Some properties, such as count, apply only to responses and do not appear in request payloads.
• Some properties, such as related, do not appear by default and appear only when the request includes certain
query parameters.
32 GETs
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Request and response schemas are hierarchical. For example, for responses, the GET /activity/{activityId}
endpoint uses the ActivityResponse schema. This schema has two child schemas: ActivityData and
ActivityResponseInclusions.
Request and response schemas extend DataEnvelope or DataListEnvelope. This ensures that information relevant to
all endpoints appears in payloads in a standard way.
Request and response schemas also define an attributes property for the payload. This property is associated with a
schema that includes resource-specific information for the payload. For example, the GET /activity/{activityId}
endpoint specifies an attributes property in the ActivityData child schema. This property is associated with the
Activity schema, which contains activity-specific fields, such as activityPattern and activityType. As a result,
response payloads for the GET /activity/{activityId} endpoint have this structure:
{
"data": {
"checksum": ...,
"attributes" : {
"activityPattern": ... ,
"activityType": ...,
...},
"id": ...,
"links": ...,
"method": ...,
"refid": ...,
"related": ...,
"type": ...,
"uri": ...
}
}
}
Viewing schemas
You can use API definition tools, such as Swagger UI, to review information about the schemas for a given endpoint
and how they structure the data.
Sending GETs
You can use a request tool, such as Postman, to ensure GETs are well-formed and to review the structure of the
response payloads. For more information, see “Requests and responses” on page 26.
GETs 33
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
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 URL for the server and the endpoint.
• For example, to do a GET /activities on an instance of BillingCenter on your machine, enter: http://
localhost:8580/bc/rest/billing/v1/accounts
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.
a. On the Authorization tab, select Basic Auth using user su and password gw.
2. Enter the following call and click Send: GET http://localhost:8580/bc/rest/billing/v1/accounts
{
"count": 2,
"data": [
{
"attributes": {
"accountName": "Standard Account",
"accountNumber": "Standard Account",
"accountType": {
"code": "insured",
"name": "Insured"
},
"billDateOrDueDateBilling": {
"code": "BillDateBilling",
"name": "Bill Date"
...
34 GETs
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
(Note: JSON does not support comments. However, to clarify the code, pseudo-comments have been added. Each
pseudo-comment is preceded by a hashtag (#).)
{
"count": N, # Number of resources in collection*
"data": [ # List of resources
{ # Resource 1 begins here
"attributes": { # Resource 1 name/value pairs
"propertyName": "propertyValue",
... },
"checksum": "val", # Resource 1 checksum value
"links": { ... } # Resource 1 links
}, # Resource 1 ends here
{ # Resource 2 begins here
"attributes": { # Resource 2 name/value pairs
"propertyName": "propertyValue",
... },
"checksum": "val", # Resource 2 checksum value
"links": { ... } # Resource 2 links
}, # Resource 2 ends here
... ], # Resources 3 to N
"links": { ... } # Collection-level links*
}
# *-used only for collection responses
"attributes": {
"activityPattern": "check_coverage",
"activityType": {
"code": "general",
"name": "General"
},
...
},
Each resource has a default set of fields that are returned. This is typically a subset of all the fields that could be
returned. You can override the default set of fields returned using the fields query parameter. For more information,
see “The fields query parameter” on page 44.
Simple values
When a field is a scalar, its value is listed after the colon. For example:
GETs 35
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
ID properties
Every resource has an id field. This has the same value as the Public ID of the object in BillingCenter. 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
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
“The fields query parameter” on page 44.
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"
},
36 GETs
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Monetary amount values are complex values with a currency field and an amount field. For example:
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",
GETs 37
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"post"
]
},
"self": {
"href": "/common/v1/activities/xc:20",
"methods": [
"get"
]
}
}
The self link is a link to the resource itself. The self link is useful when a caller application receives a list of
resources and wants to navigate to a specific resource in the list.
For a given object, links that execute business actions appear only if the action makes sense given the state of the
object, and only if the caller has sufficient permission to execute the action. For example, the link to close an activity
will not appear if the activity is already closed. Similarly, the link to assign an activity will not appear if the caller lacks
permission to assign activities.
<endpointPath>?include=<resourceName>
where:
• <endpointPath> is the default path, such as /common/v1/activities
• <resourceName> is the name of the related resource, such as notes
For example GET /activities?include=notes returns all activities assigned to the current user, and all notes
associated with those activities.
You can include multiple resource types in a single query. To do this, identify the resources in a comma-delimited list.
For example, GET /accounts?include=policies,invoices returns all accounts, and all policies and invoices
associated with those accounts.
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.
38 GETs
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Resource How many related resources Where do their fields When do they appear?
type for each primary resource? appear?
Inlined Typically one. (For example, Entirely in the attributes If the query does not use the fields query
resource every activity has only one section of the root resource parameter, then each inlined resource appears only if
related assignedUser.) it is one of the default attributes.
If the query does use the fields query parameter,
then each inlined resource does or does not appear
based on whether it is specified in that query
parameter.
Included One to many. (For example, ids appear in the related When the query parameter includes the ?
resource every activity can have section of the root resource. include=resourceName query parameter
several related notes.) The remaining attributes
appear in the included
section at the bottom of the
payload.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user su and password gw.
2. Enter this URL in Postman and click Send:
GET http://localhost:8580/bc/rest/billing/v1/accounts
3. Locate the id of the first account in the response. This value is referenced in the next steps as <accountID>.
4. GET the account found in the previous step and any contacts on that account. Enter the following URL in
Postman and click Send:
GET http://localhost:8580/bc/rest/billing/v1/accounts/<accountID>?include=contact
Note the following in the response payload:
• The data section starts at line 2. It includes information about the account.
• The included section includes an array of contacts for this account. The start of the included section
depends on the amount of data for the account. For example, for the preloaded sample account "Standard
Account," the included section starts at line 191.
{
"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
GETs 39
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
... },
"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"
}
]
}
}
},
40 GETs
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
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.
GETs 41
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
shows many child elements, such as AccountContact. However, if you add ?include=AccountContact to your GET
query you’ll receive an error with a message similar to the following:
"userMessage": "Bad value for the 'include' query parameter - The requested inclusions
'[AccountContact]' are not valid for this resource. The valid options are [accountHolder,
activities, activity-assignees, activity-patterns, contacts, documents, jobs, locations, notes,
policies, primaryLocation]."
In cases such as this, the error message will specify which elements are allowed in the include.
Other than creating an error and viewing the results, there are a couple of general rules that can help determine which
elements are allowed in an include for a given endpoint: child endpoints and response payload references. (Note that
these are general guidelines, and don’t necessarily apply in all cases.)
Child endpoints
Suppose you have the following set of endpoints:
• /api/v1/endpoint
• /api/v1/endpoint/child1
• /api/v1/endpoint/child1/child2
In most cases, you can include child2 on any calls to endpoint or endpoint/child1:
GET /api/v1/endpoint?include=child2
GET /api/v1/endpoint/child1?include=child2
{
"data": {
"attributes": {
"foreignKeyEntity" {
"id": "100"
}
}
}
}
In many cases such as this you can do an include that specifies the returned attribute (or attributes, if there are more
than one):
GET /api/v1/endpoint?include=foreignKeyEntity
42 GETs
chapter 3
Query parameters
This topic discusses how to use query parameters to refine a request to customize the response payload. This is most
often done with GETs. But, query parameters can also be used with POSTs and PATCHes to refine the responses to
those methods.
If you want to interact directly with the concepts in this topic, go to the following tutorials:
• “Tutorial: Send a GET with the fields parameter” on page 47
• “Tutorial: Send a GET with the filter parameters” on page 49
• “Tutorial: Send a GET with the sort query parameter” on page 51
• “Tutorial: Send a GET with the pageSize and totalCount parameters” on page 54
• “Tutorial: Send a GET with query parameters for included resources” on page 57
<URL>?<queryParameterExpressionList>
For example:
• GET /common/v1/activities?fields=*all
Query parameters 43
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
• GET /common/v1/activities?filter=escalated:eq:false
Included resources
With GETs, you can use the include query parameter to include resources related to the primary resources of the
response. You can also use query parameters to specify a custom set of properties for included resources, filter out
included resources that do not meet a given criteria, sort the included resources, and so on. For more information, see
“Query parameters for included resources” on page 55.
"message": "The sort column 'escalationDate' is not a valid option. The valid
sort options are [assignedUser, dueDate, escalated, priority, status, subject],
optionally prefixed with '-' to indicate a descending sort."
Parameter definitions
The Parameters section describes each query parameter.
Supported parameters
The Responses section include a Model tab. This tab provides information about the fields that support particular query
parameters. For example, you can sort results on some fields, but not all of them. The fields that support sorting appear
in the model with the text "sortable": true.
44 Query parameters
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
• *default - Return the default fields (typically used in conjunction with an additional field list)
• fieldList - Return one or more fields specified as a comma-delimited list
fields=*default,fieldList
fields=fieldList
"attributes": {
"activityPattern": "contact_claimant",
"assignedGroup": {
"displayName": "Auto1 - TeamA",
"id": "demo_sample:31"
},
"assignedUser": {
"displayName": "Andy Applegate",
Query parameters 45
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"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.
*all is not recommended for production environments as it may return fields that are not included in default responses
because they require additional resources to calculate. Instead, use the *default filter with any specific fields that do
not appear in the default detail or summary list.
The fields query parameter with POSTs and PATCHes
You can also use the fields query parameter with POSTs and PATCHes to control which fields are returned in the
response. For example, the following request creates a new user. The response will contain the default fields for a User
resource (such as active, id, username, and vacationStatus).
POST /admin/v1/users
46 Query parameters
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
The following request also creates a new user. But, the response will contain only the id.
POST /admin/v1/users?fields=id
The fields query parameter is the only parameter you can use with POSTs and PATCHes.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user su and password gw.
2. Enter the following and click Send:
GET http://localhost:8580/bc/rest/admin/v1/payment-plans
3. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
4. Enter the following and click Send:
GET http://localhost:8580/bc/rest/admin/v1/payment-plans?fields=id,name
filter=field:op:value
where:
• field is the name of a filterable field
• op is one of the comparison operators from the following table
• value is the value to compare
op value Meaning Example using the GET /activities endpoint Returns activities where...
eq Equal to ?filter=escalated:eq:true ...the escalated field equals true
ne Not equal to ?filter=escalated:ne:true ...the escalated field equals false
lt Less than ?filter=dueDate:lt: ...the due date is less than (before) May 11,
2020-05-11T07::00::00.000Z 2020.
gt Greater than ?filter=dueDate:gt: ...the due date is greater than (after) May
2020-05-11T07::00::00.000Z 11, 2020.
le Less than or equal ?filter=dueDate:le: ...the due date is less than or equal to (on
2020-05-11T07::00::00.000Z or before) May 11, 2020.
Query parameters 47
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
op value Meaning Example using the GET /activities endpoint Returns activities where...
ge Greater than or equal ?filter=dueDate:ge: ...the due date is greater than or equal to
2020-05-11T07::00::00.000Z (on or after) May 11, 2020.
in In ?filter=priority:in:urgent,high ...the priority is either urgent or high
ni Not in ?filter=priority:ni:urgent,high ...the priority is neither urgent nor high
sw Starts with ?filter=subject:sw:Contact ...the subject starts with the string "Contact
%20claimant claimant"
cn Contains ?filter=subject:cn:Contact ...the subject contains the string "Contact
%20claimant claimant"
The query parameter is passed as part of a URL. Therefore, special conventions must be used for certain types of
characters to ensure the URL can be parsed correctly.
• Specify strings without surrounding quotes.
• If a string has a space in it, use the URL encoding for a space (%20). (For example, "subject starts with 'Contact
claimant'" is specified as filter=subject:sw:Contact%20claimant)
• If a string has a colon (:) in it, use two colons (::) in the URL. The first colon acts as an escape character. (For
example, "subject starts with 'Urgent: Information needed'" is specified as ?filter=subject:sw:Urgent::
%20Information%20needed)
• Specify Booleans as either true or false. (For example, "escalated is true" is specified as ?
filter=escalated:eq:true)
• Date and datetime fields must be specified as an ISO-8601 datetime value. All datetime fields can accept either date
values or datetime values. For datetime values, the colons in the value must be expressed as "::". For example, "due
date is less than 2020-04-03T15:00:00.000Z" is specified as ?filter=dueDate:lt:
2020-05-11T07::00::00.000Z.
• Specify null values as null. For example, "all activities whose escalation date is null" is specified as ?
filter=escalationDate:eq:null.
References to typekey fields automatically resolve to the field's code. For example, to filter on activities whose priority
is set to urgent, use: GET /activities?filter=priority:eq:urgent.
You can also use the filter query for related resources added through the include parameter. For more information, see
“Query parameters for included resources” on page 55.
"message": "The field 'dogsaregreat' is not a filterable field for this endpoint.
The set of filterable fields is [accountNumber, accountStatus, createdDate]."
Another option that allows you to identify some of the attributes that are filterable is by reviewing the schema
definition. If a field is filterable, then the schema definition includes the text: "filterable": true.
For example, the following is the schema description from Swagger UI for two fields returned by the Common API /
activities endpoint.
escalated boolean
readOnly: true
x-gw-extensions: OrderedMap { "filterable": true, "sortable": true }
escalationDate string($date-time)
x-gw-nullable: true
Note that the escalated field includes the "filterable": true expression, but the escalationDate field does not.
This means that you can filter on escalated, but not escalationDate.
48 Query parameters
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
The limitation to the preceding option is that it won't display custom filters. You might have to look at the Gosu
resource files to determine whether a customization has been added to make a field filterable. See Cloud API
Developer Guide for information on custom filters and where to find them.
filter=field:op:value&filter=field:op:value
When multiple criteria are specified, the criteria are ANDed together. Resources must meet all criteria to be included in
the response. For example, the following GET returns only high priority activities that have not been escalated.
GET /activities?filter=priority:eq:high&filter=escalated:eq:false
The filter query parameter cannot be used to construct OR criteria.
When querying for a specific root resource, do not filter on the id property
When writing a call to GET a single root resource, use an endpoint that returns a single element, such as:
GET /activities/xc:20
Do not attempt to retrieve the resource by using an endpoint that returns a collection and filtering on the id property, as
in:
GET /activities?filter=id:eq:xc::20
Typically, the latter approach does not work because collection endpoints do not have filterable id properties.
This restriction applies to the root resource only. There may be situations where you need to retrieve a root resource
and one or more child resources. When retrieving the child resources, it may be possible and appropriate to filter on the
child resource's id.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user su and password gw.
2. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
3. Specify Basic Auth authorization using user aapplegate and password gw.
4. Enter the following and click Send:
GET http://localhost:8580/bc/rest/admin/v1/payment-plans
5. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
6. Enter the following and click Send:
GET http://localhost:8580/bc/rest/admin/v1/payment-plans?filter=periodicity:eq:monthly
Query parameters 49
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
sort=propertiesList
where propertiesList is a comma-delimited list of properties that support sorting for that endpoint.
For example, the following query returns all activities and sorts them by due date:
GET /activities?sort=dueDate
You can specify multiple sort properties. Resources are sorted based on the first property. Any resources with the same
value for the first property are then sorted by the second property, and so on. For example, the following query returns
all activities assigned to the current caller and sorts them first by escalation status and then by due date:
GET /activities?sort=escalated,dueDate
You can also use the sort query for related resources added through the include parameter. For more information, see
“Query parameters for included resources” on page 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.
resources:
...
50 Query parameters
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Activities:
resource: gw.rest.core.bc.common.v1.activity.ActivitiesCoreResource
defaultSort:
- priority
- subject
In the defaultSort section, every field is preceded by a hyphen and a space (- ). This first hyphen does not indicate
descending order. If a field has a default descending order, then the field name is preceded by a second hyphen and
surrounded by quotation marks. For example, a default sort on priority in descending order would appear as - "-
priority".
As discussed in the previous section, you can use the sort query parameter to override the default sort for a collection.
You can also remove the default sort order by specifying ?sort=*none. When you do this, results are sorted based on
their id value. This may improve performance when you are retrieving a large amount of information from an endpoint
with a default sort order and the column that the sort is based on is not indexed.
For example:
• GET /common/v1/activities returns activities using the default sort (priority and then subject).
• GET /common/v1/activities?sort=priority returns activities sorted by priority only.
• GET /common/v1/activities?sort=*none returns activities sorted only by id.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user su and password gw.
2. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
3. Specify Basic Auth authorization using user aapplegate and password gw.
4. Enter the following and click Send:
GET http://localhost:8580/bc/rest/admin/v1/payment-plans?fields=id,name
5. Open a second request tab by right-clicking the first tab and selecting Duplicate Tab.
6. Enter the following and click Send:
GET http://localhost:8580/bc/rest/admin/v1/payment-plans?fields=id,name&sort=-name
Query parameters 51
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
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. This includes:
• pageSize - limits the number of resources returned per page
• pageOffset - specifies which page of resources to return
• includeTotal - ensures the response includes a count of the entire number of resources that meet the request's
criteria
pageSize=n
{
"attributes": {
...
"id": "cc:32",
... },
...
"links": {
...
"self": {
"href": "/common/v1/activities/cc:32",
52 Query parameters
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"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.
"links": {
"first": {
"href": "/common/v1/activities?pageSize=5&fields=id",
"methods": [
"get"
]
},
"next": {
"href": "/common/v1/activities?pageSize=5&fields=id&pageOffset=10",
"methods": [
"get"
]
},
"prev": {
"href": "/common/v1/activities?pageSize=5&fields=id",
"methods": [
"get"
]
},
"self": {
"href": "/common/v1/activities?pageSize=5&fields=id&pageOffset=5",
"methods": [
"get"
]
}
}
To access a collection that starts with a specific resource, Cloud API uses a pageOffset parameter. This parameter is
used in the prev and next links for a collection. The pageOffset index starts with 0, so a theoretical pageOffset=0
would start with the first element and pageOffset=5 skips the first 5 elements and starts with the sixth.
Note: There can be some complexity involved in determining how to construct a link with the correct
pageOffset value. Therefore, Guidewire recommends that you use the prev and next provided in response
payloads and avoid constructing pageOffset queries of your own.
Note: pageOffset is supported for root resources only. When executing a query that uses request inclusion,
you cannot use pageOffset to page through included resources.
Query parameters 53
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
includeTotal=true
When you submit this query parameter, the payload includes an additional total value that specifies the total. For
example:
"total": 72
When the includeTotal query parameter is used, the response payload contains two counting values:
• count - The number of resources returned in this page.
• total - The total number of resources that meet the query's criteria.
If the total number of resources that meet the criteria is less than or equal to the pageSize, then count and total are
the same. If the total number of resources that meet the criteria is greater than the pageSize, then count is less than
total. count can never be greater than total.
For performance reasons, Guidewire will count the total number of items up to 1000 only. When the total value is
stated as 1000, the actual count could be 1000 or some number greater than 1000.
Note: If the number of resources to total is sufficiently large, using the includeTotal parameter can affect
performance. Guidewire recommends you use this parameter only when there is a need for it, and only when
the number of resources to total is unlikely to affect performance.
In some situations, you may be interested in retrieving only the total number of resources that meet a given criteria,
without needing any information from any specific resource. However, a GET cannot return only an included total. If
there are resources that meet the criteria, it must return the first N set of resources and at least one field for each
resource. For calls that are sent to retrieve only the total number of resources, Guidewire recommends using a call with
query parameters that return the smallest amount of resource information, such as GET ...?
includeTotal=true&fields=id&pageSize=1.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user su and password gw.
2. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
3. Specify Basic Auth authorization using user aapplegate and password gw.
4. Enter the following and click Send:
GET http://localhost:8580/bc/rest/admin/v1/payment-plans
5. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
6. Enter the following and click Send:
GET http://localhost:8580/bc/rest/admin/v1/payment-plans?pageSize=10&includeTotal=true
54 Query parameters
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
?include=<resourceName>
For example, GET /activities?include=notes returns all activities assigned to the current caller, and all notes
associated with those activities.
For more information on the default behavior of include, see “Payload structure for a response with included
resources” on page 38.
Most query parameters that can be used on primary resources can also be used on included resources.
<queryParameter>=<includedResource>:<queryValue>
For example, the following GET retrieves activities and their notes. It also specifies that the number of notes to return
is limited to 5.
GET /activities?include=notes
&pageSize=notes:5
The following GET retrieves activities and their notes. It also specifies that the only fields to return for the notes are id
and subject.
GET /activities?include=notes
&fields=notes:id,subject
• Returns: Account bc:10 and its included notes. For the notes, return only bodySummary and subject.
Query parameters 55
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
• Syntax: filter=resource:field:op:value
• Example:
/billing/v1/accounts/bc:10?include=invoices
&filter=invoices:allInvoiceItemsExactlyPaid:eq:false
• Returns: Account bc:10 and all invoices that do not have all invoice items exactly paid.
• Returns: Account bc:10 and its included invoices, sorted by their payment due date
• Returns: Account bc:10, its policies, and the total number of included policies for bc:10.
GET /activities?include=notes
&fields=id,description,dueDate
&fields=notes:id,subject
56 Query parameters
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
You can also use different query parameters for each resource. For example, the following query retrieves activities and
their notes. For activities, only the id, description, and dueDate fields are returned. For notes, the number of notes
per activity is limited to 5.
GET /activities?include=notes
&fields=id,description,dueDate
&pageSize=notes:5
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. Enter the following and click Send:
GET http://localhost:8180/bc/rest/billing/v1/accounts?include=contacts
3. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
4. Enter the following and click Send:
GET ttp://localhost:8180/bc/rest/billing/v1/accounts?
include=contacts&fields=id,accountNumber&filter=contacts:primaryPayer:eq:true
POST /admin/v1/users
Query parameters 57
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
The following request also creates a new user. But, the response will contain only the id.
POST /admin/v1/users?fields=id
The fields query parameter is the only parameter you can use with POSTs and PATCHes.
58 Query parameters
chapter 4
POSTs
This topic discusses the POST method and how to construct a request payload for creating a single resource. For
information on how to create request payloads that specify multiple resources, see “Reducing the number of calls” on
page 87.
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 REST API method that creates a resource in BillingCenter. The POST method is also used to execute
specific business processes, such as assigning an activity.
A POST consists of the POST method and the endpoint, such as POST /activities/{activityId}/notes, and a
request payload. The request payload contains data about the resource to create.
The response to a POST includes an HTTP code indicating success or failure. It also includes a response payload. The
contents of the response payload is determined by the endpoint's schema.
• For an endpoint used to create data, the response payload may contain data from the request payload. It may also
contain data generated by BillingCenter, such as ids and timestamps.
• For an endpoint used to execute a business action, the response payload is a resource related to the business action.
It could be the resource on which the action was executed. For example, when assigning an activity, the response
payload contains the assigned activity. It could also be a resource generated by the business action. For example,
when canceling a policy the response payload contains a JobResponse.
When a developer is configuring a caller application to POST information using Cloud API, they will need to
determine the correct structure for the request payload. They may also need to parse information out of the response
payload. The remainder of this topic discusses how request payloads for resources are structured and how developers
can learn about request payload formats.
POSTs are also used to execute business actions. For these types of POSTs, request payloads may be unnecessary,
optional, or required. For example:
• A POST that marks an activity as complete does not require a request payload.
◦ You can optionally provide a request payload to add a note to the completed activity.
• A POST that assigns an activity requires a request payload. The payload specifies how to assign the activity.
POSTs 59
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
{
"data": {
"checksum": ...,
"id": ...,
"links": ...,
"method": ...,
"refid": ...,
"related": ...,
"type": ...,
"uri": ...
}
}
}
DataListEnvelope is used to standardize the format of information for collections. It specifies the following
properties, which are siblings to the data section: count, links (for a collection), and total. At a high level, the
format of a payload for a single element looks like:
{
"count" ...,
"data": [
{ properties_for_element_1 },
{ properties_for_element_2 },
...
],
"links": ...,
"total": ...
}
Every property does not appear in every payload. There are different reasons why a property may not appear in a given
payload. For example:
• Some properties, such as refid, apply only to requests and do not appear in response payloads.
• Some properties, such as count, apply only to responses and do not appear in request payloads.
• Some properties, such as related, do not appear by default and appear only when the request includes certain
query parameters.
60 POSTs
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Request and response schemas extend DataEnvelope or DataListEnvelope. This ensures that information relevant to
all endpoints appears in payloads in a standard way.
Request and response schemas also define an attributes property for the payload. This property is associated with a
schema that includes resource-specific information for the payload. For example, the GET /activity/{activityId}
endpoint specifies an attributes property in the ActivityData child schema. This property is associated with the
Activity schema, which contains activity-specific fields, such as activityPattern and activityType. As a result,
response payloads for the GET /activity/{activityId} endpoint have this structure:
{
"data": {
"checksum": ...,
"attributes" : {
"activityPattern": ... ,
"activityType": ...,
...},
"id": ...,
"links": ...,
"method": ...,
"refid": ...,
"related": ...,
"type": ...,
"uri": ...
}
}
}
{
"data": {
"attributes": {
<field/value pairs are specified here>
}
}
}
POSTs 61
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
{
"data": {
"attributes": {
"subject": "Main contact vacation",
"body": "Rodney is on vacation in June. Direct urgent questions to Sarah Jackson.",
"confidential": false,
"topic": {
"code": "general"
}
}
}
}
In some situations, you can create an object using an "empty body" (a body that specifies no values). An object created
in this way will contain only default values. In these situations, the payload has an empty attributes section:
{
"data": {
"attributes": {
}
}
}
62 POSTs
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
For scalars, the formats for values are the same for request payloads and response payloads. For a given field, you can
use its format in a response payload as a model for how to build a request payload.
ids
ID values are assigned by BillingCenter. Therefore, you cannot specify an id for an object that is being created.
However, you can specify ids when identifying an existing object that the new object is related to.
Typekeys
Typekeys use the following format:
"field": {
"code": "value"
}
For example:
"priority": {
"code": "urgent"
}
Typekeys also have a name field, which is included in responses. But, the name field is not required. If you include it in
a request schema, it is ignored.
Monetary amounts
Monetary amounts use the following format:
"field": {
"amount": "amountValue",
"currency": "currencyCode"
}
For example:
"transactionAmount": {
"amount": "500.00",
POSTs 63
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"currency": "usd"
}
Spatial points
Spatial points use the following format:
"field": {
"longitude": "coordinateValue",
"latitude": "coordinateValue"
}
For example:
"coordinates": {
"longitude": "-122.26842",
"latitude": "37.55496"
}
To set the value of an object to null, specify the null at the object field level. For example, a user can optionally have a
home phone number. The following explicitly states that the home phone number is null:
"homePhone": null
To set a typekey to null, specify the null at the typekey field level. (Do not specify the null at the code level.) For
example, the following sets a document's language field to null:
"language": null
To set a monetary amount, currency amount, or spatial point to null, specify the null at the field level. (Do not specify
the null at the amount, currency, longitude, or latitude level.) For example, the following sets a transactionAmount
field to null:
"transactionAmount": null
Sending POSTs
You use a request tool, such as Postman, to ensure POSTs are well-formed and to review the structure of the response
payloads. For more information, see “Requests and responses” on page 26.
64 POSTs
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. Enter the following command and click Send:
GET http://localhost:8080/bc/rest/admin/v1/users
3. Identify the id of the first account in the payload. This value is referenced below as <accountId>.
4. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
5. Change the operation to POST and enter the following URL, but do not click Send yet:
POST http://localhost:8180/bc/rest/common/v1/activities/<activityId>/notes
6. Specify the request payload.
a. In the first row of tabs (the one that starts with Params), click Body.
b. In the row of radio buttons, select raw.
c. At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
d. Paste the following into the text field underneath the radio buttons.
{
"data": {
"attributes": {
"language": {
"code": "en_US"
},
"subject": "Test note",
"body": "API tutorial note 1"
}
}
}
1. Click Send. The response payload appears below the request payload.
POSTs 65
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. Enter the following call and click Send:
GET http://localhost:8080/bc/rest/admin/v1/users
3. Identify the id of the first account in the payload. This value is referenced below as <accountId>.
4. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
5. Change the operation to POST and enter the following URL, but do not click Send yet:
POST http://localhost:8580/bc/rest/common/v1/activities/<activityId>/notes
6. Specify the request payload.
a. In the first row of tabs (the one that starts with Params), click Body.
b. In the row of radio buttons, select raw.
c. At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
d. Paste the following into the text field underneath the radio buttons.
{
"data": {
"attributes": {
"language": {
"code": "en_US"
},
"subject": "Note 2 subject",
"body": "API tutorial note 2",
"confidential": true,
"topic": {
"code": "delinquency"
}
}
}
}
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 BillingCenter during resource creation that are needed by the caller application. For example:
• The resource's Public id (which is also the Cloud API id value)
66 POSTs
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
In standard REST architecture, there is no operation for this type of business action. Therefore, Cloud API has adopted
the following conventions:
POSTs 67
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
68 POSTs
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
POSTs 69
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
70 POSTs
chapter 5
PATCHes
This topic discusses the PATCH method, which modifies existing data.
If you want to interact directly with the concepts in this topic, go to the following tutorials:
• “Tutorial: PATCH an activity”
Overview of PATCHes
A PATCH is a REST API method that modifies an existing resource in BillingCenter.
A PATCH consists of the PATCH method and the endpoint, such as PATCH /activities/{activityId}, and a
request payload. The request payload contains the data to modify in the specified resource.
The response to a PATCH includes an HTTP code indicating success or failure. It also includes a response payload.
The default response for a PATCH consists of a predetermined set of fields and resources. This may or may not include
the data that the PATCH modified.
When a developer is configuring a consumer application to PATCH information to Cloud API, they will need to
determine the correct structure for the request payload. They may also need to parse information out of the response
payload.
Within REST API architecture, there are two operations that modify existing resources - PATCH and PUT. PATCH is
used to modify a portion of an existing resource (while leaving other aspects of it unmodified). PUT is used to replace
the entire contents of an existing resource with new data. Cloud API supports the PATCH operation, but not the PUT
operation. This is because nearly every operation that modifies an InsuranceSuite object modifies only a portion of it
while keeping the rest of the object untouched. This behavior maps to PATCH, but not to PUT.
PATCHes 71
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
{
"data": {
"attributes": {
"roles": [
{
"id": "billing_clerical"
}
]
}
}
}
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 26.
72 PATCHes
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
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.
a. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
2. The sample data includes one sample account called "Standard Account." Query for that account by entering the
following call and clicking Send:
a. GET http://localhost:8180/bc/rest/billing/v1/accounts?filter=accountNumber:eq:Standard
%20Account
3. For the account in the response payload, note the following information:
a. The account ID (id)
b. The account name (accountName)
4. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
5. Change the operation to PATCH and enter the following URL, but do not click Send yet:
a. PATCH http://localhost:8180/bc/rest/billing/v1/accounts/<accountID>
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": {
"accountName": "Updated Standard Account"
}
}
}
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 BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer 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 6
DELETEs
This topic provides an overview of DELETEs, which are used to delete resources.
If you want to interact directly with the concepts in this topic, go to the following tutorial:
• Tutorial: “Tutorial: DELETE a note”
Overview of DELETEs
Within the context of APIs that are fully REST-compliant, a DELETE is an endpoint operation that deletes a resource.
This typically involves removing the resource from the underlying database.
Within the context of Cloud API, a DELETE is a Cloud API method that "removes" an existing resource from
BillingCenter. What it means to "remove" the resource depends on the resource type. The DELETE operation federates
to the BillingCenter 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, BillingCenter does not support the removal of data. Several business objects
can be approved, canceled, completed, closed, declined, rejected, retired, skipped, or withdrawn. But only a few can be
deleted.
A DELETE call consists of the DELETE method and the endpoint, such as DELETE /notes/{noteId}. Similar to
GETs, DELETEs are not permitted to have a request payload.
The response to a DELETE includes an HTTP code indicating success or failure. DELETE responses do not have a
response payload.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user su and password gw.
DELETEs 75
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
76 DELETEs
chapter 7
Request headers
This topic describes how you can modify call behavior using the Guidewire-proprietary headers supported by Cloud
API.
HTTP headers
Request and response objects are used by REST APIs to send information between application. These objects contain
HTTP headers. An HTTP header is a name/value pair included with a request or response object that provides
metadata about the request or response. An HTTP header can specify information such as:
• The format used in the request object (such as whether it is JSON or XML)
• The format to use in the response object
• Session and connection information
• Authorization information
Request headers 77
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
78 Request headers
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Procedure
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
2. Specify authorization as appropriate.
3. Add the header and header value.
• In the first row of tabs (the one that starts with Params), click Headers.
• Scroll to the bottom of the existing key/value list.
• 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.
Request headers 79
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
GW headers
Cloud API has two Guidewire-specific headers you can use to specify language and locale: GW-Language and GW-
Locale. These headers give you the ability to explicitly state the desired language and locale for a call.
To specify a language using Guidewire-specific headers, include the following header with the request:
• Key: GW-Language
• Value: (an ISO 639-1 code designating the language)
For example, to set the language to Japanese, the request must contain a GW-Language/ja header.
To specify a locale using GW headers, include the following header with the request:
• Key: GW-Locale
• Value: (an ISO 639-1 code followed by an underscore followed by an ISO 3166-1 alpha-2 locale code)
For example, to set the locale to Japanese, the request must contain a GW-Locale/ja_JP header.
If you want to specify a language and locale, Guidewire recommends using these headers. They are the most explicit
declaration of the intent of the call.
80 Request headers
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
What is specified What is language set to? What is locale set to?
Both GW-Language and GW- The GW-Language header value. The GW-Locale header value.
Locale
Only GW-Language The GW-Language header value. The caller's preferred locale, if any. Otherwise,
the BillingCenter default locale.
Only GW-Locale The caller's preferred language, if any. Otherwise, The GW-Locale header value.
the BillingCenter default language.
Neither GW-Language nor The caller's preferred language, if any. Otherwise, The caller's preferred locale, if any. Otherwise,
GW-Locale the Accept-Language header, if any. Otherwise, the BillingCenter default locale.
the BillingCenter default language.
The GW-DBTransaction-ID header identifies a transaction ID (a string of up to 128 characters). When submitted with a
Cloud API call, Cloud API attempts to insert the value into the database's TransactionID table.
• If the value does not already exist in the table, the insert is successful. Cloud API assumes the transaction has not
already been committed, and the call is processed as normal.
• If the value does exist in the table, the insert fails. Cloud API assumes the transaction has already been committed,
and the call is rejected. Cloud API returns a 400 status code with an
gw.api.webservice.exception.AlreadyExecutedException error.
For the call to succeed, the transaction ID specified in the header must be globally unique across all clients, APIs, and
web services.
The GW-DBTransaction-ID header has the following limitations:
• It only works with Cloud API calls that commit data to the database.
• It only works when Cloud API commits a single time only. (Cloud API calls that commit multiple times are rare.)
• It only works if the commit is either the only side effect of the call, or if the commit happens before any other side
effects, such as the sending of notifications to external systems.
Duplicate requests do not return identical responses. The first request will succeed, but subsequent requests will fail. It
is the responsibility of the caller application to decide how or if to handle this situation.
Request headers 81
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
x-gwre-session: 09d0fbf0-243c-4337-a582-725df8d33e39
Because all three calls specify the same session ID, all three calls will be routed to the same node.
Session IDs is the default behavior of the Guidewire Cloud Platform. If you wish to use this option, you do not need to
make any special request to Guidewire.
Using cookies
Within the context of Cloud API calls in a clustered environment, a cookie is an arbitrary string generated by
Guidewire Cloud Platform that can be used to identify subsequent related API calls.
If a request header does not contain an x-gwre-session header key, the Guidewire Cloud Platform generates a cookie
and returns it in the response header with a Set-Cookie header key. Subsequent calls can include this cookie in the
request header using the Cookie header key. Every request that uses a given cookie will be routed to the same node in
the cluster that generated the cookie.
For example, suppose that a caller application makes the following calls to BillingCenter cluster:
1. A POST to create an activity
• The request header contains no x-gwre-session header key.
• The response header contains the following: Set-Cookie: gwre=ccd37ca0-f8d3-4a8e-
b278-83274d82b355; Path=/
2. A PATCH to update the activity.
• The request header contains the following: Cookie: gwre=ccd37ca0-f8d3-4a8e-b278-83274d82b355
3. A POST to create a note on the activity
• The request header contains the following: Cookie: gwre=ccd37ca0-f8d3-4a8e-b278-83274d82b355
Because the second and third call specify the cookie returned by the first call, the second and third call are routed to the
same node that processed the first call.
Cookies are not the default behavior of the Guidewire Cloud Platform. If you wish to use this option, you must request
this from Guidewire.
82 Request headers
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Warming up an endpoint
The first time a caller application makes a call to a Cloud API endpoint, the call may take longer to process than
normal. This is because the Guidewire server may need to execute tasks for the first call that it does not need to re-
execute for subsequent tasks, such as:
• Loading Java and Gosu classes
• Parsing and loading configuration files that are lazy-loaded on the first reference
• Loading data from the database or other sources into local caches
• Initializing database connections
A caller application may want to avoid having this slow processing time occur during a genuine business call.
Therefore, the caller application may want to "warm up" the endpoint. This involves sending a dummy "warm-up
request" to trigger these initial tasks. The warm-up request helps subsequent requests execute more rapidly.
Warm-up requests are not supposed to create or modify data. Theoretically, a caller application could use a GET as a
warm-up request. However, GETs do not trigger as wide a range of start-up tasks as POSTs. The better option is to
send a POST that does not commit any changes to the database. The best way to accomplish this is with a POST that
contains the GW-DoNotCommit header. This header identifies that data modifications made by the request are to be
discarded and not committed.
• ignore - Ignore all unknown properties. Do not log any messages or return any validation errors.
• log - Log a service-side info message, but then process the call, ignoring any unknown properties.
• reject - Do not process the call. Return a validation error specifying there are unknown properties.
Similarly, a Cloud API call may include a URL with a query parameter that is not defined in the associated schema. By
default, Cloud API rejects calls with unknown query parameters. You can override the default behavior by including
the GW-UnknownQueryParamHandling header. The header must be set to one of the following string values:
• ignore - Ignore all unknown query parameters. Do not log any messages or return any validation errors.
• log - Log a service-side info message, but then process the call, ignoring any unknown query parameters.
• reject - Do not process the call. Return a validation error specifying there are unknown query parameters.
Request headers 83
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
84 Request headers
part 2
Optimizing calls
The following topics discuss how caller applications can optimize Cloud API calls. This may involve reducing the
number of calls needed to complete an operation, or improving call performance. This includes how to:
• Reduce the number of calls needed to accomplish a business flow using:
◦ Composite requests
◦ Request inclusion
◦ Batch requests
• Prevent lost updates using checksums
• Execute calls asynchronously
Optimizing calls 85
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
86 Optimizing calls
chapter 8
Good integration design typically involves writing integration points so that the number of calls between services is as
small as possible. Cloud API includes multiple features that let caller applications execute multiple requests in a single
call. This topic provides an overview of these features.
Composite requests
From a Cloud API perspective, a composite request is a set of requests that are executed in a single InsuranceSuite
bundle (which corresponds to a single database transaction).
• A composite request can include one or more subrequests that create or modify data. Either all of the subrequests
succeed, or none of them are executed. Each subrequest is a separate unit of work.
• A composite request can also include one or more subselections that query for data.
◦ If the composite request has one or more subrequests, the subselections can retrieve data created or modified by
those subrequests.
◦ A composite request can also have no subrequests. In this case, the subselections merely execute multiple
queries to retrieve existing data.
Subrequests and subresponses are executed serially, in the order they are specified in the composite request payload.
BillingCenter then gathers the response to each subrequest and subselection and returns them in a single response
payload. The responses to each subrequest and subselection appear in the same order as the original composite request.
Composite requests can make use of variables. This allows data created by the execution of one subrequest to be used
by later subrequests.
Composite requests can consist entirely of subrequests that merely retrieve data. For more information, see “Composite
requests that execute only queries” on page 95.
Composite requests support the use of most endpoints, but not all of them. They also support many query parameters,
but not all of them. For more information, see “Composite request limitations” on page 95.
Composite requests can be submitted asynchronously. For more information, see “Asynchronous calls” on page 117.
Composite requests are limited to a maximum number of subrequests. For more information, see “Configuring the
maximum number of subrequests” on page 98.
Composite requests 89
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
POST <applicationURL>/rest/composite/v1/composite
{
"requests": [
{
<subrequest 1>
},
{
<subrequest 2>
},
...
],
"selections": [
{
<subselection 1>
},
{
<subselection 2>
},
...
]
}
{
"requests": [
{
"method": "<post/patch/delete>",
"uri": "<path>",
"body": {
"data": {
"attributes": {
"<field1>": "<value1>",
"<field2>": "<value2>",
...
}
}
}
},
{
<next subrequest>
},
...
{
<final subrequest>
}
]
}
For example, the following simple composite request creates two notes for activity xc:202.
POST <applicationURL>/rest/composite/v1/composite
{
"requests": [
{
"method": "post",
"uri": "/common/v1/activities/xc:202/notes",
"body": {
90 Composite requests
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"data": {
"attributes": {
"body": "Cloud API note #1."
}
}
}
},
{
"method": "post",
"uri": "/common/v1/activities/xc:202/notes",
"body": {
"data": {
"attributes": {
"body": "Cloud API note #2."
}
}
}
}
]
}
For the complete syntax that includes all composite request features, see “Complete composite request syntax” on page
98.
Declaring variables
Composite variables are declared in a subrequest's vars section. Each variable has a name and path. The name is an
arbitrary string. The path specifies what to set the variable to. It is set to a JSON path expression that identifies a value
in the subrequest's response payload.
For example, suppose a subrequest that creates an activity has the following:
"vars": [
{
"name": "newActivityId",
"path": "$.data.attributes.id"
}
]
This creates a variable named newActivityId, which is set to the value of the data section's attributes section's id
field (which would typically be the id of the newly created activity).
Referencing variables
To reference a variable, use the following syntax:
${<varName>}
You can use variables anywhere in the body of a subrequest. The most common uses for variable values are:
• In an attributes field
• Within the path of a uri
• As part of a query parameter
For example, suppose there is a subrequest that creates an activity, and it is followed by a subrequest that creates a
note. The first subrequest creates a newActivityId variable as shown previously. The uri for the second subrequest is:
"uri": "/common/v1/activities/${newActivityId}/notes"
This would create the new note as a child of the first subrequest's activity.
Composite requests 91
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"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
},
92 Composite requests
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
If a composite request is followed by a related request and the related request must have the most up-to-date values,
then the composite request must contain a selections section that retrieves the required values. The GETs in the
selections section are always executed after all subrequests have been committed.
"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 a given API, you can see a complete list of all query parameters that can be used in composite requests by
executing a GET /openapi.json call. If a query parameter is available to composite requests, the OpenAPI output will
include the following line: "x-gw-allowForCompositeApi": true.
Composite requests 93
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"selections": [
{
"uri": "<pathForFirstSubselection>"
},
{
"uri": "<pathForSecondSubselection>"
},
....
]
For the complete syntax that includes all composite request features, see “Complete composite request syntax” on page
98.
"selections": [
{
"uri": "<pathForFirstQuery>",
"parameters" : {
"fields" : "<value>",
"filter" : [<value>],
"includeTotal" : <value>,
"pageOffset" : <value>,
"pageSize" : <value>,
"sort" : [<value>]
}
},
....
]
94 Composite requests
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
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"]
}
There may be additional query parameters you can use. For information on how to determine whether a query
parameter is supported in a composite request, see “Composite request limitations” on page 95.
Composite requests 95
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
• The subrequests cannot make use of the endpoints that have been created outside of Cloud API, such as custom
endpoints created directly on the REST API Framework
• The number of subrequests and subselections in a single composite request must be less than or equal to the value
of the MaximumAllowedNumberOfCompositeSubRequests configuration parameter. (In the base configuration, this
is set to 100.)
• You cannot use request inclusion in composite requests.
◦ For more information on request inclusion, see “Request and response inclusion” on page 101.
• You cannot include a subrequest that uses a content type other than application/json.
◦ For example, you cannot work with document resources in composite requests, as documents use multipart/
form-data.
• There is no mechanism for iterating over a set of things.
◦ For example, you cannot start with a list of elements and include related resources for each item in that list.
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.
96 Composite requests
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
• For the subrequests after the failed subrequest, the text "skipped": true is returned.
• If a selections section was included, the text "skipped": true is returned for each subselection.
For example, the following is the response for a composite request with five subrequests and a set of queries. All
subrequests have responseIncluded set to false. The third subrequest failed because the dueDate attribute was
incorrectly spelled as ueDate.
{
"requestFailed": true,
"responses": [
{
"responseIncluded": false
},
{
"responseIncluded": false
},
{
"requestError": {
"details": [
{
"message": "Schema definition 'ext.common.v1.common_ext-
1.0#/definitions/Note' does not define any property
named 'ueDate'",
"properties": {
"lineNumber": 1,
"parameterLocation": "body",
"parameterName": "body"
}
}
],
"developerMessage": "The request parameters or body had issues.
See the details elements for exact details of the problems.",
"errorCode": "gw.api.rest.exceptions.BadInputException",
"status": 400,
"userMessage": "The request parameters or body had issues"
},
"status": 400
},
{
"skipped": true
},
{
"skipped": true
}
],
"selections": [
{
"skipped": true
}
]
}
If there is an error in the selections section only, the subrequests in the requests section will execute, the data will
be committed, and the composite request will return with a 200 response code, indicating success. Cloud API also
attempts to execute each subselection as best as possible.
Logging
Cloud API logs information about composite requests at both the composite request level and the subrequest/
subselection level. This information appears in the logs under the CompositeSubRequest marker, which is a child of
the normal RestRequest marker.
Each subrequest and subselection log message details information for that subrequest/subselection, such as the actual
path, the HTTP method, and the apiFqn. The same log parameter names and conventions are used for both the parent
request logging and the subrequest logging, such as whether a given value is logged with an empty string or whether it
is omitted. However:
• Some parameters are always omitted at the subrequest level because they only make sense for the parent request.
• Some additional composite-specific parameters are added.
Composite requests 97
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
For example, suppose you executed the previous composite request example in which a composite request creates two
notes for activity xc:202. The corresponding log entries could appear as follows. Note that the first message is for the
parent request and the next two messages are for the two subrequests:
Each subrequest or subselection always generates a log statement, whether the subrequest succeeded, failed, or was
skipped due to prior failures. A separate log statement is also added specifically for the commit of the composite
request, whether the composite request commit succeeded, failed, or was skipped.
{
"requests": [
{
"method": "<post/patch/delete>",
"uri": "<path>",
"body": {
"data": {
"attributes": {
"<field1>": "<value1>",
98 Composite requests
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"<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>
}
]
}
Composite requests 99
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Inclusion is a way of accessing both a parent resource and resources relating to that parent in one command. The
availability of inclusion depends on the resource, and can be available for both requests and responses.
Request inclusion
Request inclusion is a technique for POSTs and PATCHes in which the call consists of the following:
• A single parent request that creates or modifies a resource
• One or more child requests that create or modify resources related to the parent resource
If either the parent request or any child request fails, the entire request fails.
The parent resource is often referred to as the root resource. The root resource is specified in the payload's data
section. The related resources are specified in the payload's included section.
For example, a caller can use a single POST /accounts to create a new account, a set of AccountContacts for that
account, and a payment instrument 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.
Request inclusion can use endpoints from different APIs for included resources.
Response inclusion
Some endpoints allow you to use query parameters to include information about related resources in the response. See
“Additional behaviors with read inclusion” on page 105 and “Payload structure for a response with included
resources” on page 38 for more information.
When using request inclusion for simple parent/child relationships, the JSON has the following structure. This
structure is used when the root resource and the included resource are being POSTed. If the root resource is being
PATCHed, the structure may differ slightly. For more information, see “PATCHes in request inclusion” on page 103.
{
"data" : {
"attributes": {
...
}
},
"included": {
"<resourceType>": [
{
"attributes": {
...
},
"method": "post",
"uri": "/../this/..."
}
]
}
}
"included": {
"RolePermission": [
{
"attributes": {
"permission": {
"code": "regionmanage"
}
},
"method": "post",
"uri": "/admin/v1/roles/this/permissions"
}
]
}
This specifies that in order to create the association between the role and the system permission, use the POST /
admin/v1/roles/{roleId}/permissions endpoint.
The uri must start with the API name, such as "/admin/v1".
If the included resource is being POSTed, the uri must specify the ID of the root resource. When the root resource and
the included resources are being created at the same time, the root resource does not yet have an ID. Therefore, the
keyword this is used in the uri to represent the root resource's ID. If the root resource is being PATCHed, the URI
field does not use this. For more information, see “PATCHes in request inclusion” on page 103.
POST http://localhost:8580/bc/rest/admin/v1/roles
{
"data": {
"attributes": {
"name": "Region manager"
}
},
"included": {
"RolePermission": [
{
"attributes": {
"permission": {
"code": "regionmanage"
}
},
"method": "post",
"uri": "/admin/v1/roles/this/permissions"
}
]
}
}
{
"data" : {
"attributes": {
...
}
},
"included": {
"<resourceType>": [
{
"attributes": {
...
},
"method": "post",
"uri": "/../<parentId>/<resourceType>
}
]
}
}
{
"data" : {
"attributes": {
...
}
},
"included": {
"<resourceType>": [
{
"attributes": {
...
},
"method": "patch",
"uri": "/../<childId>"
}
]
}
}
Note: The uri field may or may not include a placeholder for the parent id. It depends on the structure of the
endpoint the uri is referencing.
For example, if the children were a PATCHed contact on an account and a PATCHed note, the uri fields would
be:
• "uri": "/billing/v1/accounts/<accountId>/contacts/contactId"
• "uri": "/common/v1/notes/<noteId>"
Included resources cannot reference resources other than the root resource
When using request inclusion, each included resource must specify its own operation and uri. The uri is expected to
reference the root resource using the keyword this. This ensures that when the included resource is POSTed or
PATCHed, the included resource is related to the root resource.
For example, suppose a POST is creating a user role and an association to a system permission. The uri for the
permission would have a value such as "/admin/v1/roles/this/permissions".
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 permission could reference
an existing role, such as "/admin/v1/roles/bc:20/permissions". This uri says "associate the specified permission
not to the root resource of this POST, but rather to the existing role bc:20".
Cloud API will not allow this. Any attempt to POST or PATCH an included resource to something other than the root
resource will cause the operation to fail.
• Additional GET requests - Once you have successfully PATCHed or POSTed a child resource, retrieve
information on that resource with a follow-up GET request.
• Using a composite request - Composite requests are an alternate method to execute multiple requests in a single
call. The responses from each request are collected and returned in a single response payload. For more
information, see “Composite requests” on page 89.
"uri": "/billing/v1/accounts/<accountid>/notes"
To PATCH a note, the method and uri fields look like this:
"method": "patch",
"uri": "/common/v1/notes/<noteid>"
However, some included resources are accessed through the same API as the root resource. For example,
AccountContacts are POSTed and PATCHed through the Billing API. POSTing an AccountContact as an included
resource would use method and uri fields similar to this:
"method": "post",
"uri": "/billing/v1/accounts/<accountid>/contacts"
PATCHing a contact would use method and uri fields like this:
"method": "patch",
"uri": "/billing/v1/accounts/<accountid>/contacts/<contactid>"
GET /activities?include=notes&pageSize=notes:5
For more information on how to use query parameters with included resources, see “Query parameters for included
resources” on page 55.
Batch requests
From a Cloud API perspective, a batch request is a set of requests that are executed in a non-transactional sequence.
Each call within the batch request is referred to as a subrequest. The object that contains all of the subrequests is
referred to as the main request.
Subrequests are executed serially, in the order they are specified in the request payload. BillingCenter then gathers the
responses to each subrequest and returns them in a single response payload. Once again, the subresponses appear in the
same order as the corresponding subrequests.
When the response to a batch request contains a response code of 200, it means the batch request itself was well-
formed. However, each individual subrequest may have succeeded or failed.
Batch requests are limited to a maximum number of subrequests. The maximum is specified by the
MaximumAllowedNumberOfBatchSubRequests configuration parameter. In the base configuration, this parameter is set
to 100. Batch requests with more than the maximum number of subrequests fail with a BadInputException. For more
information on modifying the maximum number of subrequests, see “Configuring the maximum number of
subrequests” on page 111.
POST <applicationURL>/rest/<apiWithVersion>/batch
For example, if you were executing a Billing API batch from an instance of BillingCenter on your local machine, the
call would be:
POST http://localhost:8580/bc/rest/billing/v1/batch
{
"requests": [
{
"method": "<method>",
"path": "<path>",
"query": "<queryParameters>",
"data":
{
"attributes": {
"<field1>": "<value1>",
"<field2>": "<value2>",
...
}
}
},
{
"method": "<method>",
"path": "<path>",
"query": "<queryParameters>",
"data":
{
"attributes": {
"<field1>": "<value1>",
"<field2>": "<value2>",
...
}
}
},
...
]
}
where:
• <method> is the method in lower case, such as "get", "post", "patch", or "delete".
• <path> is the endpoint path.
◦ This path starts as if it was immediately following the API path (including the major version, such as "/v1").
For example, suppose the path for a command when executed in isolation is: http://localhost:8580/bc/
rest/billing/v1/accounts/bc:22/invoices/bc:55. The path within a batch is: /accounts/bc:22/
invoices/bc: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": "/accounts/demo_sample:1"
},
{
"method": "get",
"path": "/accounts/demo_sample:2"
},
{
"method": "get",
"path": "/accounts/demo_sample:3"
}
]
}
{
"requests": [
{
"method": "get",
"path": "/accounts/demo_sample:1",
"query": "sort=createdDate"
},
{
"method": "get",
"path": "/accounts/demo_sample:2",
"query": "fields=*all"
},
{
"method": "get",
"path": "/accounts/demo_sample:3"
}
]
}
{
"requests": [
{
"method": "post",
"path": "/activities/xc:11/notes",
"data":
{
"attributes": {
"body": "Batch note 1"
}
}
},
{
"method": "post",
"path": "/activities/xc:73/notes",
"data":
{
"attributes": {
"body": "Batch note 2"
}
}
}
]
}
{
"requests": [
{
"method": "post",
"path": "/activities/xc:21/notes"
"body": {
"data": {
"attributes": {
"body": "Batch activity 1",
"subject": "Batch activity 1",
"topic": {
"code": "general",
"name": "General"
}
}
}
}
},
{
"method": "patch",
"path": "/notes/xc:22",
"body": {
"data": {
"attributes": {
"body": "PATCHed note body"
}
}
},
},
{
"method": "delete",
"path": "/notes/xc:23"
},
{
"method": "get",
"path": "/activities/xc:24/notes",
"query": "sort=subject&fields=id,subject"
}
]
}
{
"requests": [
{
"method": "delete",
"path": "/activities/xc:55",
"headers": [
{
"name": "GW-Checksum",
"value": "2"
}
]
},
{
"method": "delete",
"path": "/activities/xc:57",
"headers": [
{
"name": "GW-Checksum",
"value": "4"
}
]
}
]
}
{
"requests": [
{
"method": "patch",
"path": "/activities/xc:93",
"body": {
"data": {
"attributes": {
"subject": "PATCH body 1"
}
}
},
"onFail": "abort"
},
{
"method": "patch",
"path": "/activities/xc:94",
"body": {
"data": {
"attributes": {
"subject": "PATCH body 2"
}
}
},
"onFail": "abort"
},
{
"method": "patch",
"path": "/activities/xc:95",
"body": {
"data": {
"attributes": {
"subject": "PATCH body 3"
}
}
}
}
]
}
Also, be aware that batch requests are subject to any application server limitations around the maximum size of a
request body. Thus, it is possible for a batch request to be too large to process, even if the number of subrequests is at
or below the allowed maximum.
This topic defines lost updates and discusses how you can prevent them through the use of checksums.
If you want to interact directly with the concepts in this topic, go to the following tutorials:
• “Tutorial: PATCH an account using checksums” on page 115
Lost updates
Business processes often span multiple Cloud API calls. When this occurs, the first call is typically either a GET that
retrieves data or a POST that creates data. A later call may attempt to modify the resource queried for or created in the
initial GET or POST.
Some other process could modify the resource between the GET/POST and the subsequent attempt to modify it. For
example, suppose:
1. A caller application GETs activity xc:20. The activity's subject is "Contact additional insured" and the priority is
Normal.
2. An internal user manually changes the subject of activity xc:20 to "Contact primary insured" and sets the priority
to Urgent.
3. The caller application PATCHes activity xc:20 and sets the priority to Low.
The caller application's PATCH overwrites some of the changes made by the internal user. This could be a problem for
several reasons:
• The caller application's change may be based on the data it initially retrieved. The caller application may not have
initiated the change if it had known the subject or priority had later been changed by someone else.
• The internal user may not be aware that some of their changes were effectively discarded.
• The activity may now be in an inconsistent state (such as having a subject that is normally used for urgent activities
and a priority of Low).
This type of modification is referred to as a lost update. Within Cloud API, a lost update is a modification made to a
resource that unintentionally overwrites changes made by some other process. You can prevent lost updates through the
use of checksums.
Checksums
A checksum is a string value that identifies the "version" of a particular resource. Cloud API calculates checksums as
needed based on information about the underlying entities in the BillingCenter database.
Lost updates and checksums 113
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
When a process modifies data, either through user action, Cloud API, or some other process, Cloud API calculates a
different checksum for the resource. You can prevent lost updates by checking a resource's checksum before you
modify the resource to see if it matches a previously retrieved checksum.
By default, checksums are provided in the response payloads of all GETs, POSTs, and PATCHes.
Checksums can be included in:
• Request payloads, which is appropriate for:
◦ PATCHes
◦ Business action POSTs that allow request payloads (such as POST /{activityID}/assign)
• Request object headers for:
◦ DELETEs
◦ Business action POSTs that do not allow request payloads
When you submit a request with a checksum, BillingCenter calculates the checksum and compares that value to the
submitted checksum value.
• If the values match, BillingCenter 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, BillingCenter determines the resource has been changed since the caller application last
acquired the data. The request is not executed, and BillingCenter returns an error similar to the following:
{
"message": "The supplied checksum '1' does not match the current checksum '2' for the resource with uri '/
common/v1/notes/xc:101'",
"properties": {
"uri": "/common/v1/notes/xc:101",
"currentChecksum": "2",
"suppliedChecksum": "1"
}
}
Generating checksums
Checksums are always string values generated by Guidewire based on all the values in the database for the associated
entity. Checksums are typically complex string values, such as c689ec1403a489ed7bc3ca6e8ce4f73e.
An resource's checksum is modified when any field in the associated entity changes, whether that field is exposed to
Cloud API or not. For example, the Activity entity has a field named EmailTemplate which stores the id of any email
template associated with the activity. This field is not exposed in Cloud API. However, if this field is changed for a
given activity, either through the user interface or by some other process, this will increment the Activity resource's
checksum.
In some cases, checksums are set to simple integer values, such as 1, and a change to the entity simply increments the
integer value by 1. However, when a checksum is an integer, there is no guarantee that the next checksum will be the
integer value incremented by one. Guidewire recommends against caller applications attempting to predict what the
next checksum value will be. Limit checksums in Cloud API requests to only the checksums returned in previous
responses.
Resources that map to multiple data model entities
Most resources correspond to a single data model entity. For example, the properties in the Activity resource map to a
single data model entity - the Activity data model entity.
However, there are resources that combine fields from multiple data model entities. For example, the User resource has
fields that map to the User data model entity (such as externalUser), the Credential data model entity (such as
username), and the UserContact data mode entity (such as cellphone).
In the base configuration, when a resource maps to multiple data model entities, a change to any one of the underlying
entities increments the resource's checksum. Custom resources that map to multiple data model entities can also be
configured to have the checksum reflect changes to any of the underlying data model entities. For more information,
see the Cloud API Developer Guide.
"checksum": "<value>"
For example, the following payload is for a PATCH to an activity. The payload specifies a new attribute value (setting
priority to urgent) and a checksum value (7a0d9677f11e246bbe3c124889219c50).
{
"data": {
"attributes": {
"priority": {
"code": "urgent"
}
},
"checksum": "7a0d9677f11e246bbe3c124889219c50"
}
}
Checksums can be specified on the root resource and on any included resource. Specifying a checksum for any one
resource does not require you to specify checksums for the others. For example:
• You could specify a checksum for only the root resource.
• You could specify a checksum for only one of the included resources.
• You could specify a checksum for the root resource and some of the included resources, but not all of the included
resources.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user su and password gw.
2. The sample data includes one sample account called "Standard Account." Query for that account by entering the
following call and clicking Send:
a. GET http://localhost:8580/bc/rest/billing/v1/accounts?filter=accountNumber:eq:Standard
%20Account
3. For the account in the response payload, note the checksum (checksum). (This value is later referred to in later
steps as "<OriginalChecksum>".)
4. Open a second request tab and right-clicking the first tab and selecting Duplicate Tab.
5. Change the operation to POST and enter the following URL, but do not click Send yet:
a. PATCH http://localhost:8580/bc/rest/billingv1/accounts/<AccountId>
6. Specify the request payload.
a. In the first row of tabs (the one that starts with Params), click Body.
{
"data": {
"attributes": {
"accountName": "Standard Account -1"
},
"checksum": "<OriginalChecksum>"
}
}
7. Click Send. The checksum value in the payload matches the checksum value for the activity stored in
BillingCenter. 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 BillingCenter. So, the second PATCH 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.
Asynchronous calls
REST calls made to Cloud API are typically synchronous. The caller application submits a call and then waits for the
reply. However, for some types of calls, waiting for a reply may be problematic. For example:
• The call may take long enough to process that the API Gateway times out.
• The call may take long enough to process that the client-side toolkit used to make the call times out.
• A synchronous call may consume too many client-side resources.
To address these situations, calls can also be made asynchronously. The caller application submits the request at one
point in time. At a later point in time, the caller application retrieves the response.
This topic discusses how to execute Cloud API calls asynchronously.
If you want to interact directly with the concepts in this topic, go to the following tutorials:
• “Tutorial: Send a request asynchronously” on page 123
• “Tutorial: Retrieve information about an asynchronous request” on page 124
• “Tutorial: Send a request asynchronously with a wait time” on page 125
1. The caller application sends a request to Cloud API. In the diagram, the request is a POST for a resource named
someResource. The request has a set of request headers and may have a payload.
2. Cloud API processes the request synchronously.
3. Assuming the request is successful, Cloud API provides the response. The response also has a set of response
headers and may have a payload.
Asynchronous calls
For some calls, it can be problematic to wait for a synchronous response. For example, quoting a large commercial
policy may take several minutes, and the API Gateway may time out before the quote can be completed and returned to
the caller.
To address these situations, you can execute a Cloud API call asynchronously. Broadly speaking, there are three phases
to an asynchronous call. In practice, this could occur with fewer than or more than three calls.
1. The caller application sends a request to Cloud API. The request object includes a request header indicating to
process the call asynchronously.
2. Cloud API accepts the request. But it does not immediately process it.
3. Cloud API provides a response. The response includes a header with an Async API /requests path that can be
used to retrieve:
a. Information about the initial request.
b. The response to the initial request, once it is available.
{
"data": {
"attributes": {
"requestMethod": "POST",
"requestPath": "/admin/v1/users",
"responseStatus": 202,
"startTime": "2022-07-12T16:53:12.365Z",
"status": {
"code": "Accepted",
"name": "Accepted"
}
}
}
}
{
"data": {
"attributes": {
"completionTime": "2022-07-12T16:53:16.073Z",
"requestMethod": "POST",
"requestPath": "/admin/v1/users",
"responseBodyJson": {
"data": {
"attributes": {
...
"username": "asyncUser99",
"vacationStatus": {
"code": "atwork",
"name": "At work"
}
},
"checksum": "321dff263827cbbd772c26676398d8ae",
"links": {
...
}
}
},
"responseHeaders": {
"Cache-Control": [
"must-revalidate",
"post-check=0",
"pre-check=0",
"max-age=0",
"no-store",
"no-cache"
],
"Content-Type": [
"application/json;charset=UTF-8"
],
"GW-Checksum": [
"321dff263827cbbd772c26676398d8ae"
],
"Location": [
"/admin/v1/users/pc:ScaA3kB5cImBkuh7bxjNn"
],
"X-Correlation-ID": [
"d516344d-5769-4964-adb7-79eaca41e4a2"
],
...
},
"responseStatus": 201,
"startTime": "2022-07-12T16:53:12.365Z",
"status": {
"code": "Complete",
"name": "Complete"
}
}
...
}
}
1. The caller application sends a GET /async/v1/requests/{asyncRequestId} request to Cloud API. The path
comes from the header of the initial response.
2. The Cloud API response includes information about the original request. If the status is Accepted or In Progress,
the caller application must re-submit the GET after an appropriate interval.
When the response includes a status of Complete, the caller can retrieve the response to the original request. There are
multiple ways that it can be retrieved.
4. The caller application sends a GET /async/v1/requests/{asyncRequestId} request to Cloud API. The
acyncRequestId comes from the header of the initial response.
5. The Cloud API response includes information about the original request. When the status is Complete, the response
includes the original request's response if the response type is application/json.
Note that the GET /async/v1/requests/{asyncRequestId} request could return a response of Complete the first
time it is submitted or on a subsequent try.
For example, if the original request was a POST that created a new activity, the GET request to retrieve the response
might return a 201 response code and have a Location header. If the original request failed because of a validation
error, the GET request to retrieve the response might have a 400 status code and a response body with details of the
errors.
/async/v1/requests/<asyncRequestId>
The <asyncRequestId> is a random value that provides secure access to the results of the original call. Because this
value provides access to application data, Guidewire recommends keeping it secure.
There are some situations where the response will not be "202 Accepted":
• If the wait preference is used and the request completes faster than the requested wait time, the response will be
synchronous. For information on specifying a wait preference, see “Waiting for a response synchronously” on page
125.
• If the application is overloaded and unable to process or queue the request, it will return a 503 response.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
a. On the Authorization tab, select Basic Auth using user su and password gw.
2. Enter the following call, but do not click Send yet:
a. POST http://localhost:8580/bc/rest/admin/v1/users
3. Specify the request payload.
a. In the first row of tabs (the one that starts with Params), click Body.
b. In the row of radio buttons, select raw.
c. At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
d. Paste the following into the text field underneath the radio buttons.
{
"data": {
"attributes": {
"username": "asyncUser"
}
}
}
Results
The response should be "202 Accepted". To view the value for GW-Async-Location header, click the Headers tab in
the response object pane. (This Headers tab is in a row of tabs that starts with Body and Cookies.) This value is used in
the next tutorial.
/async/v1/requests/<asyncRequestId>
You can execute a GET on this endpoint to retrieve information about the original request.
/async/v1/requests/<asyncRequestId>/response
If the original request is complete, this endpoint returns the response to the original request as if the call had been
executed synchronously. This endpoint is useful when:
• The response type is something other than application/json, and therefore is not included in the /requests
response.
• The caller application wants to work with the response as it would normally appear, as opposed to having to extract
it from within the responseBodyJson attribute of a larger data envelope.
Note that there are two situations in which this endpoint could return a 400 error:
• The original request does not yet have a status of Complete. Its status is either still Accepted or In Progress.
• The original request has a status of Complete, and the response to the original request is a 400 error.
In this tutorial, you will retrieve information about the asynchronous request using both the /requests and /response
endpoints.
Tutorial steps
1. In Postman, start a new request by clicking the + to the right of the Launchpad tab
a. On the Authorization tab, select Basic Auth using user su and password gw.
2. Enter the following call, but do not click Send yet:
a. GET http://localhost:8580/bc/rest/<Async-Location>, where <Async-Location> is the value of
the GW-Async-Location response header from the initial asynchronous request.
3. Ensure that, for this request, you do not have Prefer/respond-async header specified in your request.
(Although you can submit the /requests call asynchronously, you typically would not want to.)
4. Click Send.
5. Send a second request that uses the /response endpoint to retrieve only the response.
a. Right-click the current tab and choose Duplicate Tab.
b. In the new tab, add "/response" to the end of the existing URL.
6. Click Send.
Results
On the first tab, the response object contains information about the response to the original request. Typically, user
creation occurs very rapidly, and the original request should already be processed. If so:
• The completionTime is specified.
• The responseBodyJson attribute contains the response to the original request. In this case, it is information about
the newly created user.
• The responseStatus is 201.
• The status has a code of Complete.
On the second tab, the response object contains the same information that would have been returned if the initial
request were submitted synchronously.
Tutorial steps
1. In Postman, start a new request by:
Results
The first tab executes an asynchronous call with a wait time of 1 second. The application is able to complete the call
within this time, so the response is provided. (The status is "201 Created" and the response to the original call is
provided.)
The second tab executes an asynchronous call with a wait time of 1 millisecond. The application is not able to
complete the call within this time, so the call is merely accepted. (The status is "202 Accepted" and the response body
is blank.)
• The value of X is 7.
• The batch process is scheduled to run once a day at 3:30 am.
You can configure the value of X by manually adding an AsynchApiRequestPurgeDaysOld configuration parameter to
config.xml. For example, if you wanted request information to be purged when it is 6 days old, you would add the
following to config.xml:
You can also configure when the batch process is scheduled to run. For more information, see the Administration
Guide.
The InsuranceSuite Cloud API is a set of RESTful system APIs that expose functionality in BillingCenter so that caller
applications can request data from or initiate action within BillingCenter.
The following topics discuss how caller applications can initiate specific BillingCenter business flows or interact with
specific types of BillingCenter resources. These resources include:
• Different types of plans
• Accounts
• Policies
• Charges
• Invoices
• Payments
• Disbursements
Overview of plans
In BillingCenter, a plan is a set of values that is associated with a group of accounts, policies, or producers and that
governs behaviors and automatic processes for those accounts, policies, or producers.
In Cloud API, the Admin API includes a set of endpoints to create, modify, and delete plans. As of this release, there
are endpoints for the following types of plans:
• “Billing plans” on page 137
• “Delinquency plans” on page 143
• “Payment allocation plans” on page 153
• “Payment plans” on page 159
This topic discusses functionality common to all plans, such as:
• Plan order
• Endpoints for plan testing
• Multicurrency plans
Plan order
The Priority column in the user interface
In the BillingCenter user interface, the Administration tab has a set of screens that list each plan. All of these list
screens have a Priority column on the right side. You can use this column to modify the plans' priority values.
For the plans that are assigned implicitly (such as return premium plans), the Priority is relevant. When a new account
is created, BillingCenter associates it with the relevant plan with the lowest priority. (The lowest priority plan is always
shown at the top of the list.)
For the plans that are assigned explicitly (all plans except for return premium plans), the Priority is typically irrelevant.
This is because the user or process that creates the new account, policy, or producer can associate it with any active
plan. The priority values do not limit which plan can be chosen.
For all plans, the Priority column also controls the order in which the plans are listed on the screen.
POST /admin/v1/delinquency-plans
{
"data": {
"attributes": {
"name": "Delinquency plan F",
...
}
}
}
POST /admin/v1/delinquency-plans/bc:planF
{
"data": {
"attributes": {
"planOrder": 4,
...
}
}
}
Testing plans
To facilitate development, Cloud API includes a Test Util API. The Test Util API is an API that provides functionality
to facilitate testing during development. You can use the Test Util API to mark a plan as being in use even if it is not
associated with any accounts, policies, or producers.
By default, the Test Util API is not enabled. For information on how to enable Test Util API, see “Enabling the Test
Util API” on page 347.
WARNING: The Test Util API is intended for use in a development environment only. Do not use the Test Util
API on a production system.
POST /test-util/v1/plans/bc:101/mark-in-use
In multicurrency plans, monetary values are typically used to specify a fee (such as an invoice fee) or a threshold (such
as a write-off threshold). Thus, these fields are often collectively referred to as fees and thresholds. When
multicurrency has been enabled, you can specify a fee or threshold in multiple currencies.
For more information on the business functionality of multicurrency, see the Application Guide.
POST /admin/v1/billing-plans
{
"data": {
"attributes": {
...
"currencies": [
{
"code": "usd"
},
{
"code": "cad"
}
],
...
PATCH /admin/v1/billing-plans/bc:1221
{
"data": {
"attributes": {
"name": "Cloud API Multicurrency Plan",
"aggregation": {
"code": "charges"
},
"currencies": [
{
"code": "usd"
},
{
"code": "cad"
},
{
"code": "eur"
}
],
...
Once a plan is in use, you can no longer modify its currencies through Cloud API.
Unlike plan currencies, which are specified in an array, fee/threshold currencies are specified in maps. The syntax for
specifying fee/threshold currencies is shown below:
"<feeThresholdName>": {
"<currency>": "<value>",
"<currency>": "<value>",
...
},
For example, the following is a snippet of a POST for a billing plan that supports USD, CAD, and EUR. Two invoice
fee values have been specified: one for USD and one for CAD. Even though the plan supports EUR, no EUR-specific
invoice fee has been specified.
POST /admin/v1/billing-plans
{
"data": {
"attributes": {
"name": "Cloud API Multicurrency Plan",
"aggregation": {
"code": "charges"
},
"currencies": [
{
"code": "usd"
},
{
"code": "cad"
},
{
"code": "eur"
}
],
"invoiceFeeDefaults": {
"usd": "11.00",
"cad": "13.50"
},
...
Unlike PATCHing arrays, PATCHing maps is additive, not destructive. For example, the following snippet PATCHes
the billing plan from the previous example. In this PATCH, the existing CAD value is changed to 14.00 and a new EUR
value of 15.00 is specified. USD is not mentioned in the PATCH, and therefore will retain its original value.
PATCH /admin/v1/billing-plans/bc:1221
{
"data": {
"attributes": {
"invoiceFeeDefaults": {
"cad": "14.00",
"eur": "15.00"
}
}
}
}
Billing plans
A billing plan is a plan associated with accounts that determines how invoices are sent, how automatic disbursements
are managed, and how payment requests are created. When you create an account, you must explicitly specify a billing
plan. You cannot create an account without a billing plan. For a complete description of the business functionality of
billing plans, see the Application Guide.
Some functionality is common to all plans. This includes the following:
• Plan order
• Endpoints for plan testing
• Multicurrency functionality with plans
For more information on the common functionality, see “Overview of plans” on page 131.
GET /admin/v1/billing-plans/bc:101
{
"data": {
"attributes": {
"aggregation": {
"code": "charges",
"name": "Invoice Items"
},
"allowModOfManDisb": true,
"availableDisbAmtType": {
"code": "unappliedminusauc",
"name": "Unapplied minus under contract"
},
"changeDeadlineIntervalDayCount": 0,
"createApprActForAutoDisb": true,
"currencies": [
{
"code": "usd",
"name": "USD"
}
],
"delayDisbursement": 2,
"description": "Direct bill, postal invoicing",
"disbursementOverDefaults": {
"usd": "0.00"
},
"draftDayLogic": {
"code": "exact",
"name": "Exact Day"
},
"draftIntervalDayCount": 0,
"effectiveDate": "2022-03-25",
"id": "bc:SwmB2Rt3gPdpWN5d33gpk",
"inUse": true,
"invoiceFeeDefaults": {
"usd": "0.00"
},
"leadTimeDayUnit": {
"code": "calendar",
"name": "Calendar Days"
},
"lowBalanceMethod": {
"code": "carryforward",
"name": "Carry Forward"
},
"lowBalanceThresholdDefaults": {
"usd": "0.00"
},
"name": "Standard Mail",
"nonResponsivePmntDueInterval": 21,
"paymentDueDayLogic": {
"code": "exact",
"name": "Exact Day"
},
"paymentDueInterval": 21,
"paymentReversalFeeDefaults": {
"usd": "0.00"
},
"planOrder": 1,
"requestIntervalDayCount": 0,
"reviewDisbursementOverDefaults": {
"usd": "1000.00"
},
"sendAutoDisbAwaitingApproval": false,
"skipInstallmentFees": false,
"statement": {
"code": "directbill",
"name": "Direct Bill"
},
"suppressLowBalInvoices": false,
"westernMethod": false
},
• requestIntervalDayCount
For example, suppose you want to create a billing plan where the following fields are set to the following values:
• changeDeadlineIntervalDayCount: 5
• draftIntervalDayCount: 3
• requestIntervalDayCount: 2
The sum of these values is 10. Therefore, the value of nonResponsivePmntDueInterval must be equal to or greater
than 10. If it is not, BillingCenter returns a validation error and the billing plan is not created.
Command
POST /admin/v1/billing-plans
Response payload
{
"data": {
"attributes": {
"aggregation": {
"code": "charges"
},
"allowModOfManDisb": false,
"availableDisbAmtType": {
"code": "unappliedminusbilled"
},
"changeDeadlineIntervalDayCount": 5,
"createApprActForAutoDisb": true,
"currencies": [
{
"code": "usd"
}
],
"delayDisbursement": 7,
"draftDayLogic": {
"code": "nextbusinessday"
},
"draftIntervalDayCount": 6,
"effectiveDate": "2024-12-12",
"leadTimeDayUnit": {
"code": "business"
},
"lowBalanceMethod": {
"code": "carryforward"
},
"name": "Cloud API Billing Plan",
"nonResponsivePmntDueInterval": 7,
"paymentDueDayLogic": {
"code": "exact"
},
"paymentDueInterval": 7,
"requestIntervalDayCount": 3,
"sendAutoDisbAwaitingApproval": false,
"skipInstallmentFees": true,
"statement": {
"code": "directbill"
},
"suppressLowBalInvoices": true,
"westernMethod": true
}
}
}
PATCH /admin/v1/billing-plans/bc:101
{
"data": {
"attributes": {
"expirationDate": "2025-06-06",
"leadTimeDayUnit": {
"code": "business"
}
}
}
}
DELETE /admin/v1/billing-plans/bc:101
Delinquency plans
A delinquency plan is a set of values and workflows that determine how to execute delinquencies for a given set of
accounts or policies. When you create an account, you must explicitly specify a delinquency plan. You cannot create an
account without a delinquency plan. (You can optionally specify a delinquency plan for a policy. If a policy has no
delinquency plan, the account's plan is used.) For a complete description of the business functionality of delinquency
plans, see the Application Guide.
Some functionality is common to all plans. This includes the following:
• Plan order
• Endpoints for plan testing
• Multicurrency functionality with plans
For more information on the common functionality, see “Overview of plans” on page 131.
GET /admin/v1/delinquency-plans/bc:202
{
"data": {
"attributes": {
"acctEnterDelinquencyThresholdDefaults": {
"usd": "10.00"
},
"applicableSegments": {
"code": "all"
},
"cancellationTarget": {
"code": "DelinquentPolicyOnly"
},
"cancellationThresholdDefaults": {
"usd": "11.00"
},
"currencies": [
{
"code": "usd"
}
],
"description": "Enter Delinquency at 10",
"effectiveDate": "2022-03-28",
"exitDelinquencyThresholdDefaults": {
"usd": "5.00"
},
"gracePeriodDayUnit": {
"code": "calendar"
},
"gracePeriodDays": 0,
"holdInvoicingOnDlnqPolicies": false,
"id": "bc:202",
"inUse": true,
"lateFeeAmountDefaults": {
"usd": "100.00"
},
"name": "Standard Delinquency Plan",
"planOrder": 1,
"polEnterDelinquencyThresholdDefaults": {
"usd": "10.00"
},
"reinstatementFeeAmountDefaults": {
"usd": "100.00"
},
"writeoffThresholdDefaults": {
"usd": "0.00"
}
},
There are a separate set of endpoints for querying for a delinquency plan's workflows. For more information, see
“Delinquency plan workflows” on page 147.
Threshold values
A delinquency plan has five threshold values:
• cancellationThresholdDefaults
• acctEnterDelinquencyThresholdDefaults
• polEnterDelinquencyThresholdDefaults
• exitDelinquencyThresholdDefaults
• writeoffThresholdDefaults
There is validation logic requiring these values to be higher or lower than the other values.
• The cancellationThresholdDefaults value (referred to in the following table as "High threshold") must be
greater than all other threshold values.
• The acctEnterDelinquencyThresholdDefaults and exitDelinquencyThresholdDefaults values (referred to
in the following table as "Middle threshold") can have the same value or different values. But both must be less
than cancellationThresholdDefaults and both must be greater than both
exitDelinquencyThresholdDefaults and writeoffThresholdDefaults.
POST /admin/v1/delinquency-plans
{
"data": {
"attributes": {
"cancellationTarget": {
"code": "DelinquentPolicyOnly"
},
"currencies": [
{
"code": "usd"
}
],
"effectiveDate": "2022-03-28",
"gracePeriodDays": 0,
"gracePeriodDayUnit": {
"code": "calendar"
},
"holdInvoicingOnDlnqPolicies": false,
There are a separate set of endpoints for creating delinquency plan's workflows. For more information, see
“Delinquency plan workflows” on page 147.
PATCH /admin/v1/delinquency-plans/bc:202
{
"data": {
"attributes": {
"expirationDate": "2025-06-06",
"gracePeriodDayUnit": {
"code": "calendar"
}
}
}
}
There are a separate set of endpoints for PATCHing a delinquency plan's workflows. For more information, see
“Delinquency plan workflows” on page 147.
When a delinquency plan is assigned to at least one account or policy, BillingCenter considers the plan to be in use.
When a plan is in use, it cannot be deleted.
For example, the following deletes delinquency plan bc:202 (assuming that it is not in use).
DELETE /admin/v1/delinquency-plans/bc:202
There are a separate set of endpoints for DELETEing a delinquency plan's workflows. For more information, see
“Delinquency plan workflows” on page 147.
{
"attributes": {
"delinquencyReason": {
"code": "PastDue",
"name": "Past Due"
},
"id": "bc:S44YUDkjCADvyTOFPU9ZY",
"workflowType": {
"code": "StdDelinquency",
"name": "Standard Delinquency"
}
}
}
• triggerBasis - The basis for the triggering of this event (such as the delinquency's Inception Date)
◦ This must be a code from the DelinquencyTriggerBasis typelist
• offsetDays - The target date of the event, in terms of the number of days before or after the trigger basis date
• automatic - A flag indicating whether the workflow can advance to the event automatically or if approval is
required
• relativeOrder - An optional integer used to specify the order of execution when multiple events have the same
trigger basis and offset days
For example, in the base configuration's "Standard Delinquency Plan", the Past Due reason is associated with the
Standard Delinquency workflow type. The first event for this workflow type is "Dunning Letter 1", which triggers
automatically 0 days after the delinquency inception date. In the "Standard Delinquency Plan", the
DelinquencyPlanReason resource corresponding to "Dunning Letter 1" looks like this:
"attributes": {
"automatic": true,
"eventName": {
"code": "DunningLetter1",
"name": "Dunning Letter 1"
},
"id": "bc:SWsCS5Rm-ml617OwUPINi",
"offsetDays": 0,
"relativeOrder": 0,
"triggerBasis": {
"code": "Inception",
"name": "Inception Date"
}
}
Endpoint Description
GET admin/v1/delinquency-plans/{id}/reasons Returns all reasons for the given delinquency plan
GET admin/v1/delinquency-plans/{id}/ Returns the given reason for the given delinquency plan
reasons/{rid}
GET admin/v1/delinquency-plans/{id}/ For the given delinquency plan, returns all events in the workflow for
reasons/{reasonId}/events the given reason
GET admin/v1/delinquency-plans/{id}/ For the given delinquency plan, returns the given event in the
reasons/{reasonId}/events/{eventId} workflow for the given reason
For example, the following call returns all reasons for the base configuration's "Standard Delinquency Plan" (bc:202).
For the sake of clarity, only the first two reasons are shown.
GET /admin/v1/delinquency-plans/bc:202/reasons
{
"count": 3,
"data": [
{
"attributes": {
"delinquencyReason": {
"code": "NotTaken",
"name": "Not Taken"
},
"id": "bc:S9ruPKWuQFg_q8YM-p8HR",
"workflowType": {
"code": "CancelImmediately",
"name": "Cancel Immediately"
}
}
},
{
"attributes": {
"delinquencyReason": {
"code": "PastDue",
"name": "Past Due"
},
"id": "bc:S44YUDkjCADvyTOFPU9ZY",
"workflowType": {
"code": "StdDelinquency",
"name": "Standard Delinquency"
}
}
},
...
The following call returns all events for the Standard Delinquency reason in the base configuration's "Standard
Delinquency Plan" (bc:202). For the sake of clarity, only the first two events are shown.
{
"count": 7,
"data": [
{
"attributes": {
"automatic": false,
"eventName": {
"code": "Collections",
"name": "Collections"
},
"id": "bc:SYqYgo3X991EELnynjjcj",
"offsetDays": 45,
"triggerBasis": {
"code": "Inception",
"name": "Inception Date"
}
}
},
{
"attributes": {
"automatic": true,
"eventName": {
"code": "DunningLetter1",
"name": "Dunning Letter 1"
},
"id": "bc:SWsCS5Rm-ml617OwUPINi",
"offsetDays": 0,
"relativeOrder": 0,
"triggerBasis": {
"code": "Inception",
"name": "Inception Date"
}
}
},
...
Endpoint Description
POST admin/v1/delinquency-plans/{id}/reasons Add a reason to the given delinquency plan
POST admin/v1/delinquency-plans/{id}/reasons/ For the given delinquency plan, add an event to the given reason's
{reasonId}/events workflow
POST /admin/v1/delinquency-plans/bc:1221/reasons
"data": {
"attributes": {
"delinquencyReason": {
"code": "PastDue"
},
"workflowType": {
"code": "StdDelinquency"
}
}
}
}
When adding an event to a delinquency plan reason's workflow, you must specify:
• automatic
• eventName
• triggerBasis
You do not have to specify offsetDays. However, there is no default value for this field. If you omit it from the POST,
the attribute is set to NULL. BillingCenter will treat a NULL offset as if it were a 0, except in the case where there is a
tie between a 0-offset event and a NULL-offset event. In this case, the 0-offset event wins the tie.
For example, the following request add a "Dunning Letter 1" event to the Past Due reason (bc:999) of delinquency plan
bc:1221. The event is automatic, with a trigger basis of Inception Date and an offset of 7 days.
POST /admin/v1/delinquency-plans/bc:1221/reasons/bc:999/events
{
"data": {
"attributes": {
"automatic": true,
"eventName": {
"code": "DunningLetter1"
},
"triggerBasis": {
"code": "Inception"
},
"offsetDays": 7
}
}
}
Endpoint Description
PATCH admin/v1/delinquency-plans/{id}/ Modifies the given reason in the given delinquency plan
reasons/{rid}
PATCH admin/v1/delinquency-plans/{id}/ For the given delinquency plan, modifies the given event in the given
reasons/{reasonId}/events/{eventId} reason's workflow
You can PATCH delinquency plan reasons and events only for delinquency plans that are not in use.
For example, the following requests modify the reason and event created in the previous examples.
PATCH /admin/v1/delinquency-plans/bc:1221/reasons/bc:999
{
"data": {
"attributes": {
"delinquencyReason": {
"code": "NotTaken"
}
}
}
}
PATCH /admin/v1/delinquency-plans/bc:1221/reasons/bc:999/events/bc:1001
{
"data": {
"attributes": {
"offsetDays": 10
}
}
}
Use the following endpoints to delete delinquency plan reasons and events:
Endpoint Description
PATCH admin/v1/delinquency-plans/{id}/ Deletes the given reason in the given delinquency plan
reasons/{rid}
PATCH admin/v1/delinquency-plans/{id}/ For the given delinquency plan, deletes the given event in the given
reasons/{reasonId}/events/{eventId} reason's workflow
You can delete delinquency plan reasons and events only for delinquency plans that are not in use.
For example, the following requests deletes the reason and event created in the previous examples.
DELETE /admin/v1/delinquency-plans/bc:1221/reasons/bc:999
DELETE /admin/v1/delinquency-plans/bc:1221/reasons/bc:999/events/bc:1001
A payment allocation plan is a set of values associated with accounts that determine how money in unapplied funds is
allocated to unpaid invoice items. For a complete description of the business functionality of payment allocation plans,
see the Application Guide.
Some functionality is common to all plans. This includes the following:
• Plan order
• Endpoints for plan testing
• Multicurrency functionality with plans
For more information on the common functionality, see “Overview of plans” on page 131.
Two sets of criteria
Payment allocation plans have two sets of criteria:
• Criteria that determine which invoice items are eligible to be paid (to have funds distributed to them)
• Criteria that determine the order in which eligible items are paid
Distribution criteria
Payment allocation plans use a set of criteria to define the invoice items eligible to be paid (to have funds distributed to
them). The criteria are additive. Invoice items must meet all criteria to be eligible.
The base configuration includes several distribution criteria. For example:
• Billed or Due - Invoice items are eligible if they are on invoices that are billed or due.
• Invoice - If the payment targets a specific invoice, only invoice items on that invoice are eligible.
• Positive - Only invoice items with positive amounts are eligible.
• Policy Period - If the payment targets a specific policy period, only invoice items on invoices for that policy period
are eligible.
• Next planned invoice - Invoice items are eligible if they are on billed or due invoices, or if they are on the next
planned invoice.
• Past due - Invoice items are eligible if they are on due invoices.
Invoice item ordering
If the total amount of all eligible invoice items is greater than the amount to be distributed, BillingCenter must
determine which of the eligible invoice items will be paid. Payment allocation plans have a second set of criteria to
Payment allocation plans 153
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
specify the order in which the eligible invoice items are paid. These criteria are applied consecutively. Invoice items
are ordered by the first criteria. Then, for invoice items with the same rank, invoice items are ordered by the second
criteria, and so on.
The base configuration includes several distribution criteria. For example:
• Recapture charges - Rank invoice items associated with recapture charges first.
• Event date - Rank invoice items based on their placement dates.
• Charge pattern - Rank invoice items according to the priority of their charge pattern.
• Bill date - Rank invoice items based on the bill dates of their invoices.
{
"data": {
"attributes": {
"description": "The default allocation plan...",
"distributionCriteria": [
{
"code": "BilledOrDue",
"name": "Billed or Due"
},
{
"code": "Invoice",
"name": "Invoice"
},
{
"code": "PolicyPeriod",
"name": "Policy Period"
},
{
"code": "Positive",
"name": "Positive"
}
],
"effectiveDate": "1990-01-01",
"id": "cash_plan:1",
"inUse": true,
"invoiceItemOrderings": [
{
"id": "ordering_type:1",
"invoiceItemOrderingType": {
"code": "RecaptureFirst",
"name": "Recapture Charges"
},
"priority": 1
},
{
"id": "ordering_type:2",
"invoiceItemOrderingType": {
"code": "EventDate",
"name": "Placement Date"
},
"priority": 2
},
{
"id": "ordering_type:3",
"invoiceItemOrderingType": {
"code": "ChargePattern",
"name": "Charge Pattern"
},
"priority": 3
}
],
"name": "Default Payment Allocation Plan",
"planOrder": 1
}
...
POST /admin/v1/payment-allocation-plans
{
"data": {
"attributes": {
"name": "Cloud API Default Payment Allocation Plan",
"effectiveDate": "2020-01-01"
}
}
}
If you do not specify any distribution criteria, BillingCenter adds the following criteria by default:
• Billed or Due
• Invoice
• Policy Period
• Positive
If you do not specify any invoice item ordering criteria, BillingCenter adds the following criteria by default:
1. Recapture charges
2. Event date
3. Charge pattern
Thus, the payment allocation plan created above has the following attributes:
• Name: Cloud API Default Payment Allocation Plan
• Effective Date: January 1, 2020
• Distribution criteria:
◦ Billed or Due
◦ Invoice
◦ Policy Period
◦ Positive
• Invoice item ordering criteria:
1. Recapture charges
2. Event date
3. Charge pattern
"distributionCriteria": [
{
"code": "<typecode-from-DistributionFilterType-typelist>"
},
{
"code": "<typecode-from-DistributionFilterType-typelist>"
},
...
]
Distribution criteria are additive. You can declare them in any order.
To specify invoice item ordering criteria, use the following syntax:
"invoiceItemOrderings": [
{
"invoiceItemOrderingType": {
"code": "<typecode-from-InvoiceItemOrderingType-typelist>"
}
},
{
"invoiceItemOrderingType": {
"code": "<typecode-from-InvoiceItemOrderingType-typelist>"
}
}
]
Invoice item ordering criteria are ordered. When POSTing a new payment allocation plan, the first criteria in the
payload is given a priority of 1 (it is executed first), the second is given a priority of 2 (it is executed second), and so
on.
POST /admin/v1/payment-allocation-plans
{
"data": {
"attributes": {
"name": "Cloud API Specified Criteria Payment Allocation Plan",
"effectiveDate": "2020-02-02"
"distributionCriteria": [
{
"code": "Positive"
},
{
"code": "BilledOrDue"
}
],
"invoiceItemOrderings": [
{
"invoiceItemOrderingType": {
"code": "ChargePattern"
}
},
{
"invoiceItemOrderingType": {
"code": "EventDate"
}
}
]
}
}
}
PATCH /admin/v1/payment-allocation-plans/bc:5665
{
"data": {
"attributes": {
"effectiveDate": "2020-03-03",
}
}
}
distributionCriteria and invoiceItemOrderings are both arrays. Keep in mind that, within Cloud API,
PATCHing an array does not add new members to the existing members. It replaces the existing members with the new
members.
If you want to add new distribution criteria or new invoice item ordering criteria to an existing payment allocation plan,
you must first determine the existing criteria, and then specify an array with those criteria and the ones you wish to
add. In the case of invoiceItemOrderings, you must also list old and new criteria in the desired order.
For example, the following deletes delinquency plan bc:5665 (assuming that it is not in use).
DELETE /admin/v1/delinquency-plans/bc:5665
Payment plans
A payment plan is a plan associated with a policy that determines how charges for that policy are sliced into invoice
items and placed on invoices. When you create a policy, you must explicitly specify a payment plan. You cannot create
a policy without a payment plan. For a complete description of the business functionality of payment plans, see the
Application Guide.
Some functionality is common to all plans. This includes the following:
• Plan order
• Endpoints for plan testing
• Multicurrency functionality with plans
For more information on the common functionality, see “Overview of plans” on page 131.
Equity warnings
Equity is a measure of the amount of service that has been paid for minus the amount of service that has been provided.
Typically, insurers want a policy's equity to be positive, as this means the insurer has not provided service that has not
yet been paid for.
When a user attempts to make changes to a policy's invoices that would violate the preferred amount of equity,
BillingCenter displays an equity warning message.
Equity warnings are enabled through a global application configuration parameter. Once enabled, their behavior is
controlled by several equity warning settings in the policy's payment plan.
• If equity warnings are disabled for BillingCenter, you cannot specify equity warning settings in any payment plan.
• If equity warnings are enabled for BillingCenter, but a given plan is used for premium reporting, you cannot specify
equity warning settings for that payment plan.
• If equity warnings are enabled for BillingCenter, and a given plan is not used for premium reporting, you must
specify the equity warning settings for that payment plan.
{
"data": {
"attributes": {
"accountLevelBillingInvoiceItemPlacementCutoffType": {
"code": "invoicebilldate",
"name": "Bill Date"
},
"currencies": [
{
"code": "usd",
"name": "USD"
}
],
"daysBeforePolicyExpirationForInvoicingBlackout": 30,
"daysFromReferenceDateToDownPayment": -25,
"daysFromReferenceDateToFirstInstallment": 0,
"daysFromReferenceDateToOneTimeCharge": -25,
"description": "Monthly 10% Down, 9 Max installments",
"downPaymentAfter": {
"code": "policyeffectivedate",
"name": "Policy Effective Date"
},
"downPaymentPercent": "10.00",
"downPaymentSecondInstallment": {
"code": "downpayment",
"name": "DownPayment"
},
"effectiveDate": "2022-07-28",
"equityBuffer": 30,
"equityWarningsEnabled": true,
"firstInstallmentAfter": {
"code": "policyeffectivedateplusoneperiod",
"name": "One Interval After Policy Effective Date"
},
"id": "bc:SevjGb1S68cGb1SnUYcKo",
"inUse": false,
"installmentFeeDefaults": {},
"invoicingBlackoutType": {
"code": "billed",
"name": "Billed"
},
"maximumNumberOfInstallments": 9,
"name": "A Monthly 10% Down, 9 Max installments",
"oneTimeChargeAfter": {
"code": "policyeffectivedate",
"name": "Policy Effective Date"
},
"periodicity": {
"code": "monthly",
"name": "Monthly"
},
"planOrder": 1,
"policyLevelBillingBillDateOrDueDateBilling": {
"code": "BillDateBilling",
"name": "Bill Date"
},
"reporting": false,
"skipFeeForDownPayment": true
},
maximumNumberOfInstallments integer
name string This value cannot be used by any othe
payment plan.
oneTimeChargeAfter A value from the In the base configuration, this can be
PaymentScheduledAfter typelist
• chargedate
• chargeeffectivedate
• chargeeffectivedatepluson
• policyeffectivedate
• policyeffectivedatepluson
periodicity A value from the Periodicity typelist In the base configuration, this can be
• monthly
• everyweek
• everyotherweek
• twicepermonth
• everyothermonth
• quarterly
• everyfourmonths
• everysixmonths
• everyyear
• everyotheryear
periodicity A value from the Periodicity typelist In the base configuration, this can be
• monthly
• everyweek
• everyotherweek
• twicepermonth
• everyothermonth
• quarterly
• everyfourmonths
• everysixmonths
• everyyear
• everyotheryear
skipFeeForDownPayment Boolean
maximumNumberOfInstallments integer
name string This value cannot be used by any othe
payment plan.
oneTimeChargeAfter A value from the In the base configuration, this can be
PaymentScheduleAfter typelist
• chargedate
• chargeeffectivedate
• chargeeffectivedatepluson
• policyeffectivedate
• policyeffectivedatepluson
periodicity A value from the Periodicity typelist In the base configuration, this can be
• monthly
• everyweek
• everyotherweek
• twicepermonth
• everyothermonth
• quarterly
• everyfourmonths
• everysixmonths
• everyyear
• everyotheryear
POST /admin/v1/payment-plans
{
"data": {
"attributes": {
"accountLevelBillingInvoiceItemPlacementCutoffType" : {
"code" : "invoiceduedate"
},
"currencies": [
{
"code": "usd",
"name": "USD"
}
],
"daysBeforePolicyExpirationForInvoicingBlackout": 30,
"daysFromReferenceDateToDownPayment": 7,
"daysFromReferenceDateToFirstInstallment": 7,
"daysFromReferenceDateToOneTimeCharge": 7,
"downPaymentAfter": {
"code": "policyeffectivedate"
},
"downPaymentPercent": "10.00",
"downPaymentSecondInstallment": {
"code": "downpayment"
},
"effectiveDate": "2020-12-31",
"equityBuffer": 30,
"equityWarningsEnabled": true,
"firstInstallmentAfter": {
"code": "policyeffectivedate"
},
"invoicingBlackoutType": {
"code": "due"
},
"maximumNumberOfInstallments": 10,
"name": "Cloud API Payment Plan 2",
"oneTimeChargeAfter": {
"code": "policyeffectivedate"
},
"periodicity": {
"code": "monthly"
},
"policyLevelBillingBillDateOrDueDateBilling": {
"code": "DueDateBilling"
},
"reporting": false,
"skipFeeForDownPayment": true
}
}
}
• PATCH /admin/v1/payment-plans/{paymentPlanId}
When a payment plan is assigned to at least one policy, BillingCenter considers the plan to be in use.
When a plan is not in use:
• Its inUse field is set to false.
• The entire plan can be modified.
When a plan is in use:
• Its inUse field is set to true.
• Through Cloud API, only the expirationDate can be modified.
For example, the following changes payment plan bc:1001 so that the maximum number of installments is 8 and the
plan expires on June 6, 2025.
• If the plan is not in use, the PATCH is successful.
• If the plan is in use, the PATCH fails because it specifies a value that is not expirationDate.
PATCH /admin/v1/payment-plans/bc:1001
{
"data": {
"attributes": {
"expirationDate": "2025-06-06",
"maximumNumberOfInstallments": 8
}
}
}
DELETE /admin/v1/payment-plans/bc:1001
For example, the following GETs the payment plan overrides for payment plan bc:32. There is one payment plan
override, which specifies no down payment for renewal billing instructions.
GET /admin/v1/payment-plans/bc:32/overrides
{
"count": 1,
"data": [
{
"attributes": {
"billingInstructionType": {
"code": "Renewal",
"name": "Renewal"
},
"downPaymentSecondInstallment": {
"code": "none",
"name": "None"
},
"id": "bc:S1Cn5rNhJXRu3VKic7lmj"
},
...
POST /admin/v1/payment-plans/bc:707/overrides
{
"data": {
"attributes": {
"billingInstructionType": {
"code": "Renewal"
},
"downPaymentSecondInstallment": {
"code": "none"
}
}
}
}
{
"data": {
"attributes": {
"downPaymentPercent": "6.00"
}
}
}
A return premium plan is a plan associated with a policy that determines how credits from negative charges are applied
to unpaid invoice items for the policy. Every policy must have a return premium plan, but when you create a policy,
you do not specify a plan. Rather, BillingCenter assigns a return premium plan to the policy. The assigned plan is the
active plan with the lowest plan order value (typically "1") at the time the policy is created. For a complete description
of the business functionality of return premium plans, see the Application Guide.
Some functionality is common to all plans. This includes the following:
• Plan order
• Endpoints for plan testing
• Multicurrency functionality with plans
For more information on the common functionality, see “Overview of plans” on page 131.
Code Description
Account Same Payer
Policy Same Payer and Policy
Code Description
PolicyPeriod Same Payer and Policy Period
ChargePattern Same Payer, Policy Period, and Charge Pattern
ChargeCategory Same Payer, Policy Period, and Charge Category
ChargeGroup Same Payer, Policy Period, and Charge Group
Return premium plans also have a global criteria named listBillAccountExcessTreatment. This setting identifies
which unapplied fund to use for list bill policies. It is set to a value from the ListBillAccountExcess typelist. In the
base configuration, there are two possible values:
• PolicyOwnerUnapplied - Specifies the policy owner default or policy designated unapplied as the target for any
returned premium
◦ PolicyPayerUnapplied - Specifies the policy payer unapplied as the target for any returned premium
{
"data": {
"attributes": {
"chargeQualification": {
"code": "ChargePattern",
"name": "Same Payer, Policy Period, and Charge Pattern"
},
"description": "The default plan for returned premium distribution.",
"effectiveDate": "2013-01-01",
"id": "ret_premium_plan:1",
"inUse": true,
"listBillAccountExcessTreatment": {
"code": "PolicyOwnerUnapplied",
"name": "Policy Owner Unapplied"
},
"name": "Default Return Premium Plan",
"planOrder": 1
},
...
• POST /admin/v1/return-premium-plans
Code Description
Account Same Payer
Policy Same Payer and Policy
PolicyPeriod Same Payer and Policy Period
ChargePattern Same Payer, Policy Period, and Charge Pattern
ChargeCategory Same Payer, Policy Period, and Charge Category
ChargeGroup Same Payer, Policy Period, and Charge Group
For example, the following request creates a new return premium plan.
POST /admin/v1/return-premium-plans/
{
"data": {
"attributes": {
"name": "Same payer and policy period",
"effectiveDate": "2023-01-01",
"chargeQualification": {
"code": "PolicyPeriod"
}
}
}
}
When you create a plan through Cloud API, you cannot specify a planOrder value. BillingCenter automatically sets
the new plan's planOrder to "the current highest planOrder value + 1". In other words, new plans are given the
highest possible planOrder value (and therefore the lowest priority). However, you can modify a plan's planOrder
value through a PATCH.
PATCH /admin/v1/return-premium-plans/bc:200
{
"data": {
"attributes": {
"effectiveDate": "2023-03-03",
}
}
}
DELETE /admin/v1/return-premium-plans/bc:200
Accounts
An account is a business entity that owns one or more policies and/or is responsible for paying for one or more
policies.
This topic describes how to manage accounts through Cloud API.
GET /billing/v1/accounts/bc:477
{
"data": {
"attributes": {
"accountNumber": "Standard Account",
"billDateOrDueDateBilling": {
"code": "BillDateBilling",
"name": "Bill Date"
},
"billingLevel": {
"code": "Account",
"name": "Account/Default Unapplied"
},
"billingPlan": {
"displayName": "Standard Mail",
"id": "bc:SOnd0wA7MbOlNtrgseYVU"
},
"currency": {
"code": "usd",
"name": "USD"
},
"delinquencyPlan": {
"displayName": "Standard Delinquency Plan",
"id": "bc:S1jtHjvdt5htTf4qDFCWB"
},
"everyOtherWeekInvoiceAnchorDate": "2022-08-09",
"firstTwicePerMonthInvoiceDayOfMonth": 1,
"id": "bc:SkCdQLAh9lsqwdYcYv9gB",
"invoiceDayOfMonth": 1,
"invoiceDayOfWeek": {
"code": "Friday",
"name": "Friday"
},
"paymentAllocationPlan": {
"displayName": "Default Payment Allocation Plan",
"id": "cash_plan:1"
},
Accounts 175
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"secondTwicePerMonthInvoiceDayOfMonth": 15
},
...
Creating an account
To create a new account through Cloud API, use the following endpoint:
• POST /billing/v1/accounts
The accountNumber field is required by the database. But, there is an account number generator plugin that provides a
default value. If you wish to use the value generated by the plugin, omit the accountNumber field from the POST.
User interface field Data model field Cloud API default for this field
Type AccountType Insured
Send Invoices By InvoiceDeliveryType null
176 Accounts
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
User interface field Data model field Cloud API default for this field
Default Payment Instrument DefaultPaymentInstrument Responsive
The New Account screen requires an account to have exactly one contact with the Primary Payer flag. Accounts created
from the POST /accounts endpoint are not required to have any contacts.
{
"data": {
"attributes": {
"accountNumber": "Cloud API Account 1",
"billDateOrDueDateBilling": {
"code": "BillDateBilling"
},
"billingLevel": {
"code": "PolicyDesignatedUnapplied"
},
"billingPlan": {
"displayName": "Standard Mail",
"id": "bc:S7ESqf3xS94SUQCSAMTUb"
},
"currency": {
"code": "usd"
},
"delinquencyPlan": {
"displayName": "Standard Delinquency Plan",
"id": "bc:S-JLxwyYClKzbwEfswJ9Q"
},
"everyOtherWeekInvoiceAnchorDate": "2022-08-09",
"firstTwicePerMonthInvoiceDayOfMonth": 1,
"invoiceDayOfMonth": 1,
"invoiceDayOfWeek": {
"code": "Friday"
},
"paymentAllocationPlan": {
"displayName": "Default Payment Allocation Plan",
"id": "cash_plan:1"
},
"secondTwicePerMonthInvoiceDayOfMonth": 15
}
}
}
Payment instruments
A payment instrument is a designation for how a payment was or will be made. For example, a payment instrument can
be set to Cash, Check, or a specific Credit Card (such as Credit Card 4400-0012-4523-0352). Payment instruments are
associated with accounts, invoice streams, and payments.
Accounts 177
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
(The universal payment instruments that are applicable to producers include: Cash, Check, and Unapplied Fund
(Producer).)
A non-universal payment instrument is a payment instrument that applies to a single account (or producer). Non-
universal payment instruments are typically credit cards or bank accounts that belong to the account holder. For
example, suppose the Ray Newton account has a payment instrument that is a bank account with the account number
07025 93211. This is a non-universal payment instrument.
All payment instruments have an immutable field.
• For universal payment instruments, this field is set to true.
• For non-universal payment instruments, this field is set to false.
Response body
{
"data": {
"attributes": {
"displayName": "Cash",
"id": "bc:S7JRZxdMxp3TQnHCVLN7q",
"immutable": true,
"paymentMethod": {
"code": "cash",
178 Accounts
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"name": "Cash"
}
},
...
Response body
{
"count": 5,
"data": [
{
"attributes": {
"displayName": "Cash",
"id": "bc:S7JRZxdMxp3TQnHCVLN7q",
"immutable": true,
"paymentMethod": {
"code": "cash",
"name": "Cash"
}
},
...
},
{
"attributes": {
"displayName": "Check",
"id": "bc:S3tSVt5YFd7_pnRtIk4OV",
"immutable": true,
"paymentMethod": {
"code": "check",
"name": "Check"
}
},
...
},
{
"attributes": {
"displayName": "Credit Card (4400-0012-4523-0352)",
"id": "bc:SZbE2YgL2nTsSIoIDgGLH",
"immutable": false,
"paymentMethod": {
"code": "creditcard",
"name": "Credit Card"
},
"token": "4400-0012-4523-0352"
},
...
},
...
Accounts 179
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
If you specify a payment method of creditcard, you must also specify a token field set to a String value (such as the
credit card's number).
If you specify a payment method of ach, misc, or wire, no other fields are required.
For example, the following request creates a new account-level credit card payment instrument for account bc:73.
Command
POST /billing/v1/accounts/bc:73/payment-instruments
Request body
{
"data": {
"attributes": {
"paymentMethod": {
"code": "creditcard"
},
"token": "0000-1111-2222-3333"
}
}
}
Account contacts
An account can have any number of contacts.
{
"data": {
"attributes": {
"displayName": "Ray Newton",
"taxId": "***-**-6789"
}
}
}
For some callers, such as internal or external users, the masking of tax id may be appropriate as it protects personally
identifiable information. For other callers, such as services, this masking may cause a problem as the callers may
reference contacts internally using the tax id.
There are two ways that the taxId field can be unmasked:
• You can configure the field so that it is always unmasked. For information on how to configure this, see
“Obfuscating response data”.
• You can grant the caller the restunmasktaxid system permission. Any caller who has a role with this permission
will get responses with unmasked tax IDs. For information on how to configure this, see the section on API role
special permissions in the Cloud API Developer Guide.
180 Accounts
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
• POST /accounts/{accountId}/contacts
POST billing/v1/accounts/bc:7123/contacts
{
"data": {
"attributes": {
"contactSubtype": "Person",
"firstName": "Matt",
"lastName": "Hamilton",
"primaryPayer": false
}
}
}
Additional behaviors
POSTing contacts and the primaryPayer flag
The BillingCenter user interface requires every account to have exactly 1 contact with the primaryPayer flag set to
true. This requirement is enforced in the user interface only and not in the database. The database allows an account to
have any number of primaryPayer contacts, from 0 to more than 1.
Cloud API prevents an account from having more than 1 primaryPayer contact. However, Cloud API does not prevent
an account from having no primaryPayer contacts. In fact, having no primaryPayer contacts is a required
intermediate stage when changing which contact is the primary payer.
Accounts 181
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Account-level charges
An account can have two levels of charges: account-level charges and policy-level charges. An account-level charge is
a charge that is owned by the account directly (such as a charge for a late fee). For more information on policy-level
charges, see“Policy-level charges” on page 198.
Use the following endpoint to query for account-level charges.
• GET /billing/v1/accounts/{accountId}/charges
• GET /billing/v1/charges/{chargeId}
Charges are associated with both accounts and policy periods, and a given charge cannot be considered to be owned
entirely by either an account or a policy period. Therefore, Cloud API considers charges to be a top-level entity. To get
an account's charges, you use an endpoint that has the account as the parent. But to get details about a specific charge,
you use an endpoint where the charge is the parent.
For example, the following request queries for the account-level charges for account bc:707. The response specifies
one charge for a $15 late fee.
Command
GET /billing/v1/accounts/bc:707/charges
Response body
{
"count": 1,
"data": [
{
"attributes": {
"amount": {
"amount": "15.00",
"currency": "usd"
},
"chargeDate": "2023-05-23T21:35:02.718Z",
"chargePattern": {
"displayName": "Late Fee",
"id": "default_data:7"
},
"holdStatus": {
"code": "none",
"name": "Not Held"
},
"id": "bc:SjwKGEQ00pe-TC22SOUT_",
"reversed": false,
"skipInvoiceItemCreation": false,
"totalInstallments": 0
},
...
GET /billing/v1/charges/bc:SjwKGEQ00pe-TC22SOUT_
Response body
{
"data": {
"attributes": {
"amount": {
"amount": "15.00",
"currency": "usd"
},
"chargeDate": "2023-05-23T21:35:02.718Z",
"chargePattern": {
"displayName": "Late Fee",
"id": "default_data:7"
},
"holdStatus": {
"code": "none",
"name": "Not Held"
},
182 Accounts
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"id": "bc:SjwKGEQ00pe-TC22SOUT_",
"reversed": false,
"skipInvoiceItemCreation": false,
"totalInstallments": 0
},
...
Unapplied funds
BillingCenter manages payments and credits using unapplied funds. An unapplied fund is a T-account where money is
stored before it is distributed to unpaid invoice items. All payments pass through an unapplied fund, even when they
are distributed immediately.
BillingCenter automatically creates and modifies unapplied funds as needed. In the user interface, the only thing you
can do is view information about them. Therefore, in Cloud API, the only REST method supported by the unapplied-
funds endpoints is GET.
Use the following endpoints to retrieve information about an account's unapplied funds:
• GET /billing/v1/accounts/{accountId}/unapplied-funds
• GET /billing/v1/accounts/{accountId}/unapplied-funds/{unappliedFundId}
GET /billing/v1/accounts/bc:505/unapplied-funds
Response
{
"count": 1,
"data": [
{
"attributes": {
"displayName": "Default",
"id": "bc:SVR_B0B2oxbGhbxlWd2q9",
"tAccount": {
"displayName": "Default Unapplied",
"id": "bc:SGFmh4LDkua9patoNbg6x"
}
},
...
}
],
...
GET /billing/v1/accounts/bc:606/unapplied-funds
Response
{
"count": 2,
"data": [
{
"attributes": {
"displayName": "Default",
"id": "bc:Sni0qvG6GCKZ6f2NBy6oT",
"tAccount": {
Accounts 183
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
184 Accounts
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"id": "bc:9931",
"type": "Policy",
"uri": "/billing/v1/accounts/bc:606/policies/bc:9931"
},
"tAccount": {
"displayName": "Designated Unapplied (PA-123456)",
"id": "bc:S6oMTQUguwvoq2fj6XZ3I"
}
},
...
}
],
...
Delinquency processes
A delinquency process is an automatic process that starts when an account invoice is past due. The steps of a
delinquency process are designed to resolve the issue. For example, they could consist of sending requests for payment
to the payer and then, if the account remains delinquent, sending a message to the Policy Administration System to
cancel the policy. For more information on delinquency processes, see the Application Guide.
GET /billing/v1/accounts/bc:101/delinquency-processes
Response
{
"count": 1,
"data": [
{
"attributes": {
"amount": {
"amount": "120.00",
"currency": "usd"
},
"delinquencyPlan": {
"displayName": "Standard Delinquency Plan",
"id": "bc:SAUeUVg7msVnhCpPT467g",
"type": "DelinquencyPlan",
"uri": "/admin/v1/delinquency-plans/bc:SAUeUVg7msVnhCpPT467g"
},
"id": "bc:SZCpWHICbr_ufUnCuxuk4",
"inceptionDate": "2024-05-23",
"phase": {
"code": "Delinquency",
"name": "Delinquency"
},
"reason": {
"code": "PastDue",
"name": "Past Due"
},
"startDate": "2024-05-23T04:55:22.635Z",
"status": {
"code": "Open",
"name": "Open"
}
},
...
Accounts 185
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
PATCHing accounts
Use the following endpoint to PATCH an account:
• PATCH /billing/v1/accounts/{accountId}
For example, the following request demonstrates changing the invoiceDayOfWeek field on an account.
Command
PATCH /billing/v1/accounts/bc:7123
Request body
{
"data": {
"attributes": {
"invoiceDayOfWeek": {
"code": "Monday"
}
}
}
}
WARNING: Once an account has one or more invoices, changing certain account fields can have a significant
impact. For example, when you change an account's billing level from Account Level to Policy Level,
BillingCenter reslices unbilled invoice items and puts them on new invoices in a new invoice stream. If manual
modifications were made to these invoices before the change, reversing the change will not necessarily restore
those invoices to their original state. For accounts with invoices, Guidewire recommends that you refer to the
Application Guide to understand the impact of changing a given field before you PATCH an account. For more
information, see the Application Guide.
PATCH /billing/v1/accounts/bc:Sw48E4rpt8MTGlmXNyUQa
Request body
{
"data": {
"attributes": {
"defaultPaymentInstrument": {
"id": "bc:S6RySysrRjIuXIpVuYU13"
}
}
}
}
186 Accounts
chapter 21
Policies
A policy is a written contract for insurance between an insurance company and policyholder stating details of coverage.
Policies are issued on accounts. Accounts are responsible for paying for one or more policies.
When a policy is issued on an account, the policy administration system sends a billing request to BillingCenter. The
billing request contains information on the policy, such as charges, the policy number, the policy period, and the
payment plan. BillingCenter uses this billing request to create invoices that will be sent to the payer account.
You can initiate the policy issuance process in BillingCenter by sending a billing request via Cloud API. For more
information on issuing policies through Cloud API, see “Issuing policies” on page 189.
For more information on how policies are handled in BillingCenter, see the Application Guide
Policy periods
A policy period is the period during which a policy is in effect. A policy has one or more policy periods. When a policy
is issued in BillingCenter, a policy period on that policy must be specified. Renewing or changing a policy also results
in a new policy period.
A policy period has the same number as the policy, but with a hyphen and an integer added to the end. This integer is
the term number of the policy period. For example, a policy called "Personal-Auto-Policy" would have a first policy
period with the name "Personal-Auto-Policy-1".
In BillingCenter, the policyPeriod object belongs to the policy object. In addition to the effective dates of the policy
period, the policyPeriod object contains some information about a policy that is not included in the policy object.
For example, the PolicyPeriod object includes billing and invoicing information, effective dates, payer accounts, and
delinquency plans. The policy number sent from the policy administration system and the policy period number are
both stored in the policyPeriod object. For examples of policyPeriod and policy objects, see “Querying for
policies and policy periods” on page 187.
For example, the following requests retrieves the policies for account bc:101.
GET /billing/v1/accounts/bc:101/policies
{
"count": 2,
"data": [
{
"attributes": {
"currency": {
"code": "usd",
"name": "USD"
},
"displayName": "PA-234553",
"doNotArchive": false,
"id": "bc:701",
"lobCode": {
"code": "PersonalAuto",
"name": "Personal Auto"
}
},
...
},
{
"attributes": {
"currency": {
"code": "usd",
"name": "USD"
},
"displayName": "HO-980077",
"doNotArchive": false,
"id": "bc:S97mvBd9ts7YnAh6Dw_kx"
"lobCode": {
"code": "Homeowners",
"name": "Homeowners"
}
},
...
}
...
GET /billing/v1/accounts/bc:717/policies/bc:701
{
"data": {
"attributes": {
"currency": {
"code": "usd",
"name": "USD"
},
"displayName": "PA-234553",
"doNotArchive": false,
"id": "bc:701",
"lobCode": {
"code": "PersonalAuto",
"name": "Personal Auto"
}
},
...
GET /billing/v1/accounts/bc:717/policies/bc:701/policy-periods
{
"count": 1,
"data": [
{
188 Policies
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"attributes": {
"assignedRisk": false,
"billingMethod": {
"code": "DirectBill",
"name": "Direct Bill"
},
"boundDate": "2023-02-23",
"cancelStatus": {
"code": "open",
"name": "Open"
},
"chargeHeld": false,
"closureStatus": {
"code": "open",
"name": "Open"
},
"confirmationNotificationState": {
"code": "DoNotNotify",
"name": "Do Not Notify"
},
"currency": {
"code": "usd",
"name": "USD"
},
"delinquencyPlan": {
"displayName": "Test Standard Delinquency Plan UOXWHS94",
"id": "bc:S-M11Lrkk9KhVOcId2f88"
},
"effectiveDate": "2023-02-23",
"eligibleForFullPayDiscount": false,
"equityBuffer": 30,
"equityWarningsEnabled": true,
"expirationDate": "2024-02-23",
"fullPayDiscountEvaluated": false,
"heldForInvoiceSending": false,
"holdInvoicingWhenDelinquent": true,
"id": "bc:SfKiqNhrcUNEOzvpPV1UD",
"paymentDistributionEnabled": true,
"paymentPlan": {
"displayName": "Foot-97-Star",
"id": "bc:ScxNukNXFq3F7wvvbgSsf"
},
"pendingRemainingBalanceFix": false,
"policyNumber": "PolicyNumber_LMPPXU98",
"policyNumberLong": "PolicyNumber_LMPPXU98-1",
"retrieved": false,
"returnPremiumPlan": {
"displayName": "Default Return Premium Plan",
"id": "ret_premium_plan:1"
},
"termConfirmed": true,
"termNumber": 1,
"westernMethod": false
},
Issuing policies
Use the following endpoint to issue policies in BillingCenter:
• POST billing/v1/accounts/{accountId}/issuances
Policies 189
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
POST /billing/v1/accounts/bc:101/issuances
Request body
{
"data": {
"attributes": {
"charges": [
{
"amount": {
"amount": "1200",
"currency": "USD"
},
"chargePattern": {
"id": "default_data:1",
}
},
{
"amount": {
"amount": "60",
"currency": "USD"
},
"chargePattern": {
"id": "default_data:6",
}
}
],
"paymentPlan": {
"id": "bc:SseFjlFaE9xxBLBG1ZRNR"
},
"policy": {},
"policyPeriod": {
"effectiveDate": "2023-12-11",
"expirationDate": "2024-12-11",
"policyNumber": "PA-234553"
}
}
}
}
190 Policies
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Policies 191
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
{
"data": {
"attributes": {
"charges": [
{
"amount": {
"amount": "1200.00",
"currency": "usd"
},
"chargeDate": "2023-12-12T17:29:05.022Z",
"chargePattern": {
"displayName": "Premium",
"id": "default_data:1",
"type": "ChargePattern",
"uri": "/admin/v1/charge-patterns/default_data:1"
},
"holdStatus": {
"code": "none",
"name": "Not Held"
},
"id": "bc:SFy0AE8LdXyShiK08inYY",
"reversed": false,
"skipInvoiceItemCreation": false,
"totalInstallments": 9
},
{
"amount": {
"amount": "60.00",
"currency": "usd"
},
"chargeDate": "2023-12-12T17:29:05.022Z",
"chargePattern": {
"displayName": "Taxes",
"id": "default_data:6",
"type": "ChargePattern",
"uri": "/admin/v1/charge-patterns/default_data:6"
},
"holdStatus": {
"code": "none",
"name": "Not Held"
},
"id": "bc:SakMlRBrLNvF0Crvj2Mrl",
"reversed": false,
192 Policies
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"skipInvoiceItemCreation": false,
"totalInstallments": 0
}
],
"createTime": "2023-12-12T17:29:05.022Z",
"executed": true,
"id": "bc:SZVcFGJg56XPQPrtq8HUG",
"paymentPlan": {
"displayName": "A Monthly 10% Down, 9 Max installments",
"id": "bc:SseFjlFaE9xxBLBG1ZRNR",
"type": "PaymentPlan",
"uri": "/admin/v1/payment-plans/bc:SseFjlFaE9xxBLBG1ZRNR"
},
"policy": {
"createTime": "2023-12-12T17:29:05.022Z",
"currency": {
"code": "usd",
"name": "USD"
},
"displayName": "PA-234553",
"doNotArchive": false,
"id": "bc:S6UbABC8vyTq2lKgu3GVK"
},
"policyPeriod": {
"assignedRisk": false,
"billingMethod": {
"code": "DirectBill",
"name": "Direct Bill"
},
"boundDate": "2023-12-11",
"cancelStatus": {
"code": "open",
"name": "Open"
},
"chargeHeld": false,
"closureStatus": {
"code": "open",
"name": "Open"
},
"confirmationNotificationState": {
"code": "DoNotNotify",
"name": "Do Not Notify"
},
"currency": {
"code": "usd",
"name": "USD"
},
"effectiveDate": "2023-12-11",
"eligibleForFullPayDiscount": false,
"equityBuffer": 30,
"equityWarningsEnabled": true,
"expirationDate": "2024-12-11",
"fullPayDiscountEvaluated": false,
"heldForInvoiceSending": false,
"holdInvoicingWhenDelinquent": false,
"id": "bc:S-r07gO0hbKuQwcUoeAWf",
"paymentDistributionEnabled": true,
"paymentPlan": {
"displayName": "A Monthly 10% Down, 9 Max installments",
"id": "bc:SseFjlFaE9xxBLBG1ZRNR",
"type": "PaymentPlan",
"uri": "/admin/v1/payment-plans/bc:SseFjlFaE9xxBLBG1ZRNR"
},
"pendingRemainingBalanceFix": false,
"policyNumber": "PA-234553",
"policyNumberLong": "PA-234553-1",
"retrieved": false,
"returnPremiumPlan": {
"displayName": "Default Return Premium Plan",
"id": "ret_premium_plan:1",
"type": "ReturnPremiumPlan",
"uri": "/admin/v1/return-premium-plans/ret_premium_plan:1"
},
"termConfirmed": true,
"termNumber": 1,
"westernMethod": false
}
},
"checksum": "0"
}
}
Policies 193
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Canceling policies
A cancellation is a policy transaction that ends a policy before its expiration date. The policy can be canceled by either
the insured or the insurer. For example, the insurer might cancel the policy because of non-payment, or the insured
might cancel the policy in order to work with a different insurer.
From an application perspective, the cancellation is initiated by the PAS. The PAS sends information about the policy
cancellation to BillingCenter, typically consisting of a cancellation billing request and an array of charges.
• The billing request can contain information about the cancellation, such as cancellation date, the cancellation
reason, the cancellation type, and special handling.
• The charges are usually negative, and are meant to settle the existing amount that has not yet been paid on the
policy.
When a policy is canceled, planned invoice items are typically moved onto a final invoice. If the payer has overpaid for
the policy, the additional funds can be disbursed or applied to another policy. For more information, see “The
cancellation process”.
For information on cancellations in general, see “Cancellations”.
Cancel a policy
Cancel a policy using the following endpoint:
• POST /billing/v1/accounts/{accountId}/policies/{policyId}/policy-periods/{policyPeriodId}/
cancellations
The only required field on a cancellation is modificationDate. This is the date that the cancellation is effective, which
is the Cancellation Date in the user interface. This date can come before or after BillingCenter receives the policy
cancellation billing request from the PAS.
The following is an example of a minimal cancellation:
Command
POST /billing/v1/accounts/bc:SSwoYVe/policies/bc:SjuMqx4/policy-periods/bc:SKfAeaM/cancellations
Request body
{
"data": {
"attributes": {
"modificationDate": "2024-02-15"
}
}
}
194 Policies
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Response
The response contains the cancellation billing instruction and the updated policy period, reflecting any changes made
to it during cancellation.
Policies 195
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
• All invoice items - BillingCenter reslices all invoice items, regardless of which have been billed for or paid.
• Planned items - BillingCenter reslices planned invoice items only and leaves the billed and due invoice items as is.
• Not fully paid items - BillingCenter reslices the unpaid and partially paid invoice items only and leaves the fully
paid invoice items as is.
Payment redistribution
If money has been applied to an invoice item that is going to be resliced, BillingCenter always undistributes the amount
by placing it in the appropriate unapplied fund before reslicing. This money can be redistributed automatically to the
new invoice items, or it can remain in the unapplied fund.
Down payments
Down payments can be given special treatment in certain circumstances when changing a payment plan. In situations
where only planned invoice items are affected by a payment plan change, and the down payment has already been
partially or fully paid, the insurer can choose to include down payment items in the reslicing. This means that:
• The money for the paid down payment is added to an unapplied fund
• The down payment item for the new payment plan is placed onto a new invoice
Special down payment treatment does not apply to out-of-sequence first installments.
For more information on payment plan changes, see “Changing a policy's payment plan” in the BillingCenter
Application Guide.
The includeDownPaymentItems field can be set whenever changing a payment plan. However, if all items are affected
by the payment plan change, includeDownPaymentItems has no effect.
When changing payment plans, the following must be true:
• The affected policy period is not archived.
• If changing a payment plan for a policy period on a list bill account, the new payment plan is in the list of payment
plans on the account.
Note: When changing a payment plan in the BillingCenter user interface, equity warnings alert you if a change
will violate the recommended amount of equity. The user interface gives you the opportunity to cancel when
this warning is shown. However, there is no mechanism to warn you about equity violations in Cloud API. The
payment plan is changed whether or not the recommended equity is violated.
196 Policies
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Example request
The example below provides a minimal change payment plan request.
In this example:
• Only planned invoice items are resliced, plus the down payment, regardless of its billed status
• The down payment for the old plan is reversed, and the down payment of the new plan is included in the newly-
sliced invoice items
• Any payments that have been made on planned invoices are redistributed
• The new payment plan will be the payment plan with id bc:Swg0ZXoiI7If8P9w4JRqL
Command
POST /billing/v1/accounts/bc:SB8S98/policies/bc:S1jN86AM/policy-periods/bc:SLAC88W/change-payment-plan
Request body
{
"data": {
"attributes": {
"includeDownPaymentItems": true,
"invoiceItemsToInclude": {
"code": "planneditems"
},
"paymentPlan": {
"id": "bc:Swg0ZXoiI7If8P9w4JRqL"
},
"redistributePayments": true
}
}
}
Request body
{
"data": {
"attributes": {
"assignedRisk": false,
"billingMethod": {
"code": "DirectBill",
"name": "Direct Bill"
},
"boundDate": "2024-06-28",
"cancelStatus": {
"code": "open",
"name": "Open"
},
"chargeHeld": false,
"closureStatus": {
"code": "open",
"name": "Open"
},
"confirmationNotificationState": {
"code": "Notified",
"name": "Notified"
},
"currency": {
"code": "usd",
"name": "USD"
},
"effectiveDate": "2024-06-28",
"eligibleForFullPayDiscount": false,
"equityBuffer": 30,
"equityWarningsEnabled": true,
"expirationDate": "2025-06-28",
"fullPayDiscountEvaluated": false,
"heldForInvoiceSending": false,
"holdInvoicingWhenDelinquent": false,
"id": "bc:S1OzDwkJOK9klnDF6cdCP",
"offerNumber": "Acc B Policy A",
"paymentDistributionEnabled": true,
"paymentPlan": {
"displayName": "D Quarterly 30% Down, 3 Max installments",
"id": "bc:Swg0ZXoiI7If8P9w4JRqL",
"type": "PaymentPlan",
"uri": "/admin/v1/payment-plans/bc:Swg0ZXoiI7If8P9w4JRqL"
},
"pendingRemainingBalanceFix": false,
"policyNumber": "Acc B Policy A",
Policies 197
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
The policy period object is returned. The paymentPlan field is the only field that has been changed on this object.
Policy-level charges
An account can have two levels of charges: account-level charges and policy-level charges. A policy-level charge is a
charge that is owned by one of the account's policy's policy periods (such as a premium charge or tax charge for a
given policy period). For more information on account-level charges, see “Account-level charges” on page 182.
Use the following endpoints to query for policy-level charges.
• GET /billing/v1/accounts/{accountId}/policies/{policyId}/policy-periods/{policyPeriodId}/
charges
• GET /billing/v1/charges/{chargeId}
From an application design standpoint, charges are associated with accounts and policy periods. But charges are
considered to be a top-level entity. Thus, to get a policy period's charges, you use an endpoint that has the account as
the parent. But to get details about a specific charge, you use an endpoint where the charge itself is the parent.
For example, the following request queries for the policy-level charges for policy period bc:909 for policy bc:808,
which is owned by account bc:707. The response specifies two charges: a premium charge for $1200 and a tax charge
for $50.
Command
GET /billing/v1/accounts/bc:707/policies/bc:808/policy-periods/bc:909/charges
Response body
{
"count": 2,
"data": [
{
"attributes": {
"amount": {
"amount": "50.00",
"currency": "usd"
},
"chargeDate": "2023-05-23T21:34:33.717Z",
"chargePattern": {
"displayName": "Taxes",
"id": "default_data:6"
},
"holdStatus": {
"code": "none",
"name": "Not Held"
198 Policies
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
},
"id": "bc:SYe6sQChPC8HsTpUAz5rT",
"reversed": false,
"skipInvoiceItemCreation": false,
"totalInstallments": 0,
"writtenDate": "2023-05-23T21:34:32.748Z"
},
...
},
{
"attributes": {
"amount": {
"amount": "1200.00",
"currency": "usd"
},
"chargeDate": "2023-05-23T21:34:33.717Z",
"chargePattern": {
"displayName": "Premium",
"id": "default_data:1"
},
"holdStatus": {
"code": "none",
"name": "Not Held"
},
"id": "bc:SjwKGEQ00pe-TC22SOUT_",
"reversed": false,
"skipInvoiceItemCreation": false,
"totalInstallments": 9,
"writtenDate": "2023-05-23T21:34:32.742Z"
},
...
The following request retrieves more information about the premium charge from the previous request.
Command
GET /billing/v1/charges/bc:SjwKGEQ00pe-TC22SOUT_
Response body
{
"data": {
"attributes": {
"amount": {
"amount": "1200.00",
"currency": "usd"
},
"chargeDate": "2023-05-23T21:34:33.717Z",
"chargePattern": {
"displayName": "Premium",
"id": "default_data:1"
},
"holdStatus": {
"code": "none",
"name": "Not Held"
},
"id": "bc:SjwKGEQ00pe-TC22SOUT_",
"reversed": false,
"skipInvoiceItemCreation": false,
"totalInstallments": 9,
"writtenDate": "2023-05-23T21:34:33.717Z"
},
...
Policy notes
Use the following endpoint to retrieve all of the notes associated with a policy:
• GET /billing/v1/accounts/{accountId}/policies/{policyId}/notes
For example, the following request retrieves policy notes for policy bc:127732, which is owned by account bc:606.
Command
GET /billing/v1/accounts/bc:606/policies/bc:127732/notes
Response
{
"count": 2,
Policies 199
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"data": [
{
"attributes": {
"author": {
"displayName": "Aaron Applegate",
"id": "default_data:1",
"type": "User",
"uri": "/admin/v1/users/default_data:1"
},
"bodySummary": "Underwriting forgot to apply a multi-policy discount. Customer is waiting for this to be
corrected a...",
"confidential": false,
"createdDate": "2024-01-09T21:26:32.731Z",
"id": "bc:S2AkggI3W-g6xGvcwmEVy",
"language": {
"code": "en_US",
"name": "English (US)"
},
"securityType": {
"code": "unrestricted",
"name": "Unrestricted"
},
"subject": "Discount not applied",
"topic": {
"code": "general",
"name": "General"
},
"updateTime": "2024-01-09T21:27:29.148Z"
},
...
},
{
"attributes": {
"author": {
"displayName": "Aaron Applegate",
"id": "default_data:1",
"type": "User",
"uri": "/admin/v1/users/default_data:1"
},
"bodySummary": "Customer believes they are being overcharged for the policy. Underwriting is confirming
premium was ...",
"confidential": false,
"createdDate": "2024-01-08T21:25:00.302Z",
"id": "bc:St6t0Eqg3V_rikhZiQKs7",
"language": {
"code": "en_US",
"name": "English (US)"
},
"securityType": {
"code": "unrestricted",
"name": "Unrestricted"
},
"subject": "Billing amount is in error",
"topic": {
"code": "dispute",
"name": "Dispute"
},
"updateTime": "2024-01-08T21:26:27.139Z"
},
...
}
],
...
Use the following endpoint to create a new note associated with a policy:
• POST /billing/v1/accounts/{accountId}/policies/{policyId}/notes
The following fields are required for a note:
• body - a String value
• language - a typecode from the LanguageType typelist (such as "en_US")
• subject - String value
For example, the following request create a new policy notes for policy bc:127732, which is owned by account bc:606.
Command
GET /billing/v1/accounts/bc:606/policies/bc:127732/notes
200 Policies
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Response
{
"data": {
"attributes": {
"body": "Customer has the new invoice and reports everything looks good.",
"language": {
"code": "en_US"
},
"subject": "Issue resolved"
}
}
}
Policies 201
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
202 Policies
chapter 22
Producers
Insurers often work with producers, which are business entities that find potential policyholders and assist in the policy
issuance process. For the value they add to the business, producers are paid commission. Commission is typically some
percent of the premium of the policies they help to underwrite.
Producer information is usually maintained in the policy administration system and shared with BillingCenter when the
producer is created.
For more information, see “Producers and commission”.
You can query for, create, and modify producers using Cloud API. You can also work with related entities such as
producer codes, producer contacts, and statement invoices.
Response
{
"data": {
"attributes": {
"advanceBalance": {
"amount": "0.00",
"currency": "usd"
},
"commissionPaidYearToDateForAllCurrencies": {
"amount": "0",
"currency": "usd"
},
"currency": {
"code": "usd",
"name": "USD"
Producers 203
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
},
"defaultPaymentInstrument": {
"displayName": "Responsive",
"id": "bc:SPTgtsE8phr-8_87hNl2A",
"type": "UniversalPaymentInstrument",
"uri": "/billing/v1/universal-payment-instruments/bc:SPTgtsE8phr-8_87hNl2A"
},
"holdStatement": true,
"id": "bc:178",
"name": "Standard Producer",
"recurDayOfMonth": 15,
"recurPeriodicity": {
"code": "quarterly",
"name": "Quarterly"
...
}
}
}
}
Producers can be associated with security zones. This may affect the producers that are returned, depending on the user
that submits the request. For more information, see “Security zones” on page 307.
You can use a custom sort query parameter when querying for producers to sort the returned producers by producer
tier:
• /billing/v1/producers?sort=tier
Creating producers
Create a producer using the following endpoint:
• POST /billing/v1/producers
The following fields are required to create a producer:
Request body
{
"data": {
"attributes": {
"currency": {
"code": "usd"
},
"name": "Cloud API Producer",
"recurDayOfMonth": 15,
"recurPeriodicity": {
"code": "monthly"
},
"tier": {
"code": "gold"
}
}
204 Producers
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
}
}
Modifying producers
Modify a producer using the following endpoint:
• PATCH /billing/v1/producers/{producerId}
You can patch any fields on a producer except for name and currency. These two fields cannot be altered from the
values set when the producer was created.
The following example call updates a producer to have a new agency bill plan:
Command
PATCH /billing/v1/producers/bc:178
Request body
{
"data": {
"attributes": {
"agencyBillPlan": {
"id": "bc:SJUcdT5ZdpnaoUXBqWFTs"
}
}
}
}
Producer codes
A producer code is a value that associates a producer with a commission plan. A producer has one producer code for
every commission plan that producer uses. From a functional perspective, producers must have at least one producer
code, though you can create producers without producer codes through Cloud API.
Producer codes are also used to associate policies with producers. When a policy that earns commission is bound, it
must have a producer code for every relevant producer role.
For more information on producer codes in BillingCenter, see “Producer codes”.
Response
{
"data": {
"attributes": {
"active": true,
"code": "Cloud API Code",
"commissionPlan": {
"displayName": "Commission Plan ILLUBO96",
"id": "bc:ScvbrLrQ_FT0Dl4OZrvgR",
"type": "CommissionPlan",
"uri": "/admin/v1/commission-plans/bc:ScvbrLrQ_FT0Dl4OZrvgR"
},
"id": "bc:195"
},
Producers 205
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
...
}
}
POST /billing/v1/producers/bc:178/producer-codes
Request body
{
"data": {
"attributes": {
"code": "Cloud API Code 2",
"commissionPlan": {
"id": "bc:S3EvNMry_1x0s0XwyTjVx"
}
}
}
}
PATCH /billing/v1/producers/bc:178/producer-codes/bc:195
Request body
{
"data": {
"attributes": {
"active": false
}
}
}
Producer contacts
A producer contact is a person or company that represents or is associated with a producer.
Producer contacts have contact information and can have one or more roles. A contact role is an identification of the
role or relationship that a given contact has with its parent object. In the base configuration, the two available roles for
producer contacts are "primary" and "secondary." A producer can only have one primary contact.
206 Producers
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Response
{
"count": 1,
"data": [
{
"attributes": {
"authorizationID": "SQOA9JWaJwI0315-b71bv",
"contactSubtype": "Person",
"displayName": "Bill Baker",
"emailAddress1": "[email protected]",
"firstName": "Bill",
"id": "bc:SXwewVPiEPAqZwsZ3pUsr",
...
}
}
]
}
Request body
{
"data": {
Producers 207
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"attributes": {
"contactSubtype": "company",
"companyName": "Producers Inc."
}
}
}
Request body
{
"data": {
"attributes": {
"cellPhone": {
"countryCode": {
"code": "US"
},
"number": "555-408-1324"
},
"contactSubtype": "person",
"lastName": "Smith",
"firstName": "John",
"roles": [
{
"code": "primary"
}
],
"primaryAddress": {
"addressLine1": "10 Main St.",
"city": "San Mateo",
"country": "US",
"postalCode": "94403"
}
"gender": {
"code": "m"
},
"pronounAggregate": {
"code": "hehimhis"
}
}
}
}
208 Producers
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Request body
{
"data": {
"attributes": {
"roles": [
{
"code": "primary"
}
]
}
}
}
Policy commissions
A policy commission is a collection of information about the commission that a producer earns on a policy period. It
contains fields such as the plan used to calculate commission, the policy period, the producer code, and the commission
override rate, if any.
Commission amounts (such as the commission earned or the commission paid) are also included in this resource, but
they are not returned by default when querying for policy commissions using Cloud API. Commission amounts can be
retrieved using query parameters.
For example, the following call retrieves a single policy commission on a producer:
Command
GET /billing/v1/producers/bc:127/producer-codes/bc:183/policy-commissions/bc:217
Response
{
"data": {
"attributes": {
"commissionSubPlan": {
"displayName": "CondSubPlan",
"id": "bc:SHXOiuOSIMzowZbeqTbFV",
"type": "CommissionSubPlan",
"uri": "/admin/v1/commission-plans/bc:SjIwWlktG0UlwcLdgF20f/commission-sub-plans/
Producers 209
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
bc:SHXOiuOSIMzowZbeqTbFV"
},
"currency": {
"code": "usd",
"name": "USD"
},
"defaultForPolicy": true,
"id": "bc:217",
"policyPeriod": {
"displayName": "cross-platform-monitor-1",
"id": "bc:SHUqEMSoU383OrVOPNqSg",
"type": "PolicyPeriod",
"uri": "/billing/v1/accounts/bc:SyyGOASPQ15h-4fPRIuTp/policies/bc:Sa4DBxSa8vGdSqpJmABz6/policy-periods/
bc:SHUqEMSoU383OrVOPNqSg"
},
"producerCode": {
"displayName": "NewProd (Code)",
"id": "bc:183",
"type": "ProducerCode",
"uri": "/billing/v1/producers/bc:127/producer-codes/bc:183"
},
"role": {
"code": "primary",
"name": "Primary"
}
},
...
}
}
}
Response
{
"data": {
"attributes": {
"commissionEarnedRetained": {
"amount": "450.00",
"currency": "usd"
},
"commissionExpenseBalance": {
"amount": "450.00",
"currency": "usd"
},
"commissionReserveBalance": {
"amount": "0.00",
"currency": "usd"
},
"commissionSettled": {
"amount": "450.00",
"currency": "usd"
},
"commissionSubPlan": {
"displayName": "Default",
"id": "bc:SkgUDEXzzZ0bjXDOLtz-b",
"type": "CommissionSubPlan",
"uri": "/admin/v1/commission-plans/bc:SArRUOxjtTmzRMkl-g9Xn/commission-sub-plans/bc:SkgUDEXzzZ0bjXDOLtz-
b"
},
"commissionWrittenOff": {
"amount": "0.00",
"currency": "usd"
},
"currency": {
"code": "usd",
210 Producers
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"name": "USD"
},
"defaultForPolicy": true,
"id": "bc:218",
"negativeCmsnAdjustmentBalance": {
"amount": "0.00",
"currency": "usd"
},
"paidCommission": {
"amount": "450.00",
"currency": "usd"
},
"policyPeriod": {
"displayName": "Policy123-1",
"id": "bc:SfS2SQqrf-MXsSUDuY1-E",
"type": "PolicyPeriod",
"uri": "/billing/v1/accounts/bc:SDaIYv7K8PNAtEXgdNztW/policies/bc:Sn3kcHTeNSja0kOrHhUy1/policy-periods/
bc:SfS2SQqrf-MXsSUDuY1-E"
},
"positiveCmsnAdjustmentBalance": {
"amount": "0.00",
"currency": "usd"
},
"producerCode": {
"displayName": "Cloud API Producer",
"id": "bc:184",
"type": "ProducerCode",
"uri": "/billing/v1/producers/bc:128/producer-codes/bc:184"
},
"role": {
"code": "primary",
"name": "Primary"
}
},
...
}
}
Request body
{
"data": {
"attributes": {
"currency": {
"code": "usd"
},
"name": "Producer A",
"recurDayOfMonth": 15,
"recurPeriodicity": {
"code": "monthly"
},
"tier": {
"code": "gold"
}
}
},
"included": {
"ProducerContact": [
{
Producers 211
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"attributes": {
"contactSubtype": "company",
"companyName": "Producer A Inc."
"roles": [
{
"code": "primary"
}
]
},
"method": "post",
"uri": "/billing/v1/producers/this/contacts"
}
],
"ProducerCode": [
{
"attributes": {
"code": "PA-1",
"commissionPlan": {
"id": "bc:S3EvNMry_1x0s0XwyTjVx"
}
},
"method": "post",
"uri": "/billing/v1/producers/this/producer-codes"
}
]
}
}
212 Producers
chapter 23
Agency bill
BillingCenter supports two models of billing: direct bill and agency bill. In the agency bill model, the producer
invoices policyholders and receives payment from them. The producer then sends payment to BillingCenter minus the
commission earned from these payments. Agency bill payments typically include payments for multiple policies.
BillingCenter supports both the statement bill and the account current approach to agency bill.
The following topics contain information on working with agency bill functionality through Cloud API.
Example request
The following GET retrieves an agency bill plan with id bc:145.
Command
GET /admin/v1/agency-bill-plans/bc:145
Response
{
"data": {
"attributes": {
"autoProcessWhenPaymentMatches": true,
"clearCommissionThresholdDefaults": {
"usd": "3.00"
},
"clearGrossThresholdDefaults": {
"usd": "5.00"
},
"clearingLogicTarget": {
"code": "payments",
"name": "Payments"
},
"createOffsetsOnBilledInvoices": false,
"currencies": [
{
"code": "usd",
"name": "USD"
}
],
"cycleCloseDayOfMonth": 15,
"cycleCloseDayOfMonthLogic": {
"code": "exact",
"name": "Exact Day"
},
"daysAfterCycleCloseToSendStmnt": 0,
"daysUntilFirstDunningSent": 0,
"daysUntilPromiseReminderSent": 10,
"daysUntilSecondDunningSent": 0,
"effectiveDate": "2024-05-10",
"exceptionForPastDueStatement": true,
"exceptionIfPromiseNotReceived": false,
"firstDunningSentIfNotPaid": false,
"id": "bc:145",
"inUse": false,
"lowCommissionCleared": true,
"lowGrossCleared": true,
"name": "Standard Agency Bill Plan",
"netThresholdForSuppressingStmtDefaults": {
"usd": "2.00"
},
"paymentExceptionsSent": true,
"paymentTermsInDays": 45,
"planOrder": 1,
"pmntSchdChngOffsetsOnBilled": false,
"producerWriteoffThresholdDefaults": {
"usd": "5.00"
},
"promiseDueInDays": 15,
"promiseExceptionsSent": false,
"reminderSentIfPromiseNotRcvd": false,
"secondDunningSentIfNotPaid": false,
"snapshotNonPastDueItems": true,
"statementSentAfterCycleClose": true,
"statementsWithLowNetSuppressed": true,
"workflowPlan": {
"code": "StdAgencyBill",
"name": "Standard Agency Bill"
}
},
"checksum": "0",
"links": {}
}
}
Setting thresholds
Agency bill plans use thresholds to determine if certain events occur, such as writing off commission differences or
suppressing statements. If you are setting thresholds on an agency bill plan through Cloud API, additional fields are
required to specify threshold amounts. These fields are required only when the corresponding required field is set to
true.
The following table notes these threshold fields and their corresponding required fields:
Thresholds are specified in maps, with a field for each supported currency and a value for the threshold amount for that
currency.
For example, the following snippet of a POST request body sets the thresholds below which statements are suppressed,
with values for U.S. dollars and Japanese yen.
{
"data": {
"attributes": {
"statementsWithLowNetSuppressed": true,
"netThresholdForSuppressingStmtDefaults": {
"usd": "2.00",
"jpy": "300"
}
...
For more information on using different currencies in agency bill plans, see “Plans and multicurrency” on page 133.
Example POST
The following is an example of a minimal POST to create an agency bill plan.
Command
POST /admin/v1/agency-bill-plans
Request body
{
"data": {
"attributes": {
"clearingLogicTarget": {
"code": "payments"
},
"currencies": [
{
"code": "usd"
},
{
"code": "jpy"
}
],
"cycleCloseDayOfMonthLogic": {
"code": "nextbusinessday"
},
"effectiveDate": "2024-05-05",
"name": "Cloud API Agency Bill Plan",
"lowCommissionCleared": true,
"clearCommissionThresholdDefaults": {
"usd": "3.00",
"jpy": "400"
},
"lowGrossCleared": false,
"paymentTermsInDays": 40,
"promiseDueInDays": 19,
"statementsWithLowNetSuppressed": false,
"workflowPlan": {
"code": "LegacyAgencyBill"
}
}
}
}
PATCH /admin/v1/agency-bill-plans/bc:146
Request body
{
"data": {
"attributes": {
"currencies": [
{
"code": "usd"
},
{
"code": "cad"
}
],
"clearCommissionThresholdDefaults": {
"cad": "11.00",
"usd": "13.00"
}
}
}
}
If a plan is in use, most fields cannot be PATCHed. The only fields that can be modified are expirationDate and
planOrder.
Statement invoices
A statement invoice is an itemized bill requesting payment that is due to an insurer from an agency bill producer for a
single agency bill period. "Statement invoice" is Cloud API’s term for agency bill statements.
Note: Sometimes the terms "agency bill statement," "statement invoice," "statement," and "invoice" are used
interchangeably in BillingCenter. For example, an agency bill statement’s identifying number is referred to as
Statement # in the user interface and invoiceNumber in Cloud API. This is because in the data model, agency
bill statements are a subtype of invoice.
To learn about statement invoices, see “Agency bill in BillingCenter: Statement Bill”.
You can query for statement invoices using Cloud API.
GET /billing/v1/producers/bc:154/invoices
Response
{
"count": 12,
"data": [
{
"attributes": {
"adHoc": false,
"amount": {
"amount": "1050.00",
"currency": "usd"
},
"amountDue": {
"amount": "0.00",
"currency": "usd"
},
"eventDate": "2025-03-15",
"id": "bc:SE0WN2N-xkYzmm_i1HFgK",
"invoiceNumber": "1000000063",
"netAmount": {
"amount": "1050.00",
"currency": "usd"
},
"netAmountPaid": {
"amount": "1000.00",
"currency": "usd"
},
"paymentDueDate": "2025-04-29",
"status": {
"code": "due",
"name": "Due"
},
"subtype": "StatementInvoice"
},
"checksum": "4",
"links": {
"self": {
"href": "/billing/v1/invoices/bc:SE0WN2N-xkYzmm_i1HFgK",
"methods": [
"get",
"patch"
]
}
}
},
{
"attributes": {
"adHoc": false,
"amount": {
"amount": "500.00",
"currency": "usd"
},
"amountDue": {
"amount": "0.00",
"currency": "usd"
},
...
You can add query parameters to filter or sort the returned statement invoices. For example, to retrieve only billed
invoices, you could add the following to the end of the request: ?filter=status:eq:billed.
GET /billing/v1/invoices/bc:235
Response
{
"data": {
"attributes": {
"adHoc": false,
"allInvoiceItemsExactlyPaid": false,
"amount": {
"amount": "860.00",
"currency": "usd"
},
"amountDue": {
"amount": "560.00",
"currency": "usd"
},
"eventDate": "2025-05-15",
"id": "bc:235",
"invoiceNumber": "1000000065",
"netAmount": {
"amount": "860.00",
"currency": "usd"
},
"netAmountPaid": {
"amount": "300.00",
"currency": "usd"
},
"paymentDueDate": "2025-06-29",
"primaryDirectBillEarned": {
"amount": "0.00",
"currency": "usd"
},
"status": {
"code": "due",
"name": "Due"
},
"subtype": "StatementInvoice"
},
...
}
}
GET /billing/v1/producers/bc:154/agency-bill-cycles/bc:213
Response
{
"data": {
"attributes": {
"agencyCycleProcess": {
"currency": {
"code": "usd",
"name": "USD"
},
"dunning1Sent": false,
"dunning2Sent": false,
"genPastDueExceptionDate": "2025-06-30T00:00:00.000Z",
"id": "bc:SmsQ933zikf1aob-lRRFu",
"pastDueExceptionDismissed": false,
"pastDueExceptionGenerated": false,
"promiseExceptionDismissed": false,
"promiseExceptionGenerated": false,
"promiseReminderSent": false,
"sendStatementDate": "2025-05-15T00:00:00.000Z",
"statementSent": true
},
"currency": {
"code": "usd",
"name": "USD"
},
"id": "bc:213",
"statementInvoice": {
"adHoc": false,
"allInvoiceItemsExactlyPaid": false,
"amount": {
"amount": "860.00",
"currency": "usd"
},
"amountDue": {
"amount": "560.00",
"currency": "usd"
},
"eventDate": "2025-05-15",
"id": "bc:235",
"invoiceNumber": "1000000065",
"netAmount": {
"amount": "860.00",
"currency": "usd"
},
"netAmountPaid": {
"amount": "300.00",
"currency": "usd"
},
"paymentDueDate": "2025-06-29",
"primaryDirectBillEarned": {
"amount": "0.00",
"currency": "usd"
},
"status": {
"code": "billed",
"name": "Billed"
},
"subtype": "StatementInvoice"
}
},
...
}
}
In this example, the statement has been sent, but no other steps in the agency bill workflow process have been
executed.
The statement has been partially paid, and provides fields for how much has been paid and how much needs to be paid
for the statement to be settled.
Commission plans
BillingCenter uses commission plans to calculate the amount of commission that a producer earns on a policy and to
specify when the commission is earned. Producers must be associated with at least one commission plan. Producers are
associated with commission plans using producer codes.
The following information is specified directly on the commission plan:
• The plan's effective and expiration dates, which identify when the commission plan can be associated with
producers
• The tier of the plan, such as gold, silver, or bronze
• Whether commission payments are suspended for delinquent policy periods
Commission subplans
Commission plans contain one or more commission subplans, which define commissionable items, commission rates,
earning commission criteria, and the criteria to identify when the subplan is available.
The following information is specified on commission subplans:
• The commissionable items.
• The commission rates for each producer role (primary, secondary, referrer).
• The earning commission criteria (such as "on binding" or "on invoice billing").
• Any special rates or incentives.
• The availability criteria, if applicable. This identifies the types of policies, accounts, jurisdictions, or underwriting
companies for which the subplan can be used.
For more information on working with commission subplans in Cloud API, see “Commission subplans” on page 224.
• GET /admin/v1/commission-plans
• GET /admin/v1/commission-plans/{commissionPlanId}
The following example call retrieves a single commission plan. No commission subplan information is returned.
Command
GET /admin/v1/commission-plans/bc:206
Response
{
"data": {
"attributes": {
"allowedTiers": [
{
"code": "gold",
"name": "Gold"
},
{
"code": "silver",
"name": "Silver"
}
],
"currencies": [
{
"code": "usd",
"name": "USD"
}
],
"effectiveDate": "2024-05-30",
"id": "bc:206",
"inUse": false,
"name": "SCommPlan",
"planOrder": 15
},
...
}
}
Minimal post
The following is a minimal post where the commission plan has the following features:
• Has one allowed tier
• Supports one currency
The default subplan has the following features:
• A commission rate of 15% for primary producers
• Commission is payable upon billing
• Commission payments are not suspended for delinquent policy periods
Command
POST /admin/v1/commission-plans
Request body
{
"data": {
"attributes": {
"allowedTiers": [
{
"code": "gold"
}
],
"name": "Cloud API Commission Plan",
"currencies": [
{
"code": "usd"
}
],
"defaultSubPlan": {
"commissionSubPlanRates": [
{
"rate": "15",
"role": {
"code": "primary"
}
}
],
"payableCriteria": {
"code": "billing"
},
"suspendForDelinquency": false
},
"effectiveDate": "2024-02-02"
}
}
}
When created, new commission plans are automatically placed at the bottom of the commission plan priority list. (For
information about commission plan priority, see The Priority column in “Plans”.)
The response object does not contain any information about the default subplan that has been created. To GET, PATCH,
or DELETE the default subplan, you must use a designated endpoint, such as the GET /admin/v1/commission-
plans/{commissionPlanId}/commission-sub-plans{commissionSubPlanId} endpoint. For more, see
“Commission subplans” on page 224.
Example PATCH
The following PATCH updates the commission plan to have two supported currencies and a different name.
Command
PATCH /admin/v1/commission-plans/bc:201
Request body
{
"data": {
"attributes": {
"currencies": [
{
"code": "cad"
},
{
"code": "usd"
}
],
"name": "Updated Cloud API Comm Plan"
}
}
}
Commission subplans
Commission subplans are child entities of commission plans. Commission plans have at least one subplan. When a
producer is associated with a policy period using a commission plan, BillingCenter uses the highest priority available
subplan to define commissionable items, commission rates, and earning commission criteria.
For more information, see “Specifying commission schedules”.
A commission plan has zero or more conditional subplans. A conditional subplan is used if the policy period meets
certain availability criteria specified on the subplan. For example, a conditional subplan might only be available for
policies of a certain product type.
A commission plan has one default subplan. The default subplan is always available and has no criteria which must be
met. The default subplan is used if no conditional subplan is available for a policy.
Conditional subplans:
• Are created with a call to the POST /admin/v1/commission-plans/{commissionPlanId}/commission-sub-
plans endpoint
• Can be deleted
• Have availability criteria
• Have a subtype of CondCmsnSubPlan
• Have variable and editable priority orders
Default subplans:
• Are created in the call when the commission plan is created
• Cannot be deleted
• Do not have availability criteria
• Have a subtype of DefaultCmsnSubPlan
• Are always last priority in the list of subplans
Accessing full subplan functionality
You must add certain subplan details using specific child endpoints of the commission-sub-plans endpoints.
In some cases, features of the subplan are added with one endpoint but retrieved, updated, or deleted with a child
endpoint. For example, subplan rates must be included in the call when conditional subplans are created, but they are
queried for and updated using a child endpoint.
For detailed information on working with each respective subplan feature, refer to the following topics:
• “Subplan rates” on page 230
• “Commission overrides for section types” on page 231
• “Commissionable items” on page 232
• “Charge pattern rates” on page 234
• “Incentives” on page 236
GET /admin/v1/commission-plans/bc:203/commission-sub-plans/bc:209
Response
{
"data": {
"attributes": {
"allEvaluations": true,
"allJurisdictions": true,
"allLOBCodes": true,
"allSegments": true,
"allTerms": true,
"allUWCompanies": true,
"assignedRisk": {
"code": "all",
"name": "All"
},
"id": "bc:209",
"name": "Untitled432",
"payableCriteria": {
"code": "effectivedate",
"name": "On Effective Date"
},
"selectedEvaluations": [
{
"code": "acceptable",
"name": "Acceptable"
},
...
],
"selectedLOBCodes": [
{
"code": "WorkersComp",
"name": "Workers' Compensation"
},
...
],
...
}
}
}
Because this is a conditional subplan, the response contains all the availability criteria for the subplan, such as the
selectedEvaluations array and the selectedLOBCodes array. Default subplans do not have this information.
Note that when retrieving subplans, the rates are not included in the response. They are retrieved using a child
endpoint. For more information, see “Subplan rates” on page 230.
Availability criteria
When creating a conditional subplan, you must specify some basic features about the plan as well as availability
criteria. The availability criteria are defined by the following required fields:
• allJurisdictions
• allTerms
• allEvaluations
• allUWCompanies
• assignedRisk
• allSegments
• allLOBCodes
Depending on the boolean values of the availability criteria, additional fields may be required. These are described in
the "Note" column in the table in the following section.
For some of these dependent fields, they cannot be set if the call if the corresponding boolean is true. For example, if
allEvaluations is set to true, you cannot set a value for selectedEvaluations.
Required fields
The required fields for creating a conditional subplan are as follows:
References the
AssignedRiskRestriction
typelist.
allSegments Boolean Whether all customer segments If set to false, you must also specify which
are eligible to use the subplan. segments are eligible using the
selectedSegments field.
selectedSegments is an array of typekey
references to the AccountSegment typelist.
allLOBCodes Boolean Whether all LOB codes are eligible If set to false, you must also specify which
to use the subplan. LOB codes are eligible using the
selectedLOBCodes field. This field is an
array of typekey references to the LOBCode
typelist.
POST /admin/v1/commission-plans/bc:207/commission-sub-plans
Request body
{
"data": {
"attributes": {
"commissionSubPlanRates": [
{
"rate": "15",
"role": {
"code": "primary"
}
},
{
"rate": "10",
"role": {
"code": "secondary"
}
},
{
"rate": "8",
"role": {
"code": "referrer"
}
}
],
"payableCriteria": {
"code": "billing"
},
"suspendForDelinquency": false,
"name": "PA Good Eval",
"allJurisdictions": true,
"allTerms": true,
"allEvaluations": false,
"selectedEvaluations": [
{
"code": "good"
},
{
"code": "excellent"
},
],
"allUWCompanies": true,
"assignedRisk": {
"code": "exclude"
},
"allSegments": true,
"allLOBCodes": false,
"selectedLOBCodes": [
{
"code": "PersonalAuto"
}
]
}
}
}
Modify a subplan
Use the following endpoint to modify a subplan:
• PATCH /admin/v1/commission-plans/{commissionPlanId}/commission-sub-plans/
{commissionSubPlanId}
{
"data": {
"attributes": {
"allUWCompanies": false,
"selectedUWCompanies": [
{
"code": "mainline"
}
]
}
}
}
When a commission plan is in use, subplans can be created, but they cannot be modified. This means that you cannot
PATCH any fields on the subplan, and you cannot add details with calls to child endpoints, such as adding
commissionable charge items or section rate overrides.
You can overcome these issues using a composite request. For more, see “Add a subplan to a commission plan that is
in use” on page 239.
Deleting subplans
Delete a subplan using the following endpoint:
• DELETE /admin/v1/commission-plans/{commissionPlanId}/commission-sub-plans/
{commissionSubPlanId}
Command
DELETE /admin/v1/commission-plans/bc:207/commission-sub-plans/bc:20
Subplan rates
General commission rates for each producer role in BillingCenter are defined when you first create a subplan. These
rates are required to create the subplan, so they must be included in the initial POST request. However, to view or
update the rates after the subplan is created, you must use the endpoints described in this topic.
GET /admin/v1/commission-plans/bc:134/commission-sub-plans/bc:199/commission-sub-plan-rates
Response
{
"count": 3,
"data": [
{
"attributes": {
"id": "bc:SPTtB8qdjkmQmCxDy9_hJ",
"rate": "15.00",
"role": {
"code": "primary",
"name": "Primary"
}
},
...
},
{
"attributes": {
"id": "bc:SIvKgiRyl97fWbTgU_12e",
"rate": "5.00",
"role": {
"code": "secondary",
"name": "Secondary"
}
},
...
},
...
}
}
If the subplan is not in use, the subplan rate can be PATCHed. The rate field is the only field that can be updated. For
example, the following request changes a subplan rate to be 10.5%.
Command
PATCH /commission-plans/bc:134/commission-sub-plans/bc:199/commission-sub-plan-rates/bc:204
Request body
{
"data": {
"attributes": {
"rate": "10.5"
}
}
}
The following query retrieves all section rate overrides on a commission subplan:
Command
GET /admin/v1/commission-plans/bc:134/commission-sub-plans/bc:199/section-rates
Response
{
"count": 6,
"data": [
{
"attributes": {
"id": "bc:Se8XpZqK7WPtegBMFlwB9",
"rate": "20.00",
"role": {
"code": "primary",
"name": "Primary"
},
"sectionType": {
"code": "CN",
"name": "Construction"
}
},
...
}
]
...
}
When you POST section rate overrides, you must post one rate at a time for each producer role.
The following fields are required:
Request body
{
"data": {
"attributes": {
"rate": "15",
"sectionType": {
"code": "AH"
},
"role": {
"code": "primary"
}
}
}
}
This post creates an override of 15% on the "Accident and Health" section type for producers with a role of "primary."
No request body is required, and a success message is returned when the override is deleted.
Commissionable items
Every commission subplan must identify a list of commissionable items. A commissionable item is a charge on a policy
for which the producer earns commission. Commissionable items are specified by charge pattern category. For
example, in the base configuration, you can specify Premium as a commissionable item. This means that producers
would earn commission on any charge with a charge pattern whose type is Premium.
When creating a commission plan, if there are no commissionable items defined, then no commission will be earned on
that subplan.
Commissionable items can be added, modified, and deleted through Cloud API.
For example, the following call retrieves a commissionable item on a commission subplan:
Command
GET /admin/v1/commission-plans/bc:134/commission-sub-plans/bc:199/commissionable-charge-items/bc:232
Response
{
"data": {
"attributes": {
"chargePattern": {
"displayName": "Premium Including Taxes",
"id": "default_data:16",
"type": "ChargePattern",
"uri": "/admin/v1/charge-patterns/default_data:16"
},
"id": "bc:232"
},
...
}
}
The only required field is chargePattern, which is a reference to the ChargePattern typelist.
Here is an example post:
Command
POST /admin/v1/commission-plans/bc:134/commission-sub-plans/bc:199/commissionable-charge-items
Request body
{
"data": {
"attributes": {
"chargePattern": {
"id": "default_data:10"
}
}
}
}
When you PATCH a commissionable item, the only field you can patch is chargePattern. If you PATCH this field to
be a different charge pattern from the original, it is effectively the same as DELETEing the original charge pattern and
POSTing a new one, though the id of the commissionable item remains the same.
Here’s an example PATCH request:
Command
PATCH /admin/v1/commission-plans/bc:134/commission-sub-plans/bc:199/commissionable-charge-items/bc:232
Request body
{
"data": {
"attributes": {
"chargePattern": {
"id": "default_data:11"
}
}
}
}
For example, the following call retrieves a charge pattern rate for a subplan:
Command
POST /admin/v1/commission-plans/bc:134/commission-sub-plans/bc:199/charge-pattern-rates/bc:176
Response
{
"data": {
"attributes": {
"chargePattern": {
"displayName": "Premium",
"id": "default_data:1",
"type": "ChargePattern",
"uri": "/admin/v1/charge-patterns/default_data:1"
},
"id": "bc:176",
"rate": "3.00",
"role": {
"code": "primary",
"name": "Primary"
}
},
...
}
}
There is a custom chargePattern filter for charge pattern rates that allows you to retrieve only rates of a certain
charge pattern. Input the display name of the charge pattern to return. If there are spaces in the display name, remove
them in the query parameter. For example, the following call retrieves all charge pattern rates on a subplan that have
the "Premium Including Taxes" charge pattern.
GET /admin/v1/commission-plans/bc:134/commission-sub-plans/bc:199/charge-pattern-rates?
filter=chargePattern:eq:PremiumIncludingTaxes
To set a charge pattern rate on a subplan, you must specify three fields:
• chargePattern - The charge pattern the rate applies to, referencing a charge pattern id. (For information on
accessing charge patterns in Cloud API, see “Charges and charge patterns” on page 243.)
• rate - The percent commission that will be paid.
• role - The role of the producer the rate applies to, as a typekey reference.
For example, the following call creates a commission rate of 9% for primary producers on a specific charge pattern.
Command
POST /admin/v1/commission-plans/bc:134/commission-sub-plans/bc:199/charge-pattern-rates
Request body
{
"data": {
"attributes": {
"chargePattern": {
"id": "default_data:1"
},
"rate": "9",
"role": {
"code": "primary"
}
}
}
}
When modifying a charge pattern, the only field that can be modified is rate. For example:
Sample request body
{
"data": {
"attributes": {
"rate": "3"
}
}
}
You cannot delete a charge pattern rate on a commission plan that is in use.
Incentives
A commission subplan can optionally have one or more incentives. An incentive is an additional commission that is
paid when certain business conditions are met. Incentives can be used to encourage producers to provide certain types
or amounts of business to the insurer.
In the base configuration of BillingCenter, there is only one kind of incentive: premium incentive. This is a policy-level
incentive that stipulates the primary producer earns a higher commission rate when the policy period ends, expressed as
an additional percent, if the total commissionable charges on the policy is equal to or greater than a given threshold.
For more information on incentives, see "Incentives" in “Additional options for commission plans”.
You can query for, create, modify, and delete premium incentives through Cloud API.
Response
{
"count": 1,
"data": [
{
"attributes": {
"application": "Policy",
"bonusPercentage": "5.00",
"description": "Any policy with commissionable charges over CA$50,000.00 qualifies for a 5% bonus
commission",
"id": "bc:SUOHmuokMc2bl4A7f4UG6",
"name": "Policies over CA$50,000.00 (5%)",
"subtype": "PremiumIncentive",
"threshold": {
"amount": "50000.00",
"currency": "cad"
}
}
},
...
}
}
}
Create an incentive
Create incentives using the following endpoint:
• POST /commission-plans/{commissionPlanId}/commission-sub-plans/{commissionSubPlanId}/
incentives
• threshold - The threshold of the policy’s commissionable charges, as an amount/currency pair. If the premium is
above this value, the incentive is activated.
• bonusPercentage - The additional percent that is added to the general commission rate when the incentive is
activated.
For example, the following request creates a premium incentive where the primary producer gets 3% bonus
commission on policies with commissionable charges above $50,000.
Command
POST /admin/v1/commission-plans/bc:134/commission-sub-plans/bc:199/incentives
Request body
{
"data": {
"attributes": {
"subtype": "PremiumIncentive",
"threshold": {
"amount": "50000",
"currency": "usd"
},
"bonusPercentage": "3"
}
}
}
When you create an incentive, BillingCenter automatically generates a description for the incentive. You cannot
specify this description in the request body. The following description is generated on the incentive created by the
POST request above:
"description": "Any policy with commissionable charges over $50,000.00 qualifies for a 5% bonus commission"
Modify an incentive
Modify an incentive using the following endpoint:
• PATCH /commission-plans/{commissionPlanId}/commission-sub-plans/{commissionSubPlanId}/
incentives/{incentiveId}
If the commission plan is not in use, you can update the threshold amount or the bonus percentage. You cannot change
the subtype of the incentive or the currency. If the commission plan is in use, incentives cannot be modified.
For example, the following request body updates an incentive to have a 5% bonus percentage on policies with
commissionable charges over $70,000.
Example request body
{
"data": {
"attributes": {
"threshold": {
"amount": "70000",
"currency": "usd"
},
"bonusPercentage": "5"
}
}
}
Delete an incentive
Delete an incentive using the following endpoint:
• DELETE /commission-plans/{commissionPlanId}/commission-sub-plans/{commissionSubPlanId}/
incentives/{incentiveId}
You could send the following request to change the order of the conditional subplans:
Command
POST /commission-plans/bc:134/change-sub-plan-order
Request body
{
"data": {
"attributes": {
"commissionSubPlans": [
{
"id": "condSubplanC"
},
{
"id": "condSubplanA"
},
{
"id": "condSubplanD"
},
{
"id": "condSubplanB"
},
{
"id": "defaultSubplan"
}
]
}
}
}
As a result of this call, the subplans are set to have the following priority order:
1. condSubplanC
2. condSubplanA
3. condSubplanD
4. condSubplanB
5. defaultSubplan
{
"requests": [
{
"body": {
<Commission subplan data>
},
"method": "post",
"uri": "/admin/v1/commission-plans/<commPlanId>/commission-sub-plans",
"vars": [
{
"name": "<subplanIdentifier>",
"path": "$..attributes.id"
}
]
},
{
"body": {
<Subplan child resource data>
},
"method": "post",
"uri": "/admin/v1/commission-plans/<commPlanId>/commission-sub-plans/${<subplanIdentifier>}/<childResource>"
},
...
]
}
In this syntax:
• The path field identifies the id of the subplan that is created. The value of this field does not need to be changed
from $..attributes.id
• The name field contains an arbitrary value (with the placeholder <subplanIdentifier>) which is used to associate
the subplan child resource with the id of parent subplan
For example, the following call creates a commission subplan, commissionable charge item, and a section rate on a
commission plan that is in use.
Command
POST /composite/v1/composite
Request body
{
"requests": [
{
"body": {
"data": {
"attributes": {
"payableCriteria": {
"code": "billing"
},
"commissionSubPlanRates": [
{
"rate": "10",
"role": {
"code": "primary"
}
},
{
"rate": "8",
"role": {
"code": "secondary"
}
},
{
"rate": "3",
"role": {
"code": "referrer"
}
}
],
"suspendForDelinquency": false,
"name": "{{$randomAdjective}}-{{$randomBsNoun}}",
"allJurisdictions": true,
"allTerms": true,
"allEvaluations": true,
"allUWCompanies": true,
"assignedRisk": {
"code": "all"
},
"allSegments": true,
"allLOBCodes": true
}
}
},
"method": "post",
"uri": "/admin/v1/commission-plans/bc:SArRUOxjtTmzRMkl-g9Xn/commission-sub-plans",
"vars": [
{
"name": "subPlanId",
"path": "$..attributes.id"
}
]
},
{
"body": {
"data": {
"attributes": {
"chargePattern": {
"id": "default_data:1"
}
}
}
},
"method": "post",
"uri": "/admin/v1/commission-plans/bc:SArRUOxjtTmzRMkl-g9Xn/commission-sub-plans/${subPlanId}/commissionable-
charge-items"
},
{
"body": {
"data": {
"attributes": {
"rate": "15",
"sectionType": {
"code": "AH"
},
"role": {
"code": "primary"
}
}
}
},
"method": "post",
"uri": "/admin/v1/commission-plans/bc:SArRUOxjtTmzRMkl-g9Xn/commission-sub-plans/${subPlanId}/section-rates"
}
]
}
GET /admin/v1/charge-patterns/default_data:16
{
"data": {
"attributes": {
"category": {
"code": "premium",
"name": "Premium"
},
"chargeCode": "PremiumIncludingTaxes",
"chargeName": "Premium Including Taxes",
"id": "default_data:16",
"includedInEquityDating": true,
"internalCharge": true,
"invoiceTreatment": {
"code": "depositandinstallments",
"name": "Down Payment and Installments"
},
"periodicity": {
"code": "monthly",
"name": "Monthly"
},
"priority": {
"code": "medium",
"name": "Medium"
},
"reversible": false,
"subtype": "ProRataCharge",
"tAccountOwnerType": "PolicyPeriod",
"tAccountsLazyLoaded": true
}
...
}
}
POST /admin/v1/charge-patterns
{
"data": {
"attributes": {
"category": {
"code": "premium"
},
"chargeCode": "PremiumExcludingTaxes",
"chargeName": "Premium Excluding Taxes",
"includedInEquityDating": true,
"invoiceTreatment": {
"code": "depositandinstallments"
},
"periodicity": {
"code": "monthly"
},
"subtype": "ProRataCharge",
"tAccountOwnerType": "PolicyPeriod",
"tAccountsLazyLoaded": true
}
}
}
For more information, see “Account-level charges” on page 182 and “Policy-level charges” on page 198.
• GET /billing/v1/charges/{chargeId}
A call to this endpoint is typically preceded by a call to retrieve the charges for an account or policy period, as
described in the previous topic.
For example, suppose you query for a policy period's charges and identify that there is one premium charge whose id is
bc:1212. The following request accesses that specific charge.
Command
GET /billing/v1/charges/bc:1212
Response payload
{
"data": {
"attributes": {
"amount": {
"amount": "1200.00",
"currency": "usd"
},
"chargeDate": "2023-05-24T17:58:44.732Z",
"chargePattern": {
"displayName": "Premium",
"id": "default_data:1"
},
"holdStatus": {
"code": "none",
"name": "Not Held"
},
"id": "bc:1212",
"reversed": false,
"skipInvoiceItemCreation": false,
"totalInstallments": 9,
"writtenDate": "2023-05-24T17:58:43.762Z"
},
...
GET /billing/v1/charges/bc:1212/invoice-items
Response payload
{
"count": 10,
"data": [
{
"attributes": {
"amount": {
"amount": "120.00",
"currency": "usd"
},
"eventDate": "2023-04-29",
"id": "bc:STfiGLle2rKWvhYwGLYlA",
"invoiceDateOverride": {
"code": "none",
"name": "None"
},
"reversed": false,
"type": {
"code": "deposit",
"name": "Down Payment"
}
},
...
},
{
"attributes": {
"amount": {
"amount": "120.00",
"currency": "usd"
},
"eventDate": "2023-07-01",
"id": "bc:SIN97D4oBanb3p5_IjrAL",
"installmentNumber": 1,
"invoiceDateOverride": {
"code": "none",
"name": "None"
},
"reversed": false,
"type": {
"code": "installment",
"name": "Installment"
}
},
...
},
...
Invoices
Overview of invoices
An invoice is an itemized bill requesting payment for one or more charges for a policy. The fundamental fields of an
invoice are:
• EventDate – The date the invoice is sent to the payer.
• PaymentDueDate – The date by which payment is expected to be received.
• Amount – The total of all of the invoice items on the invoice.
• AmountDue – The total of the unpaid amounts of the invoice items.
Every invoice is either an account invoice (an invoice of subtype AccountInvoice) or a statement used with Agency
Bill (an invoice of subtype StatementInvoice).
Every invoice is managed by an invoice stream. An invoice stream is a container that manages a set of invoices. It is
responsible for scheduling the invoices with a regular cadence.
• For accounts that use policy-level billing, each policy is managed by its own invoice stream.
Invoices 249
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
• For accounts that use account-level billing, policies with the same payment interval are placed on the same invoice
stream. For example, if an account had two policies billed weekly and three policies billed monthly, the weekly
policies would be on one invoice stream, and the monthly policies would be on another.
For more information on the business functionality of invoices, see the Application Guide.
GET /billing/v1/accounts/bc:16/invoices
{
"count": 10,
"data": [
{
"attributes": {
"adHoc": false,
"amount": {
"amount": "175.00",
"currency": "usd"
},
"amountDue": {
"amount": "175.00",
"currency": "usd"
},
"eventDate": "2022-11-01",
"id": "bc:8819",
"invoiceNumber": "1000000000",
"paymentDueDate": "2022-11-22",
"status": {
"code": "planned",
"name": "Planned"
},
"subtype": "AccountInvoice"
},
"checksum": "0",
"links": {
"self": {
"href": "/billing/v1/invoices/bc:SvdfPR6dOWmlT_xoqH5yR",
"methods": [
"get"
]
}
}
},
...
The following request gets detailed information about invoice bc:8819. Note that in order to get details about specific
invoice, the endpoint path does not include the account. The parent of the endpoint path is /invoices.
GET /billing/v1/invoices/bc:8819
{
"data": {
"attributes": {
"adHoc": false,
"amount": {
"amount": "175.00",
"currency": "usd"
},
"amountDue": {
"amount": "175.00",
"currency": "usd"
},
"eventDate": "2022-11-01",
"id": "bc:8819",
"invoiceNumber": "1000000000",
"paymentDueDate": "2022-11-22",
"status": {
"code": "planned",
"name": "Planned"
250 Invoices
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
},
"subtype": "AccountInvoice"
}
...
Modifying invoices
Use the following endpoint to modify a single invoice:
• PATCH /billing/v1/invoices/{invoiceId}
The only attributes of an invoice that you can update are the eventDate (the bill date) and the paymentDueDate (the
due date).
When modifying an invoice, the following must be true:
• The invoice has a status of planned
• paymentDueDate and eventDate cannot be in the past
• paymentDueDate cannot be before eventDate
Note: If you change the bill date or due date of an invoice in the user interface, you might be shown an equity
warning. Cloud API does not provide any sort of equity warning as part of the response when updating
invoices. For more information, see “Maintaining positive equity”.
The example below demonstrates updating the bill date and the due date on invoice bc:Swwq21ZNjhqLn_Vl0SPIl. The
updated invoice is returned in the response.
Command
PATCH /billing/v1/invoices/bc:Swwq21ZNjhqLn_Vl0SPIl
Request
{
"data": {
"attributes": {
"eventDate": "2024-03-10",
"paymentDueDate": "2024-03-24"
}
}
}
Response
{
"data": {
"attributes": {
"adHoc": false,
"amount": {
"amount": "98.19",
"currency": "usd"
},
"amountDue": {
"amount": "98.19",
"currency": "usd"
},
"eventDate": "2024-03-10",
"id": "bc:Swwq21ZNjhqLn_Vl0SPIl",
"invoiceNumber": "1000000014",
"paymentDueDate": "2024-03-24",
"status": {
"code": "planned",
"name": "Planned"
},
"subtype": "AccountInvoice"
},
...
}
}
Invoices 251
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
GET /billing/v1/invoices/bc:2202/invoice-items
Response payload
{
"count": 3,
"data": [
{
"attributes": {
"amount": {
"amount": "120.00",
"currency": "usd"
},
"eventDate": "2023-04-29",
"id": "bc:STfiGLle2rKWvhYwGLYlA",
"invoiceDateOverride": {
"code": "none",
"name": "None"
},
"paidAmount": {
"amount": "120.00",
"currency": "usd"
},
"reversed": false,
"type": {
"code": "deposit",
"name": "Down Payment"
}
},
...
},
{
"attributes": {
"amount": {
"amount": "50.00",
"currency": "usd"
},
"eventDate": "2023-04-29",
"id": "bc:S86b6sNYUsAZ1DaGSSIZj",
"invoiceDateOverride": {
"code": "none",
"name": "None"
},
"paidAmount": {
"amount": "50.00",
"currency": "usd"
},
"reversed": false,
"type": {
"code": "onetime",
"name": "One-Time"
}
},
...
},
{
"attributes": {
"amount": {
"amount": "15.00",
"currency": "usd"
},
252 Invoices
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"eventDate": "2023-05-24",
"id": "bc:SUdh_6Pxwe1VjwiGwT18p",
"invoiceDateOverride": {
"code": "none",
"name": "None"
},
"paidAmount": {
"amount": "0.00",
"currency": "usd"
},
"reversed": false,
"type": {
"code": "onetime",
"name": "One-Time"
}
},
...
}
...
InvoiceStream properties
Invoice streams inherit two values from the parent account:
Invoices 253
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
• Whether the account uses bill date billing or due date billing
• The anchor date of the relevant periodicity
An invoice stream can have values that override the defaults from the parent account. In other words, a given invoice
stream can have a bill date/due date billing or anchor date that is different from what is specified at the account level.
The InvoiceStream resource has the following properties:
• creationOrder - A value used for automatic stream selection when there is more than one stream that an invoice
item could be assigned to.
• currency - The currency of the invoices in the stream.
• overridingBillDateOrDueDateBilling - The override value for the invoice stream's bill date/due date setting.
• overridingFirstAnchorDate - The override value for the invoice stream's anchor date.
• periodicity - The periodicity of the invoice stream.
• policy - The policy associated with the invoice stream. This is applicable to invoice streams for policy-level billing
only.
GET /billing/v1/accounts/bc:PLB01/invoice-streams
{
"count": 2,
"data": [
{
"attributes": {
"creationOrder": 1,
"currency": {
"code": "usd",
"name": "USD"
},
"displayName": "Monthly",
"id": "bc:SP5d2fO6Gi-r_yhkjKgYe",
"overridingBillDateOrDueDateBilling": {
"code": "BillDateBilling",
"name": "Bill Date"
},
"overridingFirstAnchorDate": "2023-04-30",
"periodicity": {
"code": "monthly",
"name": "Monthly"
},
"policy": {
"displayName": "PolicyNumber_BZTBRA100",
"id": "bc:SSVRxw5FeE46PHhuNrjRM",
"type": "Policy",
"uri": "/billing/v1/accounts/bc:S7NGdmcIgJWx-KudX23aj/policies/bc:SSVRxw5FeE46PHhuNrjRM"
},
"unappliedFund": {
"displayName": "Default",
"id": "bc:S64vTSj7xe3R2st7ch9N3",
"type": "UnappliedFund",
"uri": "/billing/v1/accounts/bc:S7NGdmcIgJWx-KudX23aj/unapplied-funds/bc:S64vTSj7xe3R2st7ch9N3"
}
},
...
},
{
"attributes": {
"creationOrder": 1,
"currency": {
"code": "usd",
"name": "USD"
},
254 Invoices
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
GET /billing/v1/accounts/bc:ALB02/invoice-streams
{
"count": 2,
"data": [
{
"attributes": {
"creationOrder": 1,
"currency": {
"code": "usd",
"name": "USD"
},
"displayName": "Account Charges / Monthly",
"id": "bc:SivQCeWJhYQenjwIe4mQ6",
"periodicity": {
"code": "monthly",
"name": "Monthly"
},
"unappliedFund": {
"displayName": "Default",
"id": "bc:S-8f9mQPAQWR2J5zS0jLZ",
"type": "UnappliedFund",
"uri": "/billing/v1/accounts/bc:SSuIzycDGsN-ZNKVdpMQ1/unapplied-funds/bc:S-8f9mQPAQWR2J5zS0jLZ"
}
},
...
},
{
"attributes": {
"creationOrder": 1,
"currency": {
"code": "usd",
"name": "USD"
},
"displayName": "Every Other Week",
"id": "bc:Sp7U1Ik4C1Mz24k7TdsBt",
"periodicity": {
"code": "everyotherweek",
"name": "Every Other Week"
},
"unappliedFund": {
"displayName": "Custom Unapplied",
"id": "bc:SPiKPsJfLZLdJ5e1c3xbC",
"type": "UnappliedFund",
"uri": "/billing/v1/accounts/bc:SSuIzycDGsN-ZNKVdpMQ1/unapplied-funds/bc:SPiKPsJfLZLdJ5e1c3xbC"
}
},
...
Invoices 255
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Request body
{
"data": {
"attributes": {
"description": "Weekly invoice stream with overrides",
"overridingBillDateOrDueDateBilling": {
"code": "DueDateBilling"
},
"overridingLeadTimeDayCount": 14,
"overridingPaymentInstrument": {
"id": "bc:SV2tI8sg4BapKqRCGKFBe"
}
}
}
}
Response
{
"data": {
"attributes": {
"creationOrder": 1,
"currency": {
"code": "usd",
"name": "USD"
},
"description": "Weekly invoice stream with overrides",
"displayName": "Every Week",
"id": "bc:STmESSufleiqIALtu13ys",
"overridingBillDateOrDueDateBilling": {
"code": "DueDateBilling",
"name": "Due Date"
},
"overridingLeadTimeDayCount": 14,
"overridingPaymentInstrument": {
"displayName": "Cash",
"id": "bc:SV2tI8sg4BapKqRCGKFBe",
"type": "UniversalPaymentInstrument",
"uri": "/billing/v1/universal-payment-instruments/bc:SV2tI8sg4BapKqRCGKFBe"
},
"periodicity": {
"code": "everyweek",
"name": "Every Week"
},
"unappliedFund": {
"displayName": "Custom Unapplied",
"id": "bc:Sl3lIAkj2g4wfBjEoAKCu",
"type": "UnappliedFund",
"uri": "/billing/v1/accounts/bc:Sy1Fmx9EDhH-P-o5rRzum/unapplied-funds/bc:Sl3lIAkj2g4wfBjEoAKCu"
256 Invoices
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
}
},
...
}
}
Remove overrides
To undo a specific override, send a request payload with a null value for the desired field. For example, the following
undoes overrides on payment instruments and lead time:
{
"data": {
"attributes": {
"overridingPaymentInstrument": null,
"overridingLeadTimeDayCount": null
}
}
}
Invoices 257
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Request body
{
"data": {
"attributes": {
"overridingFirstInvoiceDayOfMonth": 7,
"overridingSecondInvoiceDayOfMonth": 21
}
}
}
Response
{
"data": {
"attributes": {
"creationOrder": 1,
"currency": {
"code": "usd",
"name": "USD"
},
"displayName": "Twice Per Month",
"id": "bc:SxGrQZ1FPUKF-Md5vpgY0",
"overridingFirstAnchorDate": "2010-01-07",
"overridingSecondAnchorDate": "2010-01-21",
"periodicity": {
"code": "twicepermonth",
"name": "Twice Per Month"
},
"unappliedFund": {
"displayName": "Custom Unapplied-3",
"id": "bc:S5PMcB2rAFnKYvsbnK49V",
"type": "UnappliedFund",
"uri": "/billing/v1/accounts/bc:Sy1Fmx9EDhH-P-o5rRzum/unapplied-funds/bc:S5PMcB2rAFnKYvsbnK49V"
}
}
}
}
As another example, for an invoice stream with a weekly periodicity, the request body would have the following
format:
{
"data": {
"attributes": {
"overridingDayOfWeek": {
"code": "monday"
}
}
}
}
Remove overrides
To undo overrides, send a request payload with a null value for the desired field. For example, the following removes
an override on the day of the week:
{
"data": {
"attributes": {
"overridingDayOfWeek": null
}
}
}
258 Invoices
chapter 27
A payment is money received from someone outside of the insurer that pays for charges associated with an account.
BillingCenter supports three methods of billing:
• Direct bill - The insurer bills the account that owns the policy. The account pays the insurer directly.
• List bill - The insurer does not bill the account that owns the policy. Rather, the insurer bills a third-party account
known as a list bill account. List bill accounts are typically businesses such as mortgage companies that have an
interest in ensuring that the policy gets paid. The list bill account pays for the policy and retrieves payment from the
owner account on its own, such as through an escrow account.
• Agency bill - The insurer does not bill the account that owns the policy. Rather, the policy's producer bills the
owner account. The producer then submits payment to the insurer minus the commission that the producer is
entitled to.
For polices that are billed using direct bill or list bill, payments are managed using the DirectBillMoneyRcvd data
model entity. These are referred to as direct bill payments. They are also sometimes referred to as "direct bill money
receiveds", "DBMRs", or some similar abbreviation.
Note: As of this release, Cloud API does not support agency bill payments.
Broadly speaking, there are two ways that a payment can be made: manually (a "responsive" payment) and
automatically.
Automatic payments
In other situations, BillingCenter sends an invoice to the payer, but it does not expect the payer to manually respond.
Instead, BillingCenter automatically deducts payment from one of the account's payment instruments (such as a
Direct bill payments 259
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
specific credit card or bank account). This occurs when the account's payment instrument is set to any value other than
Responsive. These are sometimes referred to as "automatic payments".
In this situation, BillingCenter creates a payment request when the invoice is billed. Payment requests are objects that
manage the withdrawal of funds from the associated credit card or bank account. Payment requests can also be created
manually.
When the funds are withdrawn, the payment request creates a direct bill payment. This payment has a payment
instrument, and it is set to the account's payment instrument. (In other words, the payment's payment instrument
identifies which account payment instrument was used as the source of the payment.)
Response payload
{
"count": 1,
"data": [
{
"attributes": {
"amount": {
"amount": "170.00",
"currency": "usd"
},
"appliedDate": "2024-05-23T04:55:09.027Z",
"currency": {
"code": "usd",
"name": "USD"
},
"id": "bc:Se-lTmKjyIRI3SBGUSBwF",
"paymentInstrument": {
"displayName": "Check",
"id": "bc:SDJXvckskdMnaBgYg6t_2"
},
"receivedDate": "2024-05-23T04:54:18.266Z",
"subtype": "DirectBillMoneyRcvd",
"unappliedFund": {
"displayName": "Default",
"id": "bc:SJaGjJxYFIkpsRTbMHrXm"
}
},
...
• paymentInstrumentId
• policyPeriodId
POST /billing/v1/accounts/bc:99/db-money-rcvds
Request body
{
"data": {
"attributes": {
"amount": {
"amount": "120",
"currency": "usd"
},
"currency": {
"code": "usd"
},
"paymentInstrument": {
"id": "bc:111"
},
"receivedDate": "2024-03-03"
}
}
}
When creating a payment, the payment instrument must be cash, check, or a non-universal payment instrument
associated with the account.
POST /billing/v1/accounts/bc:99/db-money-rcvds
Request body
{
"data": {
"attributes": {
"amount": {
"amount": "50",
"currency": "usd"
},
"currency": {
"code": "usd"
},
"invoice": {
"id": "bc:3300"
},
"paymentInstrument": {
"id": "bc:111"
},
"receivedDate": "2024-03-03"
}
}
}
Similarly, the following request creates a payment of $50 USD in cash (payment instrument bc:111) received on March
3, 2024 for account bc:99. The payment targets policy period bc:775.
Command
POST /billing/v1/accounts/bc:99/db-money-rcvds
Request body
{
"data": {
"attributes": {
"amount": {
"amount": "50",
"currency": "usd"
},
"currency": {
"code": "usd"
},
"paymentInstrument": {
"id": "bc:111"
},
"policyPeriod": {
"id": "bc:775"
},
"receivedDate": "2024-03-03"
}
}
}
Restrictions
A single payment cannot target both a policy period and an invoice, even if the invoice is for the given policy period.
You can set only the policyPeriod, only the invoice, or neither. When you specify neither, the payment targets only
the account.
All direct bill payments pass through an unapplied fund. However, a payment cannot target an unapplied fund directly,
as the unappliedFund field is read-only. The relevant unapplied fund is determined by other settings for the account
and the payment itself.
• For accounts that use policy-level billing with cash separation:
◦ If the payment has a specified policyPeriod or invoice, it is initially placed in the associated policy's
unapplied fund.
◦ If the payment has no specified policyPeriod or invoice, it is initially placed in the account's unapplied fund.
• For accounts that use account-level billing or policy-level billing without cash separation:
◦ The payment is initially placed in the account's unapplied fund.
Payment requests
Some accounts want to pay for invoices automatically. These accounts prefer to designate a nonresponsive payment
instrument (such as an ACH/EFT account or a credit card) from which BillingCenter can withdraw payment whenever
an invoice is billed.
Automatic payments are managed by payment requests. A payment request is an object that BillingCenter uses to
manage the process of automatically withdrawing money from a nonresponsive payment instrument to pay for an
invoice.
Payment requests can be created automatically or manually:
• When a payment request is created automatically, its amount is set to the amount due on the corresponding invoice.
• When a payment request is created manually, its amount is set by the user who is creating it.
Payment requests can also be viewed and created through Cloud API.
Note that, as of this release, there are no endpoints for editing or stopping a payment request.
GET /billing/v1/account/bc:55/payment-requests
Response body
{
"count": 1,
"data": [
{
"attributes": {
"amount": {
"amount": "120.00",
"currency": "usd"
},
"draftDate": "2023-04-25",
"dueDate": "2023-04-25",
"id": "bc:SKTGjcsKl8xIWXZb8uycZ",
"paymentInstrument": {
"displayName": "Credit card (1200-3679-3343-0094)",
"id": "bc:SGP54lChROHT4Q-HsAqh3"
},
"requestDate": "2023-04-25",
"status": {
"code": "requested",
"name": "Requested"
},
"statusDate": "2023-04-25"
},
...
• draftDate
• paymentInstrument, which must be set to the ID of a nonresponsive payment instrument associated with the
account.
For example, the following request creates a payment instrument for account bc:55 for $120 using a credit card
payment instrument whose ID is bc:7777.
Command
POST /billing/v1/account/bc:55/payment-requests
Request body
{
"data": {
"attributes": {
"amount": {
"amount": "120.00",
"currency": "usd"
},
"draftDate": "2023-05-25",
"paymentInstrument": {
"id": "bc:7777"
}
}
}
}
Reversing payments
Reversing payments in BillingCenter
When you reverse a payment, BillingCenter undistributes the payment (if it was distributed) and removes the money
from the appropriate unapplied fund.
You must specify a reason for the payment reversal. BillingCenter defines certain reasons as pejorative. (For example,
in the base configuration, the one reason defined as pejorative is Returned Check.) When a payment is reversed for a
pejorative reason, BillingCenter adds a payment reversal fee if one has been specified in the account's billing plan.
For more information on reversing payments, see the Application Guide.
using the fields query parameter. Therefore, these fields will not be present in the response for a payment that has not
been reversed.)
Command
GET /billing/v1/accounts/bc:55/db-money-rcvds/bc:1010
Response
{
"data": {
"attributes": {
"amount": {
"amount": "80.00",
"currency": "usd"
},
"appliedDate": "2024-01-23T22:15:53.067Z",
"currency": {
"code": "usd",
"name": "USD"
},
"id": "bc:1010",
"paymentInstrument": {
"displayName": "Check",
"id": "bc:STFf31JkOo1Ey9wUIWaou",
"type": "UniversalPaymentInstrument",
"uri": "/billing/v1/universal-payment-instruments/bc:STFf31JkOo1Ey9wUIWaou"
},
"receivedDate": "2024-01-23T22:15:50.037Z",
"subtype": "DirectBillMoneyRcvd",
"unappliedFund": {
"displayName": "Default",
"id": "bc:SVR_B0B2oxbGhbxlWd2q9",
"type": "UnappliedFund",
"uri": "/billing/v1/accounts/bc:SsDCo4_asUVmbT1Z-TlO6/unapplied-funds/bc:SVR_B0B2oxbGhbxlWd2q9"
}
},
...
The following command reverses that payment with a reason of modification. Note that, in the response, the
reversalDate and reversalReason fields are part of the payload.
Command
POST /billing/v1/accounts/bc:55/db-money-rcvds/bc:1010/reverse
Request
{
"data": {
"attributes": {
"reversalReason": {
"code": "modification"
}
}
}
}
Response
{
"data": {
"attributes": {
"amount": {
"amount": "80.00",
"currency": "usd"
},
"appliedDate": "2024-01-23T22:15:53.067Z",
"currency": {
"code": "usd",
"name": "USD"
},
"id": "bc:S6fSPHORKdaiudGcfC7c6",
"paymentInstrument": {
"displayName": "Check",
"id": "bc:STFf31JkOo1Ey9wUIWaou",
"type": "UniversalPaymentInstrument",
"uri": "/billing/v1/universal-payment-instruments/bc:STFf31JkOo1Ey9wUIWaou"
},
"receivedDate": "2024-01-23T22:15:50.037Z",
"reversalDate": "2024-03-04T03:26:03.743Z",
"reversalReason": {
"code": "modification",
"name": "Payment Modification"
},
"subtype": "DirectBillMoneyRcvd",
"unappliedFund": {
"displayName": "Default",
"id": "bc:SVR_B0B2oxbGhbxlWd2q9",
"type": "UnappliedFund",
"uri": "/billing/v1/accounts/bc:SsDCo4_asUVmbT1Z-TlO6/unapplied-funds/bc:SVR_B0B2oxbGhbxlWd2q9"
}
}
}
}
Suspense payments
A suspense payment is a payment that BillingCenter has received that is not associated with a known policy or account
in BillingCenter.
For example, suspense payments might be created in the following circumstances:
• The policy administration system receives payment for a policy for a new account before the policy is bound. The
policy administration system sends the payment to BillingCenter, but it has not yet sent any account or policy
information.
• The account information for a payment is erroneous or missing altogether.
Once received by BillingCenter, suspense payments can have one of the following statuses:
• Open - The target policy or account has not been found
• Applied - The payment is associated with a known BillingCenter policy or account and the funds are transferred to
that policy or account
• Reversed - The payment was reversed either due to payment info being entered incorrectly or the bank not
honoring the payment
• Disbursed - The money from the suspense payment has been returned to the original payer when the insurer cannot
determine the policy or account the payment belongs to
For more information, see “Suspense payments”.
Response
{
"data": {
"attributes": {
"amount": {
"amount": "10.00",
"currency": "usd"
},
"id": "bc:SoNHQp2KKeT0fP5yZzvHj",
"paymentDate": "2024-01-10T00:00:00.000Z",
"paymentInstrument": {
"displayName": "Cash",
"id": "bc:S6_cD6OL_JHsrHOZ3BURd",
"type": "UniversalPaymentInstrument",
"uri": "/billing/v1/universal-payment-instruments/bc:S6_cD6OL_JHsrHOZ3BURd"
},
"status": {
"code": "open",
"name": "Open"
}
},
...
}
}
Request body
{
"data": {
"attributes": {
"amount": {
"amount": "20.00",
"currency": "usd"
},
"paymentDate": "2024-10-05",
"paymentInstrument": {
"id": "bc:S6_cD6OL_JHsrHOZ3BURd"
}
}
}
}
Additional fields
The following table details common optional fields when creating a suspense payment.
Field Description
refNumber The check number (if the payment was made with a check)
invoiceNumber The related invoice for the payment
Field Description
accountNumber* The account number of the expected target account
policyNumber* The policy number of the expected target policy
description A note about the suspense payment
*Either the policy number or the account number can be set while creating the suspense payment, but not both. See the
discussion of suspense payment targets below for more.
When creating suspense payments, no validation is run on the optional fields in the above table. This means that the
accountNumber or policyNumber strings do not have to correspond with existing entities in BillingCenter. (This is
because, in theory, these entities have not yet been created.)
However, when applying suspense payments, accurate identification information must be given. For more information,
see “Applying suspense payments” on page 269.
Request body
{
"data": {
"attributes": {
"accountNumber": "bc:Sxpw_OP1JgFLGIWHCp-dS",
"amount": {
"amount": "20.00",
"currency": "usd"
},
"paymentDate": "2024-10-05",
"paymentInstrument": {
"id": "bc:S6_cD6OL_JHsrHOZ3BURd"
},
"refNumber": "12345",
"invoiceNumber": "1000000000",
"description": "Note on suspense payment"
}
}
}
This request creates a similar suspense payment to the minimal example above. However, this suspense payment has a
target account, a check number, an invoice number, and a description of the suspense payment.
• PATCH /billing/v1/suspense-payments/{suspensePaymentId}
You can only PATCH suspense payments that have a status of open. You can only update the following fields when
PATCHing suspense payments:
• amount
• description
• The target field: accountNumber or policyNumber
When updating the target field, you can change the existing target field to have a new value, or you can set an entirely
new target field. You cannot have more than one target field on a suspense payment.
For example, suppose you have a suspense payment suspense_payment_1 which has a target account
accountNumber_1. You could send the following request to update the target to be policy policyNumber_1:
Command
PATCH /billing/v1/suspense-payments/suspense_payment_1
Request body
{
"data": {
"attributes": {
"policyNumber": "policyNumber_1"
}
}
}
When you execute this request, the suspense payment no longer has the account as a target. The accountNumber on the
suspense payment is set to null. The policy replaces the account as the target.
Request body
{
"data": {
"attributes": {
}
}
}
Note: If the suspense payment does not have a target, the target must be specified in the request. You must
specify the target’s id. This differs from creating a disbursement, where you provide the policy number or the
account number rather than the id of the target entity.
To apply the suspense payment to an account, specify the account id:
Command
POST /billing/v1/suspense-payments/bc:SKXlDvlIZzPhNknWLnALg/apply
Request body
{
"data": {
"attributes": {
"account": {
"id": "bc:SgUWi7lZZx1EcF2tpJyTx"
}
}
}
}
To apply the suspense payment to a policy, it must be applied to a policy period on the policy. Specify the policy period
id:
Command
POST /billing/v1/suspense-payments/bc:SKXlDvlIZzPhNknWLnALg/apply
Request body
{
"data": {
"attributes": {
"policyPeriod": {
"id": "bc:S3x3673euPQ23MAfRyYzQ"
}
}
}
}
Example response
Below is an example response for when a suspense payment is applied.
In this case, the payment is applied to policy PolicyNumber_XSHXDQ98. This response details the policy period, the
user who applied the suspense payment, the money received, and the updated status of the suspense payment.
{
"data": {
"attributes": {
"amount": {
"amount": "55.00",
"currency": "usd"
},
"appliedByUser": {
"displayName": "Super User",
"id": "default_data:1",
"type": "User",
"uri": "/admin/v1/users/default_data:1"
},
"id": "bc:SrrnldTyMnZftsGKSfSh0",
"paymentDate": "2024-01-04T00:00:00.000Z",
"paymentInstrument": {
"displayName": "Cash",
"id": "bc:S1rxFPQrXj0GPNsH0PRKB",
"type": "UniversalPaymentInstrument",
"uri": "/billing/v1/universal-payment-instruments/bc:S1rxFPQrXj0GPNsH0PRKB"
},
"paymentMoneyReceived": {
"displayName": "Account Monster-93-Elevator $55.00, Received 01/30/2024, Applied 01/30/2024",
"id": "bc:S3AXnmg_5YQdTFmtkFU_K",
"type": "DirectBillMoneyRcvd",
"uri": "/billing/v1/accounts/bc:SgUWi7lZZx1EcF2tpJyTx/db-money-rcvds/bc:S3AXnmg_5YQdTFmtkFU_K"
},
"policyNumber": "PolicyNumber_XSHXDQ98",
"policyPeriodAppliedTo": {
"displayName": "PolicyNumber_XSHXDQ98-1",
"id": "bc:S3x3673euPQ23MAfRyYzQ",
"type": "PolicyPeriod",
"uri": "/billing/v1/accounts/bc:SgUWi7lZZx1EcF2tpJyTx/policies/bc:SP46y8feGf1KDWbIqRX06/policy-periods/
bc:S3x3673euPQ23MAfRyYzQ"
},
"status": {
"code": "applied",
"name": "Applied"
}
}
}
}
Response
{
"data": {
"attributes": {
"amount": {
"amount": "20.00",
"currency": "usd"
},
"description": "Note on suspense payment",
"id": "bc:SJRnme9xw1OvwitxWfnqH",
"invoiceNumber": "1000000000",
"paymentDate": "2024-10-05T00:00:00.000Z",
"paymentInstrument": {
"displayName": "Cash",
"id": "bc:S1rxFPQrXj0GPNsH0PRKB",
"type": "UniversalPaymentInstrument",
"uri": "/billing/v1/universal-payment-instruments/bc:S1rxFPQrXj0GPNsH0PRKB"
},
"refNumber": "1234",
"reversedByUser": {
"displayName": "Aaron Applegate",
"id": "bc:SmMqZTSa6i_HxsuhEYBgb",
"type": "User",
"uri": "/admin/v1/users/bc:SmMqZTSa6i_HxsuhEYBgb"
},
"status": {
"code": "reversed",
"name": "Reversed"
}
}
}
}
Response
{
"count": 1,
"data": [
{
"attributes": {
"address": "1234 Hillsdale Blvd, Foster City, CA 12345",
"amount": {
"amount": "332.00",
"currency": "usd"
},
"disbursementNumber": "1000000002",
"dueDate": "2024-02-29",
"id": "bc:SLm4e8iMJtMjIDgoOpjkv",
"mailTo": "John Smith",
"payTo": "John Smith",
"paymentInstrument": {
"displayName": "Check",
"id": "bc:SqB1O80gYePif3EohOCnm",
"type": "UniversalPaymentInstrument",
"uri": "/billing/v1/universal-payment-instruments/bc:SqB1O80gYePif3EohOCnm"
},
"reason": {
"code": "Cancellation",
"name": "Cancellation"
},
"status": {
"code": "Approved",
"name": "Approved"
},
"suspensePayment": {
"displayName": "1000000002",
"id": "bc:Sj293BrhPsFRULvM_BIod",
"type": "SuspensePayment",
"uri": "/billing/v1/suspense-payments/bc:Sj293BrhPsFRULvM_BIod"
}
},
...
}
}
For more information on authority limits, see “Authority limits and authority limit profiles” on page 303.
When a disbursement that requires approval is created, additional fields related to the approval activity are set on the
disbursement schema: assignedUser and openActivityCreatedByAppr. These fields are used to manage the approval
workflow. They are explained as follows:
Request body
{
"data": {
"attributes": {
"address": "123 Address St. San Mateo CA 94403",
"dueDate": "2024-02-12",
"mailTo": "John Smith",
"payTo": "John Smith",
"reason": {
"code": "Other"
}
}
}
}
Response
{
"data": {
"attributes": {
"address": "123 Address St. San Mateo CA 94403",
"amount": {
"amount": "54.00",
"currency": "usd"
},
"disbursementNumber": "1000000005",
"dueDate": "2024-02-12",
"id": "bc:SrhyR0sLlmbkuQ1r7ZgHO",
"mailTo": "John Smith",
"payTo": "John Smith",
"paymentInstrument": {
"displayName": "Cash",
"id": "bc:S8_HxpnMjgd0fLx5RCIJD",
"type": "UniversalPaymentInstrument",
"uri": "/billing/v1/universal-payment-instruments/bc:S8_HxpnMjgd0fLx5RCIJD"
},
"reason": {
"code": "Other",
"name": "Other"
},
"status": {
"code": "Approved",
"name": "Approved"
},
"suspensePayment": {
"displayName": "1000000005",
"id": "bc:SMklKGo7WhevuIbhPomsw",
"type": "SuspensePayment",
"uri": "/billing/v1/suspense-payments/bc:SMklKGo7WhevuIbhPomsw"
}
},
"checksum": "0",
"links": {
"self": {
"href": "/billing/v1/disbursements/bc:SrhyR0sLlmbkuQ1r7ZgHO",
"methods": [
"get"
]
}
}
}
}
Disbursements
A disbursement is an operation in which BillingCenter returns money to someone. There are four types of
disbursements in BillingCenter:
• Account disbursements - Money is returned from an account unapplied fund to the account payer. Typically, this is
done because the account overpaid an invoice.
• Collateral disbursement - Money is returned from collateral to an account. Typically, this is done because there is
no longer a need to hold the collateral funds.
• Suspense disbursement - Money is returned from a suspense payment to the party that submitted the payment.
Typically, this is done because the payment did not come with enough information to target it to a known account or
policy.
• Agency bill disbursement - Money is returned from a producer unapplied fund to the producer payer. Typically, this
is done because the producer overpaid for an agency bill policy.
You can use Cloud API to query for any disbursement that exists in BillingCenter. However, at this time you can only
create suspense disbursements via Cloud API. For more information, see “Suspense payment disbursements” on page
271.
Filtering results
Because the /disbursements endpoint returns all the disbursements in an instance of BillingCenter, you might want to
add query parameters to the request. You can use query parameters to customize the retrieved disbursements by
targeting properties such as disbursementNumber, dueDate, mailTo, payTo, status, and so on.
For example, to return only the disbursements where the payee is "John Smith", you could add the following query
parameter: ?filter=payTo:eq:John%20Smith.
You can also use the custom filter assignedUserId to retrieve only disbursements which have open approval activities
assigned to a user. The following example uses this filter to retrieve all the open disbursements assigned to a user with
id bc:SO9ElvEWDSCxZnSw1orIc.
Disbursements 275
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Command
GET /billing/v1/disbursements/?filter=assignedUserId:eq:bc::SO9ElvEWDSCxZnSw1orIc
Response
{
"count": 3,
"data": [
{
"attributes": {
"account": {
"displayName": "PA-12345",
"id": "bc:S3dlt88iFMLiifyjVakna",
"type": "Account",
"uri": "/billing/v1/accounts/bc:S3dlt88iFMLiifyjVakna"
},
"address": "111 Address Lane Suite 1, City, CO 12345",
"amount": {
"amount": "200.00",
"currency": "usd"
},
"assignedUser": {
"displayName": "Super Visor",
"id": "bc:SO9ElvEWDSCxZnSw1orIc",
"type": "User",
"uri": "/admin/v1/users/bc:SO9ElvEWDSCxZnSw1orIc"
},
"disbursementNumber": "1000000006",
"dueDate": "2024-06-06",
"id": "bc:Sizn9c0btX8QDLB_binMq",
"mailTo": "John Smith",
"payTo": "John Smith",
"paymentInstrument": {
"displayName": "Responsive",
"id": "bc:SfArXUmegPWi04CvYNyFk",
"type": "UniversalPaymentInstrument",
"uri": "/billing/v1/universal-payment-instruments/bc:SfArXUmegPWi04CvYNyFk"
},
"reason": {
"code": "Cancellation",
"name": "Cancellation"
},
"status": {
"code": "AwaitingApproval",
"name": "Awaiting Approval"
},
"unappliedFund": {
"displayName": "Default",
"id": "bc:S7ErFtlGkK4U1XLK7it_M",
"type": "UnappliedFund",
"uri": "/billing/v1/accounts/bc:S3dlt88iFMLiifyjVakna/unapplied-funds/bc:S7ErFtlGkK4U1XLK7it_M"
}
},
...
},
{
"attributes": {
"account": {
"displayName": "GL-12345",
"id": "bc:SgAtMMpK2-ck3ig6Tmj7P",
"type": "Account",
"uri": "/billing/v1/accounts/bc:SgAtMMpK2-ck3ig6Tmj7P"
},
"address": "111 Address Lane Suite 1, City, CO 12345",
"amount": {
"amount": "150.00",
"currency": "usd"
},
"assignedUser": {
"displayName": "Super Visor",
"id": "bc:SO9ElvEWDSCxZnSw1orIc",
"type": "User",
"uri": "/admin/v1/users/bc:SO9ElvEWDSCxZnSw1orIc"
},
"disbursementNumber": "1000000009",
"dueDate": "2024-03-13",
"id": "bc:S3MnVHtdy-oalJWExYhEf",
"mailTo": "Jane Smith",
"payTo": "Jane Smith",
"paymentInstrument": {
"displayName": "Responsive",
"id": "bc:SfArXUmegPWi04CvYNyFk",
"type": "UniversalPaymentInstrument",
"uri": "/billing/v1/universal-payment-instruments/bc:SfArXUmegPWi04CvYNyFk"
},
"reason": {
"code": "Cancellation",
276 Disbursements
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
"name": "Cancellation"
},
"status": {
"code": "AwaitingApproval",
"name": "Awaiting Approval"
},
"unappliedFund": {
"displayName": "Default",
"id": "bc:SPzPyau2t_GsPpVXiALYq",
"type": "UnappliedFund",
"uri": "/billing/v1/accounts/bc:SgAtMMpK2-ck3ig6Tmj7P/unapplied-funds/bc:SPzPyau2t_GsPpVXiALYq"
}
},
...
},
...
],
...
}
Disbursements 277
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
278 Disbursements
part 4
The InsuranceSuite Cloud API is a set of RESTful system APIs that expose functionality in BillingCenter so that caller
applications can request data from or initiate action within BillingCenter.
The following topics discuss how caller applications can initiate business flows related to the Common API and the
Admin API. This includes:
• The Common API
◦ “Documents”
◦ “History events” on page 313
• The Admin API
◦ “Users and groups”
◦ “Security zones”
◦ “Geographic zones” on page 311
◦ “Batch processes”
◦ “Database consistency checks”
◦ “Business entity schemas”
◦ “Testing”
Documents
In BillingCenter, a document is an electronic file (such as a PDF, Word document, or digital photograph) which
contains information relevant to an account, policy, or producer. (Note that documents are not used for invoices.
Invoice information is generated by BillingCenter. But the assembly of invoice information into a printed or electronic
invoice is handled by a downstream system.)
For a complete description of the functionality of documents in BillingCenter, see the Application Guide.
Note: Documents exist in all core InsuranceSuite applications. To ensure that documents behave in a common
way across all applications, some document endpoints, such as the endpoints for querying for document
metadata or contents, are declared in the Common API. Documents can also belong to accounts, policies, and
producers. 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 producer, are declared in the Billing API. This
topic always identifies the API in which each endpoint is declared.
Note: ContactManager provides the ability to attach documents to contacts. However, the contact must have the
"vendor" tag. Documents cannot be attached to non-vendor contacts.
Overview of documents
Document owners
Documents cannot exist on their own. They must be attached to a parent object. From a Cloud API perspective,
BillingCenter documents are always attached to an account, a policy, or a producer.
In ContactManager, documents can be attached only to vendor contacts (contacts with the "vendor" tag).
existence of the document and metadata about the document, even though the contents are not in the document
management system.
Documents cannot exist in an InsuranceSuite application with contents but no metadata.
Endpoint Returns
GET /common/v1/documents/{documentId} Metadata for the given document
GET /billing/v1/accounts/{accountId}/ Metadata for documents on the given account
documents
GET /billing/v1/accounts/{accountId}/ Metadata for documents on the given policy
policies/{policyId}/documents When retrieving documents on policies, the policy must have at least one
non-archived policy period.
GET /billing/v1/producers/{producerId}/ Metadata for documents on the given producer
documents
Response
{
"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"
282 Documents
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
}
},
...
Response
RESPONSE:
{
"data": {
"attributes": {
"contents": "REVWIEJVSUxEDQoNCklmIHRoZXJlIGlzIG9ubHkgYSB2aXN1YWxp
emVkIHByb2R1Y3QNCiAgQU5EIHRoZSAiRW5hYmxlZCBmb3IgUmVzdCBBUEkiIGZpZWxkIGlzIGlua
XRpYWxseSBzZXQgdG8gRW5hYmxlZA0KICBBTkQgeW91IGNoYW5nZSB0aGUgZmllbGQgdG8gRGlzYW
JsZWQNCiAgVEhFTiB0aGUgcHJvZHVjdCBpcyBpbW1lZGlhdGVseSB1bmF2YWlsYWJsZSB0byB0aGU
gc3lzdGVtIEFQSXMNCg0KSWYgdGhlcmUgaXMgYSB2aXN1YWxpemVkIHByb2R1Y3QgYW5kIGEgZmlu
YWxpemVkIHByb2R1Y3QNCiAgQU5EIHRoZSAiRW5hYmxlZCBmb3IgUmVzdCBBUEkiIGZpZWxkIGlzI
GluaXRpYWxseSBzZXQgdG8gRW5hYmxlZA0KICBBTkQgeW91IGNoYW5nZSB0aGUgZmllbGQgdG8gRG
lzYWJsZWQNCiAgVEhFTiB0aGUgZmluYWxpemVkIHByb2R1Y3QgaXMgaW1tZWRpYXRlbHkgYXZhaWx
hYmxlIHRvIHRoZSBzeXN0ZW0gQVBJcw0KDQpDVVNUT01FUiBCVUlMRA0KDQpJZiB0aGVyZSBpcyBv
bmx5IGEgdmlzdWFsaXplZCBwcm9kdWN0DQogIEFORCB0aGUgIkVuYWJsZWQgZm9yIFJlc3QgQVBJI
iBmaWVsZCBpcyBpbml0aWFsbHkgc2V0IHRvIEVuYWJsZWQNCiAgQU5EIHlvdSBjaGFuZ2UgdGhlIG
ZpZWxkIHRvIERpc2FibGVkDQogIFRIRU4gdGhlIHByb2R1Y3QgaXMgaW1tZWRpYXRlbHkgdW5hdmF
pbGFibGUgdG8gdGhlIHN5c3RlbSBBUElzDQooSSBhc3N1bWUgdGhpcyBpcyB0aGUgc2FtZSBhcyAN
Cg0KSWYgdGhlcmUgaXMgYSB2aXN1YWxpemVkIHByb2R1Y3QgYW5kIGEgZmluYWxpemVkIHByb2R1Y
3QNCiAgQU5EIHRoZSAiRW5hYmxlZCBmb3IgUmVzdCBBUEkiIGZpZWxkIGlzIGluaXRpYWxseSBzZX
QgdG8gRW5hYmxlZA0KICBBTkQgeW91IGNoYW5nZSB0aGUgZmllbGQgdG8gRGlzYWJsZWQNCiAgVEh
FTiB0aGUgZmluYWxpemVkIHByb2R1Y3QgaXMgaW1tZWRpYXRlbHkgYXZhaWxhYmxlIHRvIHRoZSBz
eXN0ZW0gQVBJcw==",
"responseMimeType": "text/plain"
},
...
POSTing documents
Use the following endpoints to POST documents:
• POST /billing/v1/accounts/{accountId}/documents
• POST /billing/v1/accounts/{accountId}/policies/{policyId}/documents
• POST /billing/v1/producers/{producerId}/documents
• (ContactManager) POST /contact/v1/contacts/{contactId}/documents
◦ In ContactManager, documents can be posted only to contacts with the "vendor" tag.
FormData objects
For most Cloud API endpoints, the request has a body with a single string of JSON text. However, this format is not
sufficiently robust for documents. When working with documents, the caller application typically sends two sets of
data: the document metadata and the document contents. This is accomplished using FormData objects.
FormData is an industry-standard interface that constructs an object as a set of key/value pairs. When a caller
application is constructing a POST /documents call, the request has a FormData object with the following keys:
• metadata, whose value is a JSON string identifying the document metadata
• content, whose value is the contents of the document (and whose format varies based on the document type)
Documents 283
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Request body
METADATA:
{
"data": {
"attributes": {
"name": "Billing error",
"status": {
"code": "draft"
},
"type": {
"code": "billingerror"
}
}
}
}
CONTENTS:
<contents of "billingerror.pdf" file>
284 Documents
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
The following is an example of POSTing a "billingerror.pdf" file for account bc:10 that does exist in the document
management system with id "2024/5/2/18/billingerror.pdf".
Command
POST /billing/v1/accounts/bc:10/documents
Request body
METADATA:
{
"data": {
"attributes": {
"docUID": "2024/5/2/18/billingerror.pdf",
"name": "Billing error",
"status": {
"code": "draft"
},
"type": {
"code": "billingerror"
}
}
}
}
CONTENTS:
<no content specified>
If a POST /documents call needs to specify document metadata only, it can be executed using a request body that is
formatted as JSON (as opposed to FormData). For more information, see “Sending document metadata only using
JSON” on page 288.
Request body
METADATA:
{
"data": {
"attributes": {
"name": "Printout of billing error",
"status": {
"code": "draft"
},
"type": {
"code": "billingerror"
}
}
}
}
CONTENTS:
<no content specified>
If a POST /documents call needs to specify document metadata only, it can be executed using a request body that is
formatted as JSON (as opposed to FormData). For more information, see “Sending document metadata only using
JSON” on page 288.
Documents 285
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
Procedure
1. Identify the files needed for the FormData object. This includes:
• A JSON file that contains the metadata. (The file extension must be .json.)
• The document file that has the content.
2. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
3. Under the Untitled Request label, select POST.
4. In the Enter request URL field, enter the URL for the server and the endpoint.
• For example, to POST a document to an account on an instance of BillingCenter on your machine, enter:
http://localhost:8580/bc/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 JSON file containing the 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.
286 Documents
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
PATCHing documents
Use the following to PATCH documents:
• PATCH /common/v1/documents/{documentId}
Logically speaking, a PATCH call can modify only the metadata of a document, only the content of a document, or
both.
Request body
METADATA:
{
"data": {
"attributes": {
"status": {
"code": "final"
}
}
}
}
You can also submit a metadata-only PATCH using a request body that is formatted as JSON (as opposed to
FormData). For more information, see “Sending document metadata only using JSON” on page 288.
PATCHes to content are destructive, not additive. If you specify content, the new content replaces the previous
content entirely.
For example, the following call updates the entire content for document xc:127 (without changing any of the
metadata).
Command
PATCH /common/v1/documents/xc:127
Request body
METADATA:
{
"data": {
"attributes": {
}
}
}
}
Documents 287
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
PATCH /common/v1/documents/xc:127
Request body
METADATA:
{
"data": {
"attributes": {
"status": {
"code": "final"
}
}
}
}
Request body
{
"data": {
"attributes": {
"status": {
"code": "final"
}
}
}
}
DELETEing documents
Use the following to DELETE documents:
• DELETE /common/v1/documents/{documentId}
288 Documents
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
PATCH /common/v1/documents/xc:101
Documents 289
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
290 Documents
chapter 30
Cloud API provides endpoints in the Admin API to support several of the tasks associated with user and group
management.
Users
In most cases, a user is a person who is known to BillingCenter and who is listed in the BillingCenter database (such as
policy underwriters, claims adjusters, and billing clerks). Within the context of Cloud API authentication, this is also
referred to as an internal user.
In some cases, a user can represent a service. This occurs for caller applications which are services which are mapped
to user accounts for the purpose of managing access.
Do not confuse internal users with external users. External users are users known to BillingCenter but who are not
listed in the BillingCenter database (such as account holders, policy holders, and service vendors).
For information on working with services and external users, see the Cloud API Developer Guide.
Note: Be aware that Cloud API enforces application constraints specified in internal code, but it does not
enforce constraint specified in the user interface. This is because internal code constraints cannot be modified or
removed, but user interface constraints can. As a result of this, there may be actions you can execute through
Cloud API that you cannot execute through the base configuration user interface.
For example, there is no internal code that requires a user to have a phone number. Therefore, you can create
and modify a user through Cloud API without ever specifying a primary phone number. However, the base
configuration user interface does require you to specify a phone number. Therefore, any user that you modify
through the base configuration user interface must have a phone number, even when that user was created
through Cloud API without a phone number.
If there is a desire to have the constraints of the two environments match, insurers can add constraints to Cloud
API and/or remove them from the user interface.
Command
GET /admin/v1/users/bc:SwJl9CwZJ3GJj_mvArObi
Response
{
"data": {
"attributes": {
"active": true,
"cellPhone": {
"countryCode": {
"code": "US",
"name": "United States (1)"
},
"displayName": "650-333-3333",
"number": "6503333333"
},
"displayName": "Aaron Applegate",
"externalUser": false,
"firstName": "Aaron",
"id": "bc:SwJl9CwZJ3GJj_mvArObi",
"lastName": "Applegate",
"roles": [
{
"displayName": "All Permissions (Deprecated)",
"id": "superuser",
"type": "Role"
}
],
"username": "aapplegate",
"vacationStatus": {
"code": "atwork",
"name": "At work"
},
"workPhone": {
"displayName": "213-555-8164",
"number": "2135558164"
}
}
}
}
Creating users
To create a user, use the following endpoint:
• POST /admin/v1/users
Note: When a user is created through Cloud API, the user's password is set to a value that cannot be used for
authentication. (The password is set to a value that is not a valid Base64 string, but the authentication
framework can authenticate passwords only when they are valid Base64 strings.) In order for the new user to
authenticate, the password must first be changed to a valid Base64 string through some other method, such as
through the user interface.
{
"data": {
"attributes": {
"username": "amartin"
}
}
}
POST /admin/v1/users
{
"data": {
"attributes": {
"active": true,
"displayName": "",
"externalUser": false,
"id": "bc:S21jxg7V0kWX7Lk1o4Mu7",
"username": "amartin",
"vacationStatus": {
"code": "atwork",
"name": "At work"
}
},
"checksum": "89341e74aa80e5732927941330885c06",
"links": {
"self": {
"href": "/admin/v1/users/bc:S21jxg7V0kWX7Lk1o4Mu7",
"methods": [
"get",
"patch"
]
}
}
}
}
POST /admin/v1/users
{
"data": {
"attributes": {
"firstName": "Adriana",
"lastName": "Diaz",
"username": "adiaz",
"employeeNumber": "ACME-02027",
"authorityLimitProfile": {
"id": "default_data:2"
},
"roles" : [
{
"id": "billing_clerical"
},
{
"id": "billing_manager"
}
]
}
}
}
When you create a user, you can also specify the user's roles.
• For more information on working with user roles, see “User roles” on page 299.
Updating users
Use the following endpoint to modify an existing user:
• PATCH /admin/v1/users/{userId}
For example, the following request updates the first name of user xc:2156
PATCH /admin/v1/users/xc:2156
{
"data": {
"attributes": {
"firstName": "Alex"
}
}
}
Deleting users
Use the following endpoint to delete an existing user:
• DELETE /admin/v1/users/{userId}
For example, the following request deletes user xc:2156:
DELETE /admin/v1/users/xc:2156
Groups
A group is a set of users who represent a single business unit or who are assigned a single body of work.
GET /admin/v1/users/demo_sample:31
{
"data": {
"attributes": {
"displayName": "Alexandria Branch",
"groupType": {
"code": "branch",
"name": "Branch office"
},
"id": "demo_sample:31",
"name": "Alexandria Branch",
"parent": {
"displayName": "Eastern Region",
"id": "demo_sample:29",
"type": "Group",
"uri": "/admin/v1/groups/demo_sample:29"
},
"securityZone": {
"displayName": "Auto and Property",
"id": "default_data:1"
},
"supervisor": {
"displayName": "Sue Smith",
"id": "demo_sample:2",
"type": "User",
"uri": "/admin/v1/users/demo_sample:2"
}
},
...
}
}
Creating groups
To create a group, use the following endpoint:
• POST /admin/v1/groups
When creating a group, you must specify the following values:
• groupType - a value from the GroupType typelist, such as general
• name - a string value
• parent - A JSON object with an id field that references the id of the parent group
• securityZone - A JSON object with an id field that references the id of the group's security zone
• supervisor - A JSON object with an id field that references the id of the user who is the supervisor
As of this release, there is no endpoint for retrieving information about security zones. To identify the ID of the desired
security zone, you must use some other method.
The user who is designated as the supervisor of the group is not required to be a member of the group. Also, designated
a user as the supervisor does not automatically add the user to the group as a member.
For example, the following request creates a new group:
POST /admin/v1/groups
{
"data": {
"attributes": {
"groupType": {
"code": "general"
},
"name": "Cloud API Group 1",
"parent": {
"id": "systemTables:1"
},
"securityZone": {
"id": "default_data:1"
},
"supervisor": {
"id": "demo_sample:7"
}
}
}
}
• manager - Boolean indicating whether the user has permission to view the activity of others in the group
• member - Boolean indicating whether the user is a working member of the group (for purposes of work assignment),
as opposed to simply being associated with the group as a manager or other auxiliary person
• loadFactor - Percent of work that can be assigned to the user
Querying for group/user information
To retrieve information about user assignments for a group, use the following endpoints:
• GET /admin/v1/groups/{groupId}/users
◦ Returns a collection of user assignments for the group
• GET /admin/v1/groups/{groupId}/users/[groupUserId}
◦ Returns information about a specific user assignment to the group
For example, the following is the snippet of the response payload when retrieving the information for the GroupUser
assignments in group demo_sample:31. Note that the count is 12, which means the group has 12 users. Information is
then provided about each GroupUser assignment, including who the user is, and whether the user is a member or a
manager.
GET /admin/v1/users/demo_sample:31/users
{
"count": 12,
"data": [
{
"attributes": {
"id": "cc:SfZwdri9ldAAUgR46xZT7",
"manager": false,
"member": true,
"user": {
"displayName": "Andy Applegate",
"id": "demo_sample:1",
"type": "User",
"uri": "/admin/v1/users/demo_sample:1"
}
},
...
},
{
"attributes": {
"id": "cc:SZPhG_CUIA3E1sO2AiZ_s",
"manager": false,
"member": true,
"user": {
"displayName": "Betty Baker",
"id": "demo_sample:8",
"type": "User",
"uri": "/admin/v1/users/demo_sample:8"
}
},
...
},
...
POST /admin/v1/groups/demo_sample:31/users
{
"data": {
"attributes": {
"user": {
"id": "demo_sample:18"
}
}
}
}
This assigns user demo_sample:18 to group demo_sample:31 as a member. The user is not a manager of the group and
has a null load factor. (If a field’s value is null, the field is not included in Cloud API responses.)
PATCH /admin/v1/groups/demo_sample:31/users/xc:55
{
"data": {
"attributes": {
"manager": true,
"member": false
}
}
}
DELETE /admin/v1/groups/demo_sample:31/users/xc:55
Updating groups
Use the following endpoint to modify an existing group:
• PATCH /admin/v1/groups/{groupId}
For example, the following request updates the supervisor of group xc:202:
PATCH /admin/v1/groups/xc:202
{
"data": {
"attributes": {
"supervisor": {
"id": "demo_sample:6"
}
}
}
}
Deleting groups
Use the following endpoint to delete an existing group:
• DELETE /admin/v1/groups/{groupId}
For example, the following request deletes group xc:202:
DELETE /admin/v1/groups/xc:202
Queues
A queue is a named repository that belongs to a specific group and that contains activities assigned to the group but not
yet to any user in the group. Users who belong to the group can assign activities in a queue to themselves. Queues are
often used to allow users in a group to take ownership of activities as their workload or expertise permits.
In the data model, queues are managed using the AssignableQueue data model entity.
In order to work with queues in the base configuration, the following must exist:
• Support for queues in the data model
• Assignment methods that let activities be assigned to queues
• Rules that create queues automatically, and/or user interface controls that let administrators create queues manually
• User interface screens to let users view queues and the activities assigned to them, and to take ownership of
activities in the queue
The base configuration of ClaimCenter has all of the above items. Thus, the base configuration of ClaimCenter
supports queues.
The base configuration of PolicyCenter and BillingCenter have the first two items only. PolicyCenter and BillingCenter
can support queues, but further configuration is required.
GET /admin/v1/groups/cc:118/queues/cc:790
{
"data": {
"attributes": {
"description": "Auto-created FNOL queue for group",
"id": "xc:790",
"name": "FNOL",
"subGroupVisible": false
},
...
Creating queues
Use the following endpoint to create queues:
• POST /admin/v1/groups/{groupId}/queues
When creating queues, the only required values are:
• name - A string
• subGroupVisible - A Boolean indicating whether the queue is visible from sub-groups of the group to which it
belongs
For example, the following request creates a new queue for group cc:118:
POST /admin/v1/groups/cc:118/queues
{
"data": {
"attributes": {
"name": "Damaged vehicle evaluations",
"subGroupVisible": true
}
}
}
PATCH /admin/v1/groups/cc:118/queues/cc:990
{
"data": {
"attributes": {
"description": "Queue for activities to process evaluations of damaged vehicles"
}
}
}
DELETE /admin/v1/groups/cc:118/queues/cc:990
User roles
A system permission is a granular permission that identifies something a user can view, edit, create, or otherwise work
with.
A user role is a named group of system permissions. User roles simplify the work of granting access by allowing a set
of related system permissions to be assigned to a user. (Note that in most Guidewire documentation, user roles are
referred to simply as "roles". The Cloud API documentation uses the term "user role" to help distinguish them from
"API roles", which is a feature with a similar purpose but different underlying functionality.)
GET /admin/v1/roles?pageSize=4
{
"count": 5,
"data": [
{
"attributes": {
"carrierInternal": true,
"description": "Permissions for account admin",
"displayName": "Account Manager",
"id": "account_manager",
"name": "Account Manager"
}
},
{
"attributes": {
"carrierInternal": true,
"description": "All permissions related to activity rules",
"displayName": "Activity Rules Admin",
"id": "activity_rules_admin",
"name": "Activity Rules Admin"
}
},
{
"attributes": {
"carrierInternal": true,
"description": "Permissions to edit activity rules",
"displayName": "Activity Rules Editor",
"id": "activity_rules_editor",
"name": "Activity Rules Editor"
}
},
{
"attributes": {
"carrierInternal": true,
"description": "Permissions to view activity rules",
"displayName": "Activity Rules Viewer",
"id": "activity_rules_viewer",
"name": "Activity Rules Viewer"
}
}
]
}
GET /admin/v1/roles/claims_adjuster/permissions
{
"count": 25,
"data": [
{
"attributes": {
"id": "sample_data:213",
"permission": {
"code": "lvprint",
"name": "Print listviews"
}
},
...
},
{
"attributes": {
"id": "sample_data:222",
"permission": {
"code": "searchpols",
"name": "Search related policies"
}
},
...
},
{
"attributes": {
"id": "sample_data:210",
"permission": {
"code": "actview",
"name": "View activities"
}
},
...
},
...
For example, the following creates a new user role for users named "finance_admin".
POST /admin/v1/roles
{
"data": {
"attributes": {
"roleType": {
"code": "user"
},
"name": "finance_admin"
}
}
}
POST /admin/v1/roles/xc:222/permissions
{
"data": {
"attributes": {
"permission": {
"code": "notecreate"
}
}
}
}
There is no way to specify multiple permissions in a single call to the /permissions endpoint. You must invoke the /
permissions endpoint once for each permission to be added to a role.
POST /admin/v1/roles
{
"data": {
"attributes": {
"roleType": {
"code": "user"
},
"name": "finance_admin"
}
},
"included": {
"RolePermission": [
{
"attributes": {
"permission": {
"code": "noteview"
}
},
"method": "post",
"uri": "/admin/v1/roles/this/permissions"
}
]
}
}
Endpoint Description
PATCH /admin/v1/roles/{roleId} Modify attributes about the role, such as its name or description
DELETE /admin/v1/roles/{roleId}/permissions/ Remove a permission from a role
{permissionId}
DELETE /admin/v1/roles/{roleId} Delete a role
PATCH /admin/v1/roles/xc:222
{
"data": {
"attributes": {
"name": "Finance Administrator",
"description": "User role for finance administrators"
}
}
}
DELETE /admin/v1/roles/xc:222/permissions/xc:515
DELETE /admin/v1/roles/xc:222
Endpoint Retrieves
For example, the following request retrieves information about authority limit profile default_data:2.
Command
GET /admin/v1/authority-limit-profiles/default_data:2
Response
{
"data": {
"attributes": {
"description": "General default authority",
"id": "default_data:2",
"name": "General"
},
"checksum": "0",
"links": {
"authority-limits": {
"href": "/admin/v1/authority-limit-profiles/default_data:2/authority-limits",
"methods": [
"get"
]
},
"self": {
"href": "/admin/v1/authority-limit-profiles/default_data:2",
"methods": [
"get"
]
}
}
}
}
You can query for specific authority limits or retrieve a list of all authority limits in an authority limit profile. The
information provided for each authority limit is the same whether you query for one or all the authority limits.
The following retrieves information about the authority limits in authority limit profile default_data:2
Command
GET /admin/v1/authority-limit-profiles/default_data:2/authority-limits
Response
{
"count": 25,
"data": [
{
"attributes": {
"id": "bc:ShlFtMFFN8BjwuA1BWvln",
"limitAmount": {
"amount": "1000000.00",
"currency": "usd"
},
"limitType": {
"code": "advancecommission",
"name": "Advance Commission"
}
},
...
},
{
"attributes": {
"id": "bc:SAkcsI2tqo0gFzFOI6yFG",
"limitAmount": {
"amount": "1000000.00",
"currency": "usd"
},
"limitType": {
"code": "negwtoffagbillprodunap",
"name": "Agency Bill Negative Writeoff From Producer Unapplied"
}
},
...
},
{
"attributes": {
"id": "bc:SqlpqJgWAJa6xjkOMCtqp",
"limitAmount": {
"amount": "1000000.00",
"currency": "usd"
},
"limitType": {
"code": "writeoffagbillprodunap",
"name": "Agency Bill Writeoff From Producer Unapplied"
}
},
...
},
...
]
}
Security zones
A security zone is a set of business objects whose access is restricted to the users in a user group. Security zones are
used to define access to specific sets of business objects.
At a high level, the process of limiting access through security zones is implemented in these steps:
1. A security zone is created.
2. The security zone is associated with a set of business objects, such as accounts, policies, or claims.
3. The security zone is also associated with a user group.
By default, the only users who can view or edit the business objects in the security zone are the users in the group
associated with the security zone.
For example, suppose there is a security zone named "Security Zone A" that contains an account named "Big Lake
Bakery". The "Western Region" group is also added to "Security Zone A". Now, the Big Lake Bakery account can be
viewed and modified only by users who belong to the Western Region group.
The functionality of security zones, including the business objects that can be added to them, varies between
applications. For more information on the business functionality of security zones in BillingCenter, see the Application
Guide.
The endpoints for working with security zones are available in Cloud API for ClaimCenter, Cloud API for
PolicyCenter, and Cloud API for BillingCenter. They are not available in Cloud API for ContactManager.
{
"data": {
"attributes": {
"description": "Default Security Zone",
"displayName": "Default Security Zone",
"id": "default_data:1",
"name": "Default Security Zone"
},
...
{
"data": {
"attributes": {
"name": "Cloud API security zone"
}
}
}
Note that there are differences between security zone functionality in the base configuration of the different
applications.
• In ClaimCenter and BillingCenter, users can create security zones. This is done from the Admin tab's Security Zones
screen in the Users & Security group.
• In PolicyCenter, users cannot create security zones. (There is no Security Zones screen.) However, users can import
security zones through the Import Administrative Data screen in the Utilities group.
PATCH /admin/v1/security-zones/xc:111
{
"data": {
"attributes": {
"description": "Security zone created using Cloud API"
}
}
}
Note that there are differences between security zone functionality in the base configuration of the different
applications.
• In ClaimCenter and BillingCenter, users can edit security zones. This is done from the Admin tab's Security Zones
screen in the Users & Security group.
• In PolicyCenter, users cannot edit security zones.
DELETE /admin/v1/security-zones/xc:111
In PolicyCenter and BillingCenter, users cannot delete security zones, either through the user interface or through
Cloud API. The DELETE /security-zones/{securityZoneId} endpoint is exposed in Cloud API for PolicyCenter
and Cloud API for BillingCenter. But if you attempt to use it, Cloud API returns the following error. This is true even
for the super user "su", who is not bound by permissions.
{
"status": 403,
"errorCode": "gw.api.rest.exceptions.NotAuthorizedException",
"userMessage": "You do not have permission to delete this resource"
}
{
"data": {
"attributes": {
"securityZone": {
"id": "bc:222"
}
}
}
}
Similarly, the following request PATCHes BillingCenter group bc:555 so that it is associated with security zone bc:222.
PATCH /admin/v1/groups/bc:555
{
"data": {
"attributes": {
"securityZone": {
"id": "bc:222"
}
}
}
}
As a result of the two queries in the previous examples, account bc:101 is now restricted to only users in group bc:555.
Geographic zones
The geographic zone endpoint is used to retrieve information about a predefined geographic region. That information
can then be associated with InsuranceSuite features where a geographic region is needed.
Geographic zone endpoint:
GET /admin/v1/geographic-zones
GET is the only method available for geographic zones; you cannot add, update, or delete geographic zones through
the Cloud API.
The base configuration of InsuranceSuite includes over 1,000 geographic zones, so Guidewire provides several fields
you can filter on to make retrieving geographic zones more efficient.
Filters:
• id: The unique ID of the zone.
• country: The typecode for the country you want to filter on. Use the Country typekey to find available country
codes:
GET /common/v1/typelists/Country?fields=typeKeys
• zoneType: A typekey that varies by country. For example, if the country is US (United States) the zoneType could
be state, whereas a country value of CA (Canada) could have a zoneType of province. Use the ZoneType typekey
to find available zone types:
GET /common/v1/typelists/ZoneType?fields=typeKeys
• code: A value associated with the zoneType. For example, if the zoneType is state, the code could be OR
(Oregon).
This example retrieves information for the geographic zone that includes the U.S. state of Oregon:
GET /admin/v1/geographic-zones?filter=country:eq:US&filter=zoneType:eq:state&filter=code:eq:OR
{
"count": 1,
"data": [
{
"attributes": {
"code": "OR",
"country": {
"code": "US",
"name": "United States"
},
"displayName": "OR",
"id": "US:S4MEjnBYkBZqD_nWzarTl",
"name": "OR",
"zoneType": {
"code": "state",
"name": "State"
}
},
...
}
Here’s another example, this time with a broader search. This example will return a list of all provinces in Canada:
GET /admin/v1/geographic-zones?filter=country:eq:CA&filter=zoneType:eq:province
{
"data": [
{
"attributes": {
"code": "BC",
"country": {
"code": "CA",
"name": "Canada"
},
"displayName": "BC",
"id": "CA:SNAwbKcTW2uiIdv0FGcd0",
"name": "BC",
"zoneType": {
"code": "province",
"name": "Province"
}
},
},
{
"attributes": {
"code": "NL",
"country": {
"code": "CA",
"name": "Canada"
},
"displayName": "NL",
"id": "CA:SGVv0UjgB0_EJCt80VU1K",
"name": "NL",
"zoneType": {
"code": "province",
"name": "Province"
}
},
...
History events
When certain events occur in InsuranceSuite they are automatically recorded. Each history event is stored as a
CustomHistory type. You can retrieve these history events by using the history-events endpoint.
• GET /common/v1/history-events/{historyEventId}
The following section provides an example using this endpoint.
GET /common/v1/history-events/S-d_RRz9cG9bhqcfVN2xC
Response
{
"data": {
"attributes": {
"account": {
"displayName": "C000478975",
"id": "SaDgS3XDMmUlTYlw-HNoI",
"type": "Account",
"uri": "/account/v1/accounts/SaDgS3XDMmUlTYlw-HNoI"
},
"customType": {
"code": "acct_changed",
"name": "Account changed"
},
"description": "Pending account became active",
"eventTimestamp": "2024-06-03T23:03:05.992Z",
"historyType": {
"code": "custom",
"name": "Custom"
},
"id": "SJj0sm_oXm7aZUXrKuWxF",
"user": {
"displayName": "Super User",
"id": "default_data:1",
"type": "User",
"uri": "/admin/v1/users/default_data:1"
}
},
…
}
Batch processes
The BillingCenter base configuration comes with a set of batch processes that can be scheduled to run maintenance
tasks periodically. You can also run batch processes on demand.
Cloud API provides support for batch processes. This includes retrieving the status of a batch process, and starting and
stopping a batch process. Third-party batch process schedulers can also use the batch process endpoints to manage
batch process scheduling externally.
For more information on the base configuration functionality of batch processes, see the Administration Guide.
The information in the response varies based on whether the batch process has completed, is running, or has never been
run.
GET /systemtools/v1/batch-processes/ActivityEsc
{
"data": {
"attributes": {
"distributed": false,
"status": {
"dateCompleted": "2022-09-19T17:30:00.021Z",
"dateCreated": "2022-09-19T17:30:00.003Z",
"failedOps": 0,
"opsCompleted": 0,
"serverId": "55d109613ac9",
"startDate": "2022-09-19T17:30:00.011Z",
"type": "ActivityEsc"
},
"type": {
"code": "ActivityEsc",
"name": "Activity Escalation"
}
},
...
GET /systemtools/v1/batch-processes/ActivityEsc
{
"data": {
"attributes": {
"distributed": false,
"status": {
"dateCreated": "2022-09-19T17:30:00.003Z",
"failedOps": 0,
"opsCompleted": 0,
"opsExpected": 0,
"progress": "1 out of 3",
"serverId": "55d109613ac9",
"startDate": "2022-09-19T17:30:00.011Z",
"type": "ActivityEsc"
},
"type": {
"code": "ActivityEsc",
"name": "Activity Escalation"
}
},
...
GET /systemtools/v1/batch-processes/ActivityEsc
{
"data": {
"attributes": {
"distributed": false,
"status": {
"failureReason": "This batch process type has never run",
"type": "ActivityEsc"
},
"type": {
"code": "ActivityEsc",
"name": "Activity Escalation"
}
},
...
A batch process can be categorized as MaintenanceOnly, which means the batch process is not available if the server's
run level is above NODAEMONS mode. The /start endpoint is not available for MaintenanceOnly batch processes
when the server's run level is above NODAEMONS mode.
Batch processes can also be categorized as APIRunnable. This setting impacts whether the batch process can be run
from the Guidewire SOAP-based MaintenanceToolsAPI. It does not impose any limitation on whether Cloud API can
start the batch process.
POST /systemtools/v1/batch-processes/ActivityEsc/start
RESPONSE:
{
"data": {
"attributes": {
"distributed": true,
"processId": 4055,
"status": {
"dateCreated": "2022-09-19T17:54:19.929Z",
"failedOps": 0,
"opsCompleted": 0,
"serverId": "55d109613ac9",
"type": "ActivityEsc"
},
"type": {
"code": "ActivityEsc",
"name": "Activity Escalation"
},
"workQueueStatus": {
"numActiveExecutors": 1,
"numActiveWorkItems": 0
}
},
...
{
"data": {
"attributes": {
"<batchProcessFieldName>": {
"<argument1>": <values>,
"<argument2>": <values>,
...
}
}
}
}
For example, the PurgeAsyncApiRequests object has one integer field, purgeDaysOld. The following request starts
the Purge Async API Requests batch process and passes in a purgeDaysOld value of 3.
POST /systemtools/v1/batch-processes/PurgeAsyncApiRequests/start
{
"data": {
"attributes": {
"purgeAsyncApiRequests": {
"purgeDaysOld": 3
}
}
}
}
Note that the structure of the JSON object varies based on the datatype of the arguments. For example, the following is
an example of starting the Database Consistency Check batch process with arguments. Note that one of the arguments,
tableNames, is an array, whereas the other, description, is a string.
POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
{
"data": {
"attributes": {
"dbconsistencycheck": {
"tableNames": [
"cc_activity",
"cc_address"
],
"description": "Start of Q1 maintenance"
}
}
}
}
If the attributes section contains any property with an unexpected name, Cloud API returns a 400 error.
RESPONSE:
{
"data": {
"attributes": {
"distributed": true,
"status": {
"dateCompleted": "2022-09-19T18:00:51.304Z",
"dateCreated": "2022-09-19T18:00:51.291Z",
"failedOps": 0,
"opsCompleted": 0,
"serverId": "55d109613ac9",
"startDate": "2022-09-19T18:00:51.298Z",
"type": "ActivityEsc"
},
"type": {
"code": "ActivityEsc",
"name": "Activity Escalation"
},
"wasStopped": true,
"workQueueStatus": {
"numActiveExecutors": 1,
"numActiveWorkItems": 0
}
},
A database consistency check (DBCC) is a check that BillingCenter executes to verify that data in the database is
consistent.
Cloud API provides support for DBCCs. This includes running DBCCs, retrieving information about DBCCs, and
downloading DBCC reports in a zip file format.
DBCC runs
A DBCC run refers to the execution of a DBCC. DBCC run information is stored in the BillingCenter database. Each
DBCC run is assigned an id, the dbccId, which can be used to access that information any time after the DBCC was
run.
DBCC scopes
DBCC runs can execute every type of check on every table in the database. DBCC runs can also be limited to a
specific set of tables, and/or a specific set of check types, such as assignment checks. The complete list of DBCC check
types is defined in the ConsistencyCheckType typelist.
If you run the DBCCs only for the cc_activity table (but for all check types), then the description is:
If you run only the assignment check DBCCs (on all tables), then the description is:
If you run only the assignment check DBCCs for only the cc_activity table, then the description is:
Running DBCCs
Use the following endpoint to run database consistency checks:
• POST /systemtools/v1/batch-processes/{batchProcessType}/start
The value of {batchProcessType} must be: DBConsistencyCheck.
POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
For example, the following request runs all DBCCs for the cc_activity and cc_address tables.
POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
{
"data": {
"attributes": {
"dbconsistencycheck": {
"tableNames": [
"cc_activity",
"cc_address"
]
}
}
}
}
Note that BillingCenter does not perform any validation to ensure that there are tables in the database with the
specified names. If there is no table corresponding to a provided table name, BillingCenter ignores the name.
For example, the following request runs all DBCCs whose check type is either 0lengthstringcheck or
assignmentcheck.
POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
{
"data": {
"attributes": {
"dbconsistencycheck": {
"checkTypes": [
"0lengthstringcheck",
"assignmentcheck"
]
}
}
}
}
Note that BillingCenter does not perform any validation to ensure that there are check types in the data model with the
specified names. If there is no check type corresponding to provided check type name, BillingCenter ignores the name.
POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
{
"data": {
"attributes": {
"dbconsistencycheck": {
"description": "Start of Q1 maintenance"
}
}
}
}
POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
{
"data": {
"attributes": {
"dbconsistencycheck": {
"tableNames": [
"cc_activity",
"cc_address"
],
" checkTypes ": [
"0lengthstringcheck",
"assignmentcheck"
],
"description": "Start of Q1 maintenance"
}
}
}
}
checks endpoint. Note that the Key value is expressed as an integer. For more information on this endpoint, see
“Querying for DBCC run information” on page 324.
For example, suppose you ran a DBCC that had errors. The GET /systemtools/v1/database-consistency-checks
endpoint identifies the Key for this run is 21. You have fixed the errors and now want to rerun the same DBCC. The
following request does this.
POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
{
"data": {
"attributes": {
"dbconsistencycheck": {
"rerunKey": 21
}
}
}
}
BillingCenter reruns a DBCC run only when the original DBCC run reported errors. If you provide a Key value that
does not correspond to a previous run with errors, BillingCenter ignores the request.
GET /systemtools/v1/database-consistency-checks/cc:303
{
"data": {
"attributes": {
"description": "Tables: cc_activity, cc_address; Checks: All.",
"duration": "0.151",
"endTime": "2022-09-19T22:23:23.163Z",
"errors": 1,
"extensionsSchemaVersion": 508,
"id": "cc:303",
"key": 16,
"majorSchemaVersion": 50,
"minorSchemaVersion": 603,
"platformMajorSchemaVersion": 50,
"platformMinorSchemaVersion": 605,
"startTime": "2022-09-19T22:23:23.012Z",
"totalChecks": 17
},
The key value is needed to rerun DBCCs that report consistency errors on their first run.
The response does not include endTime if the DBCC is in progress.
Note that when you run a DBCC using the POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
endpoint, the response does not include the dbccId value. This is because, for most batch processes, the results are not
stored in the database. Therefore, there is no "ID value" that can be provided for all batch process types. If you want to
run a DBCC and then download the report through Cloud API, you must execute three calls:
1. Execute the batch process with POST /systemtools/v1/batch-processes/DBConsistencyCheck/start
2. Retrieve the dbccID value with GET /systemtools/v1/database-consistency-checks
3. Get the DBCC report with GET /systemtools/v1/database-consistency-checks/{dbccId}/report
For some use cases, it’s necessary to have a schema with detailed graph and entity information. For this purpose,
BillingCenter provides endpoints that retrieve schema information that can be used to navigate the graph structure for
various purposes and to build out custom user interfaces.
The schema endpoints return metadata about the business entities that are exposed by the API (such as Users and
Contacts) as normal JSON schema documents. In addition to standard JSON Schema properties, the schema endpoints
can also return additional application-specific metadata. This additional metadata is returned in the form of x-gw-*
properties.
The topics in this section describe the endpoints and query parameters for retrieving schemas. They also describe
properties that are specific to entity and graph schemas and not found in the standard business schemas (such as
OpenAPI).
GET /common/v1/entity-schemas/User
The schema returned by the entity-schemas/{entityId} endpoint returns the schema for the specified entity and
other schemas transitively referenced from that entity. In the preceding example, in the base configuration the returned
Business entity schemas 327
Guidewire BillingCenter for Guidewire Cloud 2024.07 Cloud API Consumer Guide
entity schema would include User, plus related schemas such as UserGroupReference and UserRoleReference.
However, it won’t return the schemas for any child entities. Instead it will return a list of children (if any) in the x-gw-
children property for each entity. (See "Child entities" in “Schema properties usage” on page 332 for more
information.)
To retrieve a specific entity along with the complete schema information for all its children, filter the entity-schemas
endpoint on rootEntity:
GET /common/v1/entity-schemas?filter=rootEntity:eq:{entityId}
Filtering on rootEntity retrieves a more detailed schema than using the entity-schemas/{entityId} endpoint by
traversing the entity graph tree and including all the child entities of the specified entity.
The following command retrieves a graph schema with entities such as Account, MonetaryAmount, and
PaymentRequest.
Command
GET /billing/v1/graph-schema
Response
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"Account": {
"description": "Account (Since 1.5.0)",
"properties": {
"accountName": {
…
"MonetaryAmount": {
"description": "A monetary amount that combines a decimal amount with a currency",
"properties": {
"amount": {
…
"PaymentRequest": {
"description": "Payment request",
"properties": {
"amount": {
…
includeLocalizations Include localization strings in the schema for all • {language code} none
localizable strings for the specified installed
• {language-region code}
languages.
• *all (all installed
Available only for entity-schemas endpoints.
languages)
includeLocalizations
The includeLocalizations query parameter includes localized versions of all strings in the schema response. Any
element that can be localized will include an x-gw-localizations property containing localized versions of the
associated schema property. (If no localized version for a given language exists, the value will be provided in the
default language.)
The localized languages that are displayed depend on the value assigned to the parameter. You can retrieve localized
strings for all installed languages (languages in the LangaugeType typelist) by assigning the *all value to the
parameter.
To retrieve localized strings for only specific languages, include the language code as the value. The language code can
be in any of the following formats:
• Language code, such as fr (French).
• Language and region, such as fr-CA (French, Canada) or fr-FA (French, France).
• Language and region with either a hyphen or an underscore. Both fr-CA and fr_CA will return French (Canada)
localized strings.
Note that the value is case-sensitive; you’ll receive an error if the installed language is en_US and you specify en_us.
Only installed languages can be specified. If you set a value to a language that is not installed you’ll receive an error.
The following examples show different options for calling includeLocalizations:
Retrieve localized values for all installed languages:
GET /common/v1/entity-schemas?includeLocalizations=*all
GET /common/v1/entity-schemas?includeLocalizations=en_US
GET /common/v1/entity-schemas?includeLocalizations=fr
GET /common/v1/entity-schemas?includeLocalizations=en,fr_CA
inlineTypelists
The inlineTypelists query parameter is used to include typelist metadata for each typekey field or term so that
typelist metadata doesn’t need to be fetched separately. Set inlineTypelists to true to enable this feature.
• GET /common/v1/entity-schemas?inlineTypelists=true
• GET /billing/v1/graph-schema?inlineTypelists=true
See “Choice values” on page 333 for more information and schema examples.
ETag support
The business entity schema endpoints support the use of ETags. An ETag response header is returned with every
request. The ETag acts as a checksum of schema content, so it changes depending on which query parameters you use.
Use the ETag with the If-None-Match request header. If this matches the current checksum, you’ll receive a "304 not
modified" response. If it doesn’t match, the request will be processed normally.
ETag is a standard HTTP header. More information can be found by doing an internet search.
Schema properties
The InsuranceSuite business entity schemas are returned as JSON documents using the JSON Schema Draft-7
specification. In addition to standard JSON schema properties, the business entity schemas include a number of
additional schema properties that include metadata about the entities and their representation in APIs and AppEvents.
• “Schema properties overview” on page 330
• “Schema properties usage” on page 332
x-gw-actions A list of logical actions that you can take on an entity. This “Cloud API endpoint
encompasses standard HTTP operations on the element or elements” on page 334
collection, as well as custom actions.
x-gw-after Applies to properties of format date or date-time. Indicates a “Date and date-time
date or date-time that the value must be later than. fields” on page 337
x-gw-before Applies to properties of format date or date-time. Indicates a “Date and date-time
date or date-time that the value must be earlier than. fields” on page 337
x-gw- For entities that can be accessed through a Cloud API endpoint, “Cloud API endpoint
canonicalCollectionUri this object contains the URI to the collection endpoint. elements” on page 334
x-gw-canonicalElementUri For entities that can be accessed through a Cloud API endpoint, “Cloud API endpoint
this object contains the URI to the individual element endpoint. elements” on page 334
x-gw-canonicalParent For entities that can be accessed through a Cloud API endpoint, “Cloud API endpoint
this object contains the ID of the parent entity. elements” on page 334
x-gw-calculatedValues An object whose keys represent schema properties that have “Calculated values” on
dynamic values. Dynamic values are calculated based on page 332
evaluation of static values retrieved through JsonLogic.
x-gw-children An object containing information about child objects of an “Child entities” on page
entity. 333
x-gw-choices This property contains typelist values associated with the entity “Choice values” on page
objects. It is included in the schema response when the 333
inlineTypelists query parameter is set to true.
x-gw-createOnly Indicates that a property can be set when creating the entity “Update restrictions” on
(during an initial POST), but not modified. page 344
x-gw-defaultValues An array of strings that indicate what default views a property “Cloud API responses” on
will appear in. Possible values include detail, summary, and page 335
none.
x-gw-dynamicProperties An object where each key in the map represents a named rule. “Rules” on page 342
The values of such keys have a jsonLogic object defining the
rules.
x-gw-entityId A marker on every schema that corresponds to an entity that “Entity ID” on page 337
contains the id of that entity.
x-gw-filterBy Applies to typekey properties that have typelists that are “Typekey references” on
filtered by categories from other typelists represented on the page 344
same object. This property is an array of schema property
names for the filtering typekey properties.
x-gw-forbidden This property contains an array of one or more values that • “Forbidden fields” on
indicate properties that are forbidden for use in a particular page 338
context. Often used within an x-gw-rules object to identify
fields that cannot be used in certain situations. • “Country-specific
fields” on page 336
x-gw-includedInAppEvents Used to determine whether a property is event safe. Only for “Event safety” on page 338
use when integrating through App Events.
x-gw-localizations When the “Localizations” on page
339
includeLocalizations query parameter is set to true, this
property is included in the schema to show localized versions of
strings for every installed language.
x-gw-maximum Used to represent a maximum value for a property that is not a “Numeric values” on page
standard JSON integer or decimal, such as a gw-bigdecimal 340
or MonetaryAmount object.
x-gw-minimum Used to represent a minimum value for a property that is not a “Numeric values” on page
standard JSON integer or decimal, such as a gw-bigdecimal 340
or MonetaryAmount object.
x-gw-patchOnly Indicates that the value can be set only during updates (PATCH “Update restrictions” on
requests), not during the initial creation (POST request). page 344
x-gw-precision The precision of a fixed-point decimal value (the total number “Numeric values” on page
of digits allowed in a number). 340
x-gw-reference-schema The name of the schema definition associated with a given type “References” on page 341
when a property is a reference (such as SimpleReference).
x-gw-referenceType The name of the referenced entity type when a property is a “References” on page 341
reference (such as SimpleReference).
x-gw-requiredForCreate An array of property names for properties whose values must “Required properties” on
be specified as part of POST requests to create a new entity. page 341
x-gw-requiredForValidation This property identifies fields that are required for a particular • “Required properties”
entity to be valid. A typical use case is to define required fields on page 341
in an address.
• “Country-specific
fields” on page 336
x-gw-resourceReference A marker attached to schema definitions such as “References” on page 341
SimpleReference that indicates that the schema represents a
reference to another entity.
x-gw-rules This property contains a jsonLogic attribute where you can • “Rules” on page 342
apply conditional rules to various schema elements.
• “Country-specific
fields” on page 336
x-gw-scale The scale of a fixed-point decimal value (the number of digits “Numeric values” on page
allowed to the right of the decimal point). 340
x-gw-sortOrder The sequence number of coverable fields defined in APD. • “Sort order” on page
344
• “Choice values” on
page 333
x-gw-typelist The name of the typelist when the property is a reference to a “Typekey references” on
TypeKeyReference. page 344
Calculated values
APD supports calculated values for coverage terms on a parent coverage where the minimum or maximum are
calculated based on terms on the child coverages. For example, the parent coverage can have a limit whose minimum
value is the sum of the limits of a set of child coverages. Calculated values can use a sum, min, or max across the child
terms, or be a direct reference to a child term.
The entity schema provides the x-gw-calculatedValues property to support this type of scenario. This property is an
object whose keys represent schema properties that have dynamic values rather than static values. Each schema
property will have a value with a jsonLogic property that can be evaluated, resulting in the concrete value to attach to
that schema property.
The x-gw-calculatedValues property is primarily intended for use by client code that uses schema-based validation.
In order to interpret the calculated values at runtime, a client needs to iterate through each property on the x-gw-
calculatedValues object, evaluate the JsonLogic expression for that property, and then attach the resulting value to
the containing schema definition.
See https://jsonlogic.com/ for more information on using JsonLogic.
The following is an example of a calculated value. This is a simple example where the value must be retrieved from
another entity:
"x-gw-calculatedValues": {
"x-gw-maximum": {
"jsonLogic": {
"+": {
"uri": "/jobs/{jobId}/lines/TSTLine/test-coverables/{testCoverableId}/coverages/TSTChildCov/
terms.TSTChildCovPackageTerm.choiceValue.values[0].value"
}
}
}
}
Child entities
An entity can (but doesn’t have to) have child objects. These child objects are returned in the x-gw-children schema
object. The following properties can be included with the x-gw-children object:
• childType: The type related to certain product model metadata. See "Special child types" below.
• description: A description of the children.
• graphProperty: The property used to attach these children in the schema.
• id: The id of the child entity.
• title: The title for the children.
• urlPart: The URL fragment used for the collection of child entities in the API.
The following example shows some of the children for the Account entity in the base configuration:
"x-gw-children": [
{
"id": "Activity",
"urlPart": "activities"
},
{
"id": "Assignee",
"urlPart": "activity-assignees"
},
{
"id": "ActivityPattern",
"urlPart": "activity-patterns"
},
Choice values
For entities that contain choice values, the entity schema returns the x-gw-choices object. You must include the query
parameter inlineTypelists set to true to retrieve this object. The object contains the following properties:
sortOrder The canonical sort order for the choice, relative to other choices in the same list. • Typelists
• Option/package choices
• Coverage term choices
categories A list of strings that indicate the categories the typekey belongs to. Categories are • Option/package choices
presented in the form Typelist.Code, such as Country.US.
• Coverage term choices
values An array of additional values relating to coverage terms. • Coverage term choices
"accountStatus": {
"$ref": "#/definitions/TypeKeyReference",
"description": "The current status of this account",
"readOnly": true,
"title": "Account status",
"x-gw-typelist": "AccountStatus"
},
This example shows that accountStatus is a typelist of type AccountStatus, but the values of that typelist are not
displayed. When you add inlineTypelists=true to the endpoint query string, the individual values are included in
the schema in the x-gw-choices object:
"accountStatus": {
"$ref": "#/definitions/TypeKeyReference",
"description": "The current status of this account",
"readOnly": true,
"title": "Account status",
"x-gw-choices": [
{
"code": "Active",
"description": "The account is fully ready and open, and submissions have been created for it.",
"name": "Active",
"sortOrder": 0
},
{
"code": "Merged",
"description": "The account has been merged into another account and is available for read only access.",
"name": "Merged",
"sortOrder": 1
},
{
"code": "Pending",
"description": "The account is ready for data entry, but data entry is still ongoing and the account is not
considered fully open.",
"name": "Pending",
"sortOrder": 2
},
{
"code": "Withdrawn",
"description": "The account has been withdrawn from consideration for business with the carrier.",
"name": "Withdrawn",
"sortOrder": 3
}
],
"x-gw-typelist": "AccountStatus"
Notice the sortOrder value under each choice. This ordering can be used to ensure the desired order of user interface
elements. See “Sort order” on page 344 for more information.
◦ actionTarget: Whether the command applies to the individual element endpoint or the collection endpoint.
◦ description: Optional. Describes the action.
◦ urlSuffix: Optional. An additional action that can be taken on the endpoint by using the httpMethod with the
endpoint, followed by the urlSuffix at the end of the endpoint. (See example below.)
For example, here are the endpoint elements available for the RolePermission entity:
This example shows that you can take the following actions on the RolePermission entity through Cloud API:
• GET a collection of role permissions. (GET /admin/v1/roles/{roleId}/permissions)
• Create a new role permission with the POST command on the permissions collection. (POST /admin/v1/roles/
{roleId}/permissions)
• DELETE a single role permission. (DELETE /admin/v1/roles/{roleId}/permissions/{permissionId})
• GET a single role permission. (GET /admin/v1/roles/{roleId}/permissions/{permissionId})
Note that the x-gw-canonicalParent identifies the Role entity as the canonical parent of RolePermissions.
"AccountContact": {
...
"properties": {
"accountContactRoles": {
...
"x-gw-defaultViews": [
"detail"
],
...
},
The following command retrieves a single account contact, and therefore displays the accountContactRoles property:
Command
GET /account/v1/accounts/pc:Su4p27AlTSug_SWq-8koA/contacts/pc:S9rwT9nWtFBArb3GFDwkc
Response
{
"data": {
"attributes": {
"accountContactRoles": [
{
"code": "AccountHolder",
"name": "AccountHolder"
}
],
"active": true,
"authorizationID": "S5qmqyeE_7azM0VwejF2r",
"cellPhone": {
"countryCode": {
"code": "US",
"name": "United States (1)"
},
However, when the collection of account contacts is retrieved, account contact roles is not included:
Command
GET /account/v1/accounts/pc:Su4p27AlTSug_SWq-8koA/contacts
Response
{
"count": 5,
"data": [
{
"attributes": {
"authorizationID": "S5qmqyeE_7azM0VwejF2r",
"cellPhone": {
"countryCode": {
"code": "US",
"name": "United States (1)"
},
Country-specific fields
Entity schemas use JSON logic conditional rules to define whether certain fields are forbidden or required based on the
country. In some cases a field might be forbidden for use in a particular county. In other cases, such as addresses,
required fields differ by country. These rules are specified in the x-gw-rules property.
Note: See “Rules” on page 342 and “Forbidden fields” on page 338 for more information.
In this example, there is a rule on PolicyLocation that makes certain location fields forbidden and others required for
the US:
"x-gw-entityId": "PolicyLocation",
"x-gw-rules": [
{
"jsonLogic": {
"if": [
{
"===": [
{
"var": "country"
},
"US"
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-forbidden": [
"CEDEX",
"addressLine1Kanji",
"addressLine2Kanji",
"area",
"cityKanji",
"department",
"emirate",
"island",
"oblast",
"parish",
"prefecture",
"province"
],
"x-gw-requiredForValidation": [
"addressLine1",
"city",
"postalCode",
"state"
]
},
In some cases the same set of rules apply to multiple countries. In those cases, all countries are listed in an array using
in logic on the rules, as shown here:
"x-gw-rules": [
{
"jsonLogic": {
"if": [
{
…
},
{
"in": [
{
"var": "country"
},
[
"AS",
"AU",
"FM",
"GU",
"IN",
"MH",
...
"dateOfBirth": {
"description": "The person's date of birth. Only applicable for an `AccountContact` that represents a person.",
"format": "date",
"nullable": true,
"title": "Date of birth",
"type": "string",
"x-gw-before": "now"
},
Entity ID
Every schema that contains an entity has a corresponding entity ID. For example, the User schema has an entity ID of
User:
"x-gw-entityId": "User"
In contrast, the SimpleReference schema is not an entity, and therefore does not have an x-gw-entityId property.
Note that the x-gw-entityId property is available only when a schema is retrieved through the entity-schemas
endpoints.
Event safety
When you’re integrating with Guidewire InsuranceSuite through App Events, it’s important to know whether a
property is event safe. You can determine the event safety of a property by looking for the x-gw-
includedInAppEvents property.
If a property is not event safe, it will have an x-gw-includedInAppEvents property with a value of false. If a
property is event safe, x-gw-includedInAppEvents will not be present on the property.
If you are not integrating through App Events, you can ignore the x-gw-includedInAppEvents property.
See App Events for more information on App Events.
Forbidden fields
The schema can include the x-gw-forbidden property. This property is an array used to indicate that one or more
properties are not allowed or available under certain conditions. It is often defined inside JsonLogic decisions that
provide the conditions under which something is forbidden. (See https://jsonlogic.com/ for more information on using
JsonLogic.)
This example shows a section of the schema that indicates certain properties are forbidden based on a contact subtype:
"x-gw-rules": [
{
"jsonLogic": {
"if": [
…
{
"in": [
{
"var": "contactSubtype"
},
[
"Adjudicator",
"Person",
"PersonVendor",
"UserContact"
]
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-forbidden": [
"companyName"
]
},
{
"in": [
{
"var": "contactSubtype"
},
[
"LegalVenue",
"Place"
]
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-forbidden": [
"applicableGoodDriverDiscount",
"cellPhone",
"companyName",
…
]
},
The x-gw-forbidden property is used in several contexts. It is used to designate forbidden fields for things such as:
• Subtype-specific fields.
• Product edition rules that indicate that a given element is unavailable for that edition.
• Choices on options, packages, or typekeys. In these cases, x-gw-forbidden is an array of objects, where each
object has a code and name for the forbidden choice.
See “Country-specific fields” on page 336 for more examples of x-gw-forbidden.
Localizations
When you call the schema retrieval endpoint with the includeLocalizations parameter set to true, the returned
schema will contain localized versions of all localizable strings in the schema. (See “includeLocalizations” on page 329
for information on using this parameter.) If you also specify the inlineTypelists parameter, localized strings will be
included for typelist values. Similarly, if you specify the inlineProductDefinition parameter, localized strings will
be included for localizable product model elements such as coverage names and descriptions.
Localization strings are returned on the x-gw-localizations property on the associated element. The value of x-gw-
localizations is an object with a key for each localized property, such as title or description. The values of those
keys are another object with key/value pairs for each requested language and the localized value for those languages.
For example, suppose you have two languages configured, English (US) and French (France). You also have a schema
object on an entity named username. The object looks like this:
"username": {
"description": "The username for the user",
"maxLength": 30,
"minLength": 1,
"pattern": "\\S",
"title": "Username",
"type": "string",
GET /common/v1/entity-schemas?includeLocalizations=*all
Schema example
"x-gw-localizations": {
"description": {
"en_US": "The username for the user",
"fr_FR": "Le nom d’utilisateur de l’utilisateur"
},
"title": {
"en_US": "Username",
"fr_FR": "Nom d’utilisateur"
}
}
GET /common/v1/entity-schemas?includeLocalizations=en_US
Schema example
"x-gw-localizations": {
"description": {
"en_US": "The username for the user"
},
"title": {
"en_US": "Username"
}
}
GET /common/v1/entity-schemas?includeLocalizations=en_US&inlineTypelists=true
Schema example
"vacationStatus": {
"$ref": "#/definitions/TypeKeyReference",
"description": "Indicates whether the user is considered to be on vacation",
"title": "Vacation status",
"x-gw-choices": [
{
"code": "atwork",
"description": "The user is at work",
"name": "At work",
"sortOrder": 0,
"x-gw-localizations": {
"description": {
"en-US": "The user is at work"
},
"name": {
"en-US": "At work"
}
}
},
{
"code": "onvacation",
"description": "The user is on vacation",
"name": "On vacation",
"sortOrder": 1,
"x-gw-localizations": {
"description": {
"en-US": "The user is on vacation"
},
"name": {
"en-US": "On vacation"
}
}
},
…
],
"x-gw-localizations": {
"description": {
"en-US": "Indicates whether the user is considered to be on vacation"
},
"title": {
"en-US": "Vacation status"
}
},
"x-gw-typelist": "VacationStatusType"
},
A value will always be included in x-gw-localizations for each installed language. If the value has not been
localized for a language, normal localization fallback rules will apply. If a language code and region are specified, the
first fallback will be to language code, then to the default language. For example, suppose fr_CA (Frech, Canada) is an
installed language. If there is no localization for a particular property for fr_CA, it will fall back to a value specified for
fr (French). If there is no localized value for fr, the value will be the default language (if the default language is not
fr_CA or fr).
Command
GET /common/v1/entity-schemas?includeLocalizations=en_US,fr_FR
Schema example
"x-gw-localizations": {
"description": {
"en_US": "The username for the user",
"fr_FR": "The username for the user"
},
"title": {
"en_US": "Username",
"fr_FR": "Username"
}
}
Numeric values
Properties that are numeric types can have additional defining properties depending on the type of value.
Fixed-point decimal values
Certain decimal values need to be restricted as to the maximum number of digits allowed in the value. This is depicted
in the schema through the x-gw-precision and x-gw-scale properties:
• x-gw-precision: The maximum number of digits allowed for a value.
• x-gw-scale: The scale of the value, such as the maximum number of digits to the right of a decimal point.
These properties apply only to elements of type gw-bigdecimal and to MonetaryAmount references.
In this example, the cost of a new car can be up to 18 digits, with up to two digits following the decimal point:
"PersonalVehicle": {
"description": "Personal Vehicle",
"properties": {
...
"costNew": {
"$ref": "#/definitions/MonetaryAmount",
"description": "Original retail cost of car.",
"nullable": true,
"title": "Cost New",
"x-gw-precision": 18,
"x-gw-scale": 2,
"x-gw-sortOrder": 6
},
"amount": {
"$ref": "#/definitions/MonetaryAmount",
"description": "The transaction amount for the effective time",
"readOnly": true,
"title": "Amount",
"x-gw-maximum": 5000,
"x-gw-minimum": 250
},
References
There are some schema definitions that are references to other entities. Examples are entities such as SimpleReference
and GroupReference. When this is the case, the entity has an x-gw-resourceReference property set to true.
"x-gw-resourceReference": true
For properties that are reference types, such as SimpleReference, the name of the referenced entity type is defined in
the x-gw-referenceType property. The name of the schema definition associated with a given type is specified in the
x-gw-reference-schema property. In this example, accountHolder is a SimpleReference associated with the
AccountContact schema, of type AccountContact:
"accountHolder": {
"$ref": "#/definitions/SimpleReference",
"description": "A reference to the `AccountContact` that represents the owner of the policies for this account",
"title": "Account holder",
"x-gw-reference-schema": "AccountContact",
"x-gw-referenceType": "AccountContact"
},
Required properties
Some entities have a required property. This property is an array containing a list of properties that must have values
on instances of the entity. In addition, there are properties that are required only when certain actions, such as creation
or validation, take place on those entities.
• requiredForCreate: The property must have a value for an entity to be created.
• requiredForValidation: The property must have a value for the object to validate.
For example, the following specifies that an address cannot be validated if there are not values for addressLine1,
city, postalCode, and state:
"x-gw-requiredForValidation": [
"addressLine1",
"city",
"postalCode",
"State"
]
Rules
The entity schema applies rules to some entities, both conditional and non-conditional. Rules are required for several
different areas of the schema. For details on some of the specific areas of the entity schema where rules are used, see
the following sections:
• “Country-specific fields” on page 336
Rules Overview
In some cases there is schema metadata about a business entity, or associated product model entity, that is conditional
rather than static. To support those use cases, where possible the Guidewire schema APIs translate those rules into
conditions using the JsonLogic format. The JsonLogic expressions, when evaluated, will return a JSON object that
might contain additional JSON Schema properties to apply to the attached schema.
For example, if a direct coverage term has a conditional maximum value, the directValue schema property for the
term's schema will have an x-gw-rules array with an object representing this rule. Evaluating the JsonLogic
expression for the associated rule might return a result such as:
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-maximum": "500.00"
}
This means that the x-gw-maximum schema property needs to be applied to the term's schema dynamically, replacing
any value that might already be there. If the result returns null or the empty object, it means no changes to the schema
are needed. (The x-gw-dynamicPropertiesMarker property is a marker property that can be ignored at runtime).
JsonLogic expressions need to be evaluated using the associated root API object's attributes as the context for
evaluation.
See https://jsonlogic.com/ for more information on using JsonLogic.
The following are examples of places where rules can be attached:
• Field existence rules are attached to the containing schema definition.
• Field min/max/default rules are attached to the associated property definition.
• Field typekey existence rules are attached to the associated property definition.
• Clause existence rules are attached to the _Coverages schema definition that defines a container for all coverages
on the coverable.
• Term existence rules are attached to the terms property on the _Coverage schema definition.
• Term min/max/default rules are attached to the Value property for the term, such as directValue.
• Term option/package/typekey existence rules are attached to the choiceValue or typekeyValue property for the
term.
Rules Examples
Conditional rules are provided with JsonLogic. Often (but not always) this logic is nested within the x-gw-rules array.
Here’s an example. (Note that while this example pertains specifically to PolicyCenter, the functionality of x-gw-rules
is the same across all InsuranceSuite products.)
"x-gw-rules": [
{
"jsonLogic": {
"if": [
{
"===": [
{
"uri": "/jobs/{jobId}/lines/PersonalAutoLine/integerProperty"
},
1002
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-maximum": "500.00"
}
},
{
"===": [
{
"uri": "/jobs/{jobId}/lines/PersonalAutoLine/integerProperty"
},
1003
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-maximum": "400.00"
},
In this case, if the property at the specified uri is equal to 1002, the maximum value for this property is 500. But if the
value is 1003, the maximum is 400.
Rules can also exist without conditions. For example, if a direct coverage term always has a maximum of 500.00 for a
particular product edition, fetching the schema in the context of that edition includes the property directly.
"directValue": {
"x-gw-maximum": "500.00",
…
}
The x-gw-rules property is an array of JsonLogic rules. Another property, x-gw-dynamicProperties, is similar to x-
gw-rules, but instead of being an array, it’s an object containing named rules. In this example, there are two named
rules, one for accountHolderCreation and one for primaryLocationCreation:
"x-gw-dynamicProperties": {
"accountHolderCreation": {
"forbiddenError": "Exactly one of either 'accountHolder' or 'initialAccountHolder' is required on creation",
"jsonLogic": {
"if": [
{
"===": [
{
"var": "accountHolder"
},
null
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-requiredForCreate": [
"initialAccountHolder"
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-forbidden": [
"initialAccountHolder"
]
}
]
},
"requiredError": "Exactly one of either 'accountHolder' or 'initialAccountHolder' is required on creation"
},
"primaryLocationCreation": {
"forbiddenError": "Exactly one of either 'primaryLocation' or 'initialPrimaryLocation' is required on creation",
"jsonLogic": {
"if": [
{
"===": [
{
"var": "primaryLocation"
},
null
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-requiredForCreate": [
"initialPrimaryLocation"
]
},
{
"x-gw-dynamicPropertiesMarker": true,
"x-gw-forbidden": [
"initialPrimaryLocation"
]
}
]
},
Sort order
Sort order is preserved in various situations and can be used to ensure the desired order of user interface elements.
sortOrder
In this example, the order of Account Status choices has been preserved through the sortOrder on the choice options,
with Active first, Merged second, and so on. Note that counting starts at 0, so the first choice is sortOrder 0.
"accountStatus": {
"$ref": "#/definitions/TypeKeyReference",
"description": "The current status of this account",
"readOnly": true,
"title": "Account status",
"x-gw-choices": [
{
"code": "Active",
"description": "The account is fully ready and open, and submissions have been created for it.",
"name": "Active",
"sortOrder": 0
},
{
"code": "Merged",
"description": "The account has been merged into another account and is available for read only access.",
"name": "Merged",
"sortOrder": 1
},
{
"code": "Pending",
"description": "The account is ready for data entry, but data entry is still ongoing and the account is not
considered fully open.",
"name": "Pending",
"sortOrder": 2
},
Update restrictions
Some properties can be assigned values only when the entity is first created. In those cases, the property will have a
value of x-gw-createOnly set to true.
For example, an initial account holder can be specified only at the time the account is created (POST), and cannot be
modified later.
"Account": {
...
"initialAccountHolder": {
...
"title": "Initial account holder",
"x-gw-createOnly": true
},
In other cases, a property can be assigned a value only when the entity is updated (PATCH). In those cases, the property
will have x-gw-patchOnly set to true:
"x-gw-patchOnly": true
Typekey references
Some properties in the schema are used to identify typekey properties and behaviors.
Typelist
If an element in the schema is a TypeKeyReference, the applicable typelist is specific in the x-gw-typelist property.
In this example, the organizationType property is a TypeKeyReference to the AccountOrgType typelist:
"organizationType": {
"$ref": "#/definitions/TypeKeyReference",
"description": "The type of organization of the company or person represented by this account, such as `individual`
or `corporation`",
"nullable": true,
"title": "Organization type",
"x-gw-typelist": "AccountOrgType"
},
Filter
Some typelists are filtered by categories from other typelists represented on the same object. The x-gw-filterBy
property contains an array of categories on which to filter. For example, a country typelist might include states,
provinces, islands, and so on. Not all of these options apply to all countries. In these cases, the typelist needs to be
filtered by country, as in the following examples:
"province": {
"$ref": "#/definitions/TypeKeyReference",
"description": "The province of the location's address. Only applicable in certain countries.",
"nullable": true,
"title": "Province",
"x-gw-createOnly": true,
"x-gw-filterBy": [
"country"
],
"x-gw-typelist": "State"
},
"state": {
"$ref": "#/definitions/TypeKeyReference",
"description": "The state of the location's address. Only applicable in certain countries.",
"nullable": true,
"title": "State",
"x-gw-createOnly": true,
"x-gw-filterBy": [
"country"
],
"x-gw-typelist": "State"
}
To facilitate development, Cloud API includes a Test Util API. The Test Util API is an API that provides functionality
to facilitate testing during development. The API is also sometime referred to by its internal name (testutil).
By default, the Test Util API is not enabled.
WARNING: The Test Util API is intended for use in a development environment only. Do not use the Test Util
API on a production system.
Learn more about the Test Util API and some of the available endpoints:
• “Enabling the Test Util API” on page 347
• “View the Test Util API in Swagger UI” on page 348
• “Test Util API endpoints” on page 348
The Test Util API is enabled using substitution placeholders. A substitution placeholder is a variable that determines
the setting of a specific server property. The value is stored outside of the Guidewire application. During server start-
up, the Guidewire application looks for the property's value in the following places in this order. It uses the first value it
finds.
1. Guidewire Property Services
2. Guidewire Cloud Console environment variables
3. The application's config.properties file
The syntax for a substitution variable varies slightly based on where the value is being set.
published-apis.PUBLISHEDAPIS_testutil_publish = true
PUBLISHEDAPIS_testutil_publish = true
published-apis.PUBLISHEDAPIS_testutil_publish = true
WARNING: The Test Util API is intended for use in a development environment only. Do not use the Test Util
API on a production system.
After you enable Test Util, you can use Swagger UI to view the Test Util API definition. (See “Enabling the Test Util
API” on page 347 for instructions on enabling Test Util.)
Procedure
1. Start BillingCenter.
2. In a web browser, enter the URL for Swagger UI. This loads the Swagger UI tool.
• The format of the URL is <applicationURL>/resources/swagger-ui/
• For example, for a local instance of BillingCenter, use: http://localhost:8580/bc/resources/swagger-
ui/
3. In the text field at the top of the Swagger UI interface, enter the following URL:
• <applicationURL>/rest/test-util/v1/swagger.json
4. Click Explore.
WARNING: The Test Util API is intended for use in a development environment only. Do not use the Test Util
API on a production system.
The following table lists the endpoints in the Test Util API that are used most often, and where you can go to get more
information about them.