API Endpoints
Fracttal →

Create purchase orders

Through this EndPoint you can create a purchase order to a warehouse.

A purchase order is made within a warehouse and it is mandatory that the assets that are being associated are part of the warehouse.

When making integration purchase orders, the following characteristics must be taken into account:

  • The currency or currency with which the PO is generated is the one associated by default with the company - The conditions are automatically selected from the supplier information chosen.

Input parameters

ParameterTypeRequiredDescription
warehouse_codeTextyesWarehouse Code
bodyJSONOptionalJSON with the necessary information for the creation of the PO

Body parameters

ParameterTypeRequiredDescription
documentTextYesPurchase order reference
code_third_partyTextOptionalSupplier code of the purchase order (Third party supplier or service provider in Fracttal)
description_cost_centerTextOptionalDescription of the cost center. (It is not necessary to send it if the value of the cost center is sent).
value_cost_centerTextOptionalCost center code. (It is not necessary to send it if the cost center description is sent).
dateTextOptionalDate of delivery. Must be sent in the format 'YYYYY-MM-DD'. If this field is not entered, the default is the time the purchase order was created in Fracttal.
id_priorityIntegerOptional1: Very High 2: High 3: Medium 4: Low 5: Very Low
descriptionTextOptionalPurchase order notes
itemsArray de JsonYes
ParameterType of fieldDescription
codeTextCode of the item to be associated in the purchase order (must be associated to the warehouse)
tax_nameTextTax name
qtyTextRequired quantity
unit_costRealUnit cost. Must have the tax associated with it applied
total_costRealTotal Cost.Must be the multiplication of the quantity and unit cost
.

Output parameters

ParámetroTipoDescripción
idIntegerId of the movement
dateDateDelivery date
descriptionTextDescription of the entry.
documentTextReference
id_third_partyTextid of the third party
third_parties_nameTextName of third party
third_parties_codeTextThird party code
id_cost_centerTextCost Center Id
costs_center_descriptionTextDescription of the Cost Center
costs_center_valueTextCost center value
folio_sourceTextSource warehouse movement ID
folio_targetTextDestination warehouse movement ID
date_createTextDate of creation of the movement
id_priorityTextId Priority
priorities_descriptionTextPriority
id_currencyNumberCurrency id
currency_descriptionTextCurrency description
currency_symbolTextCurrency symbol
currency_symbolTextCurrency symbol
movements_states_descriptionTextDescription of the movement status

Example:

Request: (POST) https://app.fracttal.com/api/warehouse_purchase_orders/1254

{
    "document":"OC_325",
    "code_third_party":"00063960000109",
    "cost_center": "Activos",
    "date":"2019-10-22",
    "id_priority":"2",
    "description":"Nota de OC mediante integración",
    "items":[
	     {
	    	"code":"DEST01",
                "qty": "9",
                "unit_cost":5000,
                "tax_name": "IVA"
	     },
	     {
	    	"code":"0005010000100222",
                "qty": "15",
                "unit_cost":9800,
                "tax_name": "IVA"
	     }	
    ]
   
}
{
    "success": true,
    "message": "200",
    "data": {
        "id": "30",
        "date": "2019-10-22",
        "description": "Nota de OC mediante integración",
        "document": "OC_325",
        "id_third_party": 225,
        "third_parties_name": "Walmart ",
        "third_parties_code": "00063960000109",
        "id_cost_center": 5,
        "costs_center_description": "Activos",
        "costs_center_value": "456465",
        "folio_source": null,
        "folio_target": "30",
        "date_create": "2019-10-22T20:00:28.868832+00:00",
        "id_priority": 2,
        "priorities_description": "HIGH",
        "id_currency": 4,
        "currency_description": "Peso Colombiano",
        "currency_symbol": "$",
        "movements_states_description": "NOT_DELIVERED",
        "movement_details": [
            {
                "id_item": 168,
                "items_description": "VIDRIO OSCURO PARA CARETA SOLDADOR N°12    { 0005010000100222 }",
                "code": "0005010000100222",
                "qty": 15,
                "unit_cost": 98700,
                "total_cost": 1761800,
                "tax_name": "IVA",
                "tax_rate": 19
            },
            {
                "id_item": 16,
                "items_description": "Destornillador    { DEST01 }",
                "code": "DEST01",
                "qty": 9,
                "unit_cost": 5000,
                "total_cost": 53550,
                "tax_name": "IVA",
                "tax_rate": 19
            }
        ]
    },
    "total": 1
}

Test It

Language