01
Order API
Kao-Order — Orders endpoints
The Orders API enables creating and managing orders for the Kao-Order module. All endpoints are protected by the auth:api middleware.
🔐
Requires a valid Bearer token in the
Authorization header.
02
List Orders
Get a list of all orders
GET
/api/kao-order/orders/index
List all orders
▶
Request
cURL
GET /api/kao-order/orders/index
Response (200)
JSON
{
"status": "success",
"data": [ /* array of orders */ ]
}03
Get Order
Get a single order by ID
GET
/api/kao-order/orders/show/{id}
Retrieve order
▶
Request
| Param | Type | Required | Description |
|---|---|---|---|
| id | int | Yes | Order ID |
Response (200)
JSON
{ "status":"success", "data": { /* order */ } }04
Create Order
Create a new order
POST
/api/kao-order/orders/store
Create order
▶
Request Body
JSON
{
"client_id": "string",
"email": "string",
"phone": "string",
"country": "string",
"order_date": "YYYY-MM-DD",
"requested_arrival_date": "YYYY-MM-DD",
"ex_factory_date": "YYYY-MM-DD",
"po": "string",
"grade": "string",
"packaging": "string",
"qty": "string",
"delivery_address": "string",
"customer": "string",
"mode_of_transport": "string"
}Response (201)
JSON
{ "status":"success", "message": "Order created successfully", "data": { /* order */ } }05
Update Order
Update an order by ID
PUT
/api/kao-order/orders/update/{id}
Update order
▶
Request
JSON
{ /* fields to update */ }Response (200)
JSON
{ "status":"success", "message": "Order updated successfully", "data": { /* order */ } }06
Delete Order
Delete an order by ID
DEL
/api/kao-order/orders/delete/{id}
Delete order
▶
Request
| Param | Type | Required | Description |
|---|---|---|---|
| id | int | Yes | Order ID |
Response (200)
JSON
{ "status":"success", "message": "Order deleted successfully" }