Taslağı Düzenleyip Gönderir
var client = new RestClient("//einvoice/Draft/EditAndSend");
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": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"TemplateBase64String": "string",
"InvoiceType": "SATIS",
"InvoiceSerieOrNumber": "string",
"IssueDate": "2022-11-08T13:45:00.975Z",
"CurrencyCode": "string",
"ExchangeRate": 0,
"InvoiceProfile": "TEMELFATURA",
"DespatchDocumentReference": [
{
"IssueDate": "2022-11-08T13:45:00.975Z",
"Value": "string"
}
],
"OrderReference": {
"IssueDate": "2022-11-08T13:45:00.975Z",
"Value": "string"
},
"OrderReferenceDocument": {
"ID": "string",
"IssueDate": "2022-11-08T13:45:00.975Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
},
"AdditionalDocumentReferences": [
{
"ID": "string",
"IssueDate": "2022-11-08T13:45:00.975Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
}
],
"TaxExemptionReasonInfo": {
"KDVExemptionReasonCode": "string",
"OTVExemptionReasonCode": "string",
"OzelMatrahExemptionReasonCode": "string"
},
"PaymentTermsInfo": {
"Percent": 0,
"Amount": 0,
"Note": "string"
},
"PaymentMeansInfo": {
"Code": "string",
"ChannelCode": "string",
"DueDate": "2022-11-08T13:45:00.975Z",
"PayeeFinancialAccountID": "string",
"Note": "string"
},
"OKCInfo": {
"ID": "string",
"IssueDate": "2022-11-08T13:45:00.975Z",
"Time": "string",
"ZNo": "string",
"EndPointID": "string",
"DocumentDescription": "string"
},
"ReturnInvoiceInfo": [
{
"InvoiceNumber": "string",
"IssueDate": "2022-11-08T13:45:00.975Z"
}
],
"AccountingCost": "string",
"InvoicePeriod": {
"StartDate": "2022-11-08T13:45:00.975Z",
"StartTime": "2022-11-08T13:45:00.975Z",
"EndDate": "2022-11-08T13:45:00.975Z",
"EndTime": "2022-11-08T13:45:00.975Z",
"DurationMeasureValue": 0,
"Description": "string"
},
"SGKInfo": {
"RegisterName": "string",
"DocumentNumber": "string",
"RegisterCode": "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"
},
"BuyerCustomerInfo": {
"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"
},
"ExportCustomerInfo": {
"TaxNumber": "string",
"LegalRegistrationName": "string",
"PersonName": "string",
"PersonSurName": "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"
}
],
"DeliveryInfo": {
"GTIPNo": "string",
"DeliveryTermCode": "string",
"TransportModeCode": "string",
"PackageBrandName": "string",
"ProductTraceID": "string",
"PackageID": "string",
"PackageQuantity": 0,
"PackageTypeCode": "string",
"DeliveryAddress": {
"Address": "string",
"District": "string",
"City": "string",
"Country": "string",
"PostalCode": "string",
"Phone": "string",
"Fax": "string",
"Mail": "string",
"WebSite": "string"
}
},
"ManufacturerCode": "string",
"BrandName": "string",
"ModelName": "string",
"Note": "string",
"OzelMatrahReason": "string",
"OzelMatrahTotal": 0
}
],
"Notes": [
"string"
]
},
"CustomerAlias": "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 => '//einvoice/Draft/EditAndSend',
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 =>'{
"EInvoice": {
"InvoiceInfo": {
"UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"TemplateBase64String": "string",
"InvoiceType": "SATIS",
"InvoiceSerieOrNumber": "string",
"IssueDate": "2022-11-08T13:45:00.975Z",
"CurrencyCode": "string",
"ExchangeRate": 0,
"InvoiceProfile": "TEMELFATURA",
"DespatchDocumentReference": [
{
"IssueDate": "2022-11-08T13:45:00.975Z",
"Value": "string"
}
],
"OrderReference": {
"IssueDate": "2022-11-08T13:45:00.975Z",
"Value": "string"
},
"OrderReferenceDocument": {
"ID": "string",
"IssueDate": "2022-11-08T13:45:00.975Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
},
"AdditionalDocumentReferences": [
{
"ID": "string",
"IssueDate": "2022-11-08T13:45:00.975Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
}
],
"TaxExemptionReasonInfo": {
"KDVExemptionReasonCode": "string",
"OTVExemptionReasonCode": "string",
"OzelMatrahExemptionReasonCode": "string"
},
"PaymentTermsInfo": {
"Percent": 0,
"Amount": 0,
"Note": "string"
},
"PaymentMeansInfo": {
"Code": "string",
"ChannelCode": "string",
"DueDate": "2022-11-08T13:45:00.975Z",
"PayeeFinancialAccountID": "string",
"Note": "string"
},
"OKCInfo": {
"ID": "string",
"IssueDate": "2022-11-08T13:45:00.975Z",
"Time": "string",
"ZNo": "string",
"EndPointID": "string",
"DocumentDescription": "string"
},
"ReturnInvoiceInfo": [
{
"InvoiceNumber": "string",
"IssueDate": "2022-11-08T13:45:00.975Z"
}
],
"AccountingCost": "string",
"InvoicePeriod": {
"StartDate": "2022-11-08T13:45:00.975Z",
"StartTime": "2022-11-08T13:45:00.975Z",
"EndDate": "2022-11-08T13:45:00.975Z",
"EndTime": "2022-11-08T13:45:00.975Z",
"DurationMeasureValue": 0,
"Description": "string"
},
"SGKInfo": {
"RegisterName": "string",
"DocumentNumber": "string",
"RegisterCode": "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"
},
"BuyerCustomerInfo": {
"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"
},
"ExportCustomerInfo": {
"TaxNumber": "string",
"LegalRegistrationName": "string",
"PersonName": "string",
"PersonSurName": "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"
}
],
"DeliveryInfo": {
"GTIPNo": "string",
"DeliveryTermCode": "string",
"TransportModeCode": "string",
"PackageBrandName": "string",
"ProductTraceID": "string",
"PackageID": "string",
"PackageQuantity": 0,
"PackageTypeCode": "string",
"DeliveryAddress": {
"Address": "string",
"District": "string",
"City": "string",
"Country": "string",
"PostalCode": "string",
"Phone": "string",
"Fax": "string",
"Mail": "string",
"WebSite": "string"
}
},
"ManufacturerCode": "string",
"BrandName": "string",
"ModelName": "string",
"Note": "string",
"OzelMatrahReason": "string",
"OzelMatrahTotal": 0
}
],
"Notes": [
"string"
]
},
"CustomerAlias": "string"
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Accept: text/plain',
'Authorization: Bearer <API KEY>'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var axios = require('axios');
var data = JSON.stringify({
"EInvoice": {
"InvoiceInfo": {
"UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"TemplateBase64String": "string",
"InvoiceType": "SATIS",
"InvoiceSerieOrNumber": "string",
"IssueDate": "2022-11-08T13:45:00.975Z",
"CurrencyCode": "string",
"ExchangeRate": 0,
"InvoiceProfile": "TEMELFATURA",
"DespatchDocumentReference": [
{
"IssueDate": "2022-11-08T13:45:00.975Z",
"Value": "string"
}
],
"OrderReference": {
"IssueDate": "2022-11-08T13:45:00.975Z",
"Value": "string"
},
"OrderReferenceDocument": {
"ID": "string",
"IssueDate": "2022-11-08T13:45:00.975Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
},
"AdditionalDocumentReferences": [
{
"ID": "string",
"IssueDate": "2022-11-08T13:45:00.975Z",
"DocumentType": "string",
"DocumentTypeCode": "string",
"DocumentDescription": "string",
"Attachment": {
"Base64Data": "string",
"MimeCode": "string",
"FileName": "string"
}
}
],
"TaxExemptionReasonInfo": {
"KDVExemptionReasonCode": "string",
"OTVExemptionReasonCode": "string",
"OzelMatrahExemptionReasonCode": "string"
},
"PaymentTermsInfo": {
"Percent": 0,
"Amount": 0,
"Note": "string"
},
"PaymentMeansInfo": {
"Code": "string",
"ChannelCode": "string",
"DueDate": "2022-11-08T13:45:00.975Z",
"PayeeFinancialAccountID": "string",
"Note": "string"
},
"OKCInfo": {
"ID": "string",
"IssueDate": "2022-11-08T13:45:00.975Z",
"Time": "string",
"ZNo": "string",
"EndPointID": "string",
"DocumentDescription": "string"
},
"ReturnInvoiceInfo": [
{
"InvoiceNumber": "string",
"IssueDate": "2022-11-08T13:45:00.975Z"
}
],
"AccountingCost": "string",
"InvoicePeriod": {
"StartDate": "2022-11-08T13:45:00.975Z",
"StartTime": "2022-11-08T13:45:00.975Z",
"EndDate": "2022-11-08T13:45:00.975Z",
"EndTime": "2022-11-08T13:45:00.975Z",
"DurationMeasureValue": 0,
"Description": "string"
},
"SGKInfo": {
"RegisterName": "string",
"DocumentNumber": "string",
"RegisterCode": "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"
},
"BuyerCustomerInfo": {
"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"
},
"ExportCustomerInfo": {
"TaxNumber": "string",
"LegalRegistrationName": "string",
"PersonName": "string",
"PersonSurName": "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"
}
],
"DeliveryInfo": {
"GTIPNo": "string",
"DeliveryTermCode": "string",
"TransportModeCode": "string",
"PackageBrandName": "string",
"ProductTraceID": "string",
"PackageID": "string",
"PackageQuantity": 0,
"PackageTypeCode": "string",
"DeliveryAddress": {
"Address": "string",
"District": "string",
"City": "string",
"Country": "string",
"PostalCode": "string",
"Phone": "string",
"Fax": "string",
"Mail": "string",
"WebSite": "string"
}
},
"ManufacturerCode": "string",
"BrandName": "string",
"ModelName": "string",
"Note": "string",
"OzelMatrahReason": "string",
"OzelMatrahTotal": 0
}
],
"Notes": [
"string"
]
},
"CustomerAlias": "string"
});
var config = {
method: 'post',
url: '//einvoice/Draft/EditAndSend',
headers: {
'Content-Type': 'application/json',
'Accept': 'text/plain',
'Authorization': 'Bearer <API KEY>'
},
data : data
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});