Skip to content

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_ID

Endpoints

MethodEndpointDescription
POST/api/partner/v1/ordersList orders
GET/api/partner/v1/orders/{id}/detailGet order details
POST/api/partner/v1/orders/createCreate order
POST/api/partner/v1/orders/updateUpdate order
POST/api/partner/v1/orders/fulfillment/set-processSet order to process
POST/api/partner/v1/orders/fulfillment/set-packedSet order packed
POST/api/partner/v1/orders/fulfillment/shipSet order to ship
POST/api/partner/v1/orders/fulfillment/completedSet order completed
POST/api/partner/v1/orders/fulfillment/returnSet order return
POST/api/partner/v1/orders/fulfillment/cancelCancel order
POST/api/partner/v1/orders/fulfillment/approve-cancelApprove cancellation request
POST/api/partner/v1/orders/fulfillment/reject-cancelReject cancellation request
POST/api/partner/v1/orders/fulfillment/shipping-labelGet shipping label
POST/api/partner/v1/orders/trackingTrack orders
POST/api/partner/v1/orders/fulfillment/set-process-packedProcess order packing asynchronously

1. List Orders

Retrieve a paginated list of orders with filtering and sorting options.

Endpoint

POST /api/partner/v1/orders

Request Description

ParameterTypeRequiredDescription
pageintegerYesPage number (default: 1)
per_pageintegerYesItems per page (default: 10, max: 100)
statusstringNoFilter by order status or "All" status
sort_bystringNoSort value (created_at, status)
sort_directionstringYesSort by (asc, desc)
created_fromstringNoStart created date (ISO 8601)
created_tostringNoEnd created date (ISO 8601)

Request Body

json
{
  "status": "All",
  "page": 1,
  "size": 10,
  "sort": "ASC"
}

Response

Success Response (200 OK)

json
{
  "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}/detail

Response

json
{
  "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/create

Request Body

json
{
    "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

json
{
    "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/update

Request Body

json
{
  "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-process

Request Body

json
{
  "order_code": "ORD123"
}

Response

json
{
  "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-packed

Request Body

json
{
  "order_code": "ORD123",
  "pickup_option": "LATE_PICKUP"
}

Pickup Option

OptionDescription
LATE_PICKUPCustomer requested cancellation
MID_PICKUPItem not available
EARLY_PICKUPPayment could not be processed

Response

json
{
  "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/ship

Request Body

json
{
  "order_code": "ORD123",
}

Response

json
{
  "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/completed

Request Body

json
{
  "order_code": "ORD123",
}

Response

json
{
  "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/return

Request Body

json
{
  "order_code": "ORD123",
  "return_by": "customer_request",
  "return_reason": "Customer requested return due to wrong size"
}

Response

json
{
  "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/cancel

Request Body

json
{
  "order_code" : "ORD123",
  "cancel_by": "customer_request",
  "cancel_reason": "Customer requested cancellation due to wrong item selection",
  "direct_cancel": true
}

Cancellation By

ReasonDescription
customer_requestCustomer requested cancellation
out_of_stockItem not available
payment_failedPayment could not be processed
fraud_detectedFraudulent order detected
duplicate_orderDuplicate order placed
otherOther reasons

Response

json
{
  "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-cancel

Request Body

json
{
  "order_code" : "ORD123"
}

Response

json
{
  "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-cancel

Request Body

json
{
  "order_code" : "ORD123"
}

Response

json
{
  "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-label

Request Body

json
{
  "order_code": "ORD123",
  "mark_as_printed": "true"
}

Response

json
{
  "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/tracking

Request Body

json
{
  "order_code": "ABC123"
}

Response

json
{
  "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-packed

Request Body

json
{
  "order_code": "ORD123",
  "pickup_option": "LATE_PICKUP"
}

Pickup Option

OptionDescription
LATE_PICKUPpick the latest pickup option
MID_PICKUPpick the middle pickup option
EARLY_PICKUPpick the earliest pickup option

Response

json
{
  "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  returned

Order Status Values

StatusDescription
pendingOrder received, awaiting payment
to_processPayment confirmed, ready for processing
processOrder is being prepared
packedOrder packed, ready for shipping
shippedOrder shipped to customer
completedOrder delivered to customer
cancelledOrder cancelled
returnedOrder returned by customer

Payment Methods

MethodDescription
bank_transferBank transfer (manual)
codCash on delivery
credit_cardCredit card payment
e_walletE-wallet (OVO, GoPay, ShopeePay)
virtual_accountVirtual account
qrisQRIS payment