Faturaları listele
Kapsam:invoices:readAnahtarın ortamındaki giden faturalar; yeniden eskiye (oluşturulma sırası). Süzgeçler fatura tarihine göredir. İmleçli sayfalama: nextCursor → cursor.
Açıklama
| Parametre | Açıklama |
|---|---|
from, to | Fatura tarihi aralığı (dahil, YYYY-AA-GG). |
status | Virgülle: sending, sent, accepted, rejected, cancelled, error. |
documentType | e_fatura ya da e_arsiv. |
limit | 1-100, varsayılan 25. |
cursor | Önceki yanıtın nextCursor değeri. |
Liste öğelerinde kalemler ve alıcının adresi yoktur (yalnızca buyer.name, buyer.taxOrIdNumber); ayrıntı için GET /invoices/{id}.
curl "https://panel.efaturan.com/api/v1/invoices?from=2026-11-01&to=2026-11-30&status=sent,accepted&limit=50" \
-H "Authorization: Bearer $EFATURAN_KEY"İstek şeması
| Alan | Tip | Durum | Açıklama |
|---|---|---|---|
fromsorgu | tarih (YYYY-AA-GG) | İsteğe bağlı | Fatura tarihi başlangıcı (dahil, YYYY-AA-GG). |
tosorgu | tarih (YYYY-AA-GG) | İsteğe bağlı | Fatura tarihi bitişi (dahil, YYYY-AA-GG). |
statussorgu | metin | İsteğe bağlı | Durum süzgeci, virgülle: sending, sent, accepted, rejected, cancelled, error.biçim: ^[a-z]+(,[a-z]+)*$ |
documentTypesorgu | "e_fatura"|"e_arsiv" | İsteğe bağlı | Belge türü. |
limitsorgu | tam sayı | İsteğe bağlı | Sayfa boyutu (1-100, varsayılan 25).≥ 1≤ 100varsayılan: 25 |
cursorsorgu | metin | İsteğe bağlı | Önceki yanıtın nextCursor değeri.en çok 200 karakter |
Yanıtlar
| Kod | Ne zaman | Gövde |
|---|---|---|
| 200 | Sayfa. | application/jsonInvoiceList |
| 400 | Geçersiz istek (INVALID_JSON, IDEMPOTENCY_KEY_REQUIRED, IDEMPOTENCY_KEY_INVALID, INTEGRATOR_REJECTED). | application/jsonError |
| 401 | Anahtar yok, geçersiz, iptal edilmiş ya da süresi dolmuş. | application/jsonError |
| 403 | IP izin listesi, kapsam, paket hakkı, askı, abonelik ya da canlı anahtar kısıtı. | application/jsonError |
| 404 | Kayıt yok ya da bu hesaba / ortama ait değil. | application/jsonError |
| 413 | Gövde çok büyük. | application/jsonError |
| 415 | Content-Type application/json değil. | application/jsonError |
| 429 | Hız sınırı aşıldı. | application/jsonError |
| 500 | Beklenmeyen hata. | application/jsonError |
| 502 | Entegratöre ulaşılamadı. | application/jsonError |
Yanıt şeması
36 alan
| Alan | Tip | Durum | Açıklama |
|---|---|---|---|
object | "list" | Zorunlu | — |
| dizi|nesne | Zorunlu | — | |
id | metin | Zorunlu | Fatura kimliği. |
object | "invoice" | Zorunlu | — |
environment | "live"|"test" | Zorunlu | Anahtarın ortamı: live (canlı) ya da test. |
status | "sending"|"sent"|"accepted"|"rejected"|"cancelled"|"error" | Zorunlu | sending: entegratöre iletiliyor · sent: GİB'e iletildi · accepted · rejected · cancelled · error. |
documentType | "e_fatura"|"e_arsiv" | Zorunlu | Belge türü. |
profile | "TICARIFATURA"|"TEMELFATURA"|"EARSIVFATURA"|"IHRACAT" | Zorunlu | — |
invoiceTypeCode | metin | Zorunlu | SATIS, IADE, TEVKIFAT, ISTISNA. |
sendType | "ELEKTRONIK"|"KAGIT" | Zorunlu | —null olabilir |
documentNumber | metin | Zorunlu | GİB belge numarası (ör. ABC2026000000001); sonucu belirsiz gönderimde boş olabilir.null olabilir |
ettn | metin | Zorunlu | Evrensel tekil tanımlama numarası (UUID).null olabilir |
issueDate | tarih (YYYY-AA-GG) | Zorunlu | Fatura tarihi (Türkiye saatiyle).null olabilir |
currency | metin | Zorunlu | — |
| nesne | Zorunlu | Tutarlar (belge para biriminde, ondalık). | |
taxExclusive | sayı | Zorunlu | Matrah (iskonto sonrası, KDV hariç). |
discount | sayı | Zorunlu | Toplam iskonto. |
vat | sayı | Zorunlu | Hesaplanan KDV. |
withholding | sayı | Zorunlu | Tevkif edilen KDV. |
payable | sayı | Zorunlu | Ödenecek tutar. |
| nesne | Zorunlu | — | |
name | metin | Zorunlu | —null olabilir |
taxOrIdNumber | metin | Zorunlu | —null olabilir |
source | metin | Zorunlu | Belgenin kaynağı: api, manual (panel), marketplace, ecommerce. |
errorMessage | metin | Zorunlu | Hata ya da ret açıklaması.null olabilir |
gibStatusCode | metin | Zorunlu | —null olabilir |
emailedAt | metin | Zorunlu | ISO 8601 zaman damgası (UTC).null olabilir |
cancelledAt | metin | Zorunlu | ISO 8601 zaman damgası (UTC).null olabilir |
createdAt | metin | Zorunlu | ISO 8601 zaman damgası (UTC). |
updatedAt | metin | Zorunlu | ISO 8601 zaman damgası (UTC). |
| nesne | Zorunlu | — | |
self | metin | Zorunlu | — |
pdf | metin | Zorunlu | — |
xml | metin | Zorunlu | — |
hasMore | true / false | Zorunlu | — |
nextCursor | metin | Zorunlu | Sonraki sayfa için cursor parametresi; son sayfada null.null olabilir |
Örnek istek
Anahtarı kodunuza yazmayın; ortam değişkeninden okuyun.
curl "https://panel.efaturan.com/api/v1/invoices" \
-H "Authorization: Bearer $EFATURAN_KEY"<?php
$ch = curl_init("https://panel.efaturan.com/api/v1/invoices");
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('EFATURAN_KEY'),
],
CURLOPT_RETURNTRANSFER => true,
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
$data = json_decode($response, true); // 200: Sayfa.const res = await fetch(`https://panel.efaturan.com/api/v1/invoices`, {
headers: {
Authorization: `Bearer ${process.env.EFATURAN_KEY}`,
},
});
const data = await res.json(); // 200: Sayfa.
console.log(res.status, data);using System.Net.Http.Headers;
using var http = new HttpClient();
http.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("EFATURAN_KEY"));
var request = new HttpRequestMessage(HttpMethod.Get, $"https://panel.efaturan.com/api/v1/invoices");
using var response = await http.SendAsync(request);
var body = await response.Content.ReadAsStringAsync(); // 200: Sayfa.
Console.WriteLine($"{(int)response.StatusCode} {body}");Örnek yanıt
Şemadan üretildi: metin alanlarındaki “…” yer tutucudur.
{
"object": "list",
"data": [
{
"id": "…",
"object": "invoice",
"environment": "live",
"status": "sending",
"documentType": "e_fatura",
"profile": "TICARIFATURA",
"invoiceTypeCode": "…",
"sendType": "ELEKTRONIK",
"documentNumber": "…",
"ettn": "…",
"issueDate": "2026-11-20",
"currency": "…",
"totals": {
"taxExclusive": 0,
"discount": 0,
"vat": 0,
"withholding": 0,
"payable": 0
},
"buyer": {
"name": "…",
"taxOrIdNumber": "…"
},
"source": "…",
"errorMessage": "…",
"gibStatusCode": "…",
"emailedAt": "…",
"cancelledAt": "…",
"createdAt": "…",
"updatedAt": "…",
"links": {
"self": "…",
"pdf": "…",
"xml": "…"
}
}
],
"hasMore": false,
"nextCursor": "…"
}