Copy Product

This operation creates a copy of an existing Product or from a Product template.

The operation creates a new Product with a new code and description. To create a new copy, the operation copies the following child objects - including their dynamic fields and records - from the source Product.

  • Default Start Date

  • Brand

  • Product Line

  • Product Family

  • Product Priority

  • Funding Arrangement

  • Currency

  • Parameter Values, including Parameter Value Start and End Dates

  • Product Provider Groups. If a product Provider Group references an inactive Provider Group, then the operation does not copy the Group into the new Product.

  • Product Limit Renewal Periods

  • Product Service Options

  • Product Services. If a Product Service references an inactive Service, then the operation does not copy the Service into the new Product.

  • Product Service Definitions and their details. If a Product Service Definition references an inactive Service Definition, then the operation does not copy the Service Definition into the new Product.

  • Extended fields on the Product and its child objects

The operation sets the following attributes or indicators for the new Product:

  • The template indicator to No.

  • The changed indicator to Yes.

  • The validation status attribute to N.

  • The build number attribute to 0.

  • The status attribute to Edit.

  • The operation sets the Aggregation Level attribute to the value of the Code of the new Product.

  • If the source Product is a template, the operation empties the Source Product attribute.

  • If the source Product is a template, the operation sets the Source Template attribute as the source Product.

Request URL

To create a copy product, send the following request with the payload:

POST http://[hostName]:[portNumber]/[api-context-root]/createproductcopy

The payload needs to have information on the source and the new Product:

{
    "sourceProduct": <source product code>,
    "targetProductCode": <new product code>,
    "targetProductDescription": <new product Description>
}

Response Messages

The operation results in the following messages:

Success

A successful operation returns an HTTP 201 Created response and the new Product resource link in the response header.

Failure

If an error occurs, the operation sends an appropriate HTTP status code with a notification containing error details. See Response Messages for more information on error codes.

The operation returns the following notifications:

Table 1. Failure
Code Severity Text

PRD-HTTP-006

Fatal

Source product does not exists.

PRD-HTTP-007

Fatal

Cannot create a copy of a product that is defined for an inactive brand

PRD-HTTP-008

Fatal

To create a copy of a product, the status of the source product must not be queued

Authorization

The products.copyproduct IP access restriction protects this operation.