---
title: "The custom fields this organisation keeps on its variants"
method: GET
path: "/api/v1/variants/custom-fields"
tags: ["variants"]
---

# The custom fields this organisation keeps on its variants

`GET /api/v1/variants/custom-fields`

## Request

- Base URL: `https://api.app.tightly.io`
- URL: `https://api.app.tightly.io/api/v1/variants/custom-fields`
- Auth: HTTP bearer

A page of custom field definitions: what this organisation has added to its variants beyond the catalogue's own columns. Each carries `id`, `name`, `field_type` (`string`, `decimal`, `integer`, `boolean` or `date`), `source`, `description`, `is_active`, `is_editable`, `is_value_editable`, `access_type`, and its timestamps.

Read this before reading or writing a variant's `custom_fields` map: the map is keyed on the field's `id`, and `field_type` is the type a value must parse as.

`source` says where the field came from: `tightly` for one declared here, otherwise the connector that brought it. The two counts beside the page are that split, over the active fields: `total_active_tightly_specific` and `total_active_integration`. `is_value_editable` is computed rather than stored: true when `source` is `tightly`, and otherwise true only when `access_type` is `read_write`.

`label` is what a face prints and `name` is the key values are stored under. `bound_to` names the connection filling the field, and while it is set a write to its values is refused; `used_in` counts the families and saved filters that read it.

Paging is `offset` and `limit`, limit at most 100 and 25 by default; `max_size` is every field matching the filters and `size` is this page. `search` matches name and description. `filter_args` is a JSON array of `{key, operation, value}` over `is_active`, `is_editable`, `field_type`, `name` and `source`.

Scope: `products:read`.

## Query parameters

- `offset` integer
- `limit` integer
- `search` string
- `filter_args` string

## Headers

- `Tightly-Version` string

## Response `200`

A page of definitions, with the active split and the size of the matching set.

- object
  - `data` object
    - `custom_fields` CustomField[]
      - `access_type` 'read_only' | 'read_write': What the connector permits on an integration field.
      - `bound_to` object, nullable: The connection filling this field and the path it reads. Null for a field nobody's connection fills, and null on this single-definition read, which does not look it up: the page read at `/variants/custom-fields` is where it is served.
        - `connection_id` string
        - `field_key` string
        - `source_path` string
      - `created_at` string, date-time, nullable
      - `description` string, nullable: What the field is for, where somebody wrote it down.
      - `field_type` 'string' | 'decimal' | 'integer' | 'boolean' | 'date': The type a value of this field must parse as.
      - `grain` 'product' | 'variant' | 'null', nullable: Which bag holds the values. Null where the definition does not say, which is every definition made before a field could be added from a connection.
      - `id` string: The field's id, which is what a variant's custom_fields map is keyed on.
      - `is_active` boolean: Whether the field is in use. An inactive field keeps its values and its history.
      - `is_editable` boolean: Whether the definition itself can be changed.
      - `is_value_editable` boolean: Whether values of this field can be written. Computed, never stored: true when source is `tightly`, otherwise true only when access_type is `read_write`.
      - `label` string: What a person calls the field. Falls back to the key humanised where nobody recorded one, so it is never null on a served row.
      - `name` string: The field's key: what its values are stored under, what a saved filter addresses as `custom_fields.<name>`, and what a family form lists. Print `label` instead.
      - `source` string: Where the field came from: `tightly` for one declared here, otherwise the connector that brought it.
      - `updated_at` string, date-time, nullable
      - `used_in` object, nullable: How many family forms and saved filters name this field. Two zeroes mean nothing reads it; null means it was not counted, which is every read but the page read at `/variants/custom-fields`.
        - `families` integer
        - `saved_filters` integer
    - `max_size` integer: Definitions matching the filters.
    - `offset` integer
    - `size` integer: Definitions in this page.
    - `total_active_integration` integer: Active fields a connector brought.
    - `total_active_tightly_specific` integer: Active fields declared in Tightly.
  - `message` object: severity, service and desc.

## Other responses

- `400`: offset or limit is outside its range, or filter_args is not valid JSON.
- `401`: No usable key: malformed, unknown, revoked, expired or stopped. One refusal covers all five, because telling a caller which is which maps the surface for them.
- `403`: The key may not reach this operation. `scope_missing` when the key does not hold Products; `ip_not_allowed` when the caller's address is outside the key's allowlist. `plan_excludes` when the organisation's plan does not include the public API itself, which is sold with Essentials and is asked of every key minted under that gate. A key minted before the gate existed is never refused by it, whatever the plan holds. Products is ungated, so that is the only plan reason served here.
- `429`: The key has spent its allowance for this minute. 600 reads and 120 writes a minute, counted per key, refused calls included. `Retry-After` says how long to wait.
- `503`: The database is briefly out of reach, which is what a failover or a full connection pool looks like from outside. Wait the seconds `Retry-After` names and send the request again. A read is safe to repeat. A write is not, because the connection was lost in the middle of it, so read the object back before sending it a second time. Branch on the status rather than on `code`, which is `POSTGRES_UNAVAILABLE` from one of the two seams that raise this and `SERVICE_UNAVAILABLE` from the other.

---

[API](https://skmtc.dev/tightly/apis/tightly-api.md) · [All operations](https://skmtc.dev/tightly/apis/tightly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tightly/apis/tightly-api/revisions/199f7eb35afb?raw)
