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.
Send a PATCH using Postman
Procedure
Tutorial: PATCH an activity
This tutorial assumes you have set up your environment with Postman and the correct sample dataset. For more information, see Tutorial: Set up your Postman environment.
In this tutorial, you will find an open activity from the sample data. You will then update the activity's subject and priority.
Tutorial steps
- In Postman, start a new request by clicking the + to the right of the Launchpad tab.
- On the Authorization tab, select Basic Auth using user aapplegate and password gw.
- The sample data will differ for ClaimCenter and PolicyCenter:
- ClaimCenter: The sample data includes one "Get police report" activity for
Andy Applegate, which can be PATCHed because it is an open activity on an open claim.
Query for that activity by entering the following call and clicking
Send:
GET
http://localhost:8080/cc/rest/common/v1/activities?filter=subject:sw:Get%20police%20report - PolicyCenter: The sample data includes one "Review risk information" activity
for Alice Applegate. Query for that activity by entering the following call and
clicking Send:
GET
http://localhost:8180/pc/rest/common/v1/activities?filter=subject:sw:Review%20risk
- ClaimCenter: The sample data includes one "Get police report" activity for
Andy Applegate, which can be PATCHed because it is an open activity on an open claim.
Query for that activity by entering the following call and clicking
Send:
- For the activity in the response payload that is assigned to Andy/Alice Applegate, note
the following information:
- Activity ID
- Priority
- Subject
- Open a second request tab. Right click the first tab and select Duplicate Tab.
- Change the operation to PATCH and enter the following URL for your respective
InsuranceSuite application, but do not click Send yet:
- ClaimCenter: PATCH
http://localhost:8080/cc/rest/common/v1/activities/<activityID> - PolicyCenter: PATCH
http://localhost:8180/pc/rest/common/v1/activities/<activityID>
- ClaimCenter: PATCH
- Specify the request payload.
- In the first row of tabs (the one that starts with Params), click Body.
- In the row of radio buttons, select raw.
- At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
- For your respective InsuranceSuite application, paste the following into the text
field underneath the radio buttons. Note that the subject has an additional "!" at the
end:
- ClaimCenter:
{ "data": { "attributes": { "subject" : "Get police report!", "priority": { "code": "low" } } } } - PolicyCenter:
{ "data": { "attributes": { "subject" : "Review Risk informaton!", "priority": { "code": "low" } } } }
- ClaimCenter:
- Click Send. The response payload appears below the request payload.
Checking your work
- ClaimCenter: Log on to ClaimCenter as the user
aapplegate. Andy's landing page is the Activities screen, which shows the open activities assigned to him. It defaults to showing "My activities today". change the drop-down list at the top of the Activities screen to "All open". - PolicyCenter: Log on to PolicyCenter as the user
aapplegate. In the left-hand side bar, click My Activities. PolicyCenter shows the My Activities screen, which shows the open activities assigned to Alice.
Click the Priority column to sort the activities in ascending priority order.
The PATCHed activity (whose priority is now Low) will be at or near the top of the list. The patched activity will have a subject ending with an "!".
Tutorial: PATCH an account
This tutorial assumes you have set up your environment with Postman and the correct sample dataset. For more information, see Tutorial: Set up your Postman environment.
In this tutorial, you will find an account from the sample data. You will then update the account's name.
Tutorial steps
- In Postman, start a new request by clicking the + to the right of the Launchpad tab.
- On the Authorization tab, select Basic Auth using user aapplegate and password gw.
- The sample data includes one sample account called "Standard Account." Query for
that account by entering the following call and clicking
Send:
GET
http://localhost:8180/bc/rest/billing/v1/accounts?filter=accountNumber:eq:Standard%20Account - For the account in the response payload, note the following information:
- The account ID (
id) - The account name (
accountName)
- The account ID (
- Open a second request tab. Right-click the first tab and select Duplicate Tab.
- Change the operation to PATCH and enter the following URL, but do not click
Send yet:
PATCH
http://localhost:8180/bc/rest/billing/v1/accounts/<accountID> - Specify the request payload.
- In the first row of tabs (the one that starts with Params), click Body.
- In the row of radio buttons, select raw.
- At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
- Paste the following into the text field underneath the radio buttons.
{ "data": { "attributes": { "accountName": "Updated Standard Account" } } }
- Click Send. The response payload appears below the request payload.
Checking your work
View the modified activity in BillingCenter:
- Log into BillingCenter as the user
aapplegate. - Search for "Standard Account" in the Account # field.
- Select the account.
The PATCHed account now has the name "Updated Standard Account."