POST /failures

Create a Failure

This endpoint allows you to create a Failure.

  • problem_id: refers to the type of problem. First, you need to retrieve the problem areas (GET /problems). Then, list the sub-problems from the desired area (GET /problems/{problem_id}/subproblems) and, from the response, use the respective problem_id.
  • local_id: refers to the location (GET /locations) related to the Failure. It can't be of type "building" neither "location-folder", this is, only of type "location".
Operation ID: createFailure
lock This endpoint requires a Bearer token in the Authorization header.

Request Body

Content-Type: application/json · Required fields: client_id, problem_id, priority, local_id

problem_id integer required

ID of the associated problem. Refers to the type of Problem and need to be a Problem Type, not a Problem Area. To get the Problem Types, first, you need to retrieve the Problem Areas (GET `/problems`). Then, list the Problem Types from the desired area (GET `/problems/{problem_id}/subproblems`) and, from the response, use the respective `problem_id`.

description string

A more detailed description of the reported incident.

Example: The bathroom light needs replacement

observations string

A longer description or anything with longer text that needs to be reported.

priority integer required

Failure priority number, being 1 the lowest priority and 4 the highest priority.

1 2 3 4
client_id integer required

ID of the client associated to the Failure

local_id integer required

ID of the location associated to the Failure

operator_id integer write-only

ID of the operator that owns the Failure. By default, uses the ID of the Operator associated to the API token.

report_type string

Type of the Failure's reporter. The failure can be reported by an Operator or by a Contact.

contact operator
report_id integer write-only

ID of the operator or contact who reported the Failure

supplier_id integer

ID of the supplier associated to the Failure

gatekeeper_id integer

ID for the associated Gatekeeper

cost_center_id integer

ID of the associated CostCenter

include_automatic_assignees boolean

If is to append automatic assignees when a user select a custom list of assignees

enforce_nfc boolean

Whether the asset's NFC tag must be scanned to execute the tasks of this work order. Only administrators and managers decide this field. A value sent by any other role is ignored rather than rejected. What is stored depends on the entity's `enforce-nfc` extension. With it configured as required, a value sent by an administrator or a manager is honoured and omitting the field stores `true`. Otherwise the field is ignored and the work order is created with `false`.

Responses

data object

Failure model structure details

id string required read-only

ID of the Failure

type string required read-only

Model type

failure
attributes object required
failure_id integer read-only

ID of the Failure

Example: 1

uuid string (uuid) read-only

Universally Unique Identifier for the Failure

problem_id integer

ID of the associated problem

status string read-only
WAITING_APPROVAL WAITING_RESOLUTION IN_RESOLUTION PAUSED COMPLETED ARCHIVED
start_date string (date-time) read-only

Example: 2020-08-28T08:48:00.000Z

completed_date string (date-time) | null read-only

Example: 2020-08-28T17:12:00.000Z

approved_date string (date-time) | null read-only

Example: 2020-08-28T09:30:00.000Z

paused_date string (date-time) | null read-only

Example: 2020-08-28T13:05:00.000Z

description string | null

Example: Needs replacement

last_status_description string

Example: Completed

observations string | null

Example: Needs a new part

code string

Example: WO2022

fts_vector string

Denormalized data of a Failure

priority integer

Failure priority number being 1 the lowest priority and 4 the highest priority.

1 2 3 4
client_id integer read-only

ID of the associated client defined according to the respective `local_id`.

entity_id integer read-only

ID of the Entity of the Failure

metering_registry_id integer | null read-only

ID of a possible associated metering registry

local_id integer

ID of the location associated to the Failure

pause_reason_id integer | null read-only

ID of the pause reason associated to the Failure. `null` when the Failure was never paused.

Example: 999

external_id string | null

External ID to be associated to the Failure

report_name string

Name of who reported the Failure

solved boolean read-only

Indicates whether the Failure was closed successfully or not

confirmed boolean read-only

Indicates whether the Failure is confirmed or not

started boolean read-only

Indicates whether the Failure is started or not

paused boolean read-only

Indicates whether the Failure is paused or not

completed boolean read-only

Indicates whether the Failure is completed or not

archived boolean read-only

Indicates whether the Failure is archived or not

approved boolean read-only

Indicates whether the Failure is approved or not

next_schedule string (date-time) | null read-only

Example: 2020-08-29T10:30:00.000Z

message_count integer

Example: 3

time_statistics object
approved_date string (date-time) | null read-only

Example: 2020-08-28T09:30:00.000Z

last_completed_date string (date-time) | null read-only

Example: 2020-08-28T17:12:00.000Z

last_paused_date string (date-time) | null read-only

Example: 2020-08-28T13:05:00.000Z

started_date string (date-time) | null read-only

Example: 2020-08-28T09:45:00.000Z

time_to_approve string | null read-only

Duration it took to approve the Failure since reported in `ISO8601` format.

Example: P0Y0M0DT0H42M0S

time_to_complete string | null read-only

Duration it took to complete the Failure since reported in `ISO8601` format.

Example: P0Y0M0DT8H24M0S

time_to_complete_after_started string | null read-only

Duration it took to complete the Failure since the resolution started in `ISO8601` format.

Example: P0Y0M0DT7H27M0S

time_to_start string | null read-only

Duration it took to start the Failure's resolution since reported in `ISO8601` format.

Example: P0Y0M0DT0H57M0S

time_to_start_after_approved string | null read-only

Duration it took to start the Failure's resolution since approved in `ISO8601` format.

Example: P0Y0M0DT0H15M0S

real_duration string | null read-only

Real duration of the Failure's resolution time in `ISO8601` format.

Example: P0Y0M0DT7H27M0S

supplier_id integer | null

ID of the supplier associated to the Failure

signature_status string

Indicates whether the Failure is signed or not

SIGNED NOT_SIGNED
enforce_nfc boolean

Whether the asset's NFC tag must be scanned to execute the tasks of this work order. Always present.

last_status_change_date string (date-time) | null read-only

Example: 2020-08-28T09:30:00.000Z

approved_by_id integer | null read-only

ID of the operator who approved the Failure.

completed_by_id integer | null read-only

ID of the operator who completed the Failure.

started_by_id integer | null read-only

ID of the operator who started the Failure's resolution.

paused_by_id integer | null read-only

ID of the operator who paused the Failure's resolution.

approved_by string | null read-only

Name of the operator who approved the Failure.

completed_by string | null read-only

Name of the operator who completed the Failure.

started_by string | null read-only

Name of the operator who started the Failure's resolution.

paused_by string | null read-only

Name of the operator who paused the Failure's resolution.

reported_by string | null read-only

Name of the operator who reported the Failure.

manpower_duration string | null read-only

Duration of the Failure's manpower time in `ISO8601` format.

Example: P0Y0M0DT7H27M0S

cost_center_id integer | null

ID of the cost center associated to the Failure

network_failure_id integer read-only

ID of the Network Failure

Example: 1

created_at string read-only
updated_at string read-only
relationships object
approvedBy object
data object
type string read-only
operator
id string read-only
assignees object

The Operators assigned to the Failure (only present when expanded in the Request)

data array<object>
type string read-only
failure_assignee
id string read-only
completedBy object
data object
type string read-only
operator
id string read-only
createdBy object
data object
type string read-only
operator
id string read-only
eventsPlanned object

The planned Events of the Failure (only present when expanded in the Request)

data array<object>
type string read-only
event
id string read-only
failure_elements object

The Elements of the Failure (only present when expanded in the Request). Archived equipment comes last; the others keep the order in which they were added to the Failure.

data array<object>
type string read-only
failure_element
id string read-only
files object
data array<object>
type string read-only
file
id string read-only
location object
data object
type string read-only
location
id string read-only
operator object
data object
type string read-only
operator
id string read-only
included array<union>

List of relationships to be included

id string required read-only

The unique string identifier of the Element record.

Example: 123

type string required read-only

The resource type. Always 'element' for Element records.

element

Example: element

attributes object required

An object containing the Element's attributes.

cost_center_id integer | null required

The ID of the Cost Center associated with this Element, if available.

Example: 758

type string required

The specific type of the Element. Allowing to identify if a Element is a equipment or local

LOCAL EQUIPMENT

Example: EQUIPMENT

archive_type string | null required read-only

Why the Element was archived. Null if not archived.

MANUAL NETWORK_SENDER_ARCHIVED NETWORK_SENDER_DELETED
archived_at string (date-time) | null required read-only

The timestamp when the Element was archived. Null if not archived.

barcode string | null required

The barcode value associated with the Element, if available.

Example: N123T

code string | null required

The assigned code or identifier for the Element, often used for quick reference.

Example: 123A

created_at string (date-time) required read-only

The timestamp when the Element record was created. This field uses the ISO 8601 format.

Example: 2019-06-22T17:26:27.000000Z

date_deleted string (date-time) | null required read-only

The timestamp when the Element was marked as deleted (soft delete). Null if not deleted.

element_id integer required read-only

The unique numeric identifier for the Element record (matches the top-level 'id').

Example: 123

element_uuid string (uuid) required read-only

The universally unique identifier (UUID) for the Element record.

Example: f81d4fae-7dec-11d0-a765-00a0c91e6bf6

entity_id integer required

The ID of the parent Entity this Element belongs to.

Example: 456

failures_count integer required read-only

A counter indicating the number of open Failures (Work orders) for this element.

Example: 0

has_bar_code boolean required

Flag indicating whether the Element has an associated barcode.

Example:

has_nfc boolean required

Flag indicating whether the Element is equipped with an NFC tag.

Example: 1

has_pmp boolean

Flag indicating whether the element has PMP (Preventive Maintenance Plan) * Only present when the query parameter `showHasPMP` is set to true

Example:

is_direct_page_accessible boolean required

Flag indicating whether the element is accessible from Direct pages.

Example: 1

is_from_network boolean required

Flag indicating whether the element is part of the Network feature (if it has been shared).

Example:

last_modified string | null required read-only

The timestamp of the last recorded modification or action related to the Element. This field uses the DATETIME format (YYYY-MM-DD HH:MM:SS).

Example: 2024-07-25 12:57:33

latitude number (float) | null required

The geographical latitude coordinate of the Element, if available.

Example: 41.1458

local_id integer | null required

The ID of the Local (Location) where this Element belongs.

Example: 445

longitude number (float) | null required

The geographical longitude coordinate of the Element, if available.

Example: 42.1458

maintenance_policy_id integer | null

The ID of the Maintenance Policy associated with this Element, if available.

Example: 659

matched_element object | null

The matched element associated with this element.

type string

The type of the matched element

LOCAL EQUIPMENT

Example: EQUIPMENT

code string

Code of the matched element

Example: ASSET.1.CODE

id integer

ID of the matched element

Example: 12

is_from_network boolean

Flag that indicates if the matched element is from network or not

Example:

metering array<object>

Element measurements in array format * Only available for the single-item element endpoint * Only present when the query parameter `showMeteringData` is set to true, and if there are any measurements. Otherwise, the field will not be sent

type string

The type of measurement

RANGE TEXT CUMULATIVE CATALOG AUDIT

Example: CATALOG

category_metering_id integer

The ID of the Category Metering associated with this measurement.

Example: 1

element_registry_id integer

The ID of the Element Registry associated with this measurement.

Example: 2

max_value number | null

The maximum value of this measurement

Example: 15

min_value number | null

The minimum value of this measurement

Example: 5

name string

Name of this measurement.

Example: Lorem

statistics union

Current measurement statistics

max string

The maximum value of this statistic

Example: 235

min string

The minimum value of this statistic

Example: 2

avg string

The average value of this statistic

Example: 109.17

stddev_samp string

The sample standard deviation of the metering readings. Indicates the data point spread around the average. Lower values mean data is closer to the average; higher values indicate a wider spread.

Example: 100.68

last_value string

The last value of this measurement was recorded

Example: option1

las_reading_time string

The date of the last value of this measurement was recorded

Example: 2021-11-24T15:25:25+00:00

unit string | null

Name of the type of measurement unit.

Example: UN

values array
nfc_code string | null required

The element's NFC tag code, if available.

Example: A123B

observation string | null required

Optional notes or observations recorded for the Element.

Example: Lorem ipsum dolor sit amet, consectetur adipiscing elit

updated_at string (date-time) required read-only

The timestamp when the Element record was last updated. This field uses the ISO 8601 format.

Example: 2025-01-31T12:34:48.000000Z

meta object
custom_fields object | null
id string required read-only

ID of the Failure Element

type string required read-only

Model type

failure_element
attributes object required
failure_id integer

ID of the Failure

element_id integer

ID of the Element

element_status integer

status of the Element

element_status_text string

description of the status of the Element

description string

description of the Element

relationships object
element object

The Element (only present when expanded in the Request)

data object
type string read-only
element
id string read-only
id string required read-only

ID of the File

type string required read-only

Model type

file
attributes object required
file_id integer read-only

File Id

file_uuid string read-only

File UUID

related_to string

Object which the File is related to

BUILDING CATEGORY CLIENT ELEMENT ELEMENT_REGISTRY FAILURE METERING_REGISTRY OPERATOR ORDER QUOTE QUOTE_REQUEST RECEIVED_QUOTE RECEIVED_QUOTE_REQUEST REQUEST SELL_ORDER SUPPLIER SCHEDULE_WORK WORK SCHEDULED_WORK PURCHASE PURCHASE_MATERIAL_LINE PURCHASE_SERVICE_LINE SALE
related_to_id integer

Relations Id

related_type string read-only

Object which the File is related to

BUILDING CATEGORY CLIENT ELEMENT ELEMENT_REGISTRY FAILURE METERING_REGISTRY OPERATOR ORDER QUOTE QUOTE_REQUEST RECEIVED_QUOTE RECEIVED_QUOTE_REQUEST REQUEST SELL_ORDER SUPPLIER SCHEDULE_WORK WORK
file_label_id integer | null

File Label Id

name string

File name

Example: my_example_file

thumb string | null read-only

URL to the thumbnail, in case the File is an image.

file_url string (uri) read-only

URL to the File

description string | null
expire_date string (date-time) | null read-only

Example: 2020-08-28T17:12:00.000Z

has_reminder boolean read-only
file_type string read-only

Internal type of the file

cad compressed file image office other pdf signature video
permission_to_technician boolean
permission_to_manager boolean
permission_to_direct boolean
extension string read-only
3gp 3gpp bin bmp cad csv doc docx gif jpeg jpg kmz mov mp4 odf odp pdf png ppt pptx qt rar txt xls xlsx zip
network_status string

Show the network status of the file.

SHARED RECEIVED NOT_SHARED
shared_with_supplier boolean

Show if the file is currently in a shared status with the supplier.

shared_with_client boolean

Show if the file is currently in a shared status with the client.

file_size integer read-only
created_at string | null read-only

Example: 2021-07-21 18:38:00

id string required read-only

ID of the Location

type string required read-only

Model type

location
attributes object required
entity_id integer
name string required

Location name

full_name string required read-only

Names of the location's parents concatenated by hyphen with location name.

code string required

Location code.

full_code string required read-only

Codes of the location's parents concatenated by dot with location code.

original_full_code string | null read-only

Location original full code.

observation string | null required

Additional information

date_updated string | null required read-only

Example: 2021-07-21 18:38:00

parent_id integer

ID of the location parent.

root_parent_id integer read-only

ID of the location root parent (of `type` equals to `building`).

area number | null

Location area

glass_area number | null

Location glass area

volume number | null

Location volume

orientation string | null

Solar orientation (North, South, West, East)

is_from_network boolean read-only

If Location is from network

local_uuid string (uuid) read-only

Location UUID

assets_count integer | null read-only

Cumulative count of assets (equipment) in this location and all its descendants. Only present when `with_assets_count=true` query parameter is provided.

associations array<string>

List of ways the operator is associated with this building. Possible values are `DIRECT` (via a direct local-operator assignment), `TEAM` (via a team the operator belongs to), and `CLIENT` (via a client the operator is assigned to).

relationships object
building object
data object
type string read-only
building
id string read-only
files object
data array<object>
type string read-only
file
id string read-only
operators object
data array<object>
type string read-only
operator
id string read-only
localOrientation object
data array<object>
type string read-only
localOrientation
id string read-only
id string read-only

ID of the Operator

type string read-only

Model type

operator
attributes object
operator_id integer read-only

ID of the Operator

operator_uuid string (uuid) read-only

Uuid of the Operator

full_name string
email string (email)
phone string | null
cellphone string | null
account string

Type of account which determines the access permission level.

admin manager technician operator reporter
language string
ar ca da_dk en es fr_fr pl_pl pt_br pt_pt ko zh_cn nl_nl de_de
cost_per_hour number

Example: 10

warehouse_id integer

ID of the warehouse associated to the Operator by default.

entity_id integer read-only
timezone string

Valid PHP timezone identifier. See the full list here: https://www.php.net/manual/en/timezones.php.

Example: Europe/Lisbon

is_from_network boolean
created_at string (date-time)
phone_country_code string

Example: US

is_first_web_login boolean | null read-only
status string
WORKING AVAILABLE OFFLINE

Example: WORKING

meta object
custom_fields object | null
status string
error
error object
properties object

Only present when related to property validation error

dev_message string

Example: Property validation error. Check the "properties" section in the response.

http_code integer
400
message string

Example: Property validation error.

more_info string
status string
error
error object
http_code integer
401
message string

Example: Authentication token invalid.

more_info string
status string
error
error object
http_code integer
403
message string

Example: Action unauthorized

more_info string
status string
error
error object
http_code integer
429
message string

Example: Too Many Requests.

more_info string
status string
error
error object
http_code integer
500
message string

Example: An error has occurred during the request.

more_info string