Skip to main content

Other APIs

General Description: The following APIs are used to perform status updates or delete purchase orders, including: approving orders, canceling orders, and deleting orders. All operations require identifying the order via order_code.


1. Approve Order

Endpoint: PUT /api/v6.1/purchase_order/approve

Description: Approve a pending order.

Body:

{
"order_code": "PO001"
}

Sample Response:

{
"message": "Successfully approved",
"data": {
"order_code": "PO001",
"status": "approved"
}
}

2. Cancel Order

Endpoint: PUT /api/v6.1/purchase_order/cancel

Description: Cancel a created order.

Body:

{
"order_code": "PO002"
}

Sample Response:

{
"message": "Order has been canceled",
"data": {
"order_code": "PO002",
"status": "canceled"
}
}

3. Delete Order

Endpoint: DELETE /api/v6.1/purchase_order

Description: Delete an order from the system.

Body:

{
"order_code": "PO003"
}

Sample Response:

{
"message": "Successfully deleted",
"data": {
"order_code": "PO003",
"deleted": true
}
}

Common Headers

Content-Type: application/json
X-API-KEY: <your-api-key>
Cookie: <your-session-cookie>

Notes

  • All APIs require authentication via API key and session cookie.
  • order_code is required in all cases.
  • If the order has already been processed, the system may reject the cancellation or deletion request.