Webhook'ları Listele
Açıklama
Section titled “Açıklama” GET
/v1/webhooks/0 Kullanıcının tanımladığı aktif webhook (geri çağırım) URL'lerini listeler.
Parametreler
Section titled “Parametreler”| Parametre | Konum | Tip | Açıklama | Varsayılan | Örnek |
|---|---|---|---|---|---|
| Authorization * | header | string | Bearer Yetkilendirme Tokeni (Örn: Bearer eyJhb...) | - | Bearer <TOKEN> |
| USER_ID * | path | string | İşlem yapan kullanıcının kimlik (ID) değeri. UUID formatındadır. | - | - |
Örnek Kod
Section titled “Örnek Kod”fetch('https://api.kargomucuz.com/v1/webhooks/0', { method: 'GET', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer <YOUR_TOKEN>' }}).then(response => response.json()).then(data => console.log(data));$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.kargomucuz.com/v1/webhooks/0');curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$headers = array();$headers[] = 'Content-Type: application/json';$headers[] = 'Authorization: Bearer <YOUR_TOKEN>';curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);if (curl_errno($ch)) { echo 'Error:' . curl_error($ch);}curl_close($ch);echo $result;Yanıtlar
Section titled “Yanıtlar”200: Başarılı kimlik doğrulaması sonrası dönen yanıt.
{ "status": false, "message": "Kullanıcı webhook'ları getirildi.", "payload": { "data": [ { "others": { "headers": { "contentType": "application/json" }, "extra": { "hello": "hello boys" }, "updated": "2025-08-05T07:39:59.994Z", "created": "2025-08-05T07:39:59.994Z" }, "resellerId": null, "_id": "6891b54f55ef60a28581c899", "events": [ "tract_updated" ], "uri": "http://localhost:4000/v1/webhooks/test-post-method", "secret": "secretim12345", "active": true, "__v": 0 } ], "totalCount": 1 }, "code": 500}