e-Fatura

Gelen Fatura

Gelen Fatura İşlem Örnekleri

Listeleme, durum, kabul/red, ERP işleme ve belge çıktısı için JSON ve ByXml endpointlerine ayrılmış kopyalanabilir request örnekleri.

Kullanım: Her JSON bloğu ilgili endpoint'in gerçek request modeliyle uyumlu, bağımsız ve doğrudan kopyalanabilir tam bir gövdedir.

Belge Alma ve Sorgulama

Örnek 1: İşlenmemiş gelen faturaları listeleme

Endpoint: POST /api/VbtApi/GetIncomingInvoiceList
Body: SearchRequestModel<IncomingInvoiceGetRequestModel> (JSON)

{
  "Skip": 0,
  "Take": 50,
  "OrderByName": "IssueDate",
  "OrderByType": "Descending",
  "Query": {
    "IssueDate": {
      "StartDate": "2026-07-01T00:00:00",
      "EndDate": "2026-07-31T23:59:59"
    },
    "IsErpProcessed": false
  }
}

Örnek 2: ETTN listesiyle ayrıntıları alma

Endpoint: POST /api/VbtApi/GetDetailedIncomingInvoiceList
Body: IncomingInvoiceListRequestModel (JSON)

{
  "EttnList": [
    "7f8c9726-5e6f-4dc4-a984-f3da76e2a912",
    "3cde8f40-d674-48f6-a784-713b227be2ac"
  ]
}

Örnek 3: Toplu durum sorgulama

Endpoint: POST /api/VbtApi/GetIncomingInvoicesStatus
Body: IncomingInvoiceSummaryStatusRequestModel (JSON)

{
  "EttnList": [
    "7f8c9726-5e6f-4dc4-a984-f3da76e2a912",
    "3cde8f40-d674-48f6-a784-713b227be2ac"
  ]
}

Kabul ve Red

Örnek 4: Kabul uygulama yanıtı

Endpoint: POST /api/VbtApi/ApproveOrRejectIncomingInvoice
Body: IncomingInvoiceApproveRequestModel (JSON)

{
  "ForwardForApproveOrReject": "ForwardForApprove",
  "Ettn": "7f8c9726-5e6f-4dc4-a984-f3da76e2a912",
  "ApplicationResponseNote": "Fatura kabul edilmiştir."
}

Örnek 5: Red uygulama yanıtı

Endpoint: POST /api/VbtApi/ApproveOrRejectIncomingInvoice
Body: IncomingInvoiceApproveRequestModel (JSON)

{
  "ForwardForApproveOrReject": "ForwardForReject",
  "Ettn": "7f8c9726-5e6f-4dc4-a984-f3da76e2a912",
  "ApplicationResponseNote": "Sipariş bilgileriyle uyuşmadığı için reddedilmiştir."
}

ERP Mutabakatı ve Belge Çıktıları

Örnek 6: ERP'de işlendi olarak işaretleme

Endpoint: POST /api/VbtApi/UpdateIncomingInvoiceErpProcessStatus
Body: InvoiceErpProcessRequestModel (JSON)

{
  "Ettn": "7f8c9726-5e6f-4dc4-a984-f3da76e2a912",
  "ErpProcessBranch": "MERKEZ",
  "IsErpProcessed": true
}

Örnek 7: UBL XML içeriklerini alma

Endpoint: POST /api/VbtApi/GetIncomingInvoiceXmlList
Body: IncomingInvoiceXmlRequestModel (JSON)

{
  "InvoiceEttns": [
    "7f8c9726-5e6f-4dc4-a984-f3da76e2a912",
    "3cde8f40-d674-48f6-a784-713b227be2ac"
  ]
}

Örnek 8: PDF içeriklerini alma

Endpoint: POST /api/VbtApi/GetIncomingInvoicePdf
Body: InvoicePdfRequestModel (JSON)

{
  "InvoiceEttns": [
    "7f8c9726-5e6f-4dc4-a984-f3da76e2a912"
  ]
}

Önerilen Çağrı Sırası

  1. Liste sonucundaki ETTN'yi yerel kayıtta tekilleştirin.
  2. Ayrıntıyı ve gerekiyorsa UBL XML aslını alın.
  3. ERP işlemini kendi transaction'ınız içinde tamamlayın.
  4. Uygulama yanıtı gereken profilde kabul veya red gönderin.
  5. Durum endpointini terminal sonuca kadar izleyin.
  6. ERP işlemi başarıyla tamamlandıktan sonra IsErpProcessed=true güncellemesini yapın.