Skip to main content

Create Purchase Order

Endpoint: POST /purchase-orders

Authentication: Bearer Token (required)

Headers

NameTypeRequiredDescription
AuthorizationstringYesBearer token for authentication. Format: Bearer <token>
Content-TypestringYesMust be application/json

Request Body

The request body must be a JSON object with the following structure:

FieldTypeRequiredDescription
statusstringYesPurchase order status. Must be "PENDING"
currencyStringstringYesISO 4217 currency code (e.g., "USD", "EUR", "ZAR")
companyIdStringstringYesUUID of the company placing the purchase order
supplierIdStringstringYesUUID of the supplier for the purchase order
itemsarray of objectsYesArray of line items in the purchase order
chargesarray of objectsNoArray of additional charges for the purchase order

Items Object

FieldTypeRequiredDescription
itemCodestringYesUnique code identifying the item
qtynumberYesQuantity of the item being ordered
unitPricenumberYesUnit price of the item in the specified currency
amountnumberYesTotal amount for the line item (qty × unitPrice)

Charges Object

FieldTypeRequiredDescription
amountnumberYesCharge amount in the specified currency

Example Request Body

{
"status": "PENDING",
"currencyString": "USD",
"companyIdString": "{{companyId}}",
"supplierIdString": "{{supplierId}}",
"items": [
{
"itemCode": "{{itemCode}}",
"qty": {{qty}},
"unitPrice": {{unitPrice}},
"amount": {{amount}}
}
],
"charges": [
{
"amount": {{charge}}
}
]
}