---
title: "List attribute definitions (schema discovery)"
method: GET
path: "/attributes"
---

# List attribute definitions (schema discovery)

`GET /attributes`

## Request

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

The schema of an entity type: every attribute key, its data type, whether it is `writable` (formulas/inverse references are not), and the parsed `acceptable_values` for selects. Call this FIRST and cache it — entity `attributes` maps are sparse, so this is the canonical "what fields exist" answer. Optionally scope to a channel.

Scope: `read:attributes`.

## Query parameters

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

## Response `200`

Attribute definitions (not paginated).

- object
  - `data` AttributeDefinition[]
    - `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

- `400`: Invalid `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)
