Turkey Customer Satisfaction Index verilerine programatik erişim
/api/tcsi/v1/
API'yi kullanmak için API anahtarınızı aşağıdaki yöntemlerden biriyle gönderebilirsiniz:
curl -H "X-API-Key: your_api_key" \
/api/tcsi/v1/firm/123
curl -H "Authorization: Bearer your_api_key" \
/api/tcsi/v1/firm/123
curl "/api/tcsi/v1/firm/123?api_key=your_api_key"
Belirli bir firmanın TCSI verilerini getirir
/api/tcsi/v1/firm/123
Firma slug'ı ile TCSI verilerini getirir
/api/tcsi/v1/firm/ornek-firma
Çoklu firma TCSI verilerini getirir (pagination destekli)
ids
- Firma ID'leri (virgülle ayırın)limit
- Sayfa başına kayıt (varsayılan: 10, max: 100)offset
- Sayfa offset (varsayılan: 0)order_by
- Sıralama (score, name, responses, updated)order
- Sıralama yönü (ASC, DESC)/api/tcsi/v1/firms?limit=20&order_by=score&order=DESC
Şehir bazlı en iyi firmaları getirir
/api/tcsi/v1/city/istanbul/top?limit=10
Sektör bazlı en iyi firmaları getirir
/api/tcsi/v1/sector/restoran/top?limit=10
API anahtarınızın geçerliliğini test eder
/api/tcsi/v1/test
Genel TCSI istatistiklerini getirir
/api/tcsi/v1/stats
API yanıtları JSON formatında döner. İşte örnek bir firma yanıtı:
{
"firm_id": 123,
"name": "Örnek Firma A.Ş.",
"slug": "ornek-firma-as",
"city": "İstanbul",
"address": "Örnek Mahallesi, Örnek Sokak No:1",
"phone": "+90 212 123 45 67",
"website": "https://www.ornekfirma.com",
"category": "Restoran",
"types": ["restaurant", "food"],
"tcsi": {
"score": 87.5,
"total_responses": 42,
"certification_level": "gold",
"certification_label": "Altın",
"score_category": "very_good",
"last_updated": "2024-01-15 14:30:00",
"tcsi_url": "https://www.sektorlideri.com/acsi/123/",
"survey_url": "https://www.sektorlideri.com/acsi-anket/firma/123/ornek-firma/"
},
"location": {
"latitude": 41.0082,
"longitude": 28.9784,
"place_id": "ChIJexample123"
},
"urls": {
"profile": "https://www.sektorlideri.com/firma/123/ornek-firma/",
"api": "/api/tcsi/v1/firm/123"
},
"meta": {
"created_at": "2024-01-01 00:00:00",
"updated_at": "2024-01-15 14:30:00",
"is_active": true
}
}
fetch('/api/tcsi/v1/firm/123', {
headers: {'X-API-Key': 'your_api_key'}
})
.then(response => response.json())
.then(data => {
console.log(`${data.name}: ${data.tcsi.score} TCSI`);
console.log(`Madalya: ${data.tcsi.certification_label}`);
});
$response = wp_remote_get('/api/tcsi/v1/city/istanbul/top?limit=5', [
'headers' => ['X-API-Key' => 'your_api_key']
]);
$data = json_decode(wp_remote_retrieve_body($response), true);
foreach ($data['data'] as $firm) {
echo "{$firm['name']}: {$firm['tcsi']['score']} TCSI\n";
}
import requests
headers = {'X-API-Key': 'your_api_key'}
response = requests.get('/api/tcsi/v1/firms?limit=10', headers=headers)
if response.status_code == 200:
data = response.json()
for firm in data['data']:
print(f"{firm['name']}: {firm['tcsi']['score']} TCSI")
TCSI API'yi kullanmaya başlamak için API anahtarınızı alın.