This EndPoint can be used to query information about all work requests or a specific one.
The "code" parameter in the URL is the request id. It can be found in this same endpoint, field id_code
GET https://app.fracttal.com/api/work_requests/{code}Input Parameters
| Parameter | Type | Required | Description | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
code | Text | Optional | Request id. Can be found in this same endpoint, field id_code | ||||||||
since | Text | Optional | Query start date. Format: 'YYYY-MM-DDTHH:MM:SS-UTC' Example: '2016-07-12T20:00:00-03'. | ||||||||
until | Text | Optional | Query end date. Format: 'YYYY-MM-DDTHH:MM:SS-UTC' Example: '2016-07-12T20:00:00-03'. | ||||||||
type_date | Text | Optional | Date type used to filter the query. Can be:
| ||||||||
id_status | Text | Optional | Work request status id. Available values are: 1 - Open | ||||||||
code_creator | Text | Optional | Code of the staff member who created the request (code field of personnel_log). Comes back NULL/empty if the creator is a third party or if the request comes from the Guest Portal (contacts_log has no code field). | ||||||||
code_item | Text | Optional | Code of the asset/item associated with the request (code field of items_log). | ||||||||
identifier | Text | Optional | Reference | ||||||||
page | Integer | Optional | Page number to query. | ||||||||
start | Integer | Optional | Record number where the query will start. Default 0. All queries are limited to 100 records; when there are more than that, use this parameter for pagination. | ||||||||
limit | Integer | Optional | Number of records the request will return. Default value is 100. |
Note oncode_creatorandcode_itemBoth filters use
NULLIFinternally — an empty string is treated as not sent (no filtering applied).code_creatorcan come back NULL in the response when the creator is a third party or when the request originated from the Guest Portal, sincecontacts_loghas nocodefield.
Output Parameters
| Parameter | Field Type | Description |
|---|---|---|
id_code | Text | Request id |
date | UTC-0 Date | Request creation date |
is_urgent | Text | True if the request is urgent, false otherwise |
description | Text | Request description |
rating | Text | Request rating |
rating_notes | Text | Application rating notes |
observation | Text | Request notes |
date_solution | UTC-0 Date | Solution date |
types_description | Text | Group |
items_description | Text | Asset associated with the request |
date_status | Text | Date of the last status change |
requests_x_status_notes | Text | Status change note |
requests_x_status_description | Text | Description of the current status |
accounts_name | Text | User who created the request |
accounts_email | Text | Email of the user who created the request |
requests_x_key_words_descriptions | Text | Sorted key words |
wo_folio | Text | Id of the WO related to the request |
date_incident | UTC-0 Date | Incident date |
parent_description | Text | Location of the asset associated with the request |
requests_x_status_accounts_name | Text | Name of the person who made the last status change request |
requested_by | Text | Requested by |
types_1_description | Text | Classification 1 |
types_2_description | Text | Classification 2 |
identifier | Text | Reference |
geolocation | Text | Geolocation |
id_company | Integer | Internal id of the company (multi-tenancy) |
id_work_order | Integer | Internal id of the work order generated from the request, if any. See wo_folio for the visible folio |
id_type | Integer | Internal id of the request type. See types_description |
id_item | Integer | Internal id of the asset/item associated with the request |
id_requests_x_status | Integer | Internal id of the history record that originated the current status |
id_type_1 | Integer | Internal id of classification 1. See types_1_description |
id_type_2 | Integer | Internal id of classification 2. See types_2_description |
id_personnel_log | Integer | Internal id of the historical record of the staff creator, when the creator is internal staff. Comes back empty if the creator is a third party |
id_contacts_log | Integer | Internal id of the historical record of the third-party contact creator, when the request comes from the Guest Portal. Comes back empty if the creator is internal staff |
id_account | Integer | Internal id of the user account of the request creator |
id_user | Integer | Id of the staff member or contact who created the request, as applicable |
id_group_task | Integer | Internal id of the task group associated with the asset/item |
id_item_log | Integer | Internal id of the historical record of the asset/item associated with the request |
id_priority | Integer | Internal id of the priority of the associated asset/item |
id_cost_center | Integer | Internal id of the cost center of the associated asset/item |
id_group | Integer | Internal id of the (base level) group of the asset/item |
id_group_1 | Integer | Internal id of the level 1 group of the asset/item |
id_group_2 | Integer | Internal id of the level 2 group of the asset/item |
id_related | Text | Id of an element related to the request. May come back empty |
status_path_image | Text | URL of the icon associated with the current status |
requests_x_key_words_id_key_words | Array of integers | Ids of the key words associated with the request. Complements requests_x_key_words_descriptions |
types_color | Text | Color associated with the request type, in hexadecimal format |
priorities_description | Text | Description of the priority of the associated asset/item |
code_item | Text | Code of the asset/item associated with the request |
costs_center_description | Text | Description of the cost center of the associated asset/item |
groups_description | Text | Description of the (base level) group of the asset/item |
groups_1_description | Text | Description of the level 1 group of the asset/item |
groups_2_description | Text | Description of the level 2 group of the asset/item |
requests_x_status_third_parties_name | Text | Name of the third-party contact who recorded the last status change, if applicable |
annotations | Object | Internal annotations associated with the request, in JSON format. Structure subject to change |
parent_path_node | Text | Hierarchical path of the parent location/node of the associated asset/item |
code_creator | Text | Code of the staff member who created the request. Comes back empty if the creator is a third party or if the request comes from the Guest Portal |
date_maintenance | UTC-0 Date | Maintenance date associated with the request |
visible_to_all | Boolean | Indicates whether the associated asset/item is visible to all users |
email_requested_by | Text | Email of the requester, as a free-text field (independent of accounts_email) |
from_guest_portal | Boolean | Indicates whether the request was created from the Guest Portal |
Example:
Request: (GET)https://app.fracttal.com/api/work_requests/381
{
"success": true,
"message": "200",
"data": [
{
"id_code": 385,
"date": "2016-11-30T19:44:07.361543+00:00",
"is_urgent": false,
"description": "AVERIA",
"rating": null,
"rating_notes": null,
"observation": "REAPRAR",
"date_solution": null,
"types_description": "Electricidad",
"items_description": "EQUIPO PARA EJEMPLO ",
"id_status": 7,
"date_status": "2016-11-30T19:45:24.225016+00:00",
"requests_x_status_notes": "REQUEST_TODO",
"requests_x_status_description": "REQUEST_TODO",
"accounts_name": "RICARDO ROMAN",
"accounts_email": "[email protected]",
"requests_x_key_words_descriptions": "Equipo Falla., Equipo en Cliente",
"wo_folio": null,
"date_incident": "2016-11-30T16:47:03",
"parent_description": "// AMERICA/ UBICACION DE EJEMPLO/ EQUIPO PARA EJEMPLO/ ",
"requests_x_status_accounts_name": "RICARDO ROMAN",
"requested_by": "RICARDO ROMAN",
"types_1_description": "EQUIPO FALLA",
"types_2_description": "CLASIFICACIÓN 2",
"identifier": "",
"geolocation": "{\"latitude\":-33.4213982,\"longitude\":-70.60434660000001,\"hour\":\"2016-11-30 4:47 PM\",\"address\":\"San Pío X 2449, Providencia, Región Metropolitana, Chile\"}",
"id_company": 3832,
"id_work_order": null,
"id_type": 12,
"id_item": 5021,
"id_requests_x_status": 771,
"id_type_1": 4,
"id_type_2": 9,
"id_personnel_log": 158,
"id_contacts_log": null,
"id_account": 942,
"id_user": 158,
"id_group_task": null,
"id_item_log": 5044,
"id_priority": 2,
"id_cost_center": 15,
"id_group": 100,
"id_group_1": 101,
"id_group_2": 102,
"id_related": null,
"status_path_image": "https://cdn.fracttal.com/status/icons/waiting.svg",
"requests_x_key_words_id_key_words": [12, 47],
"types_color": "#F4B400",
"priorities_description": "Media",
"code_item": "EQ-0042",
"costs_center_description": "Mantenimiento General",
"groups_description": "Planta Norte",
"groups_1_description": "Área Eléctrica",
"groups_2_description": "Subestación 2",
"requests_x_status_third_parties_name": null,
"annotations": null,
"parent_path_node": "1.4.12",
"code_creator": "RROMAN",
"date_maintenance": null,
"visible_to_all": true,
"email_requested_by": "[email protected]",
"from_guest_portal": false
}
],
"total": 1
}Example — filtering by creator and asset:
Request: (GET)https://app.fracttal.com/api/work_requests?code_creator=JCDIAZ&code_item=EQ-0042
{
"success": true,
"message": "200",
"data": [
{
"id_code": 3884,
"description": "PRUEBA ALEJANDRO DE ESTABILIDAD",
"items_description": "EQUIPO PARA EJEMPLO",
"id_status": 1
}
],
"total": 1
}Path Params
code — string — required
OpenAPI definition
{
"openapi": "3.1.0",
"info": {
"title": "solicitudes",
"version": "1-Es"
},
"servers": [
{
"url": "https://app.fracttal.com/api/work_requests"
}
],
"security": [
{}
],
"paths": {
"/{code}": {
"get": {
"summary": "Consulta de Solicitud",
"description": "Este EndPoint se puede utilizar para consultar información sobre todas las solicitudes de trabajo o alguna en especifico.",
"operationId": "consulta-de-solicitud",
"security": [],
"parameters": [
{
"in": "path",
"name": "code",
"schema": {
"type": "string"
},
"required": true
}
]
}
}
},
"x-readme": {
"headers": [],
"explorer-enabled": false,
"proxy-enabled": true
},
"x-readme-fauxas": true
} 200