Product definitions for products

The product endpoints provide read-only access to product data models.

Products endpoints

The /productdefinition/v1/products/* endpoints can be used to query products and their associated lines, questions, modifiers, and editions. Use the following endpoints to retrieve the data models for each product type:

  • GET /productdefinition/v1/products
  • GET /productdefinition/v1/products/{productId}
  • GET /productdefinition/v1/products/{productId}/editions
  • GET /productdefinition/v1/products/{productId}/modifiers
  • GET /productdefinition/v1/products/{productId}/lines
  • GET /productdefinition/v1/products/{productId}/questions

Product editions

You can retrieve summary information for all editions of a product by using the following endpoint:

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

For example, to retrieve the edition codes for the PersonalAuto product, use the following command:

Command

GET /productdefinition/v1/products/PersonalAuto/editions

Response

{
    "data": [
        {
            "attributes": {
                "code": "BaseEdition",
                "description": "Base Product",
                "id": "BaseEdition",
                "name": "Base Product"
            }
        }

The editions can have three sources:

  • Editions for a visualized product
  • Editions from the InstalledEditions table for an installed product not synced to cloud
  • Editions from the APD Cloud service for an installed product synced to cloud

This endpoint is intended to work across all three sources. However, there might be some inconsistencies due to differences in how the products are implemented. For example:

  • Locally-installed editions have a notion of "status" (pre-loaded, activated, or withdrawn) that doesn't apply to the other cases.
  • Locally-installed editions have no notion of a name, description, effective or expiration dates, or applicable segments and jurisdictions.
  • Locally-installed and visualized editions are attached to the line rather than the product, while cloud-synced editions are attached to the product. This endpoint attempts to abstract over that difference by aggregating all line-level editions and treating them as a product-level edition, and only writing out concrete properties if they're the same for all editions.

The main use for this endpoint is to retrieve codes for use with the /common/v1/entity-schemas endpoint. Use the code attribute from the /productdefinition/v1/products/{productId}/editions response with the editionCode query parameter for the entity-schemas endpoint. See Business entity schema query parameters for more information.