Ana içeriğe geç

Market Güncelle

Mevcut bir market'i güncelleyin.

Endpoint: PUT /api/v1/integration/markets/{id}

Kimlik Doğrulama: Gerekli (Bearer token)

Gerekli Header'lar:

Authorization: Bearer <access_token>
X-Target-Server: integration

Yol Parametreleri

ParametreTipGerekliAçıklama
idstring (UUID)EvetMarket ID

İstek Gövdesi

Tüm alanlar opsiyoneldir. Sadece güncellemek istediğiniz alanları ekleyin. webhook alanı opsiyoneldir - güncelleyebilir, kaldırabilir veya değiştirmeden bırakabilirsiniz.

Webhook ile Güncelleme:

{
"domain": "updated-domain.com",
"webhook": {
"host": "https://webhook2.example.com",
"path": "/webhook",
"method": 1,
"authentication": {
"type": 1,
"username": "user2",
"password": "pass2"
},
"timeout": 30
}
}

Webhook Olmadan Güncelleme (webhook'u kaldır):

{
"domain": "updated-domain.com",
"webhook": null
}

Sadece Domain Güncelleme (mevcut webhook'u koru):

{
"domain": "updated-domain.com"
}

İstek Parametreleri

AlanTipGerekliAçıklama
domainstringHayırMarket domain'i
webhookobject | nullHayırWebhook yapılandırması (opsiyonel, kaldırmak için null gönderin)
webhook.hoststringHayırWebhook host URL'i
webhook.pathstringHayırWebhook path'i
webhook.methodintegerHayırHTTP metodu (1=GET, 2=POST, vb.)
webhook.authenticationobjectHayırKimlik doğrulama yapılandırması
webhook.authentication.typeintegerHayırKimlik doğrulama tipi (1=Basic, 2=Token)
webhook.authentication.usernamestringHayırKullanıcı adı (type=1 ise gerekli)
webhook.authentication.passwordstringHayırŞifre (type=1 ise gerekli)
webhook.timeoutintegerHayırİstek timeout'u saniye cinsinden

Yanıt

Durum: 200 OK

Güncellenmiş market nesnesini döndürür.

{
"id": "262bed05-5a0e-4fff-8171-39fafab66b0c",
"node_id": "e40efce4-38a3-46c4-a202-e8db95d0409c",
"domain": "updated-domain.com",
"webhook": {
"host": "https://webhook2.example.com",
"path": "/webhook",
"method": "GET",
"authentication": {
"type": 1,
"username": "user2",
"password": "pass2"
},
"timeout": 30
},
"created_at": "2025-12-11T14:00:26.023564Z",
"updated_at": "2025-12-11T14:03:47.361795Z"
}

Örnek cURL İsteği

curl -X PUT 'https://<base-url>/api/v1/integration/markets/262bed05-5a0e-4fff-8171-39fafab66b0c' \
-H "Content-Type: application/json" \
-H "X-Target-Server: integration" \
-H "Authorization: Bearer <access_token>" \
-d '{
"domain": "updated-domain.com",
"webhook": {
"host": "https://webhook2.example.com",
"path": "/webhook",
"method": 1,
"authentication": {
"type": 1,
"username": "user2",
"password": "pass2"
},
"timeout": 30
}
}'