Skip to main content
GET
/
api
/
v3
/
admin
/
custom_field_definitions
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'

const client = createAdminClient({
  baseUrl: 'https://your-store.com',
  secretKey: 'sk_xxx',
})

const { data: definitions } = await client.customFieldDefinitions.list({
  q: { resource_type_eq: 'Spree::Product' },
})
{
  "data": [
    {
      "id": "cfdef_UkLWZg9DAJ",
      "namespace": "specs",
      "key": "fabric",
      "label": "Title",
      "field_type": "short_text",
      "resource_type": "Spree::Product",
      "storefront_visible": true,
      "created_at": "2026-05-24T17:36:36.857Z",
      "updated_at": "2026-05-24T17:36:36.857Z"
    },
    {
      "id": "cfdef_gbHJdmfrXB",
      "namespace": "custom",
      "key": "order_notes",
      "label": "Order Notes",
      "field_type": "short_text",
      "resource_type": "Spree::Order",
      "storefront_visible": true,
      "created_at": "2026-05-24T17:36:36.857Z",
      "updated_at": "2026-05-24T17:36:36.857Z"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 25,
    "count": 2,
    "pages": 1,
    "from": 1,
    "to": 2,
    "in": 2,
    "previous": null,
    "next": null
  }
}

Documentation Index

Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Query Parameters

expand
string

Comma-separated associations to expand. Use dot notation for nested expand (max 4 levels).

fields
string

Comma-separated list of fields to include (e.g., key,label,field_type). id is always included.

Response

200 - application/json

definitions returned