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

Update an attribute configuration

Replaces the details of an existing attribute configuration. Provide the full set of writable fields.

  • The attribute and attribute_set of an existing configuration cannot be changed; any values sent for them are ignored.

  • A behavior flag sent as null reverts to inheriting the attribute's default; a non-null value overrides it. The default_fields array is recomputed accordingly.

  • When is_variant_listable changes, the listable status of the products using this attribute set is recomputed.

put
/attribute_config/{id}/
Authorizations
AuthorizationstringRequired

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

Path parameters
idintegerRequired

The unique identifier of the attribute configuration.

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
200

The updated attribute configuration.

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.

put/attribute_config/{id}/
PUT /api/remote/1/attribute_config/{id}/ 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?