post
https://app.fracttal.com/api/groups_tasks/
Create a new task plan by sending a description and an optional associated location.
Create a new task plan by sending the plan description and, optionally, an associated location.
Input parameters (Body)
Send the following parameters in the request body as JSON.
| Parameter | Type | Required | Description |
|---|---|---|---|
description | String | Yes | Task plan description. Must be 1–255 characters. Cannot be empty or contain only whitespace. |
id_location | Integer | Optional | Location ID from the catalog. If omitted, the plan is not restricted to a location. If provided, it must match a valid location. |
Output parameters
| Parameter | Type | Description |
|---|---|---|
success | Boolean | true if the operation was successful. |
message | String | HTTP code as a string ("201"). |
data.id | Integer | Unique generated ID of the task plan. |
data.description | String | Description of the created plan. |
data.id_location | Integer | Assigned location ID (null if not provided). |
data.task_number | Integer | Number of tasks associated with the plan, initialized as 0. |
data.assets_number | Integer | Number of linked assets, initialized as 0. |
data.is_active | Boolean | Active status of the plan (true by default). |
total | String | Total number of records created ("1"). |
Error codes
| Code | Condition |
|---|---|
400 Bad Request | description is empty, null, contains only whitespace, or exceeds 255 characters; id_location does not exist. |
401 Unauthorized | Bearer token is missing, expired, or invalid. |
403 Forbidden | User does not have the task manager role or higher. |
500 Internal Server Error | Database creation failed. |
Example
Request: POST https://app.fracttal.com/api/groups_tasks
{
"description": "Preventive maintenance for north sector pumps",
"id_location": 1
}Response:
{
"success": true,
"message": "201",
"data": {
"id": 385298,
"description": "Preventive maintenance for north sector pumps",
"id_location": 1,
"task_number": 0,
"assets_number": 0,
"is_active": true
},
"total": "1"
}Response without id_location
id_location{
"success": true,
"message": "201",
"data": {
"id": 385299,
"description": "General inspection plan",
"id_location": null,
"task_number": 0,
"assets_number": 0,
"is_active": true
},
"total": "1"
}TEST CONNECTION
200