var client = new RestClient("https://apitest.nilvera.com/earchive/Draft/CreateBulk");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"{
"EArchiveInvoices": [
{
"InvoiceInfo": {
"UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"TemplateBase64String": "string",
"InvoiceType": "SATIS",
"InvoiceSerieOrNumber": "string",
"IssueDate": "2023-01-10T14:11:36.281Z",
"CurrencyCode": "string",
"ExchangeRate": 0,
"DespatchDocumentReference": [
{
"IssueDate": "2023-01-10T14:11:36.281Z",
"Value": "string"
}
],
"OrderReference": {
"IssueDate": "2023-01-10T14:11:36.281Z",
"Value": "string"
},
"OrderReferenceDocument": {
"ID": "string",
"IssueDate": "2023-01-10T14:11:36.281Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
},
"AdditionalDocumentReferences": [
{
"ID": "string",
"IssueDate": "2023-01-10T14:11:36.281Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
}
],
"TaxExemptionReasonInfo": {
"KDVExemptionReasonCode": "string",
"OTVExemptionReasonCode": "string",
"AccommodationTaxExemptionReasonCode": "string"
},
"PaymentTermsInfo": {
"Percent": 0,
"Amount": 0,
"Note": "string"
},
"PaymentMeansInfo": {
"Code": "string",
"ChannelCode": "string",
"DueDate": "2023-01-10T14:11:36.281Z",
"PayeeFinancialAccountID": "string",
"Note": "string"
},
"OKCInfo": {
"ID": "string",
"IssueDate": "2023-01-10T14:11:36.281Z",
"Time": "string",
"ZNo": "string",
"EndPointID": "string",
"DocumentDescription": "string"
},
"ReturnInvoiceInfo": [
{
"InvoiceNumber": "string",
"IssueDate": "2023-01-10T14:11:36.281Z"
}
],
"Expenses": [
{
"ExpenseType": "HKSKOMISYON",
"Percent": 0,
"Amount": 0
}
],
"ISDespatch": true,
"SalesPlatform": "NORMAL",
"SendType": "KAGIT",
"InternetInfo": {
"WebSite": "string",
"PaymentMethod": "string",
"PaymentMethodName": "string",
"PaymentDate": "2023-01-10T14:11:36.281Z",
"TransporterName": "string",
"TransporterRegisterNumber": "string",
"TransportDate": "2023-01-10T14:11:36.281Z"
},
"AccountingCost": "string",
"LineExtensionAmount": 0,
"GeneralKDV1Total": 0,
"GeneralKDV8Total": 0,
"GeneralKDV18Total": 0,
"GeneralAllowanceTotal": 0,
"PayableAmount": 0,
"KdvTotal": 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"
},
"InvoiceLines": [
{
"Index": "string",
"SellerCode": "string",
"BuyerCode": "string",
"Name": "string",
"Description": "string",
"Quantity": 0,
"UnitType": "string",
"Price": 0,
"AllowanceTotal": 0,
"KDVPercent": 0,
"KDVTotal": 0,
"Taxes": [
{
"TaxCode": "string",
"Total": 0,
"Percent": 0,
"ReasonCode": "string",
"ReasonDesc": "string"
}
],
"ManufacturerCode": "string",
"BrandName": "string",
"ModelName": "string",
"Note": "string",
"OzelMatrahReason": "string",
"OzelMatrahTotal": 0,
"AdditionalItemIdentification": {
"TagNumber": "string",
"OwnerName": "string",
"OwnerTaxNumber": "string"
}
}
],
"Notes": [
"string"
]
}
]
}
}";
request.AddParameter("application/json", body, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://apitest.nilvera.com/earchive/Draft/CreateBulk',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"EArchiveInvoices": [
{
"InvoiceInfo": {
"UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"TemplateBase64String": "string",
"InvoiceType": "SATIS",
"InvoiceSerieOrNumber": "string",
"IssueDate": "2023-01-10T14:11:36.281Z",
"CurrencyCode": "string",
"ExchangeRate": 0,
"DespatchDocumentReference": [
{
"IssueDate": "2023-01-10T14:11:36.281Z",
"Value": "string"
}
],
"OrderReference": {
"IssueDate": "2023-01-10T14:11:36.281Z",
"Value": "string"
},
"OrderReferenceDocument": {
"ID": "string",
"IssueDate": "2023-01-10T14:11:36.281Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
},
"AdditionalDocumentReferences": [
{
"ID": "string",
"IssueDate": "2023-01-10T14:11:36.281Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
}
],
"TaxExemptionReasonInfo": {
"KDVExemptionReasonCode": "string",
"OTVExemptionReasonCode": "string",
"AccommodationTaxExemptionReasonCode": "string"
},
"PaymentTermsInfo": {
"Percent": 0,
"Amount": 0,
"Note": "string"
},
"PaymentMeansInfo": {
"Code": "string",
"ChannelCode": "string",
"DueDate": "2023-01-10T14:11:36.281Z",
"PayeeFinancialAccountID": "string",
"Note": "string"
},
"OKCInfo": {
"ID": "string",
"IssueDate": "2023-01-10T14:11:36.281Z",
"Time": "string",
"ZNo": "string",
"EndPointID": "string",
"DocumentDescription": "string"
},
"ReturnInvoiceInfo": [
{
"InvoiceNumber": "string",
"IssueDate": "2023-01-10T14:11:36.281Z"
}
],
"Expenses": [
{
"ExpenseType": "HKSKOMISYON",
"Percent": 0,
"Amount": 0
}
],
"ISDespatch": true,
"SalesPlatform": "NORMAL",
"SendType": "KAGIT",
"InternetInfo": {
"WebSite": "string",
"PaymentMethod": "string",
"PaymentMethodName": "string",
"PaymentDate": "2023-01-10T14:11:36.281Z",
"TransporterName": "string",
"TransporterRegisterNumber": "string",
"TransportDate": "2023-01-10T14:11:36.281Z"
},
"AccountingCost": "string",
"LineExtensionAmount": 0,
"GeneralKDV1Total": 0,
"GeneralKDV8Total": 0,
"GeneralKDV18Total": 0,
"GeneralAllowanceTotal": 0,
"PayableAmount": 0,
"KdvTotal": 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"
},
"InvoiceLines": [
{
"Index": "string",
"SellerCode": "string",
"BuyerCode": "string",
"Name": "string",
"Description": "string",
"Quantity": 0,
"UnitType": "string",
"Price": 0,
"AllowanceTotal": 0,
"KDVPercent": 0,
"KDVTotal": 0,
"Taxes": [
{
"TaxCode": "string",
"Total": 0,
"Percent": 0,
"ReasonCode": "string",
"ReasonDesc": "string"
}
],
"ManufacturerCode": "string",
"BrandName": "string",
"ModelName": "string",
"Note": "string",
"OzelMatrahReason": "string",
"OzelMatrahTotal": 0,
"AdditionalItemIdentification": {
"TagNumber": "string",
"OwnerName": "string",
"OwnerTaxNumber": "string"
}
}
],
"Notes": [
"string"
]
}
]
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer <API KEY>',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var data = JSON.stringify({
"EArchiveInvoices": [
{
"InvoiceInfo": {
"UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"TemplateBase64String": "string",
"InvoiceType": "SATIS",
"InvoiceSerieOrNumber": "string",
"IssueDate": "2023-01-10T14:11:36.281Z",
"CurrencyCode": "string",
"ExchangeRate": 0,
"DespatchDocumentReference": [
{
"IssueDate": "2023-01-10T14:11:36.281Z",
"Value": "string"
}
],
"OrderReference": {
"IssueDate": "2023-01-10T14:11:36.281Z",
"Value": "string"
},
"OrderReferenceDocument": {
"ID": "string",
"IssueDate": "2023-01-10T14:11:36.281Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
},
"AdditionalDocumentReferences": [
{
"ID": "string",
"IssueDate": "2023-01-10T14:11:36.281Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
}
],
"TaxExemptionReasonInfo": {
"KDVExemptionReasonCode": "string",
"OTVExemptionReasonCode": "string",
"AccommodationTaxExemptionReasonCode": "string"
},
"PaymentTermsInfo": {
"Percent": 0,
"Amount": 0,
"Note": "string"
},
"PaymentMeansInfo": {
"Code": "string",
"ChannelCode": "string",
"DueDate": "2023-01-10T14:11:36.281Z",
"PayeeFinancialAccountID": "string",
"Note": "string"
},
"OKCInfo": {
"ID": "string",
"IssueDate": "2023-01-10T14:11:36.281Z",
"Time": "string",
"ZNo": "string",
"EndPointID": "string",
"DocumentDescription": "string"
},
"ReturnInvoiceInfo": [
{
"InvoiceNumber": "string",
"IssueDate": "2023-01-10T14:11:36.281Z"
}
],
"Expenses": [
{
"ExpenseType": "HKSKOMISYON",
"Percent": 0,
"Amount": 0
}
],
"ISDespatch": true,
"SalesPlatform": "NORMAL",
"SendType": "KAGIT",
"InternetInfo": {
"WebSite": "string",
"PaymentMethod": "string",
"PaymentMethodName": "string",
"PaymentDate": "2023-01-10T14:11:36.281Z",
"TransporterName": "string",
"TransporterRegisterNumber": "string",
"TransportDate": "2023-01-10T14:11:36.281Z"
},
"AccountingCost": "string",
"LineExtensionAmount": 0,
"GeneralKDV1Total": 0,
"GeneralKDV8Total": 0,
"GeneralKDV18Total": 0,
"GeneralAllowanceTotal": 0,
"PayableAmount": 0,
"KdvTotal": 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"
},
"InvoiceLines": [
{
"Index": "string",
"SellerCode": "string",
"BuyerCode": "string",
"Name": "string",
"Description": "string",
"Quantity": 0,
"UnitType": "string",
"Price": 0,
"AllowanceTotal": 0,
"KDVPercent": 0,
"KDVTotal": 0,
"Taxes": [
{
"TaxCode": "string",
"Total": 0,
"Percent": 0,
"ReasonCode": "string",
"ReasonDesc": "string"
}
],
"ManufacturerCode": "string",
"BrandName": "string",
"ModelName": "string",
"Note": "string",
"OzelMatrahReason": "string",
"OzelMatrahTotal": 0,
"AdditionalItemIdentification": {
"TagNumber": "string",
"OwnerName": "string",
"OwnerTaxNumber": "string"
}
}
],
"Notes": [
"string"
]
}
]
});
var config = {
method: 'post',
url: 'https://apitest.nilvera.com/earchive/Draft/CreateBulk',
headers: {
'Authorization': 'Bearer <API KEY>',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
/earchive/Draft/CreateBulk
curl -L \
--request POST \
--url '/earchive/Draft/CreateBulk' \
--header 'Authorization: Bearer JWT' \
--header 'Content-Type: application/json-patch+json' \
--data '{
"EArchiveInvoices": [
{
"Invoice": {
"InvoiceInfo": {
"UUID": "123e4567-e89b-12d3-a456-426614174000",
"TemplateUUID": "123e4567-e89b-12d3-a456-426614174000",
"TemplateBase64String": "text",
"InvoiceType": "SATIS",
"InvoiceSerieOrNumber": "text",
"IssueDate": "2025-02-28T07:33:15.121Z",
"CurrencyCode": "text",
"ExchangeRate": 1,
"OrderReference": {
"IssueDate": "2025-02-28T07:33:15.121Z",
"Value": "text"
},
"OrderReferenceDocument": {
"ID": "text",
"IssueDate": "2025-02-28T07:33:15.121Z",
"DocumentType": "text",
"DocumentTypeCode": "text",
"DocumentDescription": "text",
"Attachment": {
"Base64Data": "text",
"MimeCode": "text",
"FileName": "text"
}
},
"TaxExemptionReasonInfo": {
"KDVExemptionReasonCode": "text",
"OTVExemptionReasonCode": "text",
"AccommodationTaxExemptionReasonCode": "text"
},
"PaymentTermsInfo": {
"Percent": 1,
"Amount": 1,
"Note": "text"
},
"PaymentMeansInfo": {
"Code": "text",
"ChannelCode": "text",
"DueDate": "2025-02-28T07:33:15.121Z",
"PayeeFinancialAccountID": "text",
"Note": "text"
},
"OKCInfo": {
"ID": "text",
"IssueDate": "2025-02-28T07:33:15.121Z",
"Time": "text",
"ZNo": "text",
"EndPointID": "text",
"DocumentDescription": "text"
},
"ESUReportInfo": {
"ID": "text",
"IssueDate": "2025-02-28T07:33:15.121Z"
},
"InvoicePeriod": {
"StartDate": "2025-02-28T07:33:15.121Z",
"StartTime": "text",
"EndDate": "2025-02-28T07:33:15.121Z",
"EndTime": "text",
"DurationMeasureValue": 1,
"Description": "text"
},
"ISDespatch": true,
"SalesPlatform": "NORMAL",
"SendType": "KAGIT",
"InternetInfo": {
"WebSite": "text",
"PaymentMethod": "text",
"PaymentMethodName": "text",
"PaymentAgentName": "text",
"PaymentDate": "2025-02-28T07:33:15.121Z",
"TransporterName": "text",
"TransporterRegisterNumber": "text",
"TransportDate": "2025-02-28T07:33:15.121Z"
},
"AccountingCost": "text",
"LineExtensionAmount": 1,
"GeneralKDV1Total": 1,
"GeneralKDV8Total": 1,
"GeneralKDV18Total": 1,
"GeneralKDV10Total": 1,
"GeneralKDV20Total": 1,
"GeneralAllowanceTotal": 1,
"PayableAmount": 1,
"KdvTotal": 1,
"DespatchDocumentReference": [
{
"IssueDate": "2025-02-28T07:33:15.121Z",
"Value": "text"
}
],
"AdditionalDocumentReferences": [
{
"ID": "text",
"IssueDate": "2025-02-28T07:33:15.121Z",
"DocumentType": "text",
"DocumentTypeCode": "text",
"DocumentDescription": "text",
"Attachment": {
"Base64Data": "text",
"MimeCode": "text",
"FileName": "text"
}
}
],
"ReturnInvoiceInfo": [
{
"InvoiceNumber": "text",
"IssueDate": "2025-02-28T07:33:15.121Z"
}
],
"Expenses": [
{
"ExpenseType": "HKSKOMISYON",
"Percent": 1,
"Amount": 1
}
]
},
"CompanyInfo": {
"TaxNumber": "text",
"Name": "text",
"TaxOffice": "text",
"Address": "text",
"District": "text",
"City": "text",
"Country": "text",
"PostalCode": "text",
"Phone": "text",
"Fax": "text",
"Mail": "text",
"WebSite": "text",
"PartyIdentifications": [
{
"SchemeID": "text",
"Value": "text"
}
],
"AgentPartyIdentifications": [
{
"SchemeID": "text",
"Value": "text"
}
]
},
"CustomerInfo": {
"TaxNumber": "text",
"Name": "text",
"TaxOffice": "text",
"Address": "text",
"District": "text",
"City": "text",
"Country": "text",
"PostalCode": "text",
"Phone": "text",
"Fax": "text",
"Mail": "text",
"WebSite": "text",
"PartyIdentifications": [
{
"SchemeID": "text",
"Value": "text"
}
],
"AgentPartyIdentifications": [
{
"SchemeID": "text",
"Value": "text"
}
]
},
"InvoiceLines": [
{
"Index": "text",
"SellerCode": "text",
"BuyerCode": "text",
"Name": "text",
"Description": "text",
"Quantity": 1,
"UnitType": "text",
"Price": 1,
"AllowanceTotal": 1,
"KDVPercent": 1,
"KDVTotal": 1,
"ManufacturerCode": "text",
"BrandName": "text",
"ModelName": "text",
"Note": "text",
"SerialID": "text",
"OzelMatrahReason": "text",
"OzelMatrahTotal": 1,
"VatAmountWithoutTevkifat": 1,
"ExportRegisteredInfo": {
"DIIBLineCode": "text",
"GTIPNo": "text"
},
"AdditionalItemIdentification": {
"TagNumber": "text",
"OwnerName": "text",
"OwnerTaxNumber": "text"
},
"Taxes": [
{
"TaxCode": "text",
"Total": 1,
"Percent": 1,
"ReasonCode": "text",
"ReasonDesc": "text"
}
]
}
],
"Notes": [
"text"
]
},
"SpecialCode": "text",
"Tags": [
"123e4567-e89b-12d3-a456-426614174000"
]
}
]
}'
[
"text"
]
Toplu Taslak fatura oluşturur