Skip to main content

Courier Online Booking (COB) and Call On Delivery (COD)

Courier Online Booking (COB) and Call On Delivery (COD) endpoint is used to get order data related to shipping process, especially when using Booking Code and/or Payment Amount COD. The booking code will appear when the order status reached 400. This endpoint can use to get order by order ID, get orders by Shop ID, or get orders by warehouse ID.

Path

get

/v1/fs/:fs_id/fulfillment_order?order_id=:order_id

get

/v1/fs/:fs_id/fulfillment_order?shop_id=:shop_id&per_page=:per_page

get

/v1/fs/:fs_id/fulfillment_order?warehouse_id=:warehouse_id&per_page=:per_page

Request Parameters

ParameterTypeRequiredLocationDescription
fs_id
Integer
Required
path
Fulfillment service unique identifier
order_id
Integer
Optional
query
Order unique identifier. Will be prioritized over other parameter. Required when there is no other parameter
shop_id
Integer
Optional
query
Shop unique identifier where the order belongs. Used when get multiple order ID
warehouse_id
Integer
Optional
query
Warehouse unique identifier where the order belongs. Used when get multiple order ID
per_page
Integer
Optional
query
Number of order in one request. Default value is 10. Can be use together with warehouse_id or shop_id parameter
first_order_id
Integer
Optional
query
Order ID that can be use get data after this order ID sequential by order created time
next_order_id
Integer
Optional
query
Order ID that can be use get data before this order ID sequential by order created time

Example Request

curl -X POST \
'https://fs.tokopedia.net/v1/fs/13138/fulfillment_order?order_id=342026997' \
-H 'Authorization: Bearer C-UMqWWXRqaJugr7w5U0zQ' \
-H 'Content-Type: application/json'

Response Parameters

NameTypeDemo ValueDescription
data
Object
status
Integer
200
Response Status

Success Response Examples

{
"header": {
"process_time": "35.50ms",
"messages": null,
"reason": "",
"error_code": ""
},
"data": {
"order_data": [
{
"order": {
"order_id": 342026997,
"buyer_id": 64565282,
"seller_id": 2926870,
"payment_id": 444594306,
"order_status": 700,
"invoice_number": "INV/20190718/XIX/VII/341976843",
"invoice_pdf_link": "pdf/2019/07/18",
"open_amt": 200000,
"payment_amt_cod": 195000 // This field is payment amount for "Cash On Delivery" and will be omitted by the system if there is no value there
},
"order_history": [
{
"order_hist_id": 2883479110,
"status": 700,
"shipping_date": null,
"create_by": 0
},
{
"order_hist_id": 2883478788,
"status": 690,
"shipping_date": null,
"create_by": 0
}
],
"order_detail": [
{
"order_detail_id": 540585010,
"product_id": 375822451,
"product_name": "",
"quantity": 1,
"product_price": 184000,
"insurance_price": 0
}
],
"drop_shipper": {
"order_id": 0,
"dropship_name": "",
"dropship_telp": ""
},
"type_meta": {
"kelontong": {},
"cod": {},
"sampai": {},
"now": {},
"ppp": {},
"trade_in": {},
"vehicle_leasing": {}
},
"order_shipment_fulfillment": {
"id": 121101022,
"order_id": 342026997,
"payment_date_time": "2019-07-18T14:58:01.998063Z",
"is_same_day": false,
"accept_deadline": "2019-07-19T14:58:01.998063Z",
"confirm_shipping_deadline": "2019-07-22T14:58:01.998063Z",
"item_delivered_deadline": {
"Time": "0001-01-01T00:00:00Z",
"Valid": false
},
"is_accepted": false,
"is_confirm_shipping": false,
"is_item_delivered": false,
"fulfillment_status": 0
},
"booking_data": {
"order_id": 342026997,
"booking_code": "000213552920", // Booking code is a code from JNE Online Booking / JOB
"booking_status": 200
}
}
],
"next_order_id": 342026997,
"first_order_id": 342026997
},
"status": "200"
}

Error Response Examples

{
"header": {
"process_time": 9e-8,
"messages": "We could not process your request due to malformed request, please check again",
"reason": "Data Not Found",
"error_code": "ORD_API_008"
},
"data": null
}

Error Codes

Error CodeError MessageDescription
ORD_API_001
Failed To Initialize Request
Failed sending request to upstream
ORD_API_003
Failed To Fetching Request
Failed fetching response from upstream
ORD_API_004
Failed To Reading Response Body
Failed processing response from upstream
ORD_API_005
Failed To Parsing Json Response
Failed processing response from upstream
ORD_API_006
There Are Error From Ext Service
Failed getting response from upstream
ORD_API_008
Data Not Found
Order data not found
ORD_USC_015
FS ID Is Not Associated With Shop ID or Warehouse ID
FS ID is not associated with Shop ID or Warehouse ID
ORD_DLV_001
fs_id cannot be empty
fs_id field is empty, please check again
ORD_DLV_002
invalid fs_id format
Invalid fs_id format, please check again
ORD_DLV_005
invalid order_id format
Invalid order_id format, please check again
ORD_DLV_006
invalid shop_id format
Invalid shop_id format, please check again
ORD_DLV_017
invalid per_page format
Invalid per_page format, please check again
ORD_DLV_024
invalid first_order_id format
Invalid first_order_id format, please check again
ORD_DLV_025
invalid next_order_id format
Invalid next_order_id format, please check again

Have a feedback?