Use this method to reinstate a previously canceled insurance policy. Provide the reinstatement date and any policy field overrides in the input representation, along with the ID of the policy to reinstate. The response includes the reinstated policy ID, the transaction ID, and any errors.
Example
The Apex example shows how to use the ConnectApi.InsuranceBrokerageFamily.reinstateInsurancePolicy() method to reinstate a previously canceled insurance policy.
Class Definition
This Apex example shows how to reinstate a canceled insurance policy.
1global class ReinstateConnectDriver{23 global static void callReinstateConnectAPI(){4 Map<String, Object>input = new Map<String, Object>();5 input.put('policyId', '0YTxx000000001dGAA');67 ConnectApi.InsurancePolicyReinstatementInputRepresentation reinstateInput = new ConnectApi.InsurancePolicyReinstatementInputRepresentation();8 reinstateInput.reinstatementDate = '2026-01-15';910 ConnectApi.InsurancePolicyInputRepresentation policyInput = new ConnectApi.InsurancePolicyInputRepresentation();11 Map<String, Object>fields = new Map<String, Object>();12 fields.put('Status', 'Active');13 policyInput.fieldValueMap = fields;14 reinstateInput.insurancePolicy = policyInput;1516 input.put('policyInput', reinstateInput);1718 Map<String, Object>output = new Map<String, Object>();19 Map<String, Object>args = new Map<String, Object>();20 args.put('input', input);21 args.put('output', output);2223 ReinstateTestConnectAPI callable = new ReinstateTestConnectAPI();24 Object result = callable.call('reinstate', args);2526 ConnectApi.InsurancePolicyReinstatementRepresentation policyData =27(ConnectApi.InsurancePolicyReinstatementRepresentation)result;28 System.debug('Reinstate Policy Data: ' + JSON.serializePretty(policyData));2930 if(output.containsKey('error')){31 System.debug('Error: ' + output.get('error'));32}33}34}
Usage Example
Use the ReinstateTestConnectAPI class to execute the reinstate action and process the result.