Get one attribute definition

One attribute definition by key. type selects the entity type (default product) — keys are namespaced per type, so the wrong type returns 404. Same projection as GET /attributes: the data_type, whether the key is writable, and its parsed acceptable_values. Use this to re-check a single key; use GET /attributes to learn the whole schema.

Scope: read:attributes.

get/attributes/{key}

Request

  • Base URL
    https://www.merchkit.com/api/v1
  • Auth
    HTTP bearer

Query parameters

type'product' | 'image' | 'vendor' | 'category' | 'source'

The entity type the key belongs to.

Response

The attribute definition.

Example response

{
  "data": {
    "id": "a3d81c22-5f6e-4b09-8d17-c40a92e5b613",
    "key": "material",
    "name": "Material",
    "entity_type": "product",
    "data_type": "single_select_list",
    "channel": null,
    "is_primary": false,
    "writable": true,
    "acceptable_values": [
      "White Oak",
      "Smoked Oak",
      "Walnut"
    ],
    "default_value": null,
    "formula_expression": null
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.