Skip to main content

Trigger Webhook

This endpoint will trigger our system to send new order webhook request by order id and webhook type.

Path

post

/v1/fs/:fs_id/trigger

Request Parameters

ParameterTypeRequiredLocationDescription
fs_id
Integer
Required
path
Fulfillment service unique identifier
order_id
Integer
Required
body
Order service unique identifier
type
String
Required
body
Webhook Type. Currently only two types available order_status and order_notification
url
String
Required
body
Custom URL to send webhook. If empty then the URL that will be used are from registered URL
is_encrypted
Boolean
Required
body
Temporary parameter, can send webhook with encrypted result if the value is true or not encrypted if the value is false for testing purpose

Example Request

curl -X POST \
https://fs.tokopedia.net/v1/fs/13398/trigger \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer JhgtdgUAQ5OJIrQMJjCiHA' \
-d '{
"Type": "order_notification",
"order_id": 576694264,
"url": "https://webhook.site/662b4823-599f-4455-b349-32c43701f72b",
"is_encrypted": true
}'

Response Parameters

NameTypeDemo ValueDescription
data
String
success
Response Data

Success Response Examples

{
"header": {
"process_time": 0.042723386,
"messages": "Your request has been processed successfully"
},
"data": "success"
}

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 CodeError MessageDescription
SHP_GRPC_001
Failed Send GRPC Request
Failed sending request to upstream
SHP_GRPC_003
Data Not Found
Failed finding data from upstream

Have a feedback?