API Endpoints
Fracttal →

Create a warehouse output

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

ParameterTypeRequiredDescription
warehouse_codeTextYesWarehouse Code
wo_folioTextYesId of the work order with the associated requisition
id_movementTextYes (only for OT type outputs)Material Requisition Id
id_movement_typeNumberYesType of output to be performed: 4: OT output (default value) 5: General Output
responsible_codeTextYesCode of the human resource responsible for the stock removal. It must be an existing human resource in Fracttal.
documentTextYes (For General type outputs)Transaction reference.
itemsArray JsonYes (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.
dateTextOptionalDelivery date. Default is the current date in UTC-0
descriptionTextOptionalNotes on stock removal
description_cost_centerTextOptionalCost Center Description. Must exist in Fracttal
value_cost_centerTextOptionalValue 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

ParameterTypeDescription
dateDateDelivery date
descriptionTextNote assigned to the output
documentTextWork order
date_createDateDate of creation
descriptionTextDescription of the entry.
itemsjsonInformation 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

Language