put https://app.fracttal.com/api/items/:id
Using this API you can update any type of existing asset in Fracttal.
** Only the parameters that need to be updated should be sent.
Input parameters
Parameter | Type | Required | Description |
---|---|---|---|
code | Text | Required | Code ítem |
id_type_item | number | Required | Type of asset. Can be: 1:for Locations 2:for Equipment 3:for Tools 4:for Spare Parts and Supplies 5:for Digital |
active | Text | Optional | True if the asset is active, false otherwise. |
barcode | Text | Optional | Barcode |
notes | Text | Optional | Notes |
weight | Text | Optional | Weight |
is_serial_control | Boolean | Optional | True when it is a serial controlled item, false otherwise (False default value). |
group | Text | Optional | Type |
group_1 | Text | Optional | Classification 1 |
group_2 | Text | Optional | Classification 2 |
priorities | Text | Optional | Priority Description |
code_parent_location | Text | Optional | Code of the asset where it is located or is a part of |
latitude | Text | Optional | Latitude |
longitud | Text | Optional | Longitude |
unit_code | Text | Optional (If the asset type is Spare or supply it is mandatory) | Unit code |
unit_description | Text | Optional (If the asset type is Spare or supply it is mandatory) | Description of the unit |
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' Exemple:'2016-07-12T20:00:00-03'. |
total_cost | Text | Optional | Total cost |
startup_date | Text | Optional | Start date for depreciation. Formato: 'YYYY-MM-DDTHH:MM:SS-UTC' Example:'2016-07-12T20:00:00-03'. |
costs_center | Text | Optional | Description Cost center |
budgets | Text | Optional | Total straight-line depreciation cost |
Configurable input parameters to update that vary according to the type of asset:
Parameter | Type | Required | Description Locations (id_type_item = 1) | Description Equipments (id_type_item = 2) | Description Tools (id_type_item = 3) | Description Spares (id_type_item = 4) | Description Digital (id_type_item = 5) |
---|---|---|---|---|---|---|---|
field_1 | Text | yes | Name | Name | Name | Name | Name |
field_2 | Text | Optional | Address | Manufacturer | Part number | Part number | Manufacturer |
field_3 | Text | Optional | City | Model | Manufacturer | Manufacturer | 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 |
For the updating of the assets, you must send the mandatory fields and the parameters with the additional values you wish to insert. Do not send the parameters that are not mandatory in blank .
Output parameters
Parameter | Type | Description |
---|---|---|
success | Boolean | True if the insert was successful or false otherwise |
message | Text | 200 if successful |
data | Text | JSON with inserted item |
total | number | Number of records inserted (Always 1)200 if successful |
Example:
Petición: (PUT) https://app.fracttal.com/api/items/EQM028*
{
"id_type_item":2,
"field_1":"REFRIGERADOR DE VACUNAS",
"field_2":"SAMSUNG",
"field_3":"C13 D",
"field_4":"001827",
"field_5":"02 RACKS",
"field_6":"750X580X390",
"barcode":"123987123AAC",
"priorities":"Muy Alta",
"purchase_date":"2015-10-27T20:00:00-05",
"is_serial_control":"false",
"is_tool":"false",
"active":"true"
}
Test IT