Default value creation

In some cases when you create certain resources, children of those resources are also created by default. This isn’t always a desirable behavior. When creating a new submission, there are query parameters that prevent the automatic creation of certain resources on the job.

The createDefaultCoverages query parameter

By default, when you create a coverable, PolicyCenter automatically creates all coverages (and conditions and exclusions) that meet the following criteria:

  • They are available when the call is made
  • They have an existence type of "Required" or "Suggested"

Sometimes, a job may not want these default coverages. But it can be cumbersome for a caller to determine what coverages were added automatically and then remove the undesired ones. In these situations, it may be easier to have a coverable with no default coverages.

You can create a coverable without default coverages using the createDefaultCoverages query parameter. This is a Boolean query parameter whose default is true. It is available on the following sets of endpoints:

  • Line endpoints
    • For example, POST /jobs/{jobId}/lines​
    • Note that POST /lines endpoints are present only for multi-line products
  • Non-line coverable endpoints
    • For example, POST /jobs/{jobId}/lines/PersonalAutoLine/vehicles
  • The POST /job/v1/submissions endpoint
    • This suppresses the creation of coverages, conditions, and exclusions on the default policy lines.
    • This also suppresses the creation of coverages, conditions, and exclusions on any coverable that is created automatically, such as a Commercial Property's default primary location coverable.
  • The POST /graphs/v1/submissions endpoint
    • All the preceding behaviors on the Job API endpoints are performed on the Graph API endpoint.

When the query parameter is set to false, the following behaviors are implemented:

  • POST of a coverable
    • Disable creation of default coverages, exclusions, and conditions

For example, suppose you have Personal Auto submission pc:6066. A vehicle is POSTed to the submission. The following call will create the vehicle with all default coverages.

POST /job/v1/jobs/pc:6066/lines/PersonalAutoLine/vehicles

In contrast, the following call will also create the vehicle, but with no default coverages.

POST /job/v1/jobs/pc:6066/lines/PersonalAutoLine/vehicles?createDefaultCoverages=false

This query parameter does not have special permissions. Any caller that can access coverable endpoints can also use this query parameter.

The createCoveredLocationForPrimaryLocation query parameter

By default, when a submission is initially created many property LOBs will automatically create a line-specific covered location for the primary location on a policy. However, this behavior can be undesirable in the context of a Composite API or graph POST submissions request. Because the ID of an automatically-created covered location can't be known ahead of time, there's no way to update that location in the same request. For example, there is no way to automatically create the location and then attach buildings or coverages to it within the composite request or the Graph API /submissions request.

Set the createCoveredLocationForPrimaryLocation query parameter to false to disable the creation of a default covered location. This allows the caller to explicitly create the covered location as a separate request so that its ID can be known (in a composite request) or so that it can have children specified (in a graph POST request).

This query parameter is true by default. It’s available on the following endpoints:

  • POST /job/v1/submissions
  • POST /graph/v1/submissions