For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create an attribute configuration

Adds an attribute to an attribute set.

  • The combination of attribute and attribute_set must be unique. Creating a duplicate is rejected.

  • Each behavior flag is nullable: send a value to override the attribute's default for this set, or leave it null (the default) to inherit. The inherited flags are reported in the read-only default_fields array.

post
/attribute_config/
Authorizations
AuthorizationstringRequired

Token credential sent in the Authorization header, in the form: Token <your-token>. Requires a staff (admin) account.

Body

The payload accepted when creating or fully updating an attribute configuration. On update, attribute and attribute_set are immutable and any values sent for them are ignored.

attributeintegerRequired

The identifier of the attribute. Together with attribute_set, must be unique.

attribute_setintegerRequired

The identifier of the attribute set. Together with attribute, must be unique.

is_requiredboolean · nullableOptional

Overrides the attribute's is_required; null inherits it.

is_visibleboolean · nullableOptional

Overrides the attribute's is_visible; null inherits it.

is_searchableboolean · nullableOptional

Overrides the attribute's is_searchable; null inherits it.

is_filterableboolean · nullableOptional

Overrides the attribute's is_filterable; null inherits it.

is_variantboolean · nullableOptional

Overrides the attribute's is_variant; null inherits it.

is_variant_listableboolean · nullableOptional

Overrides the attribute's is_variant_listable; null inherits it.

is_form_requiredboolean · nullableOptional

Overrides the attribute's is_form_required; null inherits it.

is_form_field_requiredboolean · nullableOptional

Overrides the attribute's is_form_field_required; null inherits it.

orderinteger · nullableOptional

The sort order of the attribute within the set.

attribute_config_groupinteger · nullableOptional

The identifier of the attribute configuration group this configuration belongs to.

Responses
201

The attribute configuration was created.

application/json

The membership of one attribute in one attribute set. Each behavior flag is nullable; a null value means the flag is inherited from the parent attribute, and the read-only default_fields array reports which flags are currently inherited.

pkintegerRead-onlyOptional

The unique identifier of the attribute configuration.

attributeintegerOptional

The identifier of the attribute.

attribute_setintegerOptional

The identifier of the attribute set.

is_requiredboolean · nullableOptional

Overrides the attribute's is_required; null inherits it.

is_visibleboolean · nullableOptional

Overrides the attribute's is_visible; null inherits it.

is_searchableboolean · nullableOptional

Overrides the attribute's is_searchable; null inherits it.

is_filterableboolean · nullableOptional

Overrides the attribute's is_filterable; null inherits it.

is_variantboolean · nullableOptional

Overrides the attribute's is_variant; null inherits it.

is_variant_listableboolean · nullableOptional

Overrides the attribute's is_variant_listable; null inherits it. Changing this recomputes the listable status of the attribute set's products.

is_form_requiredboolean · nullableOptional

Overrides the attribute's is_form_required; null inherits it.

is_form_field_requiredboolean · nullableOptional

Overrides the attribute's is_form_field_required; null inherits it.

default_fieldsstring[]Read-onlyOptional

The names of the behavior flags currently inherited from the attribute (those left null).

orderinteger · nullableOptional

The sort order of the attribute within the set.

attribute_config_groupinteger · nullableOptional

The identifier of the attribute configuration group this configuration belongs to, when any.

post/attribute_config/
POST /api/remote/1/attribute_config/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 254

{
  "attribute": 1,
  "attribute_set": 1,
  "is_required": null,
  "is_visible": null,
  "is_searchable": null,
  "is_filterable": null,
  "is_variant": null,
  "is_variant_listable": null,
  "is_form_required": null,
  "is_form_field_required": null,
  "order": null,
  "attribute_config_group": null
}
{
  "pk": 7001,
  "attribute": 42,
  "attribute_set": 15,
  "is_required": true,
  "is_visible": null,
  "is_searchable": null,
  "is_filterable": true,
  "is_variant": null,
  "is_variant_listable": null,
  "is_form_required": null,
  "is_form_field_required": null,
  "default_fields": [
    "is_visible",
    "is_searchable",
    "is_variant",
    "is_variant_listable",
    "is_form_required",
    "is_form_field_required"
  ],
  "order": 0,
  "attribute_config_group": null
}

Last updated

Was this helpful?