Through this API you can create an asset in Fracttal.
You must bear in mind that the amount of assets that you can create is limited by the plan your company has contracted.
EndPoint
https://app.fracttal.com/api/items
Method POST
Input Parameters in the Body
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 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, otherwise false. (False value by default) |
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 | Asset code where is it located or is part of |
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 | Cost Center Description |
budgets | Text | Optional | Total cost of straight line depreciation |
id_custom_field_group | Number | Optional | Id custom field group |
Configurable input parameters that vary according to 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 | yes | name | name | name | name | name |
field_2 | Text | Optional | Address | Maker | Part number | Part number | Maker |
field_3 | Text | Optional | City | Modelo | 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 sending with the additional values that you want to insert. Do not send the parameters that aren’t mandatory in white.
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 the inserted item |
total | Number | Number of records inserted (Will always be 1) |
Example:
Petition: (POST) https://app.fracttal.com/api/items
Body
{
"id_type_item":2,
"code":"EQM028",
"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",
"is_changed":"false"
}
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": "REFRIGERADOR DE VACUNAS",
"field_2": "SAMSUNG",
"lead_time": null,
"path_image": null,
"field_3": "C13 D",
"field_4": "001827",
"is_changed": false,
"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
}