Gets XML of Previewed Voucher

Ön izlenen makbuzu indirir.

POST/evoucher/Send/Model/Download
Body
VoucherVoucherDto (object)
Response

Ön izlenen makbuzu indirir.

Body
string
Request
const response = await fetch('/evoucher/Send/Model/Download', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json-patch+json"
    },
    body: JSON.stringify({}),
});
const data = await response.json();
Response
text
var client = new RestClient("https://apitest.nilvera.com/evoucher/Send/Model/Download");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"{
  "Voucher": {
    "VoucherInfo": {
      "UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "TemplateBase64String": "string",
      "VoucherSerieOrNumber": "string",
      "IssueDate": "2023-01-12T10:19:06.068Z",
      "CurrencyCode": "string",
      "SendType": "KAGIT",
      "ExchangeRate": 0
    },
    "CompanyInfo": {
      "TaxNumber": "string",
      "Name": "string",
      "TaxOffice": "string",
      "PartyIdentifications": [
        {
          "SchemeID": "string",
          "Value": "string"
        }
      ],
      "AgentPartyIdentifications": [
        {
          "SchemeID": "string",
          "Value": "string"
        }
      ],
      "Address": "string",
      "District": "string",
      "City": "string",
      "Country": "string",
      "PostalCode": "string",
      "Phone": "string",
      "Fax": "string",
      "Mail": "string",
      "WebSite": "string"
    },
    "CustomerInfo": {
      "TaxNumber": "string",
      "Name": "string",
      "TaxOffice": "string",
      "PartyIdentifications": [
        {
          "SchemeID": "string",
          "Value": "string"
        }
      ],
      "AgentPartyIdentifications": [
        {
          "SchemeID": "string",
          "Value": "string"
        }
      ],
      "Address": "string",
      "District": "string",
      "City": "string",
      "Country": "string",
      "PostalCode": "string",
      "Phone": "string",
      "Fax": "string",
      "Mail": "string",
      "WebSite": "string"
    },
    "VoucherLines": [
      {
        "Name": "string",
        "GrossWage": 0,
        "Price": 0,
        "KDVPercent": 0,
        "KDVTotal": 0,
        "Taxes": [
          {
            "TaxCode": "string",
            "Total": 0,
            "Percent": 0,
            "ReasonCode": "string",
            "ReasonDesc": "string"
          }
        ],
        "GVWithholdingPercent": 0,
        "GVWithholdingTotal": 0
      }
    ],
    "Notes": [
      "string"
    ]
  }
}";
request.AddParameter("application/json", body,  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

Last updated