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

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

const customField = await client.products.customFields.get('prod_UkLWZg9DAJ', 'cf_AbC123XyZ')
{
  "id": "cf_UkLWZg9DAJ",
  "label": "Title",
  "type": "Spree::Metafields::ShortText",
  "field_type": "short_text",
  "key": "custom.title",
  "value": "wool",
  "created_at": "2026-06-17T13:37:40.061Z",
  "updated_at": "2026-06-17T13:37:40.061Z",
  "storefront_visible": true,
  "custom_field_definition_id": "cfdef_UkLWZg9DAJ"
}

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

Path Parameters

product_id
string
required
id
string
required

Query Parameters

expand
string

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

fields
string

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

Response

200 - application/json

custom field found