Distributor Güncelle
Mevcut bir distributor'ı güncelleyin.
Endpoint: PUT /api/v1/integration/distributors/{id}
Kimlik Doğrulama: Gerekli (Bearer token)
Gerekli Header'lar:
Authorization: Bearer <access_token>
X-Target-Server: integration
Yol Parametreleri
| Parametre | Tip | Gerekli | Açıklama |
|---|---|---|---|
id | string (UUID) | Evet | Distributor ID |
İstek Gövdesi
Tüm alanlar opsiyoneldir. Sadece güncellemek istediğiniz alanları ekleyin. meta alanı opsiyoneldir - güncelleyebilir, kaldırabilir veya değiştirmeden bırakabilirsiniz.
Meta ile Güncelleme:
{
"meta": {
"host": "https://example.com222",
"path": "/webhook",
"method": 1,
"authentication": {
"type": 1,
"username": "user",
"password": "pass"
}
}
}
Meta'yı Kaldır (null olarak ayarla):
{
"meta": null
}
İstek Parametreleri
| Alan | Tip | Gerekli | Açıklama |
|---|---|---|---|
meta | object | null | Hayır | Webhook yapılandırması (opsiyonel, kaldırmak için null gönderin) |
meta.host | string | Hayır | Webhook host URL'i |
meta.path | string | Hayır | Webhook path'i |
meta.method | integer | Hayır | HTTP metodu (1=GET, 2=POST, vb.) |
meta.authentication | object | Hayır | Kimlik doğrulama yapılandırması |
meta.authentication.type | integer | Hayır | Kimlik doğrulama tipi (1=Basic, 2=Token) |
meta.authentication.username | string | Hayır | Kullanıcı adı (type=1 ise gerekli) |
meta.authentication.password | string | Hayır | Şifre (type=1 ise gerekli) |
Yanıt
Durum: 200 OK
Güncellenmiş distributor nesnesini döndürür.
{
"id": "39e8003c-6342-4fd3-97a1-3f2a7b437d0a",
"node_id": "e40efce4-38a3-46c4-a202-e8db95d0409c",
"meta": {
"host": "https://example.com222",
"path": "/webhook",
"method": "GET",
"authentication": {
"type": 1,
"username": "user",
"password": "pass"
}
},
"created_at": "2025-12-23T23:16:10.419732Z",
"updated_at": "2025-12-23T23:16:10.419732Z"
}
Örnek cURL İsteği
curl -X PUT 'https://<base-url>/api/v1/integration/distributors/39e8003c-6342-4fd3-97a1-3f2a7b437d0a' \
-H "Content-Type: application/json" \
-H "X-Target-Server: integration" \
-H "Authorization: Bearer <access_token>" \
-d '{
"meta": {
"host": "https://example.com222",
"path": "/webhook",
"method": 1,
"authentication": {
"type": 1,
"username": "user",
"password": "pass"
}
}
}'