POST /api/v2/admin/field_groups
Create field group

Errors

Code Description
401 Unauthorized
500 Internal Server Error
422 Missing parameters

Examples

POST /api/v2/admin/field_groups
{
  "name": "Test_field_group"
}
200
{
  "field_group": {
    "id": 1,
    "name": "Test_field_group",
    "created_at": "2021-10-05T08:59:48.841Z",
    "updated_at": "2021-10-05T08:59:48.841Z",
    "group_type": "default"
  },
  "errors": []
}
POST /api/v2/admin/field_groups
{
  "name": "Test Field Not Authenticated"
}
401
POST /api/v2/admin/field_groups
{
  "name": "Test Field Default User"
}
401

Params

Param name Description
name
required

Field group name

Validations:

  • Must be a String

group_type
optional

Field group type

Validations:

  • Must be one of: default, complex.

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

POST /api/v2/admin/field_groups/:field_group_id
Update field group

Errors

Code Description
401 Unauthorized
500 Internal Server Error
422 Missing parameters

Examples

POST /api/v2/admin/field_groups/2
{
  "name": "swapped_name"
}
200
{
  "ok": "ok"
}
POST /api/v2/admin/field_groups/not-found-id
{
  "name": "swapped_name"
}
404
{
  "error": "Field group not found"
}
POST /api/v2/admin/field_groups/3
{
  "name": "swapped_name no auth"
}
401
POST /api/v2/admin/field_groups/4
{
  "name": "swapped_name default user"
}
401

Params

Param name Description
field_group_id
required

Field group ID

Validations:

  • Must be a String

name
required

Field group name

Validations:

  • Must be a String

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

POST /api/v2/admin/field_groups/:field_group_id/fields
Add field to field group

Errors

Code Description
401 Unauthorized
500 Internal Server Error
422 Missing parameters

Examples

POST /api/v2/admin/field_groups/8/fields
{
  "name": "test_field",
  "dropdown_options": [],
  "field_type": "textbox",
  "searchable": false,
  "read_only": true
}
200
{
  "ok": "ok"
}
POST /api/v2/admin/field_groups/not-found-id/fields
{
  "name": "test_field",
  "dropdown_options": [],
  "field_type": "textbox",
  "searchable": false,
  "read_only": true
}
404
{
  "error": "Field group not found"
}
POST /api/v2/admin/field_groups/not-found-id/fields
{
  "name": "test_field",
  "dropdown_options": [],
  "field_type": "textbox",
  "searchable": false,
  "read_only": true
}
401
POST /api/v2/admin/field_groups/not-found-id/fields
{
  "name": "test_field",
  "dropdown_options": [],
  "field_type": "textbox",
  "searchable": false,
  "read_only": true
}
401

Params

Param name Description
field_group_id
required

Field group ID

Validations:

  • Must be a String

name
required

Fields name

Validations:

  • Must be a String

field_type
required

Fields type

Validations:

  • Must be one of: date, textbox, textarea, rich_text, dropdown, boolean, datetime.

dropdown_options
required

Dropdown fields options

Validations:

  • Must be an array of Hash

searchable
required

Is field searchable

Validations:

  • Must be one of: true, false.

read_only
required

Is field read only

Validations:

  • Must be one of: true, false.

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

DELETE /api/v2/admin/field_groups/:field_group_id
Delete field group

Errors

Code Description
401 Unauthorized
500 Internal Server Error
422 Missing parameters

Examples

DELETE /api/v2/admin/field_groups/5
200
{
  "ok": "ok"
}
DELETE /api/v2/admin/field_groups/not-found-id
404
{
  "error": "Field group not found"
}
DELETE /api/v2/admin/field_groups/6
401
DELETE /api/v2/admin/field_groups/7
401

Params

Param name Description
field_group_id
required

Field group ID

Validations:

  • Must be a String

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

DELETE /api/v2/admin/field_groups/:field_group_id/fields/:field_id
Delete field from field group

Errors

Code Description
401 Unauthorized
500 Internal Server Error
422 Missing parameters

Examples

DELETE /api/v2/admin/field_groups/13/fields/3
200
{
  "ok": "ok"
}
DELETE /api/v2/admin/field_groups/14/fields/not-found-id
404
{
  "error": "Field not found"
}
DELETE /api/v2/admin/field_groups/15/fields/4
401
DELETE /api/v2/admin/field_groups/16/fields/5
401

Params

Param name Description
field_group_id
required

Field group ID

Validations:

  • Must be a String

field_id
required

Field ID

Validations:

  • Must be a String

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY

POST /api/v2/admin/field_groups/:field_group_id/fields/:field_id
Update field

Errors

Code Description
401 Unauthorized
500 Internal Server Error
422 Missing parameters

Examples

POST /api/v2/admin/field_groups/9/fields/2
{
  "name": "new_field_name",
  "field_type": "textbox",
  "dropdown_options": [],
  "searchable": false,
  "read_only": true
}
200
{
  "ok": "ok"
}
POST /api/v2/admin/field_groups/10/fields/not-found-id
{
  "name": "new_field_name",
  "field_type": "textbox",
  "dropdown_options": [],
  "searchable": false,
  "read_only": true
}
404
{
  "error": "Field not found"
}
POST /api/v2/admin/field_groups/11/fields/not-found-id
{
  "name": "new_field_name",
  "field_type": "textbox",
  "dropdown_options": [],
  "searchable": false,
  "read_only": true
}
401
POST /api/v2/admin/field_groups/12/fields/not-found-id
{
  "name": "new_field_name",
  "field_type": "textbox",
  "dropdown_options": [],
  "searchable": false,
  "read_only": true
}
401

Params

Param name Description
field_group_id
required

Field group ID

Validations:

  • Must be a String

field_id
required

Field ID

Validations:

  • Must be a String

name
required

Field Name

Validations:

  • Must be a String

dropdown_options
optional

Dropdown menu options

Validations:

  • Must be an array of Hash

searchable
optional

Is the field searchable

Validations:

  • Must be one of: true, false.

read_only
optional

Is the field read only

Validations:

  • Must be one of: true, false.

Headers

Header name Description
Content-Type
required
application/json
X-API-KEY
required
YOUR_API_KEY