Faturayı Model Olarak Gönderir

Faturayı model olarak gönderir.

Faturayı model olarak göndermek için bu uç kullanılır.

POST/einvoice/Send/Model
Body
EInvoiceEInvoiceDto (object)
CustomerAliasnullable string
Response

Faturayı model olarak gönderir

Body
UUIDstring (uuid)
InvoiceNumbernullable string
Request
const response = await fetch('/einvoice/Send/Model', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json-patch+json"
    },
    body: JSON.stringify({
      "EInvoice": {
        "InvoiceInfo": {
          "UUID": "550fc20f-9d10-4722-94e3-f290e1f98782",
          "TemplateUUID": "9ac273be-1d0d-449d-8ecb-9d9b59a375da",
          "TemplateBase64String": null,
          "InvoiceType": "SATIS",
          "InvoiceSerieOrNumber": "EFT",
          "IssueDate": "2024-11-20T20:38:14.4401198+03:00",
          "CurrencyCode": "TRY",
          "ExchangeRate": null,
          "InvoiceProfile": "TICARIFATURA",
          "DespatchDocumentReference": null,
          "OrderReference": null,
          "OrderReferenceDocument": null,
          "AdditionalDocumentReferences": null,
          "TaxExemptionReasonInfo": null,
          "PaymentTermsInfo": null,
          "PaymentMeansInfo": null,
          "OKCInfo": null,
          "ESUReportInfo": null,
          "ReturnInvoiceInfo": null,
          "AccountingCost": null,
          "InvoicePeriod": null,
          "SGKInfo": null,
          "Expenses": null,
          "LineExtensionAmount": 0,
          "GeneralKDV1Total": 0,
          "GeneralKDV8Total": 0,
          "GeneralKDV18Total": 0,
          "GeneralKDV10Total": 0,
          "GeneralKDV20Total": 0,
          "GeneralAllowanceTotal": 0,
          "PayableAmount": 0,
          "KdvTotal": 0
        },
        "CompanyInfo": {
          "TaxNumber": "6310540565",
          "Name": "Nilvera Yazılım ve Bilişim Hiz. Tic. Ltd. Şti.",
          "TaxOffice": "Erciyes",
          "PartyIdentifications": null,
          "AgentPartyIdentifications": null,
          "Address": "Adres",
          "District": "Melikgazi",
          "City": "Kayseri",
          "Country": "Türkiye",
          "PostalCode": "38038",
          "Phone": "08502514010",
          "Fax": null,
          "Mail": "info@nilvera.com",
          "WebSite": "htts://nilvera.com"
        },
        "CustomerInfo": {
          "TaxNumber": "1234567801",
          "Name": "AAA Anonim Şirketi",
          "TaxOffice": null,
          "PartyIdentifications": null,
          "AgentPartyIdentifications": null,
          "Address": "Papatya Caddesi Yasemin Sokak No21",
          "District": "Melikgazi",
          "City": "Kayseri",
          "Country": "Türkiye",
          "PostalCode": "38038",
          "Phone": null,
          "Fax": null,
          "Mail": null,
          "WebSite": null
        },
        "BuyerCustomerInfo": null,
        "ExportCustomerInfo": null,
        "TaxFreeInfo": null,
        "InvoiceLines": [
          {
            "Index": null,
            "SellerCode": null,
            "BuyerCode": null,
            "Name": "Laptop",
            "Description": null,
            "Quantity": 1,
            "UnitType": "C62",
            "Price": 100,
            "AllowanceTotal": 0,
            "KDVPercent": 18,
            "KDVTotal": 0,
            "Taxes": null,
            "DeliveryInfo": null,
            "ManufacturerCode": null,
            "BrandName": null,
            "ModelName": null,
            "Note": null,
            "SerialID": null,
            "OzelMatrahReason": null,
            "OzelMatrahTotal": null,
            "VatAmountWithoutTevkifat": null,
            "AdditionalItemIdentification": null
          }
        ],
        "Notes": [
          "Note 1",
          "Note 2"
        ]
      },
      "CustomerAlias": null
    }),
});
const data = await response.json();
Response
{
  "UUID": "123e4567-e89b-12d3-a456-426614174000",
  "InvoiceNumber": "text"
}
var client = new RestClient("/einvoice/Send/Model");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "Bearer <API KEY>");
var body = @"{
  "EInvoice": {
    "InvoiceInfo": {
      "UUID": "1f797839-fb10-45d3-818c-eaaeed533b76",
      "TemplateUUID": "28c9920d-c85d-4d07-a3a3-1b5a1d819949",
      "TemplateBase64String": null,
      "InvoiceType": "SATIS",
      "InvoiceSerieOrNumber": "EFT",
      "IssueDate": "2022-07-02T01:10:14.1406414+03:00",
      "CurrencyCode": "TRY",
      "ExchangeRate": null,
      "InvoiceProfile": "TICARIFATURA",
      "DespatchDocumentReference": null,
      "OrderReference": null,
      "OrderReferenceDocument": null,
      "AdditionalDocumentReferences": null,
      "TaxExemptionReasonInfo": null,
      "PaymentTermsInfo": null,
      "PaymentMeansInfo": null,
      "OKCInfo": null,
      "ReturnInvoiceInfo": null,
      "AccountingCost": null,
      "InvoicePeriod": null,
      "SGKInfo": null,
      "LineExtensionAmount": 0,
      "GeneralKDV1Total": 0,
      "GeneralKDV8Total": 0,
      "GeneralKDV18Total": 0,
      "GeneralAllowanceTotal": 0,
      "PayableAmount": 0,
      "KdvTotal": 0
    },
    "CompanyInfo": {
      "TaxNumber": "6310540565",
      "Name": "Nilvera Yazılım ve Bilişim Hiz. Tic. Ltd. Şti.",
      "TaxOffice": "Erciyes",
      "PartyIdentifications": null,
      "AgentPartyIdentifications": null,
      "Address": "Adres",
      "District": "Melikgazi",
      "City": "Kayseri",
      "Country": "Türkiye",
      "PostalCode": "38038",
      "Phone": "08502514010",
      "Fax": null,
      "Mail": "info@nilvera.com",
      "WebSite": "htts://nilvera.com"
    },
    "CustomerInfo": {
      "TaxNumber": "1234567801",
      "Name": "AAA Anonim Şirketi",
      "TaxOffice": null,
      "PartyIdentifications": null,
      "AgentPartyIdentifications": null,
      "Address": "Papatya Caddesi Yasemin Sokak No21",
      "District": "Melikgazi",
      "City": "Kayseri",
      "Country": "Türkiye",
      "PostalCode": "38038",
      "Phone": null,
      "Fax": null,
      "Mail": null,
      "WebSite": null
    },
    "BuyerCustomerInfo": null,
    "ExportCustomerInfo": null,
    "TaxFreeInfo": null,
    "InvoiceLines": [
      {
        "Index": null,
        "SellerCode": null,
        "BuyerCode": null,
        "Name": "Laptop",
        "Description": null,
        "Quantity": 1,
        "UnitType": "C62",
        "Price": 100,
        "AllowanceTotal": 0,
        "KDVPercent": 18,
        "KDVTotal": 0,
        "Taxes": null,
        "DeliveryInfo": null,
        "ManufacturerCode": null,
        "BrandName": null,
        "ModelName": null,
        "Note": null,
        "OzelMatrahReason": null,
        "OzelMatrahTotal": null
      }
    ],
    "Notes": [
      "Note 1",
      "Note 2"
    ]
  },
  "CustomerAlias": null
}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content