# Taslağı Düzenleyip Gönderir

## Taslak belgeyi düzenleyerek gönderir.

> Taslak olarak oluşturduğunuz belgeyi düzenleyerek göndermek için bu ucu kullanabilirsiniz.

```json
{"openapi":"3.0.1","info":{"title":"E-Archive API","version":"v1"},"servers":[{"url":"/earchive"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"EditAndSendCommand":{"type":"object","properties":{"ArchiveInvoice":{"$ref":"#/components/schemas/ArchiveInvoiceDto"}},"additionalProperties":false},"ArchiveInvoiceDto":{"type":"object","properties":{"InvoiceInfo":{"$ref":"#/components/schemas/ArchiveInvoiceInfoDto"},"CompanyInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"CustomerInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"InvoiceLines":{"type":"array","items":{"$ref":"#/components/schemas/EArchiveInvoiceLineDto"},"nullable":true},"Notes":{"type":"array","items":{"type":"string"},"nullable":true}},"additionalProperties":false},"ArchiveInvoiceInfoDto":{"type":"object","properties":{"UUID":{"type":"string","format":"uuid"},"TemplateUUID":{"type":"string","format":"uuid"},"TemplateBase64String":{"type":"string","nullable":true},"InvoiceType":{"$ref":"#/components/schemas/InvoiceType"},"InvoiceSerieOrNumber":{"type":"string","nullable":true},"IssueDate":{"type":"string","format":"date-time"},"CurrencyCode":{"type":"string","nullable":true},"ExchangeRate":{"type":"number","format":"double","nullable":true},"DespatchDocumentReference":{"type":"array","items":{"$ref":"#/components/schemas/KeyValueDto"},"nullable":true},"OrderReference":{"$ref":"#/components/schemas/KeyValueDto"},"OrderReferenceDocument":{"$ref":"#/components/schemas/AdditionalDocumentReferenceDto"},"AdditionalDocumentReferences":{"type":"array","items":{"$ref":"#/components/schemas/AdditionalDocumentReferenceDto"},"nullable":true},"TaxExemptionReasonInfo":{"$ref":"#/components/schemas/TaxExemptionReasonInfoDto"},"PaymentTermsInfo":{"$ref":"#/components/schemas/PaymentTermsDto"},"PaymentMeansInfo":{"$ref":"#/components/schemas/PaymentMeansDto"},"OKCInfo":{"$ref":"#/components/schemas/OKCInfoDto"},"ESUReportInfo":{"$ref":"#/components/schemas/ESUReportInfoDto"},"InvoicePeriod":{"$ref":"#/components/schemas/InvoicePeriodDto"},"ReturnInvoiceInfo":{"type":"array","items":{"$ref":"#/components/schemas/ReturnInvoiceInfoDto"},"nullable":true},"Expenses":{"type":"array","items":{"$ref":"#/components/schemas/ExpensesDto"},"nullable":true},"ISDespatch":{"type":"boolean"},"SalesPlatform":{"$ref":"#/components/schemas/SalesPlatform"},"SendType":{"$ref":"#/components/schemas/SendType"},"InternetInfo":{"$ref":"#/components/schemas/InternetInfoDto"},"AccountingCost":{"type":"string","nullable":true},"LineExtensionAmount":{"type":"number","format":"double"},"GeneralKDV1Total":{"type":"number","format":"double"},"GeneralKDV8Total":{"type":"number","format":"double"},"GeneralKDV18Total":{"type":"number","format":"double"},"GeneralKDV10Total":{"type":"number","format":"double"},"GeneralKDV20Total":{"type":"number","format":"double"},"GeneralAllowanceTotal":{"type":"number","format":"double"},"PayableAmount":{"type":"number","format":"double"},"KdvTotal":{"type":"number","format":"double"}},"additionalProperties":false},"InvoiceType":{"enum":["SATIS","IADE","ISTISNA","TEVKIFAT","IHRACKAYITLI","IPTAL","OZELMATRAH","SGK","TEVKIFATIADE","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","KONAKLAMAVERGISI","SARJ","SARJANLIK","TEKNOLOJIDESTEK"],"type":"string"},"KeyValueDto":{"type":"object","properties":{"IssueDate":{"type":"string","format":"date-time","nullable":true},"Value":{"type":"string","nullable":true}},"additionalProperties":false},"AdditionalDocumentReferenceDto":{"type":"object","properties":{"ID":{"type":"string","nullable":true},"IssueDate":{"type":"string","format":"date-time","nullable":true},"DocumentType":{"type":"string","nullable":true},"DocumentTypeCode":{"type":"string","nullable":true},"DocumentDescription":{"type":"string","nullable":true},"Attachment":{"$ref":"#/components/schemas/AttachmentDto"}},"additionalProperties":false},"AttachmentDto":{"type":"object","properties":{"Base64Data":{"type":"string","nullable":true},"MimeCode":{"type":"string","nullable":true},"FileName":{"type":"string","nullable":true}},"additionalProperties":false},"TaxExemptionReasonInfoDto":{"type":"object","properties":{"KDVExemptionReasonCode":{"type":"string","nullable":true},"OTVExemptionReasonCode":{"type":"string","nullable":true},"AccommodationTaxExemptionReasonCode":{"type":"string","nullable":true}},"additionalProperties":false},"PaymentTermsDto":{"type":"object","properties":{"Percent":{"type":"number","format":"double","nullable":true},"Amount":{"type":"number","format":"double","nullable":true},"Note":{"type":"string","nullable":true}},"additionalProperties":false},"PaymentMeansDto":{"type":"object","properties":{"Code":{"type":"string","nullable":true},"ChannelCode":{"type":"string","nullable":true},"DueDate":{"type":"string","format":"date-time","nullable":true},"PayeeFinancialAccountID":{"type":"string","nullable":true},"Note":{"type":"string","nullable":true}},"additionalProperties":false},"OKCInfoDto":{"type":"object","properties":{"ID":{"type":"string","nullable":true},"IssueDate":{"type":"string","format":"date-time","nullable":true},"Time":{"type":"string","nullable":true},"ZNo":{"type":"string","nullable":true},"EndPointID":{"type":"string","nullable":true},"DocumentDescription":{"type":"string","nullable":true}},"additionalProperties":false},"ESUReportInfoDto":{"type":"object","properties":{"ID":{"type":"string","nullable":true},"IssueDate":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false},"InvoicePeriodDto":{"type":"object","properties":{"StartDate":{"type":"string","format":"date-time","nullable":true},"StartTime":{"type":"string","nullable":true},"EndDate":{"type":"string","format":"date-time","nullable":true},"EndTime":{"type":"string","nullable":true},"DurationMeasureValue":{"type":"number","format":"double","nullable":true},"Description":{"type":"string","nullable":true}},"additionalProperties":false},"ReturnInvoiceInfoDto":{"type":"object","properties":{"InvoiceNumber":{"type":"string","nullable":true},"IssueDate":{"type":"string","format":"date-time"}},"additionalProperties":false},"ExpensesDto":{"type":"object","properties":{"ExpenseType":{"$ref":"#/components/schemas/ExpenseType"},"Percent":{"type":"number","format":"double"},"Amount":{"type":"number","format":"double"}},"additionalProperties":false},"ExpenseType":{"enum":["HKSKOMISYON","HKSKOMISYONKDV","HKSNAVLUN","HKSNAVLUNKDV","HKSHAMMALIYE","HKSHAMMALIYEKDV","HKSNAKLIYE","HKSNAKLIYEKDV","HKSGVTEVKIFAT","HKSBAGKURTEVKIFAT","HKSRUSUM","HKSRUSUMKDV","HKSTICBORSASI","HKSTICBORSASIKDV","HKSMILLISAVUNMAFON","HKSMSFONKDV","HKSDIGERMASRAFLAR","HKSDIGERKDV"],"type":"string"},"SalesPlatform":{"enum":["NORMAL","INTERNET"],"type":"string"},"SendType":{"enum":["KAGIT","ELEKTRONIK"],"type":"string"},"InternetInfoDto":{"type":"object","properties":{"WebSite":{"type":"string","nullable":true},"PaymentMethod":{"type":"string","nullable":true},"PaymentMethodName":{"type":"string","nullable":true},"PaymentAgentName":{"type":"string","nullable":true},"PaymentDate":{"type":"string","format":"date-time","nullable":true},"TransporterName":{"type":"string","nullable":true},"TransporterRegisterNumber":{"type":"string","nullable":true},"TransportDate":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false},"PartyInfoDto":{"type":"object","properties":{"TaxNumber":{"type":"string","nullable":true},"Name":{"type":"string","nullable":true},"TaxOffice":{"type":"string","nullable":true},"PartyIdentifications":{"type":"array","items":{"$ref":"#/components/schemas/IDTypeDto"},"nullable":true},"AgentPartyIdentifications":{"type":"array","items":{"$ref":"#/components/schemas/IDTypeDto"},"nullable":true},"Address":{"type":"string","nullable":true},"District":{"type":"string","nullable":true},"City":{"type":"string","nullable":true},"Country":{"type":"string","nullable":true},"PostalCode":{"type":"string","nullable":true},"Phone":{"type":"string","nullable":true},"Fax":{"type":"string","nullable":true},"Mail":{"type":"string","nullable":true},"WebSite":{"type":"string","nullable":true}},"additionalProperties":false},"IDTypeDto":{"type":"object","properties":{"SchemeID":{"type":"string","nullable":true},"Value":{"type":"string","nullable":true}},"additionalProperties":false},"EArchiveInvoiceLineDto":{"type":"object","properties":{"Index":{"type":"string","nullable":true},"SellerCode":{"type":"string","nullable":true},"BuyerCode":{"type":"string","nullable":true},"Name":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"Quantity":{"type":"number","format":"double"},"UnitType":{"type":"string","nullable":true},"Price":{"type":"number","format":"double"},"AllowanceTotal":{"type":"number","format":"double"},"KDVPercent":{"type":"number","format":"double"},"KDVTotal":{"type":"number","format":"double"},"Taxes":{"type":"array","items":{"$ref":"#/components/schemas/TaxDto"},"nullable":true},"ManufacturerCode":{"type":"string","nullable":true},"BrandName":{"type":"string","nullable":true},"ModelName":{"type":"string","nullable":true},"Note":{"type":"string","nullable":true},"SerialID":{"type":"string","nullable":true},"OzelMatrahReason":{"type":"string","nullable":true},"OzelMatrahTotal":{"type":"number","format":"double","nullable":true},"VatAmountWithoutTevkifat":{"type":"number","format":"double","nullable":true},"TechSupport":{"$ref":"#/components/schemas/TechSupportDto"},"ExportRegisteredInfo":{"$ref":"#/components/schemas/ExportRegisteredInfoDto"},"AdditionalItemIdentification":{"$ref":"#/components/schemas/AdditionalItemIdentificationDto"}},"additionalProperties":false},"TaxDto":{"type":"object","properties":{"TaxCode":{"type":"string","nullable":true},"Total":{"type":"number","format":"double","nullable":true},"Percent":{"type":"number","format":"double","nullable":true},"ReasonCode":{"type":"string","nullable":true},"ReasonDesc":{"type":"string","nullable":true}},"additionalProperties":false},"TechSupportDto":{"type":"object","properties":{"IMEINumbers":{"type":"array","items":{"type":"string"},"nullable":true},"IsTabletOrPc":{"type":"boolean"}},"additionalProperties":false},"ExportRegisteredInfoDto":{"type":"object","properties":{"DIIBLineCode":{"type":"string","nullable":true},"GTIPNo":{"type":"string","nullable":true}},"additionalProperties":false},"AdditionalItemIdentificationDto":{"type":"object","properties":{"TagNumber":{"type":"string","nullable":true},"OwnerName":{"type":"string","nullable":true},"OwnerTaxNumber":{"type":"string","nullable":true}},"additionalProperties":false},"SendResponse":{"type":"object","properties":{"UUID":{"type":"string","format":"uuid"},"InvoiceNumber":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/Draft/EditAndSend":{"post":{"tags":["Draft"],"summary":"Taslak belgeyi düzenleyerek gönderir.","description":"Taslak olarak oluşturduğunuz belgeyi düzenleyerek göndermek için bu ucu kullanabilirsiniz.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/EditAndSendCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/EditAndSendCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/EditAndSendCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/EditAndSendCommand"}}}},"responses":{"200":{"description":"Taslak belgeyi düzenleyerek gönderir","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendResponse"}}}},"400":{"description":"Geçersiz İstek | Gönderdiğiniz istekte geçersiz veriler bulunduğu anlamında gelmektedir | Detaylar için <a target=\"_blank\" href=\"https://developer.nilvera.com/hata-kodlari#badrequest-400\">tıklayınız</a>"},"403":{"description":"Yetkisiz Erişim | Bu uca erişmek için gerekli yetkiye sahip olmadığınız durumda dönülür"},"404":{"description":"Parametrede belirtilen kayıt bulunamadığında dönülür | Detaylar için <a target=\"_blank\" href=\"https://developer.nilvera.com/hata-kodlari#notfound-404\">tıklayınız</a>"},"409":{"description":"Gönderdiğiniz istek sistemde daha önce bulunduğunda dönülür | Detaylar için <a target=\"_blank\" href=\"https://developer.nilvera.com/hata-kodlari#conflict-409\">tıklayınız</a>"},"422":{"description":"Gönderdiğiniz istek geçerli fakat iş kuralları gereği geçersiz değerler içerdiğinde dönülür | Detaylar için <a target=\"_blank\" href=\"https://developer.nilvera.com/hata-kodlari#unprocessableentity-422\">tıklayınız</a>"}}}}}}
```

{% tabs %}
{% tab title="C#" %}

```csharp
var client = new RestClient("https://apitest.nilvera.com/earchive/Draft/EditAndSend");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"{
"ArchiveInvoice": {
    "InvoiceInfo": {
      "UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "TemplateBase64String": "string",
      "InvoiceType": "SATIS",
      "InvoiceSerieOrNumber": "string",
      "IssueDate": "2023-01-10T13:55:49.367Z",
      "CurrencyCode": "string",
      "ExchangeRate": 0,
      "DespatchDocumentReference": [
        {
          "IssueDate": "2023-01-10T13:55:49.367Z",
          "Value": "string"
        }
      ],
      "OrderReference": {
        "IssueDate": "2023-01-10T13:55:49.367Z",
        "Value": "string"
      },
      "OrderReferenceDocument": {
        "ID": "string",
        "IssueDate": "2023-01-10T13:55:49.367Z",
        "DocumentType": "string",
        "DocumentTypeCode": "string",
        "DocumentDescription": "string",
        "Attachment": {
          "Base64Data": "string",
          "MimeCode": "string",
          "FileName": "string"
        }
      },
      "AdditionalDocumentReferences": [
        {
          "ID": "string",
          "IssueDate": "2023-01-10T13:55:49.367Z",
          "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-10T13:55:49.367Z",
        "PayeeFinancialAccountID": "string",
        "Note": "string"
      },
      "OKCInfo": {
        "ID": "string",
        "IssueDate": "2023-01-10T13:55:49.367Z",
        "Time": "string",
        "ZNo": "string",
        "EndPointID": "string",
        "DocumentDescription": "string"
      },
      "ReturnInvoiceInfo": [
        {
          "InvoiceNumber": "string",
          "IssueDate": "2023-01-10T13:55:49.367Z"
        }
      ],
      "Expenses": [
        {
          "ExpenseType": "HKSKOMISYON",
          "Percent": 0,
          "Amount": 0
        }
      ],
      "ISDespatch": true,
      "SalesPlatform": "NORMAL",
      "SendType": "KAGIT",
      "InternetInfo": {
        "WebSite": "string",
        "PaymentMethod": "string",
        "PaymentMethodName": "string",
        "PaymentDate": "2023-01-10T13:55:49.367Z",
        "TransporterName": "string",
        "TransporterRegisterNumber": "string",
        "TransportDate": "2023-01-10T13:55:49.368Z"
      },
      "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);
```

{% endtab %}

{% tab title="PHP - cURL" %}

```php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://apitest.nilvera.com/earchive/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 =>'{
  "ArchiveInvoice": {
    "InvoiceInfo": {
      "UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "TemplateBase64String": "string",
      "InvoiceType": "SATIS",
      "InvoiceSerieOrNumber": "string",
      "IssueDate": "2023-01-10T13:55:49.367Z",
      "CurrencyCode": "string",
      "ExchangeRate": 0,
      "DespatchDocumentReference": [
        {
          "IssueDate": "2023-01-10T13:55:49.367Z",
          "Value": "string"
        }
      ],
      "OrderReference": {
        "IssueDate": "2023-01-10T13:55:49.367Z",
        "Value": "string"
      },
      "OrderReferenceDocument": {
        "ID": "string",
        "IssueDate": "2023-01-10T13:55:49.367Z",
        "DocumentType": "string",
        "DocumentTypeCode": "string",
        "DocumentDescription": "string",
        "Attachment": {
          "Base64Data": "string",
          "MimeCode": "string",
          "FileName": "string"
        }
      },
      "AdditionalDocumentReferences": [
        {
          "ID": "string",
          "IssueDate": "2023-01-10T13:55:49.367Z",
          "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-10T13:55:49.367Z",
        "PayeeFinancialAccountID": "string",
        "Note": "string"
      },
      "OKCInfo": {
        "ID": "string",
        "IssueDate": "2023-01-10T13:55:49.367Z",
        "Time": "string",
        "ZNo": "string",
        "EndPointID": "string",
        "DocumentDescription": "string"
      },
      "ReturnInvoiceInfo": [
        {
          "InvoiceNumber": "string",
          "IssueDate": "2023-01-10T13:55:49.367Z"
        }
      ],
      "Expenses": [
        {
          "ExpenseType": "HKSKOMISYON",
          "Percent": 0,
          "Amount": 0
        }
      ],
      "ISDespatch": true,
      "SalesPlatform": "NORMAL",
      "SendType": "KAGIT",
      "InternetInfo": {
        "WebSite": "string",
        "PaymentMethod": "string",
        "PaymentMethodName": "string",
        "PaymentDate": "2023-01-10T13:55:49.367Z",
        "TransporterName": "string",
        "TransporterRegisterNumber": "string",
        "TransportDate": "2023-01-10T13:55:49.368Z"
      },
      "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;
```

{% endtab %}

{% tab title="NodeJs - Axios" %}

```javascript
var axios = require('axios');
var data = JSON.stringify({
  "ArchiveInvoice": {
    "InvoiceInfo": {
      "UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "TemplateBase64String": "string",
      "InvoiceType": "SATIS",
      "InvoiceSerieOrNumber": "string",
      "IssueDate": "2023-01-10T13:55:49.367Z",
      "CurrencyCode": "string",
      "ExchangeRate": 0,
      "DespatchDocumentReference": [
        {
          "IssueDate": "2023-01-10T13:55:49.367Z",
          "Value": "string"
        }
      ],
      "OrderReference": {
        "IssueDate": "2023-01-10T13:55:49.367Z",
        "Value": "string"
      },
      "OrderReferenceDocument": {
        "ID": "string",
        "IssueDate": "2023-01-10T13:55:49.367Z",
        "DocumentType": "string",
        "DocumentTypeCode": "string",
        "DocumentDescription": "string",
        "Attachment": {
          "Base64Data": "string",
          "MimeCode": "string",
          "FileName": "string"
        }
      },
      "AdditionalDocumentReferences": [
        {
          "ID": "string",
          "IssueDate": "2023-01-10T13:55:49.367Z",
          "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-10T13:55:49.367Z",
        "PayeeFinancialAccountID": "string",
        "Note": "string"
      },
      "OKCInfo": {
        "ID": "string",
        "IssueDate": "2023-01-10T13:55:49.367Z",
        "Time": "string",
        "ZNo": "string",
        "EndPointID": "string",
        "DocumentDescription": "string"
      },
      "ReturnInvoiceInfo": [
        {
          "InvoiceNumber": "string",
          "IssueDate": "2023-01-10T13:55:49.367Z"
        }
      ],
      "Expenses": [
        {
          "ExpenseType": "HKSKOMISYON",
          "Percent": 0,
          "Amount": 0
        }
      ],
      "ISDespatch": true,
      "SalesPlatform": "NORMAL",
      "SendType": "KAGIT",
      "InternetInfo": {
        "WebSite": "string",
        "PaymentMethod": "string",
        "PaymentMethodName": "string",
        "PaymentDate": "2023-01-10T13:55:49.367Z",
        "TransporterName": "string",
        "TransporterRegisterNumber": "string",
        "TransportDate": "2023-01-10T13:55:49.368Z"
      },
      "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/EditAndSend',
  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);
});
```

{% endtab %}
{% endtabs %}
