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

Retrieve an attribute

Returns a single attribute.

get
/attributes/{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.

Responses
200

The requested attribute.

application/json

An attribute definition as returned by the API.

pkintegerRead-onlyOptional

The unique identifier of the attribute.

keystring · max: 255Optional

The unique machine key of the attribute. Matches ^[a-zA-Z_][a-zA-Z0-9_-]*$.

namestring · max: 255Optional

The human-readable, translatable name of the attribute.

data_typestring · enumOptional

The data type of an attribute, controlling how its value is entered and interpreted. See the Data Types table under Attributes.

Possible values:
default_valueinteger · nullableOptional

The identifier of the attribute value used as the default, when any.

is_requiredbooleanOptional

Whether the attribute must have a value on the product.

is_visiblebooleanOptional

Whether the attribute is shown in management and storefront contexts.

is_searchablebooleanOptional

Whether the attribute is indexed for search.

is_filterablebooleanOptional

Whether the attribute can be used as a storefront filter.

is_variantbooleanOptional

Whether the attribute distinguishes variants of a product.

is_variant_listablebooleanOptional

Whether the attribute participates in choosing the listable variant.

is_form_requiredbooleanOptional

Whether the attribute is required in the product form.

is_form_field_requiredbooleanOptional

Whether the attribute's form field is required.

get/attributes/{id}/
GET /api/remote/1/attributes/{id}/ HTTP/1.1
Host: sandbox.akinon.com
Authorization: YOUR_API_KEY
Accept: */*
{
  "pk": 42,
  "key": "color",
  "name": "Color",
  "data_type": "dropdown",
  "default_value": null,
  "is_required": true,
  "is_visible": true,
  "is_searchable": true,
  "is_filterable": true,
  "is_variant": true,
  "is_variant_listable": true,
  "is_form_required": false,
  "is_form_field_required": false
}

Last updated

Was this helpful?