Ana içeriğe geç

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

ParametreTipGerekliAçıklama
idstring (UUID)EvetDistributor 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

AlanTipGerekliAçıklama
metaobject | nullHayırWebhook yapılandırması (opsiyonel, kaldırmak için null gönderin)
meta.hoststringHayırWebhook host URL'i
meta.pathstringHayırWebhook path'i
meta.methodintegerHayırHTTP metodu (1=GET, 2=POST, vb.)
meta.authenticationobjectHayırKimlik doğrulama yapılandırması
meta.authentication.typeintegerHayırKimlik doğrulama tipi (1=Basic, 2=Token)
meta.authentication.usernamestringHayırKullanıcı adı (type=1 ise gerekli)
meta.authentication.passwordstringHayı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"
}
}
}'