**Version: 202701**

# Get product customization config

**GET** `/openapi/2027-01/customization/products/:product_id/design`

Returns the customization configuration of a product, including components, groups and conditions.

## Request

**Path Parameters**

- `product_id` string (required)

  SaaS product ID

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `design` object

    Product customization configuration

    - `product_id` string

      SaaS product ID
    - `type` string

      Config type: normal / linked (read only)
    - `applied_template_id` string

      Source template ID, empty when not applied from a template
    - `components` object[]

      Customization items

      *   Array [

      - `key` string

        Component key, format {type}-{8 chars}, unique within one configuration
      - `type` string

        Component type: text / dropdown / checkbox / button / image / upload / datetime / size-pricing / preview-*
      - `settings` object

        Component settings. Common fields: label (required, unique within a product), order_label, required, support_condition, value, options[]; options[]: key (option identifier, used by ERP to match), label, value, imageUrl, price, link, children, parentKey; remaining fields depend on type
      - `price_settings` object

        Pricing rule of this component

        - `calc_type` string

          Calculation type: component / option / bysize / formula
        - `price` object

          Price map. Key is the component key when calc_type=component, the option key when option, the size key when bysize

          - `property name*` double
        - `settings` object

          Extra settings, contains formula when calc_type=formula
      *   ]
    - `groups` object[]

      Component groups

      *   Array [

      - `key` string

        Group key
      - `group_name` string

        Group display name
      - `contains` string[]

        Keys of the components contained in this group
      - `type` string

        Group type: material (each component's default wrapping group, key equals the component key) / group (custom group, key looks like group-xxxxxxxx)
      *   ]
    - `conditions` object[]

      Chained display rules

      *   Array [

      - `rules` object

        {items: [{type: custom/product, left, right: []}], logic: and/or}. For custom: left is a component key, right is an option key; for product: left is a variant option name, right is a variant option value
      - `targets` string[]

        Keys of the components or groups to show
      *   ]
    - `with_preview` int32

      Preview mode: 0-options only, 1-with preview
    - `preview_settings` object

      Preview settings, present when with_preview is 1

      - `physical_size` object

        {width, height, unit, dpi}
      - `background_images` object

        {[saas_variant_id]: {image: {src, width, height}}}
      - `print_design_bounding` object

        {[saas_variant_id]: {top, left, width, height, angle, scaleX, scaleY}}
      - `layers` GoogleProtobufValue

        Layers definition
      - `artwork_image` object

        Artwork image

        - `src` string

          Image URL
        - `width` int32

          Image width in pixels
        - `height` int32

          Image height in pixels

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "design": {
      "product_id": "string",
      "type": "string",
      "applied_template_id": "string",
      "components": [
        {
          "key": "string",
          "type": "string",
          "settings": {},
          "price_settings": {
            "calc_type": "string",
            "price": {},
            "settings": {}
          }
        }
      ],
      "groups": [
        {
          "key": "string",
          "group_name": "string",
          "contains": [
            "string"
          ],
          "type": "string"
        }
      ],
      "conditions": [
        {
          "rules": {},
          "targets": [
            "string"
          ]
        }
      ],
      "with_preview": 0,
      "preview_settings": {
        "physical_size": {},
        "background_images": {},
        "print_design_bounding": {},
        "artwork_image": {
          "src": "string",
          "width": 0,
          "height": 0
        }
      }
    }
  }
}
```
