---
title: "Get one attribute definition"
method: GET
path: "/attributes/{key}"
---

# Get one attribute definition

`GET /attributes/{key}`

## Request

- Base URL: `https://www.merchkit.com/api/v1`
- URL: `https://www.merchkit.com/api/v1/attributes/{key}`
- Auth: HTTP bearer

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`.

## Query parameters

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

## Response `200`

The attribute definition.

- object
  - `data` AttributeDefinition: The discovery projection of an attribute definition (`GET /attributes`): what the key is, whether you may write it, and what values it accepts.
    - `id` string, uuid, required
    - `key` string, required: The key used in `attributes`, filters, and sorts.
    - `name` string, required
    - `entity_type` string, required
    - `data_type` string, required
    - `channel` string, nullable, required: Set when the attribute is channel-scoped.
    - `is_primary` boolean, required: The primary attribute supplies every entity's `label`.
    - `writable` boolean, required: False for derived types (formula, inverse_reference, reference_lookup) — writes to them are rejected.
    - `acceptable_values` string[], required: Parsed allowed values for selects; empty when unconstrained.
    - `default_value` string, nullable, required
    - `formula_expression` string, nullable, required: The template of a formula or web_preview column; null for every other attribute.

## Other responses

- `404`: Attribute not found for that type.

---

[API](https://skmtc.dev/merchkit/apis/merchkit-api.md) - [All operations](https://skmtc.dev/merchkit/apis/merchkit-api/llms.txt) - [OpenAPI document](https://skmtc.dev/merchkit/apis/merchkit-api/revisions/3062ca814757?raw)
