Refresh an alteration package

Re-quotes a pending alteration package against the policy's current product module definition and replaces it. The new package is created with refreshed_from_alteration_package_id set to the original, and the original is archived. If quoting fails, nothing is archived and the original stays pending.

The original's input is replayed: data from the request body if present, otherwise the data the original was created with.

A refresh is only sound when the alteration hook's validation accepts its own output unchanged, and when the hook reads no policy data other than monthly_premium, sum_assured, billing_frequency and the module keys the package carries.

Requires both the create and the archive alteration package permissions.

Path Params
uuid
required

Must be a UUID. The unique identifier of the pending alteration package to refresh.

Query Params
string

To perform an idempotent request, provide the idempotency_key query parameter with the request. An idempotency key is a unique value generated by the client which the platform uses to recognize subsequent retries of the same request. How you create unique keys is up to you, but we suggest using a V4 UUID, or another random string with enough entropy to avoid collisions. Idempotency keys can be up to 255 characters long.

Body Params
data
object

Replaces the stored input for this refresh. When omitted, the data the original package was created with is replayed. An empty object is replayed as an empty object.

boolean

If true, the new alteration package is applied to the policy after it is created. If applying fails, the new package stays pending and the error names its ID.

boolean

If true and auto_apply is true, notifications will not be sent when the alteration package is applied.

Responses

400

The package is not pending, its alteration hook is not in the policy's current product module definition, its stored input failed validation, the product module returned other than one alteration package, or the currency changed. The original stays pending.

404

The alteration package was not found, or it is archived.

409

Another request superseded, archived or applied the package first. When another refresh won, the message names the alteration package that replaced it.

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json