Through this EndPoint you can create 2 types of warehouse issues:
Output by a WO: When the output is generated from the resources requested in a material requisition generated by a WO.
General type: when you associate the spare parts that you want to deduct from the warehouse.
Both warehouse issues will generate the total delivery of the requested resources.
To generate an issue by a WO, it is mandatory to have the information of the warehouse, the requisition, the TO and that the requisition has pending deliveries. In case any of the items of the requisition are managed by serial, the "items" parameter (array) must be sent with all the information of the items that will be part of the output.
To generate a general output it is mandatory to have the warehouse information, the transaction reference, send the type of movement, and the array of items to be associated.
The optional information that can be added to the output is the code or description of the cost center and the notes of the warehouse output. It is necessary to take into account that the information of an existing cost center in Fracttal must be sent.
Body Parameters
Parameter | Type | Required | Description |
---|---|---|---|
warehouse_code | Text | Yes | Warehouse Code |
wo_folio | Text | Yes | Id of the work order with the associated requisition |
id_movement | Text | Yes (only for OT type outputs) | Material Requisition Id |
id_movement_type | Number | Yes | Type of output to be performed: 4: OT output (default value) 5: General Output |
responsible_code | Text | Yes | Code of the human resource responsible for the stock removal. It must be an existing human resource in Fracttal. |
document | Text | Yes (For General type outputs) | Transaction reference. |
items | Array Json | Yes (For General type outputs or for OTs with serial controlled items) | Json array, with the information of the items to be associated to the output. The values that each item must have are: { "code":string, "id_type_item": int, "qty": real, "serial_numbers": array of texts } "id_type_item", is the type of asset. It can be: 3: Tools 4: Spare and supply "serial_numbers", applies only for serial controlled items. |
date | Text | Optional | Delivery date. Default is the current date in UTC-0 |
description | Text | Optional | Notes on stock removal |
description_cost_center | Text | Optional | Cost Center Description. Must exist in Fracttal |
value_cost_center | Text | Optional | Value of the cost center. Must exist in Fracttal. It is only necessary to send one of the 2: the description_cost_center or the value_cost_center. |
Output parameters
Parameter | Type | Description |
---|---|---|
date | Date | Delivery date |
description | Text | Note assigned to the output |
document | Text | Work order |
date_create | Date | Date of creation |
description | Text | Description of the entry. |
items | json | Information on the items that were associated with the output and to which full delivery was made |
Body
{
"warehouse_code":"1254",
"wo_folio":"1109",
"id_movement":"109",
"responsible_code":"3457899",
"description":"Salida de almacén mediante API",
"description_cost_center":"Activos"
}
{
"success": true,
"message": "200",
"data": {
"date": "2019-07-24",
"description": "Salida de almacén API",
"document": "1109",
"id_cost_center": 5,
"id_responsible": 53,
"folio_source": "109",
"folio_target": null,
"date_create": "2019-07-24T13:04:24.235573+00:00",
"items": {
"id_movement": 378,
"id_company": 69,
"qty": 1,
"unit_cost": 5000,
"total_cost": 5000,
"id": 460,
"qty_pending": 1,
"id_item_log": 171,
"id_taxes": 1,
"item_status": 1,
"items_description": "Martillo { MART01 }"
}
},
"total": 1
}
Example:
OT output (serialized items): Request: https://app.fracttal.com/api/warehouse_outputs_orders/
{
"warehouse_code":"BD_SERIAL",
"wo_folio":"OT-1737",
"id_movement":"25",
"responsible_code":"AP87757",
"description":"Salida de almacén mediante API",
"items":[
{
"code":"CLL0976",
"id_type_item":4,
"qty":2,
"serial_numbers":["85564","98756"]
}
]
}
{
"success": true,
"message": "200",
"data": {
"id": 425748,
"id_company": 69,
"id_movement_type": 4,
"id_warehouse_source": 1642,
"id_warehouse_target": null,
"date": "2021-09-14",
"description": "Salida de almacén mediante API",
"document": "OT-1737",
"id_third_party": null,
"id_cost_center": null,
"id_responsible": 86,
"folio_source": "25",
"folio_target": null,
"id_movement_state": 2,
"id_priority": null,
"date_create": "2021-09-14T04:23:19.062941+00:00",
"id_condition": null,
"id_currency": null,
"exchange_value": null,
"id_work_orders_tasks": null,
"id_movement_reference": null,
"id_accounts_log": null,
"approved": null,
"approved_comment": null,
"is_input": null,
"id_currency_iso": null,
"approval_date": null,
"items": [
{
"id_movement": 425748,
"id_company": 69,
"qty": 2,
"unit_cost": 666.4000244140625,
"total_cost": 1332.8,
"id": 995244,
"qty_pending": 0,
"id_item_log": 656215,
"id_taxes": 1,
"item_status": 1,
"items_description": "CUCHILLA ABB { CLL0976 }"
}
]
},
"total": 1
}
Example General Output:
{
"warehouse_code":"1254",
"responsible_code":"7845123",
"description":"Salida de almacén mediante API",
"description_cost_center":"Activos",
"document":"OUTGOING",
"date":"2021-05-10",
"id_movement_type":5,
"items":[
{
"code":"HERRA01",
"id_type_item":3,
"qty":2
},
{
"code":"09877",
"id_type_item":4,
"qty":1
}
]
}
{
"success": true,
"message": "200",
"data": {
"id": 186592,
"id_company": 69,
"id_movement_type": 5,
"id_warehouse_source": 2,
"id_warehouse_target": null,
"date": "2021-05-10",
"description": "Salida de almacén mediante API",
"document": "OUTGOING",
"id_third_party": null,
"id_cost_center": 5,
"id_responsible": 7,
"folio_source": null,
"folio_target": null,
"id_movement_state": 2,
"id_priority": null,
"date_create": "2021-06-11T19:14:42.224853+00:00",
"id_condition": null,
"id_currency": null,
"exchange_value": null,
"id_work_orders_tasks": null,
"id_movement_reference": null,
"id_accounts_log": null,
"approved": null,
"approved_comment": null,
"is_input": null,
"id_currency_iso": null,
"id_warehouse": null,
"items": [
{
"id_movement": 186592,
"id_company": 69,
"qty": 1,
"unit_cost": 4590,
"total_cost": 4590,
"id": 450042,
"qty_pending": 1,
"id_item_log": 306,
"id_taxes": 1,
"item_status": 1,
"items_description": "ABRAZADERA 1/4 R16 Y70 Dunlop RM340 { ITM-002 }"
},
{
"id_movement": 186592,
"id_company": 69,
"qty": 1,
"unit_cost": 4800,
"total_cost": 4800,
"id": 450043,
"qty_pending": 1,
"id_item_log": 401,
"id_taxes": 1,
"item_status": 1,
"items_description": "NIPLE DE 3\" { 0002020000201612 }"
}
]
},
"total": 1
}
Test It