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

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

const { data: optionTypes } = await client.optionTypes.list()
{
  "data": [
    {
      "id": "opt_UkLWZg9DAJ",
      "name": "foo-size-1",
      "label": "Size",
      "position": 1,
      "kind": "dropdown",
      "metadata": {},
      "filterable": true,
      "created_at": "2026-05-17T22:57:42.762Z",
      "updated_at": "2026-05-17T22:57:42.762Z"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 25,
    "count": 1,
    "pages": 1,
    "from": 1,
    "to": 1,
    "in": 1,
    "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

Bearer token for admin authentication

Query Parameters

page
integer

Page number

limit
integer

Number of records per page

q[name_cont]
string

Filter by name (contains)

expand
string

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

fields
string

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

Response

option types found

data
object[]
required
meta
object
required