Create public field

Creates a new public field configuration, making a field or attribute accessible to storefront clients.

Request

POST /publicfield

Headers

HeaderValue
AuthorizationBearer <token>
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
fieldstringNoID of a known index field (as returned by /aggregation/fields). When supplied, fieldId, fieldName, and fieldType are derived automatically.
fieldIdstringNoManual field identifier. Used when field is not provided.
fieldNamestringNoManual human-readable name. Used when field is not provided.
fieldTypestringNoManual field type: field or attribute. Used when field is not provided.
onListingPagebooleanNoExpose this field on listing pages. Defaults to false.
onDetailPagebooleanNoExpose this field on detail pages. Defaults to false.
onLandingPagebooleanNoExpose this field on landing pages. Defaults to false.

Example Request

{
  "field": "price",
  "onListingPage": true,
  "onDetailPage": true,
  "onLandingPage": false
}

Response

Returns the created public field object.

Example Response

{
  "id": 3,
  "fieldId": "price",
  "fieldName": "Price",
  "fieldType": "field",
  "onListingPage": true,
  "onDetailPage": true,
  "onLandingPage": false,
  "user": "[email protected]",
  "changed": "2026-05-27T06:00:00+00:00"
}