Retrieve the work order labels catalog

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.


📘

Required add-on: general use. This endpoint does not require a specific add-on.

Input parameters

Sent within the body:

Required

ParameterTypeRequiredDescription
account_codeTextYesCode 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:

ParameterTypeDescription
successBooleantrue if the operation was successful.
messageTextHTTP response code.
totalIntegerNumber of labels returned.
dataArray of JSONArray of label objects.

Structure of each data object:

FieldTypeDescription
idIntegerUnique label identifier.
id_companyIntegerIdentifier of the company that owns the label.
descriptionTextName or description of the label.
colorTextLabel color in hexadecimal format (without #).
enabledBooleantrue if the label is enabled.

Validations and errors

  • 400account_code missing, null or empty.
  • 401 — Not authenticated or account not authorized as dispatcher.
  • 404account_code does 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}
  ]
}

Response
200
Language
LoadingLoading…