Creates a new public field configuration, making a field or attribute accessible to storefront clients.
Request
POST /publicfield
Headers
| Header | Value |
|---|---|
Authorization | Bearer <token> |
Content-Type | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
field | string | No | ID of a known index field (as returned by /aggregation/fields). When supplied, fieldId, fieldName, and fieldType are derived automatically. |
fieldId | string | No | Manual field identifier. Used when field is not provided. |
fieldName | string | No | Manual human-readable name. Used when field is not provided. |
fieldType | string | No | Manual field type: field or attribute. Used when field is not provided. |
onListingPage | boolean | No | Expose this field on listing pages. Defaults to false. |
onDetailPage | boolean | No | Expose this field on detail pages. Defaults to false. |
onLandingPage | boolean | No | Expose 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"
}
