get
https://app.fracttal.com/api/work_orders_labels/
This endpoint returns the complete catalog of enabled labels for the company of the authenticated dispatcher. Labels are used to classify work orders and are returned sorted alphabetically by their description. This is a read-only query and does not modify any information.
Input parameters
Sent within the body:
Required
| Parameter | Type | Required | Description |
|---|---|---|---|
account_code | Text | Yes | Code of the staff member with an active dispatcher account. Obtained from the code field in the personnel endpoint. It cannot be null or empty. |
Optional
None.
Output parameters
Successful response HTTP 200:
| Parameter | Type | Description |
|---|---|---|
success | Boolean | true if the operation was successful. |
message | Text | HTTP response code. |
total | Integer | Number of labels returned. |
data | Array of JSON | Array of label objects. |
Structure of each data object:
| Field | Type | Description |
|---|---|---|
id | Integer | Unique label identifier. |
id_company | Integer | Identifier of the company that owns the label. |
description | Text | Name or description of the label. |
color | Text | Label color in hexadecimal format (without #). |
enabled | Boolean | true if the label is enabled. |
Validations and errors
400—account_codemissing, null or empty.401— Not authenticated or account not authorized as dispatcher.404—account_codedoes not exist in personnel or has no active account.500— Internal system error.
Example:
Request: (GET) https://app.fracttal.com/api/work_orders_labels/
Body:
{
"account_code": "USR001"
}Response:
{
"success": true,
"message": "200",
"total": 3,
"data": [
{"id": 1001, "id_company": 5, "description": "Correctivo", "color": "FF0000", "enabled": true},
{"id": 1002, "id_company": 5, "description": "Preventivo", "color": "00FF00", "enabled": true},
{"id": 1003, "id_company": 5, "description": "Predictivo", "color": "0000FF", "enabled": true}
]
} 200