v1

latestSwagger 2.02026-07-13137761.0 MB
Product model

Get a product model

This endpoint allows you to get the information about a given product model. In the Entreprise Edition, since the v2.0, permissions based on your user groups are applied to the product model you request.

get/api/rest/v1/product-models/{code}

Path parameters

codestring required

Code of the resource

Query parameters

with_quality_scoresboolean

Return product model quality scores in the response. <strong>(Only available since the 6.0 version)</strong>

Response

OK

codestring required

Product model code

familystring

<a href='api-reference-paas.html#Family'>Family</a> code from which the product inherits its attributes and attributes requirements (since the 3.2)

family_variantstring required

Family variant code from which the product model inherits its attributes and variant attributes

parentstring

Code of the parent <a href='api-reference-paas.html#Productmodel'>product model</a>. This parent can be modified since the 2.3.

categoriesstring[]

Codes of the <a href='api-reference-paas.html#Category'>categories</a> in which the product model is categorized

valuesobject

Product model attributes values, see <a href='/concepts/products.html#focus-on-the-product-values'>Product values</a> section for more details

createdstring dateTime

Date of creation

updatedstring dateTime

Date of the last update

quality_scoresobject

Product model quality scores for each channel/locale combination (<strong>only available since the 7.0 version</strong> and when the "with_quality_scores" query parameter is set to "true")

Example response

{
  "code": "model-biker-jacket-leather",
  "family": "clothing",
  "family_variant": "clothing_material_size",
  "parent": "model-biker-jacket",
  "categories": [
    "summer_collection"
  ],
  "values": {
    "color": [
      {
        "locale": null,
        "scope": null,
        "data": "antique_white"
      }
    ],
    "material": [
      {
        "locale": null,
        "scope": null,
        "data": "leather"
      }
    ],
    "variation_name": [
      {
        "locale": "en_US",
        "scope": null,
        "data": "Biker jacket leather"
      }
    ],
    "name": [
      {
        "locale": "en_US",
        "scope": null,
        "data": "Biker jacket"
      }
    ],
    "collection": [
      {
        "locale": null,
        "scope": null,
        "data": [
          "summer_2017"
        ]
      }
    ],
    "description": [
      {
        "locale": "en_US",
        "scope": "ecommerce",
        "data": "Biker jacket"
      }
    ]
  },
  "associations": {
    "PACK": {
      "products": [
        "sunglass"
      ],
      "product_models": [],
      "groups": []
    }
  },
  "quantified_associations": {
    "PRODUCT_SET": {
      "products": [
        {
          "identifier": "top",
          "quantity": 2
        },
        {
          "identifier": "cap",
          "quantity": 1
        }
      ],
      "product_models": [
        {
          "code": "model-biker-jacket-leather",
          "quantity": 2
        }
      ]
    }
  },
  "quality_scores": [
    {
      "scope": "ecommerce",
      "locale": "en_US",
      "data": "A"
    },
    {
      "scope": "ecommerce",
      "locale": "fr_FR",
      "data": "B"
    },
    {
      "scope": "tablet",
      "locale": "en_US",
      "data": "D"
    },
    {
      "scope": "tablet",
      "locale": "fr_FR",
      "data": "E"
    }
  ],
  "created": "2017-10-02T15:03:55+02:00",
  "updated": "2017-10-02T15:03:55+02:00"
}