slug
(path) - Unique slug of the TypeField | Type | Required | Description |
---|---|---|---|
name | string | Yes | Field name (e.g., "Product Name") |
slug | string | Yes | Unique identifier of the field (e.g., "product_name") |
type | string | Yes | Field type: text , number , date , select , boolean , email , url |
required | boolean | No | Whether the field is required (default: false) |
defaultValue | string | No | Default value of the field |
options | object | No | Additional options (used for select fields) |
position | integer | No | Field position in the order |
active | boolean | No | Whether the field is active (default: true) |
{
"name": "Category",
"slug": "category",
"type": "select",
"required": true,
"options": {
"choices": ["electronics", "clothing", "home"]
},
"position": 3
}
curl --location --request POST 'https://api-develop.enspace.io/ws/types//fields' \
--header 'x-api-key: <api-key>' \
--header 'en-workspace: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "string",
"slug": "string",
"type": "text",
"required": false,
"config": {},
"order": 0
}'