Create an alteration package

Creates an alteration package for a policy. If the policy already has a pending alteration package with the same key and the same data, the new package supersedes it: the existing package is archived and the new one has refreshed_from_alteration_package_id set to it. This only happens when the caller also has permission to archive alteration packages. Otherwise, including requests through the embed flow, the existing pending package is returned unchanged if it was created in the last minute, or if it is older and a re-quote shows it is still current. An older one that is stale is archived and a new package is created. When the product module returns several alteration packages, all of them are created, and they are never matched against or returned in place of another package.

Path Params
string
required

The unique identifier of the policy

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
string
required

The identifier of the alteration hook.

data
object
required

Custom module-specific fields stored against the alteration package. See product modules for more details.

boolean

If true, the first alteration package will be automatically applied to the policy after creation. The response will be an array containing a single applied alteration package.

boolean

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

Responses

409

Another request superseded, archived or applied the matching pending alteration package first. Also returned when auto_apply is true and an existing pending alteration package with the same key and data would be returned; it is not applied, and can be applied by its ID. Also returned when that existing package is more than a minute old and the re-quote that checks it fails; it stays pending and can be applied by its ID.

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