🏢Üye işyeri Durumu API'sı
This endpoint returns the status of the merchant that owns the API key. A key cannot inspect another merchant.
Geçerli bir geçiş yaptığınızdan emin olunmerchant_idbir talepte bulunurken. Üye işyeri mevcut değilse veya bulunamıyorsa, bir e-posta alacaksınız.404 Not Foundhata.
- 🔹 API bir gerektirirAPI Anahtarıkimlik doğrulama için.
- 🔹 merchant_idistekte sorgu parametresi olarak iletilmelidir.
Backend integration examples
Choose your backend language. Every example reads secret credentials only from environment variables.
const response = await fetch("https://api.dinakel.com/api/gateway/v1/merchants/<merchant_id>/status", {
method: "GET"
headers: {
Authorization: `Bearer ${process.env.DINAKEL_API_KEY}`,
Accept: "application/json"
}
});
const result = await response.json();
if (!response.ok) throw new Error(result.message || "Dinakel request failed");
console.log(result);💡 Örnek İstek
GET https://api.dinakel.com/api/gateway/v1/merchants/<merchant_id>/status
Headers:
Authorization: Bearer <your_api_key>
🔍 Örnek Yanıt
{
"status": true,
"statusCode": 200,
"data": {
"merchantStatus": "active"
}
}
⚠️ Hata İşleme
API aşağıdaki hata yanıtlarını sağlar:
{
"status": false,
"statusCode": 400,
"message": "Invalid or missing merchant_id"
}
400 Bad Request:merchant_id parametresi geçersiz. Doğru kimlik biçimini kullandığınızdan emin olun.
{
"status": false,
"statusCode": 403,
"message": "API key is not authorized for this merchant"
}
403 Forbidden: The key does not belong to the requested merchant.
{
"status": false,
"statusCode": 404,
"message": "Merchant not found"
}
404 Not Found:Girilen ID'ye sahip üye işyeri sistemde mevcut değildir. Üye işyeri kimliğini bir kez daha kontrol edin.
{
"status": false,
"statusCode": 500,
"message": "Internal server error"
}
500 Internal Server Error:Sunucuda beklenmeyen bir hata oluştu. Daha sonra tekrar deneyin veya destek ekibiyle iletişime geçin.