Skip to main content
PATCH
Spree Admin SDK

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

id
string
required

Body

application/json
namespace
string

Defaults to custom.

key
string
label
string

Human-readable name; defaults to the titleized key.

field_type
string

Custom field type token (short_text, long_text, rich_text, number, …). An extension type that has no token is named by its registered class instead.

Example:

"short_text"

resource_type
string

Shorthand of the resource the field attaches to, from the resource types endpoint.

Example:

"product"

storefront_visible
boolean

When false, the definition is admin-only and never exposed in the Store API.

searchable
boolean

Include values in storefront product text search. Supported for short_text, long_text and number fields; other types are refused.

sortable
boolean

Allow storefront product listings to sort by this field (sort=cf_{namespace}_{key}). Supported for short_text and number fields; other types are refused.

Response

200 - application/json

definition updated