Get Webhook Payload
This endpoint will return payload of webhook that has been sent as the current condition of the order provided.
Path
get
/v1/order/:order_id/fs/:fs_id/webhook?type=:type
Request Parameters
Parameter | Type | Required | Location | Description |
---|---|---|---|---|
fs_id | Integer | Required | path | Fulfillment service unique identifier |
order_id | Integer | Required | path | Order service unique identifier |
type | String | Required | query | Webhook Type. Currently only two types available order_status and order_notification |
Example Request
- Curl
curl -X GET \
https://fs.tokopedia.net/v1/order/582220328/fs/13138/webhook?type=order_notification \
-H 'Authorization: Bearer JhgtdgUAQ5OJIrQMJjCiHA'
Response Parameters
Success Response Examples
Example of success response (order_status
)
{
"header": {
"process_time": 0.075659019,
"messages": "Your request has been processed successfully"
},
"data": {
"fs_id": 13398,
"order_status": 0,
"order_id": 582220328,
"shop_id": 8212734,
"warehouse_id": 8402620,
"product_details": [
{
"id": 1122747271,
"Name": "BAJU PALING OKE1A",
"notes": "",
"currency": "Rp.",
"weight": 0.01,
"total_weight": 0.01,
"price": 3000,
"total_price": 3000,
"quantity": 1,
"sku": "LKS1290C"
}
]
}
}
Example of success response (order_notification
)
{
"header": {
"process_time": 0.125516847,
"messages": "Your request has been processed successfully"
},
"data": {
"fs_id": 13398,
"order_id": 582220328,
"invoice_ref_num": "INV/20200908/XX/IX/623780220",
"products": [
{
"id": 1122747271,
"Name": "BAJU PALING OKE1A",
"notes": "",
"currency": "Rp.",
"weight": 0.01,
"total_weight": 0.01,
"price": 3000,
"total_price": 3000,
"quantity": 1,
"sku": "BJUOKE"
}
],
"customer": {
"id": 99098231,
"Name": "",
"phone": "",
"email": ""
},
"recipient": {
"Name": "openapi+buyer@tokopedia.com",
"phone": "628119916444",
"address": {
"address_full": "Surabaya Kota",
"district": "Genteng",
"city": "Kota Surabaya",
"province": "Jawa Timur",
"country": "Indonesia",
"postal_code": "60271",
"district_id": 3518,
"city_id": 252,
"province_id": 15,
"geo": "-7.2648774,112.7485448"
}
},
"shop_id": 8212734,
"warehouse_id": 8402620,
"shop_name": "Shop API Testing 9",
"payment_id": 761882386,
"payment_date": "2020-09-08T10:08:09Z",
"logistics": {
"shipping_id": 6,
"district_id": 3518,
"city_id": 252,
"province_id": 15,
"geo": "-7.2648774,112.7485448",
"shipping_agency": "Wahana",
"service_type": "Service Normal"
},
"amt": {
"ttl_product_price": 3000,
"shipping_cost": 12000,
"insurance_cost": 0,
"ttl_amount": 15000,
"voucher_amount": 0,
"toppoints_amount": 0
},
"dropshipper_info": {
"Name": "",
"phone": ""
},
"voucher_info": {
"voucher_code": "",
"voucher_type": 0
},
"device_type": "",
"create_time": "2020-09-08T10:08:05.813455Z",
"order_status": 0,
"custom_fields": {},
"accept_partial": false
}
}
Error Response Examples
{
"header": {
"process_time": 0.007438284,
"messages": "Our server encounters an error, please try again later",
"reason": "There Are Error From Ext Service",
"error_code": "ORD_API_006"
},
"data": null
}
Error Codes
Error Code | Error Message | Description |
---|---|---|
SHP_GRPC_001 | Failed Send GRPC Request | Failed sending request to upstream |
SHP_GRPC_003 | Data Not Found | Failed finding data from upstream |