Kimlik Doğrulama
API’ye yalnızca panelde ürettiğiniz API anahtarı ile erişilir. Bu anahtar, panel giriş şifreniz veya oturum token’ınız değildir; yalnızca HTTP API çağrılarında kullanılır. Anahtarı app.faturaentegrator.com üzerinden API / entegrasyon ayarları bölümünden alırsınız.
Base URL
Tüm endpoint’ler şu kök adresin altındadır:
https://app.faturaentegrator.com/api
Örnek: Fatura listesi GET https://app.faturaentegrator.com/api/invoices olarak çağrılır.
Authorization başlığı
HTTP’de yetkilendirme için Bearer şeması kullanılır: Authorization başlığına anahtarınızı şu biçimde yazarsınız (tek boşlukla Bearer ile başlar).
Authorization: Bearer YOUR_API_KEY
Accept: application/json
YOUR_API_KEY yerine panelden kopyaladığınız API anahtarı metnini yapıştırın.
Örnek istekler
- 💻 cURL
- 🐘 PHP
- 🟢 Node.js
- 🐍 Python
- 🔷 C#
curl -X GET "https://app.faturaentegrator.com/api/invoices" \
-H "Accept: application/json" \
-H "Authorization: Bearer YOUR_API_KEY"
<?php
$ch = curl_init('https://app.faturaentegrator.com/api/invoices');
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => [
'Accept: application/json',
'Authorization: Bearer YOUR_API_KEY'
],
CURLOPT_RETURNTRANSFER => true
]);
$response = curl_exec($ch);
curl_close($ch);
$data = json_decode($response, true);
const API_KEY = 'YOUR_API_KEY';
const BASE_URL = 'https://app.faturaentegrator.com';
const response = await fetch(`${BASE_URL}/api/invoices`, {
method: 'GET',
headers: {
'Accept': 'application/json',
'Authorization': `Bearer ${API_KEY}`
}
});
const data = await response.json();
import requests
API_KEY = 'YOUR_API_KEY'
BASE_URL = 'https://app.faturaentegrator.com'
response = requests.get(
f'{BASE_URL}/api/invoices',
headers={
'Accept': 'application/json',
'Authorization': f'Bearer {API_KEY}'
}
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Accept", "application/json");
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");
var response = await client.GetAsync("https://app.faturaentegrator.com/api/invoices");
var json = await response.Content.ReadAsStringAsync();
var data = System.Text.Json.JsonSerializer.Deserialize<JsonElement>(json);
Postman ve örnek koleksiyon için bkz. Fatura Entegratör — Postman Dokümantasyonu.