Alt hesap detayı
Tek bir alt hesabın bilgilerini, API anahtarını ve e-Faturam durumunu almak için bu endpoint kullanılır.
Bu uç yalnızca Geliştirici paketindeki ana hesabın anahtarıyla çağrılır; alt hesabın anahtarıyla 403 döner.
İstek
GET /api/sub-accounts/{id}
Accept: application/json
Authorization: Bearer ANA_HESAP_API_KEY
{id} ana hesabınıza bağlı bir alt hesap değilse 404 döner.
Örnek istekler
- 💻 cURL
- 🐘 PHP
- 🟢 Node.js
- 🐍 Python
curl -X GET "https://app.faturaentegrator.com/api/sub-accounts/1234" \
-H "Accept: application/json" \
-H "Authorization: Bearer ANA_HESAP_API_KEY"
<?php
$ch = curl_init('https://app.faturaentegrator.com/api/sub-accounts/1234');
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => ['Accept: application/json', 'Authorization: Bearer ANA_HESAP_API_KEY'],
CURLOPT_RETURNTRANSFER => true,
]);
$data = json_decode(curl_exec($ch), true);
curl_close($ch);
const res = await fetch('https://app.faturaentegrator.com/api/sub-accounts/1234', {
headers: { Accept: 'application/json', Authorization: 'Bearer ANA_HESAP_API_KEY' },
});
const data = await res.json();
import requests
r = requests.get(
'https://app.faturaentegrator.com/api/sub-accounts/1234',
headers={'Accept': 'application/json', 'Authorization': 'Bearer ANA_HESAP_API_KEY'},
)
data = r.json()
Yanıt
200 ile alt hesap data altında döner. Biçim ve alanlar alt hesap oluşturma yanıtıyla aynıdır; tenant alanları için bkz. alt hesap listeleme.