# 08. Webhook

# 1 Setting

# 1.1 Message Setting(POST)

# URL

https://developers.cjdropshipping.com/api2.0/v1/webhook/set

# CURL

curl --location --request POST 'https://developers.cjdropshipping.com/api2.0/v1/webhook/set' \
                --header 'CJ-Access-Token: xxxxxxxxxxxxxxxxxxxxxxxxxxxx' \
                --header 'Content-Type: application/json' \
                --data-raw '{
                    "product": {
                        "type": "ALL",
                        "callbackUrls": [
                            "http://localhsost:8080/api2.0/"
                        ]
                    },
                    "stock": {
                        "type": "ALL",
                        "callbackUrls": [
                            "http://localhsost:8080/api2.0/"
                        ]
                    }
                }'
Parameter Definition Type Required Length Note
product Product Message object Y 200 Product Message Setting
type Product Message type string Y 200 ALL,CANCEL
callbackUrls callback url list Y 5
stock Stock Message object Y 200 Stock Message Setting
type Stock Message type string Y 200 ALL,CANCEL
callbackUrls callback url list Y 5

# Result

success

{
    "code": 200,
    "result": true,
    "message": "Success",
    "data": true,
    "requestId": "97367e0f-cf3a-4c9b-acea-a36fb56f81b8"
}
Field Definition Type Length Note
code error code int 20 Reference error code
result Whether or not the return is normal boolean 1
message return message string 200
data return data object interface data return
requestId requestId string 48 Flag request for logging errors

error

{
    "code": 1601000,
    "result": false,
    "message": "User not find",
    "data": null,
    "requestId": "a18c9793-7c99-42f9-970b-790eecdceba2"
}
Field Definition Type Length Note
code error code int 20 Reference error code
result Whether or not the return is normal boolean 1
message return message string 200
data return data object interface data return
requestId requestId string 48 Flag request for logging errors