When to use this. Style custom fields are the extra data points your brand defines in Admin
and then fills in on each style: fabric composition, fit, sustainability score, and so on.
They are set up once at the organisation level and then appear on every style that matches the
field’s brand/group/category restrictions. Use these endpoints to create and manage that field
catalogue and to bulk-update lifecycle states.
The workflow
Custom fields are admin data: aCompanyAdmin defines the fields, optionally restricts them to
certain brands, groups, or categories, and then users fill them in on individual styles. The
usual path is to create the field, verify it is visible on styles, and retire it when no longer
needed.
1
Create the field
POST /api/style-custom-fields with the field name, type, and position. The body is an
array: one or many fields are created in a single all-or-nothing transaction.2
Add allowed values (dropdown fields only)
For
allowedValue and nestedAllowedValue fields, include allowedValues in the create
body, or add them later via PUT /api/style-custom-fields/{id} (full replacement) or
PATCH /api/style-custom-fields/{id} (partial update).3
Browse and filter
GET /api/style-custom-fields to list fields by type, state, brand, group, or category.
Use cursor-based pagination for large catalogues. GET /api/style-custom-fields/{id} returns
one field with its allowed values and brand, group, and style category associations embedded.4
Retire fields
PUT /api/style-custom-fields (bulk) to flip states across multiple fields in one call: an
item sent with state: "deleted" is soft-deleted. DELETE /api/style-custom-fields/{id} to
soft-delete a single field (sets state to deleted). A field’s position is set on create
and cannot be changed through these endpoints.Walkthrough
Create a mandatory text field called “Fabric Composition” that suppliers can edit. The body is an array so you can create several fields in one request.id: updates
and deletes reference fields by it.
Field reference
The fields that matter most when creating or updating a style custom field:For a partial update,
PATCH /api/style-custom-fields/{id} accepts an RFC 6902 JSON Patch
document (Content-Type: application/json-patch+json). Only the paths you send are written;
every other field keeps its current value. A replace to null on userDefinedId or maxChar
clears it. When a patch touches allowedValues, associatedBrands, associatedGroups, or
associatedStyleCategories, the resulting array is the complete new set (an empty array
clears it), while a collection the patch does not touch is left as it is. position is
read-only, a patch that targets /id is rejected, and state: "deleted" is rejected: use
DELETE so the delete-time checks run.Roles & permissions
Managing style custom fields requires thecustom_fields permission on a designer (brand)
CompanyAdmin account. CompanyUser accounts can read the field catalogue but cannot create,
update, or delete fields. Supplier accounts have no access to the admin catalogue.
diffPerColor and diffPerSize depend on your organisation’s per-colour and per-size custom
field modules. Setting either without the matching module returns a 400, and a field cannot
differ per colour and per size at the same time.When things go wrong
Errors use the standard envelope (status: "error", a code, and error.details[]). See
Errors & responses for the full list of codes and how to resolve them.
Common cases:
- 400:
namewas omitted on create. - 400
validation_error.not_allowed:positionwas supplied on aPUT(single or bulk); it cannot be changed after create. - 400
business_rule_error.business_rule_failed:state=deletedsupplied onPUT {id}orPATCH {id}(useDELETEinstead). - 400 / 422: a
PATCHoperation targets/positionor a path the field does not have. - 403: the
{id}onGET,PUT, orPATCH /api/style-custom-fields/{id}belongs to a different organisation. - 404
resource_error.style_custom_field_not_found: the{id}does not exist (onGETandPATCH, also when the field has been deleted; onDELETE, also when it belongs to a different organisation). - 409: a
testoperation in aPATCHdocument failed. - 422: any other
PATCHoperation that cannot be applied to the field.
What to call next
Style categories
Scope custom fields to specific style categories for cleaner per-product-type layouts.
Size ranges
Set up the sizes used with
diffPerSize custom fields.Colours
Manage the colour library used with
diffPerColor custom fields.API reference
Full parameter reference for all style custom field endpoints.