Create Draft Order
POST /v1/draft_orders
You can create draft order by calling the Create Draft Order API. You won't be charged until the draft order is confirmed using Confirm Draft Order API and order is created with the draft order reference id.
Draft order and order connected through reference_id, if you want to collerate the draft order with your own order id, please send it as reference_id.
With draft order, you can create a draft without specifying the courier information.
The Request Payload will roughly similar with Create Order API, with different constraints on some fields.
Draft Order Status
No | Status | Description | Available to Delete |
---|---|---|---|
1 | placed | Draft order is just barely placed, cannot be confirmed. | ✅ |
2 | ready | Draft order is ready to be confirmed. Courier has been set. | ✅ |
3 | confirmed | Draft order is ready to be confirmed. Courier has been set. | ❌ |
API Parameters
Show child parameters
pickup your package will be picked by courier based on origin that you specify.
drop_off you must drop off the package to the nearest courier agent.
Show child parameters
7_days you will receiver your money 7 days after the item is delivered.
5_days you will receiver your money 5 days after the item is delivered.
3_days you will receiver your money 3 days after the item is delivered.
now will generate waybill instantly and pickup right away.
scheduled will generate waybill instantly and pickup based on delivery date and delivery time.
Show child parameters
Value | Description |
---|---|
fashion | Clothing, accessories, and personal adornments. |
healthcare | Products related to health, wellness, and personal care. |
food_and_drink | Items related to food and beverages. |
electronic | Electronic devices and accessories. |
beauty | Beauty products and cosmetics. |
outdoor_gear | Equipment and apparel for outdoor activities. |
home_accessories | Items that enhance the decor and functionality of the home. |
hobby | Products related to leisure and hobbies. |
collection | Items that belong to a particular collection or set. |
sparepart | Replacement parts and accessories. |
groceries | Food and household items typically purchased for regular consumption. |
frozen_food | Food items preserved by freezing, such as frozen meals, meat, vegetables, and desserts. |
others | Miscellaneous items that don't fit into the other categories. |
Type of Request
Without courier
{
"origin_contact_name": "Amir",
"origin_contact_phone": "081234567890",
"origin_address": "Plaza Senayan, Jalan Asia Afrik...",
"origin_note": "Deket pintu masuk STC",
"origin_postal_code": 12440,
"destination_contact_name": "John Doe",
"destination_contact_phone": "088888888888",
"destination_contact_email": "[email protected]",
"destination_address": "Lebak Bulus MRT...",
"destination_postal_code": 12950,
"destination_note": "Near the gas station",
"delivery_type": "now",
"order_note": "Please be careful",
"items": [
{
"name": "Black L",
"description": "White Shirt",
"category": "fashion",
"value": 165000,
"quantity": 1,
"height": 10,
"length": 10,
"weight": 200,
"width": 10
}
]
}
With courier
{
"origin_contact_name": "Amir",
"origin_contact_phone": "081234567890",
"origin_address": "Plaza Senayan, Jalan Asia Afrik...",
"origin_note": "Deket pintu masuk STC",
"origin_postal_code": 12440,
"destination_contact_name": "John Doe",
"destination_contact_phone": "088888888888",
"destination_contact_email": "[email protected]",
"destination_address": "Lebak Bulus MRT...",
"destination_postal_code": 12950,
"destination_note": "Near the gas station",
"courier_company": "sicepat",
"courier_type": "reg",
"delivery_type": "now",
"order_note": "Please be careful",
"items": [
{
"name": "Black L",
"description": "White Shirt",
"category": "fashion",
"value": 165000,
"quantity": 1,
"height": 10,
"length": 10,
"weight": 200,
"width": 10
}
]
}
*When you send origin and destination value, you must at least choose one type of origin or destination. Origin and destination must at least have postal codes, coordinates or area ids. You do not need to insert all of the three values.
API Response
Created
{
"success": true,
"code": 20111002,
"object": "draft_order",
"id": "ef18275c-02a9-4887-a56b-f374edb96ec4",
"order_id": null,
"origin": {
"area_id": "IDNP6IDNC148IDND836IDNZ12430",
"address": "CITOS - Cilandak Town Square, Kota Jakarta Selatan, Jakarta 12430",
"note": null,
"contact_name": "John Doe",
"contact_phone": "081234567901",
"contact_email": "[email protected]",
"coordinate": {
"latitude": null,
"longitude": null
},
"province_name": "DKI Jakarta",
"city_name": "Jakarta Selatan",
"district_name": "Cilandak",
"postal_code": 12430,
"collection_method": "pickup"
},
"destination": {
"area_id": "IDNP6IDNC147IDND835IDNZ10210",
"address": "Jl. Contoh No. 12",
"note": null,
"contact_name": "Jake Doe",
"contact_phone": "0812345678902",
"contact_email": "[email protected]",
"coordinate": {
"latitude": null,
"longitude": null
},
"province_name": "DKI Jakarta",
"city_name": "Jakarta Pusat",
"district_name": "Tanah Abang",
"postal_code": 10210,
"proof_of_delivery": {
"use": false,
"fee": 0,
"note": null,
"link": null
},
"cash_on_delivery": {
"payment_method": null,
"amount": null,
"amount_currency": "IDR",
"note": null,
"type": null
}
},
"courier": {
"name": null,
"phone": null,
"company": "sicepat",
"type": "reg",
"link": null,
"tracking_id": null,
"waybill_id": null,
"insurance": {
"amount": 0,
"fee": 0,
"note": "",
"amount_currency": "IDR",
"fee_currency": "IDR",
},
"routing_code": null
},
"delivery": {
"type": "now",
"datetime": "2024-09-19T03:40:22.810Z",
"note": null,
"distance": null,
"distance_unit": "kilometer"
},
"extra": [],
"tags": [],
"metadata": null,
"items": [
{
"name": "Black Leather Bag",
"description": "Goods",
"value": 30,
"currency": "IDR",
"quantity": 1,
"height": 1,
"width": 1,
"length": 1,
"weight": 1
}
],
"currency": "IDR",
"tax_lines": [],
"price": 11500,
"status": "ready",
"reference_id": "example/35ef876e-3902-4186-873a-e9012ea1e354",
"invoice_id": "1209839012839012",
"user_id": "6448e9d77ff7510bbadfa605",
"created_at": "2024-09-19T03:40:22.802Z",
"updated_at": "2024-09-19T03:40:22.802Z",
"placed_at": null,
"ready_at": "2024-09-19T03:40:22.802Z",
"confirmed_at": null,
"deleted_at": null
}