Through this endpoint, you can perform inventory adjustments for spare parts and tools within the warehouse.
The parameter in the URL code is the code of the spare part and/or tool to modify. It can be consulted here. (field code)
Input Parameters
The following information must be sent in the request body.
Parameter | Type | Required | Description |
|---|---|---|---|
code | Text | Yes | Code of the spare part or tool. It can be consulted here. (field code) |
id_type_item | Integer | Optional | Asset type of the item to adjust: 3 = Tool 4 = Spare part and supply Only required if the asset code exists simultaneously as both spare part and tool. |
code_warehouse | Text | Optional | Code of the warehouse where the item is located (Do not send if id_warehouse is sent). It can be consulted here. (field code) |
id_warehouse | Integer | Optional | Warehouse ID where the item is located (Do not send if code_warehouse is sent). It can be consulted here. (field id) |
stock | Float | Yes (optional if unit_cost_stock is sent) | Current stock |
unit_cost_stock | Float | Yes (optional if stock field is sent) | Item cost |
min_stock_level | Float | Optional | Minimum stock |
max_stock_level | Float | Optional | Maximum stock |
Note: To update an item within a warehouse, you must send the stock, cost, or both data.
Output Parameters
| Parameter | Type | Description |
|---|---|---|
id | Integer | ID of the item record in the warehouse |
id_item | Text | Asset ID |
description | Integer | Asset description |
stock | Text | Quantity |
unit_cost_stock | Text | Cost |
min_stock_level | Float | Minimum stock |
max_stock_level | Float | Maximum stock |
is_serial_control | Boolean | Indicates if the item is serial controlled |
Example:
Request: (PUT)https://app.fracttal.com/api/inventories_adjustment/ACT.HERR-0014
{
"code_warehouse":"MRX-004",
"stock":8,
"unit_cost_stock":43,
"min_stock_level": 1,
"max_stock_level": 6
}{
"success": true,
"message": "200",
"data": {
"id": 1023193,
"id_company": 1190,
"id_item": 3297,
"description": "TECLE 1,5T PFAFF MANUAL 1,5TON 3MTS { ACT.HERR-0014 }",
"stock": 8,
"unit_cost_stock": 43,
"is_serial_control": false,
"min_stock_level": 1,
"max_stock_level": 6
},
"total": 1
}