insertPurchaseOrder
WRITECreate a new purchase order with all business logic - generates sequence, creates supplier interaction, resolves payment/shipping defaults from supplier. LLM can create a PO with just supplierId..
POST /api/v1/purchasing/insertPurchaseOrder
curl -X POST '<your-host>/api/v1/purchasing/insertPurchaseOrder' \
-H 'Authorization: Bearer <api-key>' \
-H 'Content-Type: application/json' \
-d '{
"supplierId": "string"
}'Response
{
"id": "string",
"purchaseOrderId": "string"
}Parameters
ParameterType
"Purchase""Return""Outside Processing"
"Draft""Planned""Needs Approval""To Review""To Receive""To Receive and Invoice""To Invoice""Completed""Rejected""Closed"
Input schema
schema
{
"type": "object",
"properties": {
"supplierId": {
"type": "string"
},
"purchaseOrderId": {
"type": "string"
},
"purchaseOrderType": {
"type": "string",
"enum": [
"Purchase",
"Return",
"Outside Processing"
]
},
"locationId": {
"type": "string"
},
"status": {
"type": "string",
"enum": [
"Draft",
"Planned",
"Needs Approval",
"To Review",
"To Receive",
"To Receive and Invoice",
"To Invoice",
"Completed",
"Rejected",
"Closed"
]
},
"currencyCode": {
"type": "string"
},
"orderDate": {
"type": "string"
},
"supplierContactId": {
"type": "string"
},
"supplierLocationId": {
"type": "string"
},
"supplierQuoteId": {
"type": "string"
},
"receiptRequestedDate": {
"type": "string"
},
"supplierReference": {
"type": "string"
},
"notes": {},
"externalNotes": {},
"customFields": {}
},
"required": [
"supplierId"
]
}