younifyd
Menu

Get Product Model Draft

Get a draft

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

Use it in a workflow

  1. Add a step and choose the Akeneo connector.
  2. Pick the Get Product Model Draft action (under Product model).
  3. Fill in the fields below, then reference the result from later steps as {{getProductModelDraft.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.

Response

Returns 200 with an object. Read it in later steps with {{getProductModelDraft.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.