Endpoint:POST /api/v3/purchase-orders
Purpose
Create a new purchase order to manage procurement processes by specifying order details, items, and quantities.
Use Case
This endpoint allows the creation of a purchase order for supplier management and inventory control. The purchase order records the transaction details, including the account ID, currency, and line items being ordered. It helps streamline procurement by tracking the items and quantities ordered from suppliers.
Request Data
{
"purchase_order": {
"id": "PO-ID",
"currency": "CURRENCY_CODE",
"purchase_order_note": "NOTE",
"account_id": "SUPPLIER_ACCOUNT_ID",
"price_tax_inclusive": "BOOLEAN_VALUE",
"lines": [
{
"item_id": "ITEM_ID",
"item_name": "ITEM_NAME",
"item_quantity": "ITEM_QUANTITY"
}
]
}
}
Response
The response provides details of the newly created purchase order, including order status, item details, and pricing information.
{
"purchase_order": {
"status": "STATUS",
"id": "PO-ID",
"currency": {
"uuid": "CURRENCY_UUID",
"name": "CURRENCY_NAME",
"link": "CURRENCY_LINK"
},
"subtotal": "SUBTOTAL_AMOUNT",
"tax": "TAX_AMOUNT",
"total": "TOTAL_AMOUNT",
"price_tax_inclusive": "BOOLEAN_VALUE",
"purchase_order_note": "NOTE",
"account_id": "ACCOUNT_ID",
"created_by": "CREATOR_NAME",
"created_on": "CREATION_TIMESTAMP",
"uuid": "PO_UUID",
"lines": [
{
"subtotal": "SUBTOTAL_AMOUNT",
"total": "TOTAL_AMOUNT",
"tax": "TAX_AMOUNT",
"item_uuid": "ITEM_UUID",
"item_id": "ITEM_ID",
"item_name": "ITEM_NAME",
"item_quantity": "ITEM_QUANTITY",
"item_price_snapshot": {
"pricing_rule": {
"price": "ITEM_PRICE"
}
}
}
]
}
}
Endpoint: POST/api/v3/purchase-orders/{id}/cancel
Purpose
This endpoint use to cancel an existing purchase order by marking it as inactive or terminated.
Use Case
This endpoint is used to cancel a specific purchase order identified by its unique ID. It is commonly utilized when a purchase order is no longer valid or required. The cancellation process ensures that no further actions or processing occur for the specified order.
Request Data
Field |
Type |
Description |
---|---|---|
id |
string |
The unique identifier of the purchase order. |
Response
This endpoint does not return any content in the response body upon a successful cancellation. It indicates that the cancellation process was completed successfully.
Endpoint: POST/api/v3/purchase-orders/{id}/reactivate
Purpose
Use this endpoint to reactivate a previously canceled or inactive purchase order, allowing it to resume its active status.
Use Case
This endpoint is used to bring a canceled or inactive purchase order back to an active state. It is commonly utilized when a purchase order needs to be reinstated for further processing or tracking.
Request Data
Field | Type | Description |
---|---|---|
id | string | The unique identifier of the purchase order. |
Response
This endpoint does not return any content in the response body upon successful reactivation. It indicates that the reactivation process for the specified purchase order was completed successfully.