retrieve-webhook-endpoints
POST /api/{team}/gateway/retrieve-webhook-endpoints
Webhook adreslerini döndürür; hiçbir şeyi değiştirmez. Token'larını gönderdiğiniz adresler ya da, göndermezseniz, çalışma alanının bütün adresleri (panelden eklenenler dahil) eskiden yeniye gelir. Liste sayfalı değildir.
Yalnızca iş ortağının açtığı çalışma alanlarında çalışır; diğerleri 403 alır. Bkz. İş Ortakları.
Kimlik doğrulama
Çalışma alanının anahtarıyla: X-Api-Key, X-Timestamp, X-Signature, Content-Type: application/json. Ayrıntılar: Kimlik Doğrulama ve İmza.
İstek
{ "tokens": ["3e7a1c9b-5d2f-4a8e-9c6b-0f1e2d3c4b5a"] }
| Alan | Tip | Zorunlu | Açıklama |
|---|---|---|---|
tokens | array | hayır | Adreslerin token'ları (UUID), en fazla 50. Gönderilmezse ya da boşsa bütün adresler döner. |
SDK örnekleri
not
Örneklerdeki $client / client nesnesinin kurulumu: İstemciyi Kurmak.
- PHP
- Node.js
- Python
- Java
- cURL
use Gurmehub\Odemehub\Request\RetrieveWebhookEndpoints;
$all = $client->retrieveWebhookEndpoints()->webhookEndpoints;
$some = $client->retrieveWebhookEndpoints(new RetrieveWebhookEndpoints(tokens: [$webhookEndpointToken]))->webhookEndpoints;
foreach ($all as $webhookEndpoint) {
$webhookEndpoint->url; // token, events, isActive, createdAt
}
const all = (await client.retrieveWebhookEndpoints()).webhookEndpoints;
const some = (await client.retrieveWebhookEndpoints({ tokens: [webhookEndpointToken] })).webhookEndpoints;
for (const webhookEndpoint of all) {
webhookEndpoint.url; // token, events, isActive, createdAt
}
from odemehub.request import RetrieveWebhookEndpoints
every = client.retrieve_webhook_endpoints().webhook_endpoints
some = client.retrieve_webhook_endpoints(RetrieveWebhookEndpoints(tokens=[webhook_endpoint_token])).webhook_endpoints
for webhook_endpoint in every:
webhook_endpoint.url # token, events, is_active, created_at
import com.odemehub.request.RetrieveWebhookEndpoints;
var all = client.retrieveWebhookEndpoints(RetrieveWebhookEndpoints.all()).getWebhookEndpoints();
var some = client.retrieveWebhookEndpoints(RetrieveWebhookEndpoints.byTokens(webhookEndpointToken)).getWebhookEndpoints();
for (var webhookEndpoint : all) {
webhookEndpoint.getUrl(); // getToken(), getEvents(), isActive(), getCreatedAt()
}
URI_PATH="/api/$ODEMEHUB_TEAM/gateway/retrieve-webhook-endpoints"
BODY='{}'
TIMESTAMP=$(date +%s)
SIGNATURE=$(printf '%s\n%s\n%s\n%s' "$TIMESTAMP" "POST" "$URI_PATH" "$BODY" | openssl dgst -sha256 -hmac "$ODEMEHUB_API_SECRET" | sed 's/^.* //')
curl -X POST "https://sandbox.odemehub.com$URI_PATH" \
-H "Content-Type: application/json" \
-H "X-Api-Key: $ODEMEHUB_API_KEY" \
-H "X-Timestamp: $TIMESTAMP" \
-H "X-Signature: $SIGNATURE" \
--data-raw "$BODY"
Yanıt
{
"result": { "successful": true, "message": null },
"webhook_endpoints": [
{
"token": "3e7a1c9b-5d2f-4a8e-9c6b-0f1e2d3c4b5a",
"url": "https://magazam.com/odemehub/webhook",
"events": ["order.paid"],
"is_active": true,
"created_at": "2026-11-05T09:40:00.000000Z"
}
]
}
webhook_endpoints: Webhook adresi nesneleri. Eşleşen yoksa boş liste.
HTTP durum kodları
| Kod | Durum |
|---|---|
200 | Liste döndü. |
401 | API anahtarı ya da imza geçersiz. |
403 | Çalışma alanı işlem yapamıyor ya da bir iş ortağının açtığı çalışma alanı değil: Bu uç yalnızca iş ortağı çalışma alanlarına açıktır. |
422 | Doğrulama hatası. |
429 | İstek sınırı aşıldı. |