Confirm Draft Order
Endpoint
POST /v1/draft_orders/:id/confirm
You can confirm draft order when the status is ready
. When the draft order is
confirmed, the draft order status will be updated to confirmed
and it will create new order. The new order will have the same
reference_id
as the draft order, this is helpful to identify which order
fulfills the draft order.
The id
on response from this endpoint is the order's id. You can then
continue the flow using Order API.
API Response
{
"success": true,
"message": "Order successfully created",
"object": "order",
"id": "66eba364e2e5a64816928197",
"draft_order_id": "ef18275c-02a9-4887-a56b-f374edb96ec4",
"shipper": {
"name": "Amir",
"email": "[email protected]",
"phone": "081234567901",
"organization": "Biteship Test"
},
"origin": {
"contact_name": "John Doe",
"contact_phone": "081234567902",
"coordinate": {
"latitude": null,
"longitude": null
},
"address": "CITOS - Cilandak Town Square, Kota Jakarta Selatan, Jakarta 12430",
"note": "-",
"postal_code": 12430,
"collection_method": "pickup"
},
"destination": {
"contact_name": "Jack Doe",
"contact_phone": "081234567903",
"contact_email": "[email protected]",
"address": "Jl. Contoh No. 123",
"note": "-",
"proof_of_delivery": {
"use": false,
"fee": 0,
"note": null,
"link": null
},
"cash_on_delivery": {
"id": null,
"amount": 0,
"fee": 0,
"amount_currency": "IDR",
"fee_currency": "IDR",
"note": null,
"type": null,
"status": null,
"payment_status": "pending",
"payment_method": "cash"
},
"coordinate": {
"latitude": null,
"longitude": null
},
"postal_code": 10210
},
"stops": [],
"courier": {
"tracking_id": "66eba364e2e5a642a092819a",
"waybill_id": "000000000000",
"company": "sicepat",
"name": null,
"phone": null,
"type": "reg",
"link": "https://track.biteship.com?waybill_id=000000000000",
"insurance": {
"amount": 0,
"fee": 0,
"amount_currency": "IDR",
"fee_currency": "IDR",
"note": ""
},
"routing_code": null
},
"delivery": {
"datetime": "2024-09-19T11:07+07:00",
"note": null,
"type": "now",
"distance": null,
"distance_unit": "kilometer"
},
"reference_id": "0000000000",
"items": [
{
"name": "Black Leather Bag",
"description": "Goods",
"category": "others",
"sku": null,
"value": 30,
"quantity": 1,
"length": 1,
"width": 1,
"height": 1,
"weight": 1
}
],
"extra": [],
"currency": "IDR",
"tax_lines": [],
"price": 11500,
"metadata": null,
"note": null,
"status": "confirmed"
}