Skip to main content
POST
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

Body

application/json
key
string
required
field_type
string
required

Custom field type identifier (one of the registered field-type class names).

resource_type
string
required

Owner class, e.g. Spree::Product

namespace
string

Defaults to custom

label
string

Human-readable name; defaults to titleized key

storefront_visible
boolean

When false, definition is admin-only (was display_on: back_end)

Response

201 - application/json

definition created