younifyd
Menu

Get Product Model By Code

Get a product model

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

Use it in a workflow

  1. Add a step and choose the Akeneo connector.
  2. Pick the Get Product Model By Code action (under Product model).
  3. Fill in the fields below, then reference the result from later steps as {{getProductModelByCode.response.data}}.

Request

Path parameters

codestringrequired

This path parameter is used to specify the unique identifier of the entity you want to retrieve or manipulate. It is essential for identifying the specific entity in the API requests. Ensure that the code is correctly formatted and corresponds to an existing entity in the system.

Query parameters

with_asset_share_linksboolean

Return asset collection share link URLs in the response. When set to `true`, the response will include direct URLs to asset collections for sharing purposes. This is useful for accessing direct links to asset collections, which can be used for sharing or external integrations. If set to `false`, the response will not include share links, which can improve performance. See [the `linked_data` format](https://api.akeneo.com/concepts/products.html#the-linked_data-format) for more details.

Default false

with_enabled_assets_onlyboolean

When set to `true`, disabled assets are excluded from asset collection values in the response. Only assets with `status: "enabled"` are returned. When set to `false` (default), all assets are returned regardless of their status.

Default false

with_quality_scoresboolean

Return product quality scores in the response. When set to `true`, the response will include quality score information for each product. This is useful for assessing and monitoring product data quality, which is essential for maintaining high data standards and improving product information. If set to `false`, the response will not include quality scores, which can improve performance.

Default false

with_readinessstring

Return readiness information in the response. - `scores_only`: include readiness percentage scores only. - `detailed`: include readiness percentage scores together with the list of unmet requirements. When omitted, no readiness information is returned. Readiness is currently in beta and is available by request only. If you would like to participate, please reach out to your Customer Success Manager.

One ofscores_onlydetailed

with_workflow_execution_statusesboolean

Return an array of workflow_execution_statuses directly associated with the requested entity (product or product model) in the response. Statuses are level-specific and are not inherited from parent models. For a complete overview of a variant product, you must query the variant itself and its parent model(s) in separate requests. Each workflow object contains: - The overall execution status (e.g., in_progress, completed). - A list of all associated tasks.

Default false

scopestring

Filter product values to return scopable attributes for the given channel as well as the non localizable/non scopable attributes. It is useful for retrieving product information specific to a particular sales channel, which is essential for channel-specific applications. For more details see the [Filter product values via channel](https://api.akeneo.com/documentation/filter.html#via-channel) section.

convert_measurementsboolean

Convert measurement attribute values to the appropriate unit for the channel provided by the `scope` parameter. When set to `true`, the `scope` parameter is required.

Default false

Response

Returns 200 with an object. Read it in later steps with {{getProductModelByCode.response.data.<field>}}.

codestring

Product model code

familystring | null

[Family](https://api.akeneo.com/api-reference.html#Family) code from which the product inherits its attributes and attributes requirements. In the case of variant product, the given family should be the same as the product model family.

Default "null only in the case of a non variant product"

family_variantstring

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

parentstring | null

Code of the parent [product model](https://api.akeneo.com/api-reference.html#Productmodel) when the product is a variant

Default null

categoriesarray<string>

Codes of the [categories](https://api.akeneo.com/api-reference.html#Category) in which the product is classified

Default []

valuesobject

Product attributes values. Each key is an attribute code, and the value is an array of value objects for that attribute. See [documentation](https://api.akeneo.com/concepts/products.html#focus-on-the-product-values) for details.

associationsobject

Several associations related to groups, product models and/or other products, grouped by association types

quantified_associationsobject

Several quantified associations related to products and/or product models, grouped by quantified association types

createdstring (date-time)

Date of creation

updatedstring (date-time)

Date of the last update

metadataobject

More information around the product

workflow_statusstring

Status of the product regarding the user permissions

One ofread_onlydraft_in_progressproposal_waiting_for_approvalworking_copy

quality_scoresarray<object>

Product quality scores for each channel/locale combination (only available when the `with_quality_scores` query parameter is set to `true`).

scopestring

Channel code for which the quality score is calculated

localestring

Locale code for which the quality score is calculated

datastring

Quality score value for the given channel/locale combination

One ofABCDE

readinessobject

Readiness scores (only available when the `with_readiness` query parameter is set to `scores_only` or `detailed`). Readiness is currently in beta and is available by request only. If you would like to participate, please reach out to your Customer Success Manager.

aggregated_scores_by_scopearray<object>2 fields

Aggregated readiness score per channel: the average of the per-locale scores within each readiness, then averaged across the readiness configurations that apply to that channel (equal weight) and rounded.

scores_by_scope_and_localeobject

Readiness scores grouped by readiness code, for each channel/locale combination

workflow_execution_statusesarray<object>

Workflow execution statuses of the product (only available when the `with_workflow_execution_statuses` query parameter is set to `true`).

uuidstring

Workflow execution UUID

statusstring

Status of the workflow execution

One ofin_progresscompleted

started_atstring (date-time)

Date and time when the workflow execution was started

completed_atstring | null

Date and time when the workflow execution was completed, null if still in progress

workflowobject3 fields

Workflow associated with the workflow execution

tasksarray<object>4 fields

Tasks associated with the workflow execution

json
{
  "code": "amarisshoe",
  "family_variant": "shoes_Variant",
  "family": "smartphone",
  "parent": "my_super_battery",
  "categories": [
    "smartphones",
    "electronics"
  ],
  "values": {
    "description": [
      {
        "data": "T-shirt long sleeves Winter special, 100% wool",
        "locale": null,
        "scope": null
      }
    ]
  },
  "associations": {
    "X_SELL": {
      "groups": [],
      "products": [
        "product_1",
        "product_2"
      ],
      "product_models": [
        "product_model_1"
      ]
    },
    "UPSELL": {
      "groups": [
        "group_1"
      ],
      "products": [],
      "product_models": []
    }
  },
  "quantified_associations": {
    "PACK": {
      "products": [
        {
          "identifier": "product_1",
          "quantity": 2
        },
        {
          "identifier": "product_2",
          "quantity": 3
        }
      ],
      "product_models": [
        {
          "identifier": "product_model_1",
          "quantity": 1
        }
      ]
    }
  },
  "created": "2022-03-14T15:25:45+00:00",
  "updated": "2022-06-24T12:54:58+00:00",
  "metadata": {
    "workflow_status": "read_only"
  },
  "quality_scores": [
    {
      "scope": "ecommerce",
      "locale": "en_US",
      "data": "A"
    }
  ]
}

Need more? See the Akeneo guide for connection setup and behaviour shared by every action.