Generating an installed product from a visualized product

Use the following endpoint to generate an installed product from a visualized product:

  • POST /productdefinition/v1/product-templates/{productId}/codegen

The request body must specify the ID of the product.

The codegen process can be executed in one of four modes:

  • API_CODE: Generate only the LOB-specific endpoints
  • BASE_CODE: Generate only the product base code
  • EXTERNAL: Generate only the additional registered extensions
  • ALL: Generate all of the above. This is the default

For more information on the scope of the product base code or additional registered extensions, see Integrating Products with PolicyCenter.

For example, the following request generates only the LOB-specific endpoints for a Crime product whose ID is "Crime".

Command

POST /productdefinition/v1/product-templates/{productId}/codegen

Request body

{
    "data": {
        "attributes": {
            "productId": "Crime"
            "generationMode": "API_CODE"
        }
    }
}