Create warehouse entry

Through this web service you can create an entry to a non-integrated Fracttal warehouse.

The parameter in the URL warehouse_code is the code of the warehouse where you want to make the entry. You can check it here. (field code)

The types of entries that can be made are: Purchase and Return

Entry for a purchase

  • A new purchase: In this type of entry you must send all the resources that will enter the warehouse with their respective quantities and prices. In this type of entry, the resources are assigned by default the tax that each company has selected as default.
  • A purchase that comes from a purchase order: for this type of entry you must send the ID of the purchase order created in the warehouse. A FULL OR PARTIAL entry can be made for the resources that are associated to the selected purchase order. If you want to make a partial entry, you must send the array with the code of items and quantities it will have. In the case of a Total entry, it is not necessary to send the items.

Entry by return

This type of entry is made when returning the materials that have been delivered by means of a stock removal. For this type of entry you must send the ID of the issue created in the warehouse. When using this type of entry, you can make a FULL OR PARTIAL entry of the resources associated with the issue. If you want to make a partial entry, you must send the array with the code of items and quantities that the entry will have. In the case of a Total entry, it is not necessary to send the items.

Example partial entry:

{
"movement_type":"2",
"is_from_movement":true,
"code_user": "25198772-2",
"document":"784",
"note":"Entrada desde una salida por integración",
"items":[
         {
           "code":"HERRA01",
           "qty": "1"
         }
 ]
}

When entries are made by integration it is mandatory to send the code of a human resource responsible for the transaction. This user must have a Fracttal account created.

When the entries are related to movements within the warehouse, the information of the supplier, cost center and currency will be automatically assigned from the source movement (either from a purchase order or an issue). In case you want to modify them, you must send the parameters in the web service.

Input parameters

Parameter Type Required Description
warehouse_code *Text* Yes Warehouse Code
body *JSON* Optional JSON with the necessary information for the creation of the entry

Body parameters

The following information must be sent in the body of the request.

Parameter Type Required Description
movement_type *Number* Yes Type of movement:
1 = Purchase
2 = Return
is_from_movement *Boolean* Optional True, in case you want to make an entry for an existing movement in Fracttal (purchase or exit order). False in the case of creating a new entry, manually entering the items. The default value is false.
document *Text* Yes Reference of the entry. If it comes from a purchase order or an output within Fracttal:
For purchase order you must send the *folio_target* of the purchase order. [You can check it here.](https://api.fracttal.com/reference/query-purchase-orders)
For return you must send the *document* of the issue. [You can check it here.](https://api.fracttal.com/reference/query-outbound-movements)

If it doesn't come from a movement, set a value of your choice.
code_user *Text* Yes Code of the user associated with the human resource responsible for the transaction. [You can check it here.](https://api.fracttal.com/reference/query-human-resources) (field *code*)
code_supplier *Text* Optional Code of the third party that is classified as a supplier. [You can check it here.](https://api.fracttal.com/reference/query-third-party) (field *code*)
value_cost_center *Text* Optional Cost center code. (It is not necessary to send it if the cost center description is sent). [You can check it here.](https://api.fracttal.com/reference/get-cost-centers-1) (field *value*)
description_cost_center *Text* Optional Description of the cost center. (It is not necessary to send it if the value of the cost center is sent). [You can check it here.](https://api.fracttal.com/reference/get-cost-centers-1) (field *description*)
note *Text* Optional Notes on the entry
items *Json Array* Yes
Parameter Type of field Required Description
code Text Yes Code of the resource to be add to the entry (must be associated with the warehouse)
qty Text Yes Quantity of the resource
unit_cost Real Yes Unit cost.
tax_name Text Optional Tax name. If not sent, the company's default tax is associated
serial_numbers Array of string Optional Only this information should be sent, when the associated resource is serial controlled. The same number of serial and number of resources must be sent

Detail of items objects

Parameter Type Description
code *Text* Item code. You can check it here. (field *code*)
qty *Number* Quantity in movement
unit_cost *Number* Unit cost

Output parameters

Parameter Type Description
folio_target *Integer* Id of the movement
date *date* Date of entry
description *Text* Note from the entry.
document *Text* Reference
id_third_party *Text* id of the third party
third_parties_name *Text* Name of third party
third_parties_code *Text* Third party code
id_cost_center *Text* Cost Center Id
costs_center_value *Text* Cost center value
costs_center_description *Text* Description of the Cost Center
folio_source *Text* Source warehouse movement ID
date_create *Text* Date of creation of the movement
id_priority *Text* Id Priority
priorities_description *Text* Priority
id_currency *Number* Currency id
currency_description *Text* Currency description
currency_symbol *Text* Currency symbol
movements_states_description *Text* Description of the movement status
movement_details *Json array* List of items that were associated with the entry

Examples

1. Example New Entry without associated transactions:

Request: (POST) https://app.fracttal.com/api/warehouse_entries_orders/002

{
    "movement_type":"1",
    "code_user": "25198772-2",
    "code_supplier":"terc-00123e3",
    "value_cost_center":"500000000",
    "document":"In_7456",
    "note":"Entry by integration",
    "items":[
    	{
    	    "code":"AFL_056",
            "qty": "5",
            "unit_cost":"135",
            "serial_numbers":["A5402","A5403","A5404","A5405","A5406"]
    	},
    	{
    	    "code":"4890255A-R1",
            "qty": "20",
            "unit_cost":"750"
        },
        {
    	    "code":"MMRVH6900",
            "qty": "8",
            "unit_cost":"42533"
        },
        {
    	    "code":"38079",
            "qty": "50",
            "unit_cost":"5794"
        }
    ]
}
{
    "success": true,
    "message": "200",
    "data": {
        "id": 3977,
        "folio_target": "MOV206ANTO",
        "date": "2019-10-18",
        "description": "Entry by integration",
        "document": "In_7456",
        "id_third_party": 2062,
        "third_parties_name": "adecco",
        "third_parties_code": "terc-00123e3",
        "id_cost_center": 421,
        "costs_center_description": "Fracttal 2019",
        "costs_center_value": "500000000",
        "folio_source": null,
        "date_create": "2019-10-18T17:13:50.008899+00:00",
        "id_priority": null,
        "priorities_description": null,
        "id_currency": 7,
        "currency_description": "PESO CHILENO",
        "currency_symbol": "$",
        "movements_states_description": "IN",
        "movement_details": [
            {
                "id_item": 5075,
                "items_description": "ACEITE VALVOLINE EURO  15W40 { 38079 } VALVOLINE",
                "code": "38079",
                "units_description": "LITROS",
                "qty": 50,
                "unit_cost": 5794,
                "total_cost": 344743,
                "tax_name": "IVA",
                "tax_rate": 19
            },
            {
                "id_item": 12437,
                "items_description": " FILTRO DE  MALLA HAGIE 690629 MMRVH6900  HYUNDAI { MMRVH6900 }",
                "code": "MMRVH6900",
                "units_description": "UNIDAD",
                "qty": 8,
                "unit_cost": 42533,
                "total_cost": 404914,
                "tax_name": "IVA",
                "tax_rate": 19
            },
            {
                "id_item": 5470,
                "items_description": "CORONA Y PIÑON EJE CORTO KIT 11X38 MFSerie 300 11X38 Fabricante { 4890255A-R1 }",
                "code": "4890255A-R1",
                "units_description": "UNIDAD",
                "qty": 20,
                "unit_cost": 750,
                "total_cost": 17850,
                "tax_name": "IVA",
                "tax_rate": 19
            },
            {
                "id_item": 122,
                "items_description": "AFLOJATODO  ACOMPA015 { AFL_056 } LUBRITEX S.A",
                "code": "AFL_056",
                "units_description": "Maquina",
                "qty": 5,
                "unit_cost": 135,
                "total_cost": 803.25,
                "tax_name": "IVA",
                "tax_rate": 19
            }
        ]
    },
    "total": 1
}

2. Example New Entry from a purchase order:

Request: (POST) https://app.fracttal.com/api/warehouse_entries_orders/002

{
    "movement_type":"1",
    "is_from_movement":true,
    "code_user": "25198772-2",
    "document":"OC34ANTO",
    "note":"Entry from purchase order by integration"
}
{
    "success": true,
    "message": "200",
    "data": {
        "id": 3998,
        "folio_target": "MOV224ANTO",
        "date": "2019-10-18",
        "description": "Entry from purchase order by integration",
        "document": "OC36ANTO",
        "id_third_party": 143,
        "third_parties_name": "FRACTTAL SPA",
        "third_parties_code": "036854",
        "id_cost_center": 22,
        "costs_center_description": "SUM3015",
        "costs_center_value": "",
        "folio_source": null,
        "date_create": "2019-10-18T19:27:07.279185+00:00",
        "id_priority": null,
        "priorities_description": null,
        "id_currency": 7,
        "currency_description": "PESO CHILENO",
        "currency_symbol": "$",
        "movements_states_description": "IN",
        "movement_details": [
            {
                "id_item": 5470,
                "items_description": "CORONA Y PIÑON EJE CORTO KIT 11X38  MFSerie 300 { 4890255A-R1 } Fabricante",
                "code": "4890255A-R1",
                "units_description": "UNIDAD",
                "qty": 45,
                "unit_cost": 980,
                "total_cost": 52479,
                "tax_name": "IVA",
                "tax_rate": 19
            },
            {
                "id_item": 20,
                "items_description": "LAINAS DE CALIBRACIÒN { 0000AC-21 }",
                "code": "0000AC-21",
                "units_description": "JUEGO",
                "qty": 5,
                "unit_cost": 6800,
                "total_cost": 40460,
                "tax_name": "IVA",
                "tax_rate": 19
            },
            {
                "id_item": 5075,
                "items_description": "ACEITE VALVOLINE EURO  15W40 { 38079 } VALVOLINE",
                "code": "38079",
                "units_description": "LITROS",
                "qty": 5,
                "unit_cost": 6894.86,
                "total_cost": 41024.4,
                "tax_name": "IVA",
                "tax_rate": 19
            }
        ]
    },
    "total": 1
}

Test It

Language