İçeriğe geç

Webhook Güncelle

PUT /v1/webhooks/{USER_ID}/6758d401d1c93075ad08c3a6
PUT /v1/webhooks/{USER_ID}/6758d401d1c93075ad08c3a6

Mevcut webhook'un abone olduğu olayları veya URL adresini günceller.

ParametreKonumTipAçıklamaVarsayılanÖrnek
Authorization * headerstringBearer Yetkilendirme Tokeni (Örn: Bearer eyJhb...)-Bearer <TOKEN>
USER_ID * pathstringİşlem yapan kullanıcının kimlik (ID) değeri. UUID formatındadır.--
{
"event":["tract_updated"],
//"uri":"",
//"secret":"",
"others":{
//"contentType":"",
"active":true
}
}
fetch('https://api.kargomucuz.com/v1/webhooks/{USER_ID}/6758d401d1c93075ad08c3a6', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <YOUR_TOKEN>'
},
body: JSON.stringify({
"event":["tract_updated"],
//"uri":"",
//"secret":"",
"others":{
//"contentType":"",
"active":true
}
})
})
.then(response => response.json())
.then(data => console.log(data));
500: Sunucu Hatası
{
"error": "fetch failed"
}
504: Gateway Timeout