Toggle a product's endpoints

A given product can exist at the same time as a visualized version and an installed version. Each version can have its own LOB-specific endpoints. However, only one version of the product can be active at a given time.

You can toggle the active set of endpoints through the user interface. For more information, see Toggle a product's active endpoints through the user interface.

You can also use the following endpoints to toggle the active set of endpoints:

  • POST /productdefinition/v1/product-templates/{productId}/enable
    • Makes the visualized product's endpoints active
  • POST /productdefinition/v1/product-templates/{productId}/disable
    • Makes the installed product's endpoints active

The request does not require a body. The response contains information about the product template, including an enabled field, which is set to either true (the visualized product's endpoints are active) or false (the installed product's endpoints are active).

For example, for the Workers' Compensation product (WorkersComp), the following request makes the installed version's endpoints active.

Command

/productdefinition/v1/product-templates/WorkersComp/disable

Request body

<none>

Response body

{
    "data": {
        "attributes": {
            "abbreviation": "WC",
            "codeIdentifier": "WorkersComp",
            "description": "Workers' Compensation",
            "enabled": false,
            ...
        },

Determining which endpoints are active

You can also use the following endpoint to determine which set of endpoints are active:

  • GET /productdefinition/v1/products/{productId}

Unlike the /enable and /disable endpoints, which use a productTemplate resource, this endpoint returns a product resource. The product schema has a Boolean visualized field. When set to true, the visualized endpoints are active. When set to false, the installed endpoints are active. For example, the following request determines which set of endpoints are active for the WorkersComp product.

Command

GET /productdefinition/v1/products/WorkersComp

Response body

{
    "data": {
        "attributes": {
            "abbreviation": "WC",
            "description": "Workers' Compensation",
            "id": "WorkersComp",
            "name": "Workers' Compensation",
            "productType": {
                "code": "Commercial",
                "name": "Commercial"
            },
            "visualized": false
        },

The visualized field is set to false. Therefore, the installed product's endpoints are active.