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.

Parameter

Type

Required

Description

code

Text

Yes

Item code

field_1

Text

Yes

Item name

id_type_item

Number

No

Type of asset to be created: 3 = Tool 4 = Spare parts and supplies (Default value when this field is not sent)

field_2

Text

Optional

Item part number

field_3

Text

Optional

Item manufacturer

field_4

Text

Optional

Item model

field_5

Text

Optional

Other 1 of the item

field_6

Text

Optional

Other 2 of the item

groups_description

Text

Optional

Type

groups_1_description

Text

Optional

Classification 1

groups_2_description

Text

Optional

Classification 2

code_warehouse

Text

Optional

Warehouse 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_warehouse

Integer

No

Warehouse 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)

barcode

Text

Optional

Item barcode

location

Text

Optional

Physical location of the item

max_stock_level

Real

Optional

Maximum stock allowed in the warehouse

min_stock_level

Real

Optional

Minimum stock allowed in the warehouse

stock

Real

Yes

Current stock (If the warehouse is not integrated, this field is optional and its value will be 0.)

unit_cost_stock

Real

Optional

Item cost (default value is 0 for integrated warehouses. If the warehouse is not integrated, the value for this field will be 0.)

unit_code

Text

Yes

Unit code

unit_description

Text

Yes

Unit description

visible_to_all

Boolean

Optional

Asset visible to all. Default is false

code_parent_location

Text

Optional

Location

notes

Text

Optional

Notes

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
}
Language