PATCH /failures/{failure}

Update Failure

This endpoint allows you to update a Failure

Operation ID: updateFailure
lock This endpoint requires a Bearer token in the Authorization header.

Path Parameters

Name Type Description
failure required
path
string

The Failure ID

Request Body

Content-Type: application/json

problem_id integer

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

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

1 2 3 4
client_id integer

ID of the client associated to the Failure

local_id integer

ID of the location associated to the Failure

supplier_id integer

ID of the supplier associated to the Failure

cost_center_id integer

ID of the associated CostCenter

gatekeeper_id integer

ID for the associated Gatekeeper

gatekeeper_notification array<integer>

A set of notifications IDs to be dispatched under Gatekeeper.

last_status_description string

Observation for closing Failure action

external_id string

Id of the failure in the external system

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

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

paused_reason_id integer

ID of the paused reason associated to the Failure

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

ID of the supplier associated to the Failure

signature_status string

Indicates whether the Failure is signed or not

SIGNED NOT_SIGNED
last_status_change_date string (date-time) 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 (date-time) read-only
updated_at string (date-time) read-only
date_deleted string (date-time) read-only
relationships object
approvedBy object
data object
type string read-only
operator
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
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
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
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