Checksums for DELETEs

For operations that do not permit a request payload, checksums can be specified in the request header. This applies to DELETEs and a small number of business action POSTs that do not permit request payloads.

The header key for a checksum is GW-Checksum. A checksum specified in the header applies only to the root resource.

Send a checksum in a request header using Postman

About this task

You can send checksums in request headers executed from Postman.

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.
    1. In the first row of tabs (the one that starts with Params), click Headers.
    2. Scroll to the bottom of the existing key/value list.
    3. In the blank row at the bottom of the key/value list, enter the following:
      • KEY: GW-Checksum
      • VALUE: <checksum value>
  4. Enter the request operation and URL.
  5. Click Send.

Results

The response appears below the request. Depending on the checksum value provided, the response will either include a success code or an error message.

Tutorial: DELETE a note using checksums

This tutorial assumes you have set up your environment with Postman and the correct sample data set. For more information, see Tutorial: Set up your Postman environment.

In this tutorial, you will send calls as the one of the following users for your respective InsuranceSuite application:
  • ClaimCenter: You will send calls as Elizabeth Lee (user name elee). In the base configuration, Elizabeth Lee is a manager who has permission to delete notes. As Elizabeth Lee, you will create a note. You will then attempt to DELETE the note twice. Both DELETEs will include a checksum value. The first DELETE will fail, and the second will succeed.
  • PolicyCenter: You will send calls as Amy Clinton (user name aclinton). In the base configuration, Amy Clinton is an underwriting supervisor who has permission to delete notes. As Amy Clinton, you will create a note. You will then attempt to DELETE the note twice. Both DELETEs will include a checksum value. The first DELETE will fail, and the second will succeed.
  • BillingCenter: In this tutorial, you will send calls as Under Writer (user name uw). In the base configuration, Under Writer is an underwriter who has permission to delete notes. As Under Writer, you will create a note. You will then attempt to DELETE the note twice. Both DELETEs will include a checksum value. The first DELETE will fail, and the second will succeed.

Tutorial steps

  1. In Postman, start a new request by clicking the + to the right of the Launchpad tab.
  2. On the Authorization tab, select Basic Auth using user aapplegate and password gw.
  3. Enter the following call for your respective InsuranceSuite application and click Send:
    • ClaimCenter: GET http://localhost:8080/cc/rest/common/v1/activities
    • PolicyCenter: GET http://localhost:8180/pc/rest/common/v1/activities?filter=subject:sw:Review%20risk

      The sample data includes one "Review risk information" activity for Alice Applegate. Your request queries for that activity.

    • BillingCenter: GET http://localhost:8580/bc/rest/billing/v1/accounts?filter=accountNumber:eq:Standard%20Account

      Your request queries for the Standard Account.

    GET http://localhost:8080/cc/rest/common/v1/activities

  4. Identify the id of the following for your respective InsuranceSuite application:
    • ClaimCenter: The first activity in the payload. This value is referenced below as <activityId>.
    • PolicyCenter: The activity in the payload. This value is referenced below as <activityId>.
    • BillingCenter: The account in the payload. This value is referenced below as <accountId>.
  5. Open a second request tab. Right-click the first tab and select Duplicate Tab tab.
  6. On the Authorization tab, select Basic Auth using one of the following sets of credentials for your respective InsuranceSuite application:
    • ClaimCenter: user: elee, password: gw
    • PolicyCenter: user: aclinton, password: gw
    • BillingCenter: user: uw, password: gw
  7. Change the operation to POST and enter the following URL for your respective InsuranceSuite application, but do not click Send yet:
    • ClaimCenter: POST http://localhost:8080/cc/rest/common/v1/activities/<activityId>/notes
    • PolicyCenter: POST http://localhost:8180/pc/rest/common/v1/activities/<activityId>/notes
    • BillingCenter: POST http://localhost:8580/bc/rest/billing/v1/accounts/<accountId>/notes
  8. Specify the request payload.
    1. In the first row of tabs (the one that starts with Params), click Body.
    2. In the row of radio buttons, select raw.
    3. At the end of the row of radio buttons, change the drop-down list value from Text to JSON.
    4. Paste the following into the text field underneath the radio buttons for your respective InsuranceSuite application:

      ClaimCenter and PolicyCenter:

      {
        "data":
          {
            "attributes": {
              "body": "API tutorial note to be deleted with a checksum"
            }
          }
      }

      BillingCenter:

      {
        "data": {
          "attributes": {
            "subject": "Test note",
            "body": "Test body",
            "language": {
              "code": "en_US"
            }
          }
        }
      }
  9. Click Send. In the response payload, identify the note's id.
  10. Open a third request tab. Right-click the second tab and select Duplicate Tab tab. Because it's a duplicate of the second tab, this tab also uses the user and password you provided in the second tab.
  11. Change the operation to DELETE, enter the following URL for your respective InsuranceSuite application, but do not click Send yet:
    • ClaimCenter: DELETE http://localhost:8080/cc/rest/common/v1/notes/<noteID>
    • PolicyCenter: DELETE http://localhost:8180/pc/rest/common/v1/notes/<noteID>
    • BillingCenter: DELETE http://localhost:8580/bc/rest/common/v1/notes/<noteId>
  12. DELETEs cannot specifies request bodies. On the third tab, navigate to the Body tab and select the none radio button.
  13. Add the checksum to the header:
    1. In the first row of tabs (the one that starts with Params), click Headers.
    2. Scroll to the bottom of the existing key/value list.
    3. In the blank row at the bottom of the key/value list, enter the following:
      • KEY: GW-Checksum
      • VALUE: 99
  14. Click Send. The checksum value in the header does not match the checksum value for the note calculated by the InsuranceSuite application. This means the DELETE is unsuccessful, and an error message appears.
  15. Change the checksum value so that it matches the one from the POST payload.
  16. Click Send a second time. Now, the checksum value in the header matches the checksum value for the note calculated by the InsuranceSuite application. This means the DELETE is successful. (The response to a successful DELETE is "204 - No content".)