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.
409Another 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.