younifyd
Menu

Post Attribute Option

Create a new attribute option

POST/api/rest/v1/attributes/{attribute_code}/options

Use it in a workflow

  1. Add a step and choose the Akeneo connector.
  2. Pick the Post Attribute Option action (under Attribute option).
  3. Fill in the fields below, then reference the result from later steps as {{postAttributeOption.response.data}}.

Request

Path parameters

attribute_codestringrequired

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

Request body

Enter the body as JSON in the step's Body field.

codestringrequired

Code of option

attributestring

Code of attribute related to the attribute option

sort_orderinteger

Order of attribute option

labelsobject

Attribute option labels for each locale

Default {}

json
{
  "code": "black",
  "attribute": "a_simple_select",
  "sort_order": 2,
  "labels": {
    "en_US": "Black",
    "fr_FR": "Noir",
    "de_DE": "Schwarz"
  }
}

Response

Returns 201 with a any. Read it in later steps with {{postAttributeOption.response.data.<field>}}.

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

Post Attribute Option — Akeneo — Documentation