Orders API
Manage customer orders, track order status, process fulfillments, and handle returns. The Orders API provides comprehensive order management capabilities for your e-commerce operations.
Authentication
All API requests require authentication using Bearer token in the Authorization header and X-Tenant-Id header for tenant identification:
Authorization: Bearer YOUR_API_KEY
X-Tenant-Id: YOUR_TENANT_IDEndpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/partner/v1/orders | List orders |
| GET | /api/partner/v1/orders/{id}/detail | Get order details |
| POST | /api/partner/v1/orders/create | Create order |
| POST | /api/partner/v1/orders/update | Update order |
| POST | /api/partner/v1/orders/fulfillment/set-process | Set order to process |
| POST | /api/partner/v1/orders/fulfillment/set-packed | Set order packed |
| POST | /api/partner/v1/orders/fulfillment/ship | Set order to ship |
| POST | /api/partner/v1/orders/fulfillment/completed | Set order completed |
| POST | /api/partner/v1/orders/fulfillment/return | Set order return |
| POST | /api/partner/v1/orders/fulfillment/cancel | Cancel order |
| POST | /api/partner/v1/orders/fulfillment/approve-cancel | Approve cancellation request |
| POST | /api/partner/v1/orders/fulfillment/reject-cancel | Reject cancellation request |
| POST | /api/partner/v1/orders/fulfillment/shipping-label | Get shipping label |
| POST | /api/partner/v1/orders/tracking | Track orders |
| POST | /api/partner/v1/orders/fulfillment/set-process-packed | Process order packing asynchronously |
1. List Orders
Retrieve a paginated list of orders with filtering and sorting options.
Endpoint
POST /api/partner/v1/ordersRequest Description
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | Yes | Page number (default: 1) |
| per_page | integer | Yes | Items per page (default: 10, max: 100) |
| status | string | No | Filter by order status or "All" status |
| sort_by | string | No | Sort value (created_at, status) |
| sort_direction | string | Yes | Sort by (asc, desc) |
| created_from | string | No | Start created date (ISO 8601) |
| created_to | string | No | End created date (ISO 8601) |
Request Body
{
"status": "All",
"page": 1,
"size": 10,
"sort": "ASC"
}Response
Success Response (200 OK)
{
"status": 200,
"message": "Ok",
"data": {
"data": [
{
"order_header_id": 5,
"order_code": "ORD123",
"order_reference_id": "ABCD",
"internal_status": "In Process",
"external_status": "PROCESSED",
"store_platform": "offline",
"location_id": 1,
"warehouse_code": "ABCD",
"payment_method": "COD",
"logistic_provider_name": "Dethix",
"logistic_service_name": "Reguler",
"logistic_carrier": "Dethix Reguler",
"delivery": "REGULER",
"tracking_number": null,
"is_fake": false,
"fulfill_by_mp": false,
"created_at": "2025-09-27T01:12:09.000000Z",
"updated_at": "2025-09-20T01:27:06.000000Z"
},
{
"order_header_id": 6,
"order_code": "ORD124",
"order_reference_id": "ABCD",
"internal_status": "To Process",
"external_status": "PROCESSED",
"store_platform": "offline",
"location_id": 1,
"warehouse_code": "ABCD",
"payment_method": "COD",
"logistic_provider_name": "Dethix",
"logistic_service_name": "Reguler",
"logistic_carrier": "Dethix Reguler",
"delivery": "REGULER",
"tracking_number": null,
"is_fake": false,
"fulfill_by_mp": false,
"created_at": "2025-09-28T00:12:09.000000Z",
"updated_at": "2025-09-19T10:12:13.000000Z"
}
],
"current_page": 1,
"per_page": 2,
"total_data": 4,
"total_page": 2
},
"errors": null,
"request_id": "354e833c-7576-4025-b727-ac9f1ab9e811"
}2. Get Order Details
Retrieve detailed information for a specific order.
Endpoint
GET /api/partner/v1/orders/{id}/detailResponse
{
"status": 200,
"message": "Ok",
"data": {
"order_id": 5,
"order_code": "ORD123",
"original_order_code": "ORD123",
"internal_status": "In Process",
"external_status": "PROCESSED",
"cancel_by": null,
"cancel_reason": null,
"channel": null,
"created_via": "Upload",
"client_id": "5d3315d3-97cc840e77c7",
"client_name": "",
"location_id": 1,
"store_name": "Toko Offline",
"store_channel_id": "VWXYZAIUC",
"delivery": "REGULER",
"shipping_info": {
"provider_name": "Dethix",
"provider_service": "Reguler",
"logistic_carrier": "Dethix Reguler",
"tracking_number": "DTX1234567",
"routing_code": null,
"sorting_code": null
},
"payment_type": "COD",
"payment_via": null,
"recipient_info": {
"name": "Abdul",
"phone": "8971772727",
"email": null,
"country": "Indonesia",
"state": "DKI Jakarta",
"city": "Jakarta Pusat",
"district": "Kemayoran",
"sub_district": null,
"full_address": "Jalan mangga",
"postal_code": "10650",
"longitude": null,
"latitude": null,
"remarks": "ABDNDD"
},
"buyer_info": {
"name": "Abcd",
"phone": "89716662181",
"email": null,
"full_address": "Jl Angkasa No 1",
"remarks": "Titip di security"
},
"dropshipper_info": {
"name": null,
"phone": null,
"email": null,
"full_address": null
},
"product_info": [
{
"order_detail_id": 1,
"product_id": null,
"product_name": null,
"is_cancel": false,
"sku": "BARANG",
"price": "2000.00",
"currency": "IDR",
"quantity": 1,
"weight": 0.001
},
{
"order_detail_id": 2,
"product_id": null,
"product_name": null,
"is_cancel": false,
"sku": "SKU KU",
"price": "40000.00",
"currency": "IDR",
"quantity": 2,
"weight": 0.001
}
],
"price_info": {
"sub_total": "12000.00",
"shipping_price": "10000.00",
"total_discount": "0.00",
"tax": "0.00",
"cod_price": "12000.00",
"dfod_price": "0.00",
"insurance_price": "0.00",
"grand_total": "12000.00",
"currency": "IDR"
},
"discount_info": [],
"checkout_at": null,
"paid_at": null,
"cancel_sla_at": null,
"created_at": "2025-09-17T01:12:09.000000Z",
"updated_at": "2025-09-20T01:27:06.000000Z",
"fulfill_by_mp": false
},
"errors": null,
"request_id": "request-id"
}3. Create Order
Create a new order manually (for manual order entry or phone orders).
Endpoint
POST /api/partner/v1/orders/createRequest Body
{
"order_code": "ORDMISHMVEOG3",
"payment_method_type": "NON COD",
"payment_via": "TRANSFER BANK",
"store_id": "1",
"location_id": "1",
"checkout_at": "2025-12-05T06:32:00.000Z",
"sales_pic": "John Doe",
"remarks": "",
"origin_code": "31.73.07.1001",
"destination_code": "32.06.30.2001",
"cod_percentage": 0,
"insurance_percentage": 1,
"dropshipper_name": "",
"dropshipper_phone": null,
"dropshipper_email": "",
"dropshipper_full_address": "",
"is_dropship": false,
"is_draft": false,
"is_unpaid": false,
"recipient": {
"name": "Mark Smith",
"phone": "+628292839282",
"email": "example@gmail.com",
"country": "Indonesia",
"province": "Jawa Barat",
"city": "Kabupaten Tasikmalaya",
"sub_district": "Sariwangi",
"district": "Sariwangi",
"postal_code": "46465",
"full_address": "Sariwangi Parongpong Bandung",
"sub_district_id": "Sariwangi",
"remarks": "",
"recipient_sub_district_id": "32.06.30.2001"
},
"buyer": {
"email": "example@gmail.com",
"name": "Mark Smith",
"phone": "+628292839282",
"full_address": "Sariwangi Parongpong Bandung"
},
"delivery": {
"logistic": "ID EXPRESS - iDlite",
"delivery_method": "SELF-DELIVERY",
"custom_logistic": "",
"logistic_provider_name": "ID EXPRESS",
"logistic_service_name": "iDlite",
"logistic_carrier": "ID EXPRESS - iDlite",
"tracking_number": ""
},
"products": [
{
"name": "Handuk",
"sku": "SKU-001",
"product_id": 1,
"unit_price": 15000,
"unit_weight": "1.00",
"qty": 1
}
],
"package": {
"weight": 1000,
"length": 5,
"width": 2,
"height": 2
},
"price": {
"sub_total_price": 15000,
"shipping_price": 0,
"other_price": 0,
"total_discount_price": 0,
"cod_fee": 0,
"cod_price": 0,
"grand_total_order_price": 15000,
"discount_seller": 0,
"discount_shipping": 0,
"packing_price": 0,
"insurance_price": ""
}
}Response
{
"status": 201,
"message": "Created",
"data": null,
"errors": null,
"request_id": "c01d4b42-e364-4068-94cb-bcab9c0f6988"
}4. Update Order
Update an existing order's information.
Endpoint
POST /api/partner/v1/orders/updateRequest Body
{
"customer": {
"name": "Jane Smith Updated",
"email": "jane.smith@example.com",
"phone": "+6289876543210"
},
"shipping_address": {
"name": "Jane Smith",
"phone": "+6289876543210",
"address": "Jl. Thamrin No. 456 Updated",
"city": "Jakarta",
"province": "DKI Jakarta",
"postal_code": "12345",
"country": "Indonesia"
},
"notes": "Updated delivery instructions",
"tags": ["updated", "priority"]
}5. Set Order to Process
Change order status to "process" (ready for fulfillment).
Endpoint
POST /api/partner/v1/orders/fulfillment/set-processRequest Body
{
"order_code": "ORD123"
}Response
{
"status": 200,
"message": "Success Process Order ORD123",
"data": [],
"errors": null,
"request_id": "request-id"
}6. Set Order Packed
Mark order as packed and ready for shipping.
Endpoint
POST /api/partner/v1/orders/fulfillment/set-packedRequest Body
{
"order_code": "ORD123",
"pickup_option": "LATE_PICKUP"
}Pickup Option
| Option | Description |
|---|---|
| LATE_PICKUP | Customer requested cancellation |
| MID_PICKUP | Item not available |
| EARLY_PICKUP | Payment could not be processed |
Response
{
"status": 200,
"message": "Success Packed Order ORD123",
"data": [],
"errors": null,
"request_id": "request-id"
}7. Set Order to Ship
Mark order as shipped with tracking information.
Endpoint
POST /api/partner/v1/orders/fulfillment/shipRequest Body
{
"order_code": "ORD123",
}Response
{
"status": 200,
"message": "Success Shipped Order ORD123",
"data": [],
"errors": null,
"request_id": "request-id"
}8. Set Order Completed
Mark order as completed (delivered to customer).
Endpoint
POST /api/partner/v1/orders/fulfillment/completedRequest Body
{
"order_code": "ORD123",
}Response
{
"status": 200,
"message": "Success Completed Order ORD123",
"data": [],
"errors": null,
"request_id": "request-id"
}9. Set Order Return
Process order return.
Endpoint
POST /api/partner/v1/orders/fulfillment/returnRequest Body
{
"order_code": "ORD123",
"return_by": "customer_request",
"return_reason": "Customer requested return due to wrong size"
}Response
{
"status": 200,
"message": "Success Return Order ORD123",
"data": [],
"errors": null,
"request_id": "request-id"
}10. Cancel Order
Cancel an order and update inventory accordingly.
Endpoint
POST /api/partner/v1/orders/fulfillment/cancelRequest Body
{
"order_code" : "ORD123",
"cancel_by": "customer_request",
"cancel_reason": "Customer requested cancellation due to wrong item selection",
"direct_cancel": true
}Cancellation By
| Reason | Description |
|---|---|
| customer_request | Customer requested cancellation |
| out_of_stock | Item not available |
| payment_failed | Payment could not be processed |
| fraud_detected | Fraudulent order detected |
| duplicate_order | Duplicate order placed |
| other | Other reasons |
Response
{
"status": 200,
"message": "Success Cancel Order ORD123",
"data": [],
"errors": null,
"request_id": "request-id"
}11. Approve Cancel Request
Approve a pending cancellation request.
Endpoint
POST /api/partner/v1/orders/fulfillment/approve-cancelRequest Body
{
"order_code" : "ORD123"
}Response
{
"status": 200,
"message": "Success Approve Cancel Order ORD123",
"data": [],
"errors": null,
"request_id": "request-id"
}12. Reject Cancel Request
Reject a pending cancellation request.
Endpoint
POST /api/partner/v1/orders/fulfillment/reject-cancelRequest Body
{
"order_code" : "ORD123"
}Response
{
"status": 200,
"message": "Success Reject Cancel Order ORD123",
"data": [],
"errors": null,
"request_id": "request-id"
}13. Get Shipping Label
Generate shipping label for an order.
Endpoint
POST /api/partner/v1/orders/fulfillment/shipping-labelRequest Body
{
"order_code": "ORD123",
"mark_as_printed": "true"
}Response
{
"status": 200,
"message": "Ok",
"data": {
"order_id": 1,
"channel": "offline",
"order_code": "ORD123",
"url": "https://cdn.bebaskirim.com/labels/ORD123.pdf",
},
"errors": null,
"request_id": "request-id"
}14. Track Orders
Track multiple orders using tracking numbers.
Endpoint
POST /api/partner/v1/orders/trackingRequest Body
{
"order_code": "ABC123"
}Response
{
"status": "ok",
"data": {
"order_code": "ABC123",
"order_reference_id": "ABCD1234",
"order_status": "In Process",
"tracking_number": "AWB12345",
"channel": "Offline",
"courier": "Dethix Reguler",
"service": "Reguler",
"tenant_id": "ABC-123",
"order_history": [
{
"status": "In Process",
"channel_status": "PROCESSED",
"activity": "Process Order",
"full_name": "System",
"created_at": "2024-01-21T10:00:00Z",
"file_url": "",
"remarks": ""
},
{
"status": "To Process",
"channel_status": "PROCESSED",
"activity": "Process Order",
"full_name": "System",
"created_at": "2024-01-21T10:00:00Z",
"file_url": "",
"remarks": ""
}
],
"delivery_history": [
{
"tracking_number": "AWB12345",
"status": "in_transit",
"location": "Jakarta",
"timestamp": "2024-01-21T10:00:00Z",
"courier": "dethix",
"service": "reg"
},
{
"tracking_number": "AWB12345",
"status": "delivered",
"location": "Surabaya",
"timestamp": "2024-01-21T09:30:00Z",
"courier": "dethix",
"service": "reg"
}
]
},
"errors": null,
"request_id": "request-id"
}15. Async Process Packed
Process order packing asynchronously for bulk operations.
Endpoint
POST /api/partner/v1/orders/fulfillment/set-process-packedRequest Body
{
"order_code": "ORD123",
"pickup_option": "LATE_PICKUP"
}Pickup Option
| Option | Description |
|---|---|
| LATE_PICKUP | pick the latest pickup option |
| MID_PICKUP | pick the middle pickup option |
| EARLY_PICKUP | pick the earliest pickup option |
Response
{
"status": 200,
"message": "Success Process Packed Order ORD123",
"data": [],
"errors": null,
"request_id": "request-id"
}Order Status Flow
pending → to_process → process → packed → shipped → completed
↓ ↓ ↓ ↓ ↓
cancelled cancelled cancelled cancelled returnedOrder Status Values
| Status | Description |
|---|---|
| pending | Order received, awaiting payment |
| to_process | Payment confirmed, ready for processing |
| process | Order is being prepared |
| packed | Order packed, ready for shipping |
| shipped | Order shipped to customer |
| completed | Order delivered to customer |
| cancelled | Order cancelled |
| returned | Order returned by customer |
Payment Methods
| Method | Description |
|---|---|
| bank_transfer | Bank transfer (manual) |
| cod | Cash on delivery |
| credit_card | Credit card payment |
| e_wallet | E-wallet (OVO, GoPay, ShopeePay) |
| virtual_account | Virtual account |
| qris | QRIS payment |