Using 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's information.
EndPoint
https://app.fracttal.com/api/warehouse_purchase_orders/:warehouse_code
warehouse_code = Warehouse code
POST Method
Input Parameters
Parameter | Field type | Required | Description |
warehouse_code | Text | Yes | Warehouse Code |
body | JSON | Optional | JSON with the necessary information for the creation of the PO |
Body parameters
Parameter | Field type | Required | Description |
document | Text | Yes | Purchase order reference |
code_third_party | Text | Optional | Purchase order supplier code (Third party supplier or service provider type in Fracttal) |
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) |
value_cost_center | Text | Optional | Cost center code. (It is not necessary to send it if the cost center description is sent). |
date | Text | Optional | Delivery date. 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_priority | Integer | Optional | 1: Very High 2: High 3: Medium 4: Low 5: Very low |
description | Text | Optional | Purchase Order Notes |
items | Json Array | Yes | ParameterField typeDescriptioncodeTextItem code to be associated to the purchase order (must be associated to the warehouse)tax_nameTextName of the taxqtyTextQuantity Requestedunit_costRealUnit cost. Must have the tax associated with it appliedtotal_costRealCostTotal.must be the multiplication of the quantity and the unit cost. |
Output parameters
Parameter | Field type | Description |
id | Integer | Transaction ID |
date | date | Date of delivery |
description | Text | Description of the entry. |
document | Text | Reference |
id_third_party | Text | third party id |
third_parties_name | Text | Third party name |
third_parties_code | Text | Third Party Code |
id_cost_center | Text | Cost Center Id |
costs_center_description | Text | Cost center description |
costs_center_value | Text | Cost center value |
folio_source | Text | Source Warehouse Movement ID |
folio_target | Text | Movement ID of the destination warehouse |
date_create | Text | Date the movement was created |
id_priority | Text | Priority ID |
priorities_description | Text | Priority |
id_currency | Número | Currency id |
currency_description | Text | Currency description |
currency_symbol | Text | Currency symbol |
currency_symbol | Text | Currency symbol |
movements_states_description | Text | Description of movement status |
Example:
Example Request:
EndPoint: https://app.fracttal.com/api/warehouse_purchase_orders/1254
Body
{
"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"
}
]
}
RESPONSE
{
"success": true,
"message": "200",
"data": {
"id": "30",
"date": "2019-10-22",
"description": " PO Note by integration ",
"document": "OC_325",
"id_third_party": 225,
"third_parties_name": "Walmart ",
"third_parties_code": "00063960000109",
"id_cost_center": 5,
"costs_center_description": " Assets ",
"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": " Colombian Peso ",
"currency_symbol": "$",
"movements_states_description": "NOT_DELIVERED",
"movement_details": [
{
"id_item": 168,
"items_description": " DARK GLASS FOR WELDING HELMET N°12 { 0005010000100222 }",
"code": "0005010000100222",
"qty": 15,
"unit_cost": 98700,
"total_cost": 1761800,
"tax_name": "IVA",
"tax_rate": 19
},
{
"id_item": 16,
"items_description": " Screwdriver { DEST01 }",
"code": "DEST01",
"qty": 9,
"unit_cost": 5000,
"total_cost": 53550,
"tax_name": "IVA",
"tax_rate": 19
}
]
},
"total": 1
}