Through this EndPoint you can associate an existing spare part in Fractal to a warehouse.

EndPoint
https://app.fracttal.com/api/inventories_associate_warehouse

Method POST

Input Parameters

Parameter

Type of field

Required

Description

code

Text

Yes

Spare part code

code_warehouse

Text

Yes

Warehouse code to which the spare part will be associated. You can send the code or the warehouse id. You don’t need both

id_warehouse

Text

Yes

Id of the warehouse to which the spare part will be associated. You can send the code or the warehouse id. You don’t need both

stock

Real

Optional

Existence of the spare part in the warehouse. It only applies to integrated warehouses (By default the value is 0).

unit_cost_stock

Real

Optional

Unit cost of the spare part within the warehouse. It only applies to integrated warehouses (By default the value is 0).

max_stock_level

Entire

Optional

Maximum stock of the spare part in the warehouse. By default it’s 1. (This value is only informative to generate alerts within Fracttal)

min_stock_level

Entire

Optional

Minimum stock of the spare part in the warehouse. By default it’s 0. (This value is only informative to generate alerts within Fracttal)

location

Text

Optional

Location

Ouput Parameters

Parameter

Type of field

Description

code

Text

Spare part code

description

Text

Spare part description

field_1

Text

Spare part name

field_2

Text

Part Number

field_3

Text

Manufacturer

field_4

Text

Model

field_5

Text

Group 1

field_6

Text

Group 2

warehouses

Array Json

Array with the information of the warehouses to which the spare part is associated

Example Petition (POST):
URL: https://app.fracttal.com/api/inventories_associate_warehouse

Body:

{ 
"code": "0001010000102283",
"code_warehouse": "FTTL-COP",
"stock": 50,
"unit_cost_stock": 1000,
"max_stock_level":20,
"min_stock_level":3
}

Example response:
Body:

{ 
"success": true,
"message": "200",
"data": {
"id": 611,
"description": "ACEITE BESLUX (SM) SERIAL MARCA MODELO { 0001010000102283 }",
"field_1": "ACEITE BESLUX (SM)",
"field_2": "SERIAL",
"field_3": "MARCA",
"field_4": "MODELO",
"field_5": "PROVEEDOR",
"field_6": "0100-LUBRICANTES,ACEITES,ADITIVOS Y OTROS",
"warehouses": [
{
"id_warehouse": 18,
"location": "",
"max_stock_level": 20,
"min_stock_level": 3,
"reorder_level": 1,
"stock": 50,
"stock_temp": 0,
"unit_cost_stock": 1000,
"code_warehouse": "FTTL-COP"
},
{
"id_warehouse": 4,
"location": null,
"max_stock_level": null,
"min_stock_level": null,
"reorder_level": null,
"stock": 0,
"stock_temp": 0,
"unit_cost_stock": 3560.43,
"code_warehouse": "BOG_INTG"
}
]
},
"total": 1

Did this answer your question?