Create an asset and associate it with a warehouse

Through this endpoint, you can create an item as spare parts and supplies and associate it with a warehouse (when the warehouse code is sent to the web service).

Input Parameters

The following information must be sent in the request body.

ParameterTypeRequiredDescription
codeTextYesItem code
field_1TextYesItem name
id_type_itemNumberNoType of asset to be created:
3 = Tool
4 = Spare parts and supplies (Default value when this field is not sent)
field_2TextOptionalItem part number
field_3TextOptionalItem manufacturer
field_4TextOptionalItem model
field_5TextOptionalOther 1 of the item
field_6TextOptionalOther 2 of the item
groups_descriptionTextOptionalType
groups_1_descriptionTextOptionalClassification 1
groups_2_descriptionTextOptionalClassification 2
code_warehouseTextOptionalWarehouse code to which the item will be associated. If not provided, the item will be created but not associated with a warehouse. Can be consulted here. (code field)
id_warehouseIntegerNoWarehouse ID where the item will be associated. If not provided, the item will not be associated with a warehouse. Can be consulted here. (id field)
barcodeTextOptionalItem barcode
locationTextOptionalPhysical location of the item
max_stock_levelRealOptionalMaximum stock allowed in the warehouse
min_stock_levelRealOptionalMinimum stock allowed in the warehouse
stockRealYesCurrent stock (If the warehouse is not integrated, this field is optional and its value will be 0.)
unit_cost_stockRealOptionalItem cost (default value is 0 for integrated warehouses. If the warehouse is not integrated, the value for this field will be 0.)
unit_codeTextYesUnit code
unit_descriptionTextYesUnit description
visible_to_allBooleanOptionalAsset visible to all. Default is false
code_parent_locationTextOptionalLocation
notesTextOptionalNotes

Output Parameters

ParameterTypeDescription
idIntegerID of the item to delete
codeTextItem code
descriptionTextConcatenation of fields field_1 to field_6
id_warehouseIntegerWarehouse ID where the item is located
locationTextPhysical location of the item
max_stock_levelIntegerMaximum stock allowed in the warehouse
min_stock_levelIntegerMinimum stock allowed in the warehouse
reorder_levelFloatQuantity to order
stockIntegerCurrent stock
unit_cost_stockFloatItem cost

Example:

Request: (POST)https://app.fracttal.com/api/inventories

{
    "code": "ITEM-001-ALM-001",
    "field_1": "Tire",
    "field_2": "R16 Y70",
    "field_3": "Dunlop",
    "field_4": "RM340",
    "code_warehouse": "ALM-RUBEN",
    "id_warehouse": null,
    "unit_code": "UND",
    "unit_description": "UND",
    "max_stock_level": 150,
    "min_stock_level": 20,
    "stock": 100,
    "unit_cost_stock": 1500
}
{
    "success": true,
    "message": "200",
    "data": {
        "id": 30697368,
        "id_company": null,
        "code": "ITEM-001-ALM-001",
        "description": " Tire { ITEM-001-ALM-001 }",
        "id_type_item": 4,
        "id_group": null,
        "id_group_2": null,
        "notes": null,
        "min_stock_warning": null,
        "weight": null,
        "id_unit": 20,
        "is_serial_control": false,
        "is_tool": false,
        "active": true,
        "barcode": null,
        "field_1": "Tire",
        "field_2": "R16 Y70",
        "lead_time": null,
        "id_custom_field_group": null,
        "path_image": null,
        "id_parent": null,
        "id_priority": null,
        "id_group_1": null,
        "id_group_task": null,
        "id_cost_center": null,
        "field_3": "Dunlop",
        "field_4": "RM340",
        "is_changed": true,
        "field_5": null,
        "field_6": null,
        "import_code": null,
        "total_replacement_cost": null,
        "salvage_value": null,
        "purchase_date": null,
        "total_cost": null,
        "anual_depreciation": null,
        "startup_date": null,
        "id_third_party": null,
        "id_budget": null,
        "latitude": null,
        "longitud": null,
        "id_items_import": null,
        "visible_to_all": false,
        "hours_average_daily_use": null,
        "parent_description": null,
        "path_node": null,
        "statistics": null,
        "public_qr": null
    },
    "total": 1
}
Response
200
Language
LoadingLoading…