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
| Parametre | Tip | Gerekli | Açıklama |
|---|---|---|---|
id | string (UUID) | Evet | Market 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
| Alan | Tip | Gerekli | Açıklama |
|---|---|---|---|
domain | string | Hayır | Market domain'i |
webhook | object | null | Hayır | Webhook yapılandırması (opsiyonel, kaldırmak için null gönderin) |
webhook.host | string | Hayır | Webhook host URL'i |
webhook.path | string | Hayır | Webhook path'i |
webhook.method | integer | Hayır | HTTP metodu (1=GET, 2=POST, vb.) |
webhook.authentication | object | Hayır | Kimlik doğrulama yapılandırması |
webhook.authentication.type | integer | Hayır | Kimlik doğrulama tipi (1=Basic, 2=Token) |
webhook.authentication.username | string | Hayır | Kullanıcı adı (type=1 ise gerekli) |
webhook.authentication.password | string | Hayır | Şifre (type=1 ise gerekli) |
webhook.timeout | integer | Hayı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
}
}'