Create Folder Type

/folder_types

Create Folder Type [POST]

Create a new folder type.

Authorization: Admin

Request

Body
{
  "name": "Fire Equipment and Protection",
  "folderTypeCategoryId": 17,
  "defaultReportId": 98,
  "rowStatus": 1,
  "color": "78930f",
  "idPrefix": "AS",
  "iDCounter": "1000",
  "teamsIds": [509],
  "defaultFormTemplateIds": [4190, 4191],
  "coverHidden": true,
  "coverContent": "",
  "tableOfContentsHidden": false,
  "formIncompleteHidden": false,
  "formPrioritySummaryHidden": true,
  "formScoreSummaryHidden": false,
  "formPageBreakBetweenForms": true,
  "questionIfPriorityLessThanHidden": -1
}

Response 200

Body
{
  "item": {
    "id": 630,
    "name": "Fire Equipment and Protection",
    "color": "000000",
    "rowStatus": 1,
    "idPrefix": "PE",
    "idCounter": 3001,
    "folderTypeCategoryId": 295,
    "defaultReportId": 61,
    "defaultFormTemplateIds": [
      4190,
      4191
    ],
    "teamIds": [
      509
    ],
    "coverHidden": true,
    "coverContent": "",
    "indexHidden": true,
    "tableOfContentsHidden": false,
    "tableOfContentsPrioritiesHidden": true,
    "formIncompleteHidden": true,
    "formPrioritySummaryHidden": true,
    "formScoreSummaryHidden": true,
    "formIfPriorityLessThanHidden": -1,
    "formPageBreakBetweenForms": true,
    "questionColorAnswers": true,
    "questionIfPriorityLessThanHidden": -1,
    "customReport": false
  }
}

Response 422

Body
{
  "errors": {
    "name": [
      "Name is required"
    ],
    "defaultReportId": [
      "A default report is required",
      "default report does not exist"
    ],
    "color": [
      "is not hexadecimal value"
    ],
    [
    "rowStatus": [
      "must be a value of 1, 0, or -1"
    ],
    "folderTypeCategoryId": [
      "folder type category does not exist"
    ]
  }
}

Still need help? Contact Us Contact Us