Query work request

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

ParameterTypeRequiredDescription
codeTextOptionalRequest id. Can be found in this same endpoint, field id_code
sinceTextOptionalQuery start date. Format: 'YYYY-MM-DDTHH:MM:SS-UTC' Example: '2016-07-12T20:00:00-03'.
untilTextOptionalQuery end date. Format: 'YYYY-MM-DDTHH:MM:SS-UTC' Example: '2016-07-12T20:00:00-03'.
type_dateTextOptionalDate type used to filter the query. Can be:
ValueDescription
dateRequest creation date (default value)
date_incidentIncident date
date_solutionRequest solution date
id_statusTextOptional

Work request status id. Available values are:

1 - Open
2 - In process
3 - Operating system in process
4 - Resolved without WO
5 - Cancelled
6 - Resolved with WO
7 - Waiting for a WO
8 - WO under review
9 - WO cancelled
10 - Waiting for another WO
11 - Request removed from Pending Tasks
12 - Rejected
13 - Created from the Guest Portal

code_creatorTextOptionalCode 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_itemTextOptionalCode of the asset/item associated with the request (code field of items_log).
identifierTextOptionalReference
pageIntegerOptionalPage number to query.
startIntegerOptionalRecord 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.
limitIntegerOptionalNumber of records the request will return. Default value is 100.

Note on code_creator and code_item

Both filters use NULLIF internally — an empty string is treated as not sent (no filtering applied). code_creator can come back NULL in the response when the creator is a third party or when the request originated from the Guest Portal, since contacts_log has no code field.

Output Parameters

ParameterField TypeDescription
id_codeTextRequest id
dateUTC-0 DateRequest creation date
is_urgentTextTrue if the request is urgent, false otherwise
descriptionTextRequest description
ratingTextRequest rating
rating_notesTextApplication rating notes
observationTextRequest notes
date_solutionUTC-0 DateSolution date
types_descriptionTextGroup
items_descriptionTextAsset associated with the request
date_statusTextDate of the last status change
requests_x_status_notesTextStatus change note
requests_x_status_descriptionTextDescription of the current status
accounts_nameTextUser who created the request
accounts_emailTextEmail of the user who created the request
requests_x_key_words_descriptionsTextSorted key words
wo_folioTextId of the WO related to the request
date_incidentUTC-0 DateIncident date
parent_descriptionTextLocation of the asset associated with the request
requests_x_status_accounts_nameTextName of the person who made the last status change request
requested_byTextRequested by
types_1_descriptionTextClassification 1
types_2_descriptionTextClassification 2
identifierTextReference
geolocationTextGeolocation
id_companyIntegerInternal id of the company (multi-tenancy)
id_work_orderIntegerInternal id of the work order generated from the request, if any. See wo_folio for the visible folio
id_typeIntegerInternal id of the request type. See types_description
id_itemIntegerInternal id of the asset/item associated with the request
id_requests_x_statusIntegerInternal id of the history record that originated the current status
id_type_1IntegerInternal id of classification 1. See types_1_description
id_type_2IntegerInternal id of classification 2. See types_2_description
id_personnel_logIntegerInternal 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_logIntegerInternal 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_accountIntegerInternal id of the user account of the request creator
id_userIntegerId of the staff member or contact who created the request, as applicable
id_group_taskIntegerInternal id of the task group associated with the asset/item
id_item_logIntegerInternal id of the historical record of the asset/item associated with the request
id_priorityIntegerInternal id of the priority of the associated asset/item
id_cost_centerIntegerInternal id of the cost center of the associated asset/item
id_groupIntegerInternal id of the (base level) group of the asset/item
id_group_1IntegerInternal id of the level 1 group of the asset/item
id_group_2IntegerInternal id of the level 2 group of the asset/item
id_relatedTextId of an element related to the request. May come back empty
status_path_imageTextURL of the icon associated with the current status
requests_x_key_words_id_key_wordsArray of integersIds of the key words associated with the request. Complements requests_x_key_words_descriptions
types_colorTextColor associated with the request type, in hexadecimal format
priorities_descriptionTextDescription of the priority of the associated asset/item
code_itemTextCode of the asset/item associated with the request
costs_center_descriptionTextDescription of the cost center of the associated asset/item
groups_descriptionTextDescription of the (base level) group of the asset/item
groups_1_descriptionTextDescription of the level 1 group of the asset/item
groups_2_descriptionTextDescription of the level 2 group of the asset/item
requests_x_status_third_parties_nameTextName of the third-party contact who recorded the last status change, if applicable
annotationsObjectInternal annotations associated with the request, in JSON format. Structure subject to change
parent_path_nodeTextHierarchical path of the parent location/node of the associated asset/item
code_creatorTextCode 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_maintenanceUTC-0 DateMaintenance date associated with the request
visible_to_allBooleanIndicates whether the associated asset/item is visible to all users
email_requested_byTextEmail of the requester, as a free-text field (independent of accounts_email)
from_guest_portalBooleanIndicates 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
}
Path Params
string
required
Response
200
Language
LoadingLoading…