Create a custom field

Creates a new custom field. The custom fields app is installed automatically if not already installed.

post/custom-fields

Request

  • Base URL
    https://api.ecommerceapi.uk/v1
  • URL
    https://api.ecommerceapi.uk/v1/custom-fields
  • Auth
    HTTP basic

Request body

namestring required

Name of the custom field (max 40 characters, only letters, digits, and underscores).

typestring

Type of the custom field. Defaults to 'text'. Valid values: text, toggle, choice, list, date, date_time, value_list, product_list.

labelstring

Label of the custom field.

itemTypestring required

Item type associated with the custom field. Valid values: product, category, brand, order, page, blog_post.

sortOrderinteger

The display order of the custom field.

allowedValuesstring[]

Allowed values for value_list (max 20 values), only for choice and list types.

Response

Custom field created successfully.

idinteger

Unique identifier for the custom field.

namestring

Name of the custom field (max 40 characters, only letters, digits, and underscores).

typestring

Type of the custom field. Valid values: text, toggle, choice, list, date, date_time, value_list, product_list.

labelstring

Label of the custom field.

itemTypestring

Item type associated with the custom field. Valid values: product, category, brand, order, page, blog_post.

sortOrderinteger

The display order of the custom field.

allowedValuesstring[]

Allowed values for value_list (max 20 values) only for choice and list types.

Changes

No recorded changes to this operation across all 1 revision of this API.