Build

This operation enables building draft provider pricing clauses in a pricing worksheet. For more details on building draft provider pricing clauses please see Draft Provider Pricing Clauses Worksheet

The pricing worksheet resource offers a build link.

 ... pricing worksheet properties ...
 "links": [
    {
      "href": "http://[hostName]:[portNumber]/[api-context-root]/generic/pricingworksheets/",
      "rel": "self"
    },
    {
      "href": "http://[hostName]:[portNumber]/[api-context-root]/pricingworksheets/{pricingworksheet_code}/build",
      "rel": "pricingworksheet:build",
      "httpMethod": "POST"
    }
  ]
}

Clients can send in one or more draft provider pricing clauses in the POST payload. If the client does not include a list of draft provider pricing clauses, all draft provider pricing clauses in the pricing worksheet are built:

{
  "draftProviderPricingClauseList": [
     {"code": ""},
     {"code": ""}
      ..
  ]
}

The build operation validates and builds draft provider pricing clauses. If the request specifies draft provider pricing clause codes, only the draft provider pricing clauses with specified codes are processed; otherwise, the complete worksheet is built. If a draft provider pricing clause with the specified code is not found within the context of the pricing worksheet, the system creates an interface message "Draft provider pricing clause with {code} not found" for each such code.

The build operation (re-)validates each draft provider pricing clause in context before creating a provider pricing clause for it, also those that already have the status Valid. This validation is identical to the validation in the Validate operation.

For details on the build function refer to Build Draft Provider Pricing Clauses

The request header parameter continue_when_invalid determines whether the system stops the build operation when it finds an invalid draft provider pricing clause, or continues with building valid draft provider pricing clauses into provider pricing clauses. When set to true, the operation continues. When set to false, the operation stops immediately if at least one draft provider pricing clause in the worksheet is invalid.

Response Messages

Success

The system responds with 201 created. The system also returns a link to the task resource in the Location header: http://[hostName]:[portNumber]/[api-context-root]/generic/task/{id}.
This enables the external system to track the progress by issuing a GET to this task URI.

Failure

Following HTTP status codes can be returned in case of error.

Table 1. Failure
Response Description

HTTP 401

Unauthorized

HTTP 404

Pricing worksheet is unknown

See Response Messages for more details.

Authorization

The operation in this section is protected by access restriction "pricingworksheets.build IP". A grant must be given with both the Read and Update flag set.