Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Cancel Insurance Policy Action

Cancel an insurance policy by using a set of user inputs that represent policy details.

This action is available in API version 63.0 and later.

Supported REST HTTP Methods

URI
/services/data/v68.0/actions/standard/cancelInsurancePolicy
Formats
JSON
HTTP Methods
POST
Authentication
Authorization: Bearer token

Inputs

Input Details
cancelPolicyIAInputRep Type

Apex-defined

Description

An Apex ConnectApi.CancelPolicyIAInputRep record that contains details of the policy to be canceled.

Outputs

Output Details
cancelPolicyIAOutputRep Type

Apex-defined

Description

An Apex ConnectApi.CancelPolicyIAOutputRep record that contains the details of the policy that's canceled.

Example

Sample Request

1{
2   "inputs": [
3       {
4           "CancelPolicyIAInputRep": {
5               "policyId": "0YTxx00000001H3GAI",
6               "effectiveDate": "2024-09-08",              
7               "transactionRecord":{                            
8                   "name": "Cancel Transaction"
9               }
10           }
11       }
12   ]
13}

Sample Response

1{
2  "actionName": "cancelInsurancePolicy",
3  "errors": null,
4  "invocationId": null,
5  "isSuccess": true,
6  "outcome": null,
7  "outputValues": {
8    "CancelPolicyIAOutputRep": {
9      "impactedPolicyVersions": [
10        "0YTSG000000PgSH4A0"
11      ],
12      "refund": {
13        "premium": "133.4",
14        "tax": "21.3",
15        "fee": "32.3"
16      },
17      "sortOrder": -1,
18      "version": 1
19    }
20  }
21}