Taslak Oluşturur

Taslak makbuz oluşturur.

post

Taslak makbuz oluşturmak için bu ucu kullanabilirsiniz.

Authorizations
Body
Responses
200
Taslak makbuz oluşturur.
application/json
post
POST /evoucher/Draft/Create HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 1204

{
  "Voucher": {
    "VoucherInfo": {
      "UUID": "123e4567-e89b-12d3-a456-426614174000",
      "TemplateUUID": "123e4567-e89b-12d3-a456-426614174000",
      "TemplateBase64String": "text",
      "VoucherSerieOrNumber": "text",
      "IssueDate": "2025-06-25T13:45:46.198Z",
      "CurrencyCode": "text",
      "SendType": "KAGIT",
      "ExchangeRate": 1
    },
    "CompanyInfo": {
      "TaxNumber": "text",
      "Name": "text",
      "TaxOffice": "text",
      "PartyIdentifications": [
        {
          "SchemeID": "text",
          "Value": "text"
        }
      ],
      "AgentPartyIdentifications": [
        {
          "SchemeID": "text",
          "Value": "text"
        }
      ],
      "Address": "text",
      "District": "text",
      "City": "text",
      "Country": "text",
      "PostalCode": "text",
      "Phone": "text",
      "Fax": "text",
      "Mail": "text",
      "WebSite": "text"
    },
    "CustomerInfo": {
      "TaxNumber": "text",
      "Name": "text",
      "TaxOffice": "text",
      "PartyIdentifications": [
        {
          "SchemeID": "text",
          "Value": "text"
        }
      ],
      "AgentPartyIdentifications": [
        {
          "SchemeID": "text",
          "Value": "text"
        }
      ],
      "Address": "text",
      "District": "text",
      "City": "text",
      "Country": "text",
      "PostalCode": "text",
      "Phone": "text",
      "Fax": "text",
      "Mail": "text",
      "WebSite": "text"
    },
    "VoucherLines": [
      {
        "Name": "text",
        "GrossWage": 1,
        "Price": 1,
        "KDVPercent": 1,
        "KDVTotal": 1,
        "Taxes": [
          {
            "TaxCode": "text",
            "Total": 1,
            "Percent": 1,
            "ReasonCode": "text",
            "ReasonDesc": "text"
          }
        ],
        "GVWithholdingPercent": 1,
        "GVWithholdingTotal": 1
      }
    ],
    "Notes": [
      "text"
    ]
  }
}
{
  "UUID": "123e4567-e89b-12d3-a456-426614174000",
  "VoucherNumber": "text"
}
var client = new RestClient("https://apitest.nilvera.com/evoucher/Draft/Create");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer C08A60FB5055274DC7A658F88B9380F262E1998DAFBD6BA94DBD73951E970876");
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:42:10.067Z",
      "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