Through this API you can update any kid of existing asset in Fracttal.

EndPoint
https://app.fracttal.com/api/items/:code_item

:code_item = Asset code

Method PUT

Input Parameters in the Body

** Only the parameters that need to be updated must be sent

Parameter

Type of field

Required

Description

code

Text

Yes

Item code

id_type_item

Number

Yes

Asset type. Can be: 1 for Locations, 2 for Equipment, 3 for tools, 4 for spare parts, 5 for Digital

active

Text

Optional

True is the asset is active, false otherwise.

barcode

Text

Optional

Barcode

notes

Text

Optional

Notes

weight

Text

Optional

Weight

is_serial_control

Boolean

Yes

True when is an item controlled by serial

group

Text

Optional

Type

group_1

Text

Optional

Classification 1

group_2

Text

Optional

Classification 2

id_priority

Number

Optional

Id priority

1: Very Hight

2: Hight

3: Medium

4: Low

5: Very Low

code_parent_location

Text

Optional

Código del activo donde está ubicado o es parte de

latitude

Text

Optional

Latitude

longitud

Text

Optional

Length

unit_code

Text

Optional(If the type of asset is Spare Part or Supply, then it’s mandatory)

Unit code

unit_description

Text

Optional(If the type of asset is Spare Part or Supply, then it’s mandatory)

Unit description

visible_to_all

Boolean

Optional

True if the asset can be viewed by everyone in the company

purchase_date

Text

Optional

Date of purchase. Format: 'YYYY-MM-DDTHH:MM:SS-UTC' Example:'2016-07-12T20:00:00-03'.

total_cost

Text

Optional

Total cost

startup_date

Text

Optional

Start date for depreciation. Format: 'YYYY-MM-DDTHH:MM:SS-UTC' Example:'2016-07-12T20:00:00-03'.

costs_center

Text

Optional

Description Cost Center

budgets

Text

Optional

Total Cost of Straight Line Depreciation

Input parameters to update depending on the type of asset:

Parameter

field type

Required

Description Locations (id_type_item = 1)

Equipment Description (id_type_item = 2)

Description Spare parts (id_type_item = 3)

Description Tools (id_type_item = 4)

Digital Description (id_type_item = 5)

field_1

Text

Optional

Name

Name

Name

Name

Name

field_2

Text

Optional

Address

Maker

Part number

Part number

Maker

field_3

Text

Optional

Ciudad

Model

Maker

Maker

serial number

field_4

Text

Optional

Area code

serial number

Model

Model

Version

field_5

Text

Optional

Department / State / Region

Other 1

Other 1

Other 1

field_6

Text

Optional

Country

Other 2

Other 2

Other 2

Note: in order to create the assets, the mandatory fields and the parameters must be sent with the additional values that you want to insert. Do not send parameters that are not mandatory in blank.

Output parameters

Parameter

Type of field

Description

success

Boolean

True if the insert was successful or false otherwise

message

Text

200 if it was successful

data

Text

Json with inserted item

total

Number

Number of records inserted (It will always be 1)

Example:
Petition: (PUT) https://app.fracttal.com/api/items/EQM028

Body

{ 
"id_type_item":2,
"field_1":"VACCINE REFRIGERATOR",
"field_2":"SAMSUNG",
"field_3":"C13 D",
"field_4":"001827",
"field_5":"02 RACKS",
"field_6":"750X580X390",
"barcode":"123987123AAC",
"priorities":"Very high",
"purchase_date":"2015-10-27T20:00:00-05",
"is_serial_control":"false",
"is_tool":"false",
"active":"true"
}

Example Response:

{ 
"success": true,
"message": "200",
"data": {
"
"code": "EQM028",
"description": null,
"id_type_item": 2,
"notes": null,
"min_stock_warning": null,
"weight": null,
"id_unit": null,
"is_serial_control": false,
"is_tool": false,
"active": true,
"barcode": "123987123AAC",
"field_1": "VACCINE REFRIGERATOR",
"field_2": "SAMSUNG",
"lead_time": null,
"path_image": null,
"field_3": "C13 D",
"field_4": "001827",
"field_5": "02 RACKS",
"field_6": "750X580X390",
"import_code": null,
"total_replacement_cost": null,
"salvage_value": null,
"purchase_date": "2015-10-27",
"total_cost": null,
"anual_depreciation": null,
"startup_date": null,
"latitude": null,
"longitud": null,
"visible_to_all": false,
"hours_average_daily_use": null
},
"total": 0
}

Did this answer your question?