CRUD operations for field group definitions via REST.
Creates and updates reject locked PRO field types when the current license does not allow them. Existing saved definitions are preserved for renewal, but value reads and post REST payloads filter unavailable PRO fields while the site is Free.
GET /fieldforge/v1/field-groups
List all field groups.
curl -s -u "$AUTH"
"https://example.com/wp-json/fieldforge/v1/field-groups"[
{
"id": 1,
"title": "Product Fields",
"fields": [
{
"key": "field_abc123",
"label": "Price",
"name": "price",
"type": "number",
"required": true
}
],
"location_rules": [
[{ "param": "post_type", "operator": "==", "value": "product" }]
],
"menu_order": 0,
"status": "publish",
"created_at": "2024-01-15 10:30:00",
"updated_at": "2024-03-20 14:22:00"
}
]POST /fieldforge/v1/field-groups
Create a new field group.
curl -s -X POST -u "$AUTH"
-H "Content-Type: application/json"
"https://example.com/wp-json/fieldforge/v1/field-groups"
-d '{
"title": "Event Details",
"fields": [
{ "key": "field_evt_date", "label": "Event Date", "name": "event_date", "type": "date_picker", "required": true },
{ "key": "field_evt_loc", "label": "Location", "name": "event_location", "type": "text" }
],
"location_rules": [
[{ "param": "post_type", "operator": "==", "value": "event" }]
]
}'{ "id": 5 }
PUT /fieldforge/v1/field-groups/{id}
Update an existing field group. Send the full updated object.
curl -s -X PUT -u "$AUTH"
-H "Content-Type: application/json"
"https://example.com/wp-json/fieldforge/v1/field-groups/5"
-d '{ "title": "Event Details (Updated)", "fields": [ ... ] }'{ "success": true }
DELETE /fieldforge/v1/field-groups/{id}
Delete a field group and its associated field values.
curl -s -X DELETE -u "$AUTH"
"https://example.com/wp-json/fieldforge/v1/field-groups/5"{ "success": true }
—