PurchaseOrder object together with a PurchaseOrderItem array; optionally include a Payment object to record an immediate payment and a PurchaseOrderCustomField array. The only hard-required fields are PurchaseOrder.supplier_id and, for each line item, item, quantity and unit_price; most other fields are defaulted automatically (currency, date, number, store, branch).type and payment_status are set server-side and any client values for them are ignored. Whether the order is saved as a draft is controlled by the send query parameter, not a body field.{ "result": "successful", "code": 202, "id": <new id> }.curl --location --globoff 'https://.daftra.com/api2/purchase_orders.json?send=undefined' \
--header 'Accept: application/json' \
--header 'apikey: ' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"PurchaseOrder": {
"supplier_id": 45,
"currency_code": "USD",
"date": "30/06/2026"
},
"PurchaseOrderItem": [
{
"item": "Widget",
"quantity": 10,
"unit_price": 100,
"product_id": 12
}
]
}'{
"result": "successful",
"code": 202,
"id": 123
}