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

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

const optionType = await client.optionTypes.update('ot_UkLWZg9DAJ', {
  label: 'Updated Label',
  option_values: [{ name: 'red', label: 'Crimson' }],
})
{
  "id": "opt_UkLWZg9DAJ",
  "name": "foo-size-7",
  "label": "Updated Label",
  "position": 1,
  "kind": "dropdown",
  "metadata": {},
  "filterable": true,
  "created_at": "2026-06-17T13:37:03.596Z",
  "updated_at": "2026-06-17T13:37:03.885Z"
}

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

Path Parameters

id
string
required

Option type ID

Body

application/json
name
string
Example:

"color"

label
string
Example:

"Color"

position
integer
Example:

1

filterable
boolean
Example:

true

option_values
object[]

Response

option type updated

id
string
required
name
string
required
label
string
required
position
number
required
kind
string
required
metadata
object
required
filterable
boolean
required
created_at
string
required
updated_at
string
required
option_values
object[]