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.
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
}
}Endpoint: POST /api/VbtApi/GetIncomingInvoiceListByXml
Body: XmlRequestModel; aşağıdaki XML XmlModel alanına verilir.
<SearchRequestModel>
<Skip>0</Skip>
<Take>50</Take>
<OrderByName>IssueDate</OrderByName>
<OrderByType>Descending</OrderByType>
<Query>
<IssueDate>
<StartDate>2026-07-01T00:00:00</StartDate>
<EndDate>2026-07-31T23:59:59</EndDate>
</IssueDate>
<IsErpProcessed>false</IsErpProcessed>
</Query>
</SearchRequestModel>Ö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"
]
}Endpoint: POST /api/VbtApi/GetDetailedIncomingInvoiceListByXml
Body: XmlRequestModel; aşağıdaki XML XmlModel alanına verilir.
<IncomingInvoiceListRequestModel>
<EttnList>
<string>7f8c9726-5e6f-4dc4-a984-f3da76e2a912</string>
<string>3cde8f40-d674-48f6-a784-713b227be2ac</string>
</EttnList>
</IncomingInvoiceListRequestModel>Örnek 3: Toplu durum sorgulama
Endpoint: POST /api/VbtApi/GetIncomingInvoicesStatus
Body: IncomingInvoiceSummaryStatusRequestModel (JSON)
{
"EttnList": [
"7f8c9726-5e6f-4dc4-a984-f3da76e2a912",
"3cde8f40-d674-48f6-a784-713b227be2ac"
]
}Endpoint: POST /api/VbtApi/GetIncomingInvoicesStatusByXml
Body: XmlRequestModel; aşağıdaki XML XmlModel alanına verilir.
<IncomingInvoiceSummaryStatusRequestModel>
<EttnList>
<string>7f8c9726-5e6f-4dc4-a984-f3da76e2a912</string>
<string>3cde8f40-d674-48f6-a784-713b227be2ac</string>
</EttnList>
</IncomingInvoiceSummaryStatusRequestModel>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."
}Endpoint: POST /api/VbtApi/ApproveOrRejectIncomingInvoiceByXml
Body: XmlRequestModel; aşağıdaki XML XmlModel alanına verilir.
<IncomingInvoiceApproveRequestModel>
<ForwardForApproveOrReject>ForwardForApprove</ForwardForApproveOrReject>
<Ettn>7f8c9726-5e6f-4dc4-a984-f3da76e2a912</Ettn>
<ApplicationResponseNote>Fatura kabul edilmiştir.</ApplicationResponseNote>
</IncomingInvoiceApproveRequestModel>Ö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."
}Endpoint: POST /api/VbtApi/ApproveOrRejectIncomingInvoiceByXml
Body: XmlRequestModel; aşağıdaki XML XmlModel alanına verilir.
<IncomingInvoiceApproveRequestModel>
<ForwardForApproveOrReject>ForwardForReject</ForwardForApproveOrReject>
<Ettn>7f8c9726-5e6f-4dc4-a984-f3da76e2a912</Ettn>
<ApplicationResponseNote>Sipariş bilgileriyle uyuşmadığı için reddedilmiştir.</ApplicationResponseNote>
</IncomingInvoiceApproveRequestModel>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
}Endpoint: POST /api/VbtApi/UpdateIncomingInvoiceErpProcessStatusByXml
Body: XmlRequestModel; aşağıdaki XML XmlModel alanına verilir.
<InvoiceErpProcessRequestModel>
<Ettn>7f8c9726-5e6f-4dc4-a984-f3da76e2a912</Ettn>
<ErpProcessBranch>MERKEZ</ErpProcessBranch>
<IsErpProcessed>true</IsErpProcessed>
</InvoiceErpProcessRequestModel>Ö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"
]
}Endpoint: POST /api/VbtApi/GetIncomingInvoiceUblListByXml
Body: XmlRequestModel; aşağıdaki XML XmlModel alanına verilir.
<IncomingInvoiceXmlRequestModel>
<InvoiceEttns>7f8c9726-5e6f-4dc4-a984-f3da76e2a912</InvoiceEttns>
<InvoiceEttns>3cde8f40-d674-48f6-a784-713b227be2ac</InvoiceEttns>
</IncomingInvoiceXmlRequestModel>Örnek 8: PDF içeriklerini alma
Endpoint: POST /api/VbtApi/GetIncomingInvoicePdf
Body: InvoicePdfRequestModel (JSON)
{
"InvoiceEttns": [
"7f8c9726-5e6f-4dc4-a984-f3da76e2a912"
]
}Endpoint: POST /api/VbtApi/GetIncomingInvoicePdfByXml
Body: XmlRequestModel; aşağıdaki XML XmlModel alanına verilir.
<InvoicePdfRequestModel>
<InvoiceEttns>7f8c9726-5e6f-4dc4-a984-f3da76e2a912</InvoiceEttns>
</InvoicePdfRequestModel>Önerilen Çağrı Sırası
- Liste sonucundaki ETTN'yi yerel kayıtta tekilleştirin.
- Ayrıntıyı ve gerekiyorsa UBL XML aslını alın.
- ERP işlemini kendi transaction'ınız içinde tamamlayın.
- Uygulama yanıtı gereken profilde kabul veya red gönderin.
- Durum endpointini terminal sonuca kadar izleyin.
- ERP işlemi başarıyla tamamlandıktan sonra
IsErpProcessed=truegüncellemesini yapın.