Purge Policy
This operation completely removes a single policy and all of its details from the system. These details include mutations, calculation results and financial transactions. It will not create reversal transactions and it will not delete or correct financial messages in which transactions of the deleted policies are included.
The purpose of this operation is to facilitate re-using test data in non-production environments, especially in scenarios where the system restricts the removal of certain configuration settings after they have been applied in a calculation.
The use of this resource in a production environment is strongly discouraged, as it may cause having financial messages in the system without the originating policies and policy changes.
The resource supports the deletion of the enrollment of a person on that policy but it does not remove the person itself. The same applies for the policyholder: the operation will remove the fact that a certain person is (or was) the policyholder of a policy but it will not remove that person.
Request Purge
An external system can request the purging of a policy and all its details by exposing a POST request to the URL: http://\{base_URL}/api/purge/policies.
Example:
-
Expose a POST operation on http://\{base_URL}/api/purge/policies/<id>
-
Expose a POST operation on http://\{base_URL}/api/purge/policies/code/<code>
If the request specifies an id, the operation purges all versions of the policy where one of the policy versions has the specified id. If the request specifies a code, the operation will purge all versions of the policy where the latest version of the policy has the specified code.
The request payload does not support the specification of any settings.
Purge
The system deletes:
-
all financial information for any version of this policy.
-
all calculation results for all versions of this policy.
-
all policy account information for all versions of this policy
-
all policy information for all versions of the policy as specified in the cascading delete rules for the policy
-
all dynamic fields, dynamic records and multi language information on the deleted items
The system does NOT delete:
-
Financial Transaction Sets
-
Financial Messages
-
Payment Registrations
-
Group Accounts (but it will remove the policy from the group account)
-
Persons and/or organizations
The purge operation completes in full or not at all for each policy.
Response Messages
This operation provides HTTP status codes as defined in Response Messages. If an error occurs, the appropriate HTTP status code is returned, and a notification is sent containing the details of the error.
No operation specific errors are foreseen for this operation.
Authorization
The above described operation is protected by access restriction "purge.policies IP". An access restriction grant for this access restriction is not provided per default.
If the access to a policy is restricted by a data access group restriction, then to perform this operation on that policy also a grant for that data access group restriction must be provided with the Delete flag set.