# Genel Bakış

## API Hakkında

**Nilvera API**'leri, REST olarak tasarlanmıştır. API istek ve dönüşleri HTTP standartlarına uygun olarak geliştirilmiştir. Dokumanın ilerleyen sayfalarında Ortak Nesneler hakkında detaylı bilgiler verilmiştir.

API istek ve dönüş tiplerinde **OAS 3.x** standartları kullanılmıştır. İlgili API'lere ait tanımlayıcı dosyaları ile kendi uygulamalarınızı çok hızlı ve sorunsuz bir biçimde entegre edebilirsiniz.

API dokumantasyonları içerisinde tüm uçların açıklamaları, istek ve dönüş tipleri detaylıca açıklanmıştır.

API'leri kullanarak **e-Fatura**, **e-Arşiv Fatura**, **e-İrsaliye**, **e-Serbest Meslek Makbuzu**, **e-Müstahsil Makbuzu**, **e-Adisyon** özel entegratörlük hizmetlerimizi geliştirmiş olduğunuz ERP/Muhasebe sistemleri ve diğer uygulamalarınız ile entegre edebilirsiniz.

## Test ve Canlı Ortam Hakkında

API'ler Canlı ve Test ortamı olarak ayrılmaktadır. Test ortamında üretilen anahtlar ile Canlı ortam anahtarları ve Firma bilgileri birbirinden ayrı olacaktır.

Test ortamı ile tüm entegrasyon tamamlandıktan sonra canlı hesap açılışları yapıldıktan sonra endpoint canlı ortama bakacak şekilde ayarlanması durumunda bir sorun yaşanmayacaktır.

{% tabs %}
{% tab title="Canlı Ortam" %}

```url
https://api.nilvera.com/{API_NAME}
```

{% endtab %}

{% tab title="Test Ortamı" %}

```
https://apitest.nilvera.com/{API_NAME}
```

{% endtab %}
{% endtabs %}

## Authentication ve Authorization

Tüm API'lerimizde yetkilendirme mekanizması olarak OAuth 2.0 kullanılmaktadır. Hizmetlere ait API'ler farklı uygulamalar olmasına karşın merkezi yetkilendirme otoritesi üzerinden API'leri kullanabilirsiniz.

API'lerde kullanılacak Token tipi JWT değil Reference tipindedir. Daha önceden edindiğiniz kullanıcı adı ve şifrenizle Portal uygulaması üzerinden API'lerde kullanmak üzere API Anahtarı üretmelisiniz.

Üretilen API Anahtarı sizin belirleyeceğiniz yetkilere (scope) sahip olacak ve sadece yetkisi olduğu işlemleri yapabilecek, belirttiğiniz süre dolduğunda da API Anahtarı geçersiz olacaktır.

{% hint style="info" %}
API anahtarları <mark style="color:orange;">`Persisted Access Token`</mark> şeklindedir. Bir anahtar ürettikten sonra bu anahtarı sürekli kullanabilir, Portal üzerinden erişimini anında sonlandırabilirsiniz.

Örnek : 9EE05B6564525810C86A32646DB46A26E20F4BCE32C0B13AB22AA78E70DC4F69
{% endhint %}

![](https://content.gitbook.com/content/d6zbpiT3oETRlZXAzPZr/blobs/shKBzo8BPFQJRFb9jFG4/api.png)

> **Not:** API anahtarını servis çağrılarınızın Header alanında `Authorization:Bearer {API_ANAHTARI}` şeklinde göndermeniz API nin sizi tanıması ve yetkilendirmesi için yeterli olacaktır.


# API Anahtarı Üretimi

{% hint style="info" %}
Kullanıcı Adı ve Şifre kullanılarak Portal üzerinde oturum açıldıktan sonra sırayla aşağıdaki işlemler takip edilir.
{% endhint %}

Sol Menüden,  **API Tanımları** > **Yeni Anahtar** 'a tıklanır.\
Gelen erkandaki bilgiler doldurulur.

* **Açıklama** kısmına ilgili anahtar için hatırlatıcı bir değer girebilirsiniz. Örn : X Erp Entegrasyon vb.
* **Son geçerlilik tarihi**, api anahtarının hangi süreye kadar geçerli olacağını belirtir. Boş bırakarak süresiz olarak ayarlayabilirsiniz

![Api Key](https://content.gitbook.com/content/d6zbpiT3oETRlZXAzPZr/blobs/s5MQ2zAgqFFjE6rpU9RU/apikey.png)

{% hint style="warning" %}
**Not :** Üretilen anahtar yalnızca bir kez görüntülenir. Ürettiğiniz anahtarı mutlaka kopyalayarak, kendi uygulamalarınızdaki ilgili alanlara kaydetmelisiniz
{% endhint %}


# Hata Kodları

<table data-card-size="large" data-column-title-hidden data-view="cards"><thead><tr><th>Http Status Kodlar</th><th> </th></tr></thead><tbody><tr><td><strong>200 - OK</strong></td><td>HTTP 200 durum kodu, yanıtın başarılı olduğunu gösterir.</td></tr><tr><td><strong>401 - Unauthorized</strong></td><td>Bu durumda, alınan bir yanıta erişim sağlamak için yetkilendirme gerekir.</td></tr><tr><td><strong>403 - Forbidden</strong></td><td>Kullanıcının söz konusu kaynak üzerinde herhangi bir yetkiye sahip olmadığı anlamına gelir.</td></tr><tr><td><strong>500, 502, 503, 504 - Server Errors</strong></td><td>Sunucunun belirli bir isteği tamamlamak için gereken gereksinimleri desteklemediğini veya sahip olmadığını gösterir. </td></tr></tbody></table>

## BadRequest - <mark style="color:red;">400</mark>

Servisten **400** Http kodu ile bir dönüş aldığınızda, gönderdiğiniz istekte geçersiz veriler bulunduğu anlamında gelmektedir. Bu hatayı aldığınız durumda istek parametrelerinizi gözden geçirmeniz gerekmektedir.

{% code title="Örnek Dönüş" %}

```json
{
  "Message": "GECERSIZ ISTEK",
  "Errors": [
    {
      "Code": 400,
      "Description": "Alias",
      "Detail": "Nesnesi Null Olamaz."
    }
  ]
}
```

{% endcode %}

## NotFound - <mark style="color:red;">404</mark>

Servisten **404** Http kodu ile bir dönüş aldığınızda, gönderdiğiniz isteğe karşılık bir kayıt olamadığı anlamına gelmektedir.&#x20;

{% code title="Örnek Dönüş" %}

```json
{
  "Message": "HATALI ISTEK",
  "Errors": [
    {
      "Code": 3006,
      "Description": "Belge Bulunamadı.",
      "Detail": "61bc499c-8e77-4ec9-a358-8f7a6d657d51 Nolu belge sistemde bulunamadı."
    }
  ]
}
```

{% endcode %}

### 404 Dönebilecek Diğer Kodlar

<table><thead><tr><th width="107">Kod</th><th>Açıklama</th></tr></thead><tbody><tr><td>3000</td><td>Alıcıya Ait Etiket Bulunamadı.</td></tr><tr><td>3001</td><td>Göndericiye Ait Etiket Bulunamadı.</td></tr><tr><td>3002</td><td>Etiket Sistemde Kayıtlı Değildir.</td></tr><tr><td>3003</td><td>Belge Sistemde Bulunamadı.</td></tr><tr><td>3004</td><td>Kayıt Sistemde Bulunamadı.</td></tr><tr><td>3005</td><td>Döküman İçeriği Boş.</td></tr><tr><td>3006</td><td>Rapor Sistemde Bulunamadı.</td></tr><tr><td>3007</td><td>Raporlanacak Fatura Bulunamadı.</td></tr><tr><td>3008</td><td>Raporlanacak Makbuz Bulunamadı.</td></tr><tr><td>3009</td><td>Seri Firmaya Tanımlı Değil.</td></tr><tr><td>3010</td><td>Şablon Bulunamadı.</td></tr><tr><td>3011</td><td>Şablon Aktif Değil.</td></tr><tr><td>3012</td><td>Firmaya Tanımlı Herhangi Bir Şablon Bulunmamaktadır.</td></tr><tr><td>3013</td><td>E-Mail Modülünüz Aktif Değildir.</td></tr><tr><td>3014</td><td>Whatsapp Modülünüz Aktif Değildir.</td></tr><tr><td>3015</td><td>Sms Modülünüz Aktif Değildir.</td></tr><tr><td>3016</td><td>Firma Bayiye Tanımlı Değildir.</td></tr><tr><td>3017</td><td>Koduna Sahip Paketiniz Bulunmamaktadır.</td></tr><tr><td>3018</td><td>Belirtilen Koda Sahip Alt Bayiniz Bulunmamaktadır.</td></tr><tr><td>3019</td><td>Raporlanacak Fatura Bulunamadı.</td></tr><tr><td>3020</td><td>E-Saklama Modülü Bulunamadı.</td></tr><tr><td>3021</td><td>E-Defter Ayarları Bulunamadı.</td></tr><tr><td>3022</td><td>Muhasebeci Bilgisi Bulunamadı.</td></tr><tr><td>3023</td><td>Sertifika Bilgisi Bulunamadı.</td></tr><tr><td>3024</td><td>Firma Erp Ayar Alanı Bulunamadı.</td></tr><tr><td>3025</td><td>E-Defter Sorgusu Bulunamadı</td></tr><tr><td>3026</td><td>E-Defter raporu bulunamadı.</td></tr><tr><td>3027</td><td>E-Defter İmza Değeri Bulunamadı.</td></tr><tr><td>3028</td><td>Mali Dönem Hatalı.</td></tr><tr><td>3029</td><td>Design Modülünüz Bulunamadı.</td></tr><tr><td>3030</td><td>API Bulunamadı.</td></tr></tbody></table>

## Conflict - <mark style="color:red;">409</mark>

Servisten **409** Http kodu ile bir dönüş aldığınızda, gönderdiğiniz istek sistemde daha önce bulunduğu anlamına gelmektedir.

{% code title="Örnek Dönüş" %}

```json
{
  "Message": "HATALI ISTEK",
  "Errors": [
    {
      "Code": 1000,
      "Description": "ETTN Numarası Sistemde Kayıtlıdır.",
      "Detail": "e1b40d5b-24b3-4f79-8735-a01ae5577de7 ETTN Numarası Sistemde Kayıtlıdır."
    }
  ]
}
```

{% endcode %}

### 409 Dönebilecek Diğer Kodlar

<table><thead><tr><th width="106">Kod</th><th>Açıklama</th></tr></thead><tbody><tr><td>1000</td><td>Gönderilen VKN/TCKN İle Firma Uyuşmamaktadır.</td></tr><tr><td>1001</td><td>ETTN Numarası Sistemde Kayıtlıdır.</td></tr><tr><td>1002</td><td>Uyumsuz OperationType Bilgisi.</td></tr><tr><td>1003</td><td>E-Fatura Otomatik Olarak Kabul Edildi Durumundadır.</td></tr><tr><td>1004</td><td>E-Fatura Daha Önce Eklenmiş.</td></tr><tr><td>1005</td><td>E-Fatura Serisi Daha Önce Kullanılmıştır.</td></tr><tr><td>1006 </td><td>Temel Faturalara Cevap Verilmemektedir.</td></tr><tr><td>1007</td><td>E-Fatura Daha Önce Cevaplanmış.</td></tr><tr><td>1008</td><td>E-İrsaliye Otomatik Olarak Kabul Edildi Durumundadır.</td></tr><tr><td>1009</td><td>E-İrsaliye Daha Önce Eklenmiş.</td></tr><tr><td>1010</td><td>E-İrsaiye Serisi Daha Önce Kullanılmıştır.</td></tr><tr><td>1011</td><td>E-İrsaliye Daha Önce Cevaplanmış.</td></tr><tr><td>1012</td><td>E-Arşiv Fatura Daha Önce Eklenmiş.</td></tr><tr><td>1013</td><td>E-SMM Daha Önce Eklenmiş.</td></tr><tr><td>1014</td><td>E-MM Daha Önce Eklenmiş.</td></tr><tr><td>1015</td><td>Kayıt Daha Önce Eklenmiş.</td></tr><tr><td>1016</td><td>Firmanın Belirtilen Yıl İçin Tanımlanmış Saklama Paketi Bulunmaktadır.</td></tr><tr><td>1017</td><td>E-SMM Serisi Daha Önce Kullanılmıştır.</td></tr><tr><td>1018</td><td>E-MM Serisi Daha Önce Kullanılmıştır.</td></tr><tr><td>1019</td><td>E-Adisyon Serisi Daha Önce Kullanılmıştır.</td></tr><tr><td>1020</td><td>E-Adisyon Daha Önce Eklenmiş.</td></tr></tbody></table>

## UnprocessableEntity - <mark style="color:red;">422</mark>

Servisten **422** Http kodu ile bir dönüş aldığınızda, gönderdiğiniz istek geçerli fakat iş kuralları gereği geçersiz değerler içermektedir.

{% code title="Örnek Dönüş" %}

```json
{
  "Message": "HATALI ISTEK",
  "Errors": [
    {
      "Code": 2000,
      "Description": "Yeterli Kontörünüz Bulunmamaktadır.",
      "Detail": "Yeterli Kontörünüz Bulunmamaktadır. Lütfen Kontör Alımı Yapınız."
    }
  ]
}
```

{% endcode %}

### 422 Dönebilecek Diğer Kodlar&#x20;

{% hint style="info" %}
Örneğin Oluşturmak istediğiniz e-Fatura KAMU daki bir vergi numarasına ait ise  size <mark style="background-color:blue;">**422**</mark> <mark style="color:orange;">Fatura Seneryosu KAMU Olmalıdır</mark> hatası döner. Servisten dönen <mark style="background-color:blue;">**422**</mark> kodundaki hataların detay kodları ve dönebilecek kodların listesi aşağıda listelenmiştir.
{% endhint %}

<table><thead><tr><th width="98">Kod</th><th>Açıklama</th></tr></thead><tbody><tr><td>2000</td><td>Yeterli Kontörünüz Bulunmamaktadır.</td></tr><tr><td>2001</td><td>Firma Bilgileri Eklenirken Hata Oluştu.</td></tr><tr><td>2002   </td><td>Saklama Alanınız Yetersiz Lütfen Üst Pakete Geçiniz.</td></tr><tr><td>2003 </td><td>Şubeler Getirilirken Hata Oluştu.</td></tr><tr><td>2004 </td><td>Kayıt Başarısız.</td></tr><tr><td>2005 </td><td>Dosya Yüklenemedi.</td></tr><tr><td>2006</td><td>Şablon Güncellenemedi.</td></tr><tr><td>2007</td><td>Döküman Açılamadı.(Unzip)</td></tr><tr><td>2008</td><td>Döküman Deserialize Edilemedi.</td></tr><tr><td>2009</td><td>Döküman İşleme Hatası.</td></tr><tr><td>2010</td><td>Belge Ekleri Getirilirken Hata.</td></tr><tr><td>2011</td><td>Yeni Zarf Oluşturulurken Hata Oluştu.</td></tr><tr><td>2012</td><td>Döküman Okunamadı.</td></tr><tr><td>2013</td><td>Kayıt Silinemedi.</td></tr><tr><td>2014</td><td>Pdf Dosyası Oluşturulamadı.</td></tr><tr><td>2015</td><td>Şema/Şematron Hatası.</td></tr><tr><td>2016</td><td>İstatistikler Getirilirken Hata Oluştu.</td></tr><tr><td>2017</td><td>Uyumsuz FileType Bilgisi.</td></tr><tr><td>2018</td><td>SEND_TYPE İçin Geçersiz Değer.</td></tr><tr><td>2019</td><td>İşlem Sayısı 100 Adedi Geçemez.</td></tr><tr><td>2020</td><td>Uyumsuz Dosya İçeriği.</td></tr><tr><td>2021</td><td>Döviz Kurları Getirilirken Hata.</td></tr><tr><td>2022</td><td>Güncelleme Yapılırken Hata.</td></tr><tr><td>2023</td><td>Önizleme Oluşturulamadı.</td></tr><tr><td>2024</td><td>Belge Senaryosu EARSIVBELGE Olmalıdır.</td></tr><tr><td>2025</td><td>Alıcı E-Fatura Mükellefidir. E-Arşiv Fatura Gönderilemez.</td></tr><tr><td>2026</td><td>E-Arşiv Fatura Daha Önce İptal Edilmiştir.</td></tr><tr><td>2027</td><td>Rapor Hatalı Olması Durumunda E-Arşiv Fatura İptal Edilemez.</td></tr><tr><td>2028</td><td>Dosya Kuyrukta Veya Durumu Bilinmiyorsa E-Arşiv Fatura İptal Edilemez.</td></tr><tr><td>2029</td><td>E-Arşiv Fatura İptal Kaydı Oluşturulamadı.Lütfen Daha Sonra Tekrar Deneyiniz.</td></tr><tr><td>2030</td><td>İptal Kaydı Geri Alınmak İstenen E-Arşiv Fatura Raporlanmıştır.</td></tr><tr><td>2031</td><td>E-Arşiv Fatura İptal Kaydı Geri Alınamadı. Lütfen Daha Sonra Tekrar Deneyiniz.</td></tr><tr><td>2032</td><td>E-Arşiv Fatura Serisi Aktif Değil.</td></tr><tr><td>2033</td><td>E-Arşiv Fatura Seri Alanı Boş Geçilemez.</td></tr><tr><td>2034</td><td>E-SMM Daha Önce İptal Edilmiştir.</td></tr><tr><td>2035</td><td>Rapor Hatalı Olması Durumunda E-SMM İptal Edilemez.</td></tr><tr><td>2036</td><td>Dosya Kuyrukta Veya Durumu Bilinmiyorsa E-SMM İptal Edilemez.</td></tr><tr><td>2037</td><td>E-SMM İptal Kaydı Oluşturulamadı.Lütfen Daha Sonra Tekrar Deneyiniz.</td></tr><tr><td>2038</td><td>İptal Kaydı Geri Alınmak İstenen E-SMM Raporlanmıştır.</td></tr><tr><td>2039</td><td>E-SMM İptal Kaydı Geri Alınamadı. Lütfen Daha Sonra Tekrar Deneyiniz.</td></tr><tr><td>2040</td><td>E-SMM Serisi Aktif Değil.</td></tr><tr><td>2041</td><td>E-SMM Seri Alanı Boş Geçilemez.</td></tr><tr><td>2042</td><td>E-MM Daha Önce İptal Edilmiştir.</td></tr><tr><td>2043</td><td>Dosya Kuyrukta Veya Durumu Bilinmiyorsa E-MM İptal Edilemez.</td></tr><tr><td>2044</td><td>E-MM İptal Kaydı Oluşturulamadı.Lütfen Daha Sonra Tekrar Deneyiniz.</td></tr><tr><td>2045</td><td>İptal Kaydı Geri Alınmak İstenen E-MM Raporlanmıştır.</td></tr><tr><td>2046</td><td>E-MM İptal Kaydı Geri Alınamadı. Lütfen Daha Sonra Tekrar Deneyiniz.</td></tr><tr><td>2047</td><td>E-MM Serisi Aktif Değil.</td></tr><tr><td>2048</td><td>E-MM Seri Alanı Boş Geçilemez.</td></tr><tr><td>2049</td><td>Rapor Sorgulanamaz.</td></tr><tr><td>2050</td><td>Rapor Oluşturulurken Hata.</td></tr><tr><td>2051</td><td>Gönderici E-Fatura Mükellefi Değildir.</td></tr><tr><td>2052</td><td>Alıcıya Ait Etiket Kullanımda Değildir.</td></tr><tr><td>2053</td><td>Alıcı Bu Tarihde E-Fatura Mükellefi Olmuştur.</td></tr><tr><td>2054</td><td>Alıcı E-Fatura Mükellefi Değildir.</td></tr><tr><td>2055</td><td>Alıcının Etiketi Girilmelidir.</td></tr><tr><td>2056</td><td>Alıcıya Ait Etiket Kullanımdadır.</td></tr><tr><td>2057</td><td>E-Fatura Etiketleri Getirilirken Hata Oluştu.</td></tr><tr><td>2058</td><td>E-Fatura Kâğıt yada E-Arşiv Fatura Olarak Düzenlenmelidir.</td></tr><tr><td>2059</td><td>E-Fatura Senaryosu Kamu Olmalıdır.</td></tr><tr><td>2060</td><td>Fatura Senaryosu E-Arşiv Fatura Olmalıdır.</td></tr><tr><td>2061</td><td>E-Fatura Senaryosu Kamu Olmamalıdır.</td></tr><tr><td>2062</td><td>E-Fatura Cevabı Güncellenemedi.</td></tr><tr><td>2063</td><td>Fatura Senaryosu E-Arşiv Fatura Olduğu İçin E-Fatura Ucuna Gönderilemez.</td></tr><tr><td>2064</td><td>E-Fatura Serisi Aktif Değil.</td></tr><tr><td>2065</td><td>E-Fatura Seri Alanı Boş Geçilemez.</td></tr><tr><td>2066</td><td>Gönderici E-İrsaliye Mükellefi Değildir.</td></tr><tr><td>2067</td><td>Alıcı Bu Tarihde E-İrsaliye Mükellefi Olmuştur.</td></tr><tr><td>2068</td><td>Belge Sanal Alıcıya Gönderilemez.</td></tr><tr><td>2069</td><td>Belge Sanal Alıcıya Gönderilmelidir. (urn:mail:defaultpk@gib.gov.tr)</td></tr><tr><td>2070</td><td>E-İrsaliye Etiketleri Getirilirken Hata Oluştu.</td></tr><tr><td>2071</td><td>İrsaliye Yanıtı Beklememektedir.</td></tr><tr><td>2072</td><td>İrsaliye Senaryosu 'TEMELIRSALIYE' veya 'HKSIRSALIYE' Olmalıdır.</td></tr><tr><td>2073</td><td>E-İrsaliye Serisi Aktif Değil.</td></tr><tr><td>2074</td><td>E-İrsaliye Seri Alanı Boş Geçilemez.</td></tr><tr><td>2075</td><td>Kontör Paketinizin Tarihi Bitmiştir.</td></tr><tr><td>2076</td><td>Saklama Paketinizin Tarihi Bitmiştir.</td></tr><tr><td>2077</td><td>Yeterli Sayıda Paketiniz Bulunmamaktadır.</td></tr><tr><td>2078</td><td>Kontör Paketinizin Yeterli Kontörü Bulunmamaktadır.</td></tr><tr><td>2079</td><td>Rapor Hatalı Olması Durumunda E-MM İptal Edilemez.</td></tr><tr><td>2080</td><td>E-Adisyon Daha Önce İptal Edilmiştir.</td></tr><tr><td>2081</td><td>Dosya Kuyrukta Veya Durumu Bilinmiyorsa E-Adisyon İptal Edilemez.</td></tr><tr><td>2082</td><td>E-Adisyon İptal Kaydı Oluşturulamadı.Lütfen Daha Sonra Tekrar Deneyiniz.</td></tr><tr><td>2083</td><td>İptal Kaydı Geri Alınmak İstenen E-Adisyon Raporlanmıştır.</td></tr><tr><td>2084</td><td>E-Adisyon İptal Kaydı Geri Alınamadı. Lütfen Daha Sonra Tekrar Deneyiniz.</td></tr><tr><td>2085</td><td>E-Adisyon Serisi Aktif Değil.</td></tr><tr><td>2086</td><td>E-Adisyon Seri Alanı Boş Geçilemez.</td></tr><tr><td>2087</td><td>PDF Dosyası Okunamadı.</td></tr><tr><td>2088</td><td>E-Defter Daha Önceden Oluşturuldu.</td></tr><tr><td>2089</td><td>E-Defter Oluşturulurken Hata.</td></tr><tr><td>2090</td><td>E-Defter Yapısında Hata.</td></tr><tr><td>2091</td><td>E-Defter Oluşturma İşlemi Devam Ediyor.</td></tr><tr><td>2092</td><td>Sertifikalar Eşleşmiyor.</td></tr><tr><td>2093</td><td>İmzalama Hatalı.</td></tr><tr><td>2094</td><td>Amount Değeri Bir Sayı Olmalıdır.</td></tr><tr><td>2095</td><td>EnteredDate alanı hatalı formatta.</td></tr><tr><td>2096</td><td>E-Defter Gönderme İşlemi Devam Etmektedir.</td></tr><tr><td>2097</td><td>GİB'ten Sorgulanamadı.</td></tr><tr><td>2098</td><td>Hesap Dönemi 12 Aydan Oluşmalıdır.</td></tr><tr><td>2099</td><td>Defter Statusu Güncellenirken Hata Oluştu.</td></tr><tr><td>2100</td><td>Seri ve Belge Yılı Uyuşmazlığı.</td></tr><tr><td>2101</td><td>Rapor Hatalı Olması Durumunda E-Adisyon İptal Edilemez.</td></tr></tbody></table>


# GENEL API

{% hint style="info" %}
Bu dökümanda  genel bilgilendirme yapılmaktadır.
{% endhint %}


# Firma İşlemleri

{% hint style="info" %}
Firmaya ait bilgileri (Adres,Telefon Numarası,WEB Sitesi vb.) sorgulama ve güncelleme işlemlerini buradan yapabilirsiniz.
{% endhint %}


# Firma Bilgileri Getirir

## GET /Company

> Firma bilgilerini getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CompanyResponse":{"type":"object","properties":{"Name":{"type":"string","nullable":true},"TaxNumber":{"type":"string","nullable":true},"TaxOffice":{"type":"string","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},"PhoneNumber":{"type":"string","nullable":true},"Fax":{"type":"string","nullable":true},"Email":{"type":"string","nullable":true},"WebSite":{"type":"string","nullable":true},"IsActive":{"type":"boolean","nullable":true},"IsDeleted":{"type":"boolean","nullable":true},"PayeeFinancialAccountID":{"type":"string","nullable":true},"PaymentMeansChannelCode":{"type":"string","nullable":true},"PaymentMeansCode":{"type":"string","nullable":true},"Aliases":{"type":"array","items":{"$ref":"#/components/schemas/CompanyAliases"},"nullable":true,"readOnly":true}},"additionalProperties":false},"CompanyAliases":{"type":"object","properties":{"Alias":{"type":"string","nullable":true},"AliasType":{"type":"integer","format":"int32"},"Type":{"type":"integer","format":"int32"}},"additionalProperties":false}}},"paths":{"/Company":{"get":{"tags":["Company"],"summary":"Firma bilgilerini getirir.","responses":{"200":{"description":"Firma bilgilerini getirir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyResponse"}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/Company");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/Company',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/Company',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Firma Bilgileri Günceller

## PUT /Company

> Firma bilgilerini günceller.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CompanyResponseCommand":{"type":"object","properties":{"TaxOffice":{"type":"string","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},"PhoneNumber":{"type":"string","nullable":true},"Fax":{"type":"string","nullable":true},"Email":{"type":"string","nullable":true},"WebSite":{"type":"string","nullable":true},"PayeeFinancialAccountID":{"type":"string","nullable":true},"PaymentMeansChannelCode":{"type":"string","nullable":true},"PaymentMeansCode":{"$ref":"#/components/schemas/PaymentMeansCode"}},"additionalProperties":false},"PaymentMeansCode":{"enum":["ODEMETIPIMUHTELIF","NAKIT","CEK","BANKACEKI","HAVALE_EFT","KREDIKARTI_BANKAKARTI"],"type":"string"},"CompanyResponse":{"type":"object","properties":{"Name":{"type":"string","nullable":true},"TaxNumber":{"type":"string","nullable":true},"TaxOffice":{"type":"string","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},"PhoneNumber":{"type":"string","nullable":true},"Fax":{"type":"string","nullable":true},"Email":{"type":"string","nullable":true},"WebSite":{"type":"string","nullable":true},"IsActive":{"type":"boolean","nullable":true},"IsDeleted":{"type":"boolean","nullable":true},"PayeeFinancialAccountID":{"type":"string","nullable":true},"PaymentMeansChannelCode":{"type":"string","nullable":true},"PaymentMeansCode":{"type":"string","nullable":true},"Aliases":{"type":"array","items":{"$ref":"#/components/schemas/CompanyAliases"},"nullable":true,"readOnly":true}},"additionalProperties":false},"CompanyAliases":{"type":"object","properties":{"Alias":{"type":"string","nullable":true},"AliasType":{"type":"integer","format":"int32"},"Type":{"type":"integer","format":"int32"}},"additionalProperties":false}}},"paths":{"/Company":{"put":{"tags":["Company"],"summary":"Firma bilgilerini günceller.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CompanyResponseCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/CompanyResponseCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/CompanyResponseCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CompanyResponseCommand"}}}},"responses":{"200":{"description":"Firma bilgilerini günceller.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyResponse"}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/Company");
client.Timeout = -1;
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"{"TaxOffice": "string",
"Address": "string",
"District": "string",
"City": "string",
"Country": "string",
"PostalCode": "string",
"PhoneNumber": "string",
"Fax": "string",
"Email": "string",
"WebSite": "string",
"PayeeFinancialAccountID": "string",
"PaymentMeansChannelCode": "string",
"PaymentMeansCode": "ODEMETIPIMUHTELIF"}";
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/general/Company',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
  "TaxOffice": "string",
  "Address": "string",
  "District": "string",
  "City": "string",
  "Country": "string",
  "PostalCode": "string",
  "PhoneNumber": "string",
  "Fax": "string",
  "Email": "string",
  "WebSite": "string",
  "PayeeFinancialAccountID": "string",
  "PaymentMeansChannelCode": "string",
  "PaymentMeansCode": "ODEMETIPIMUHTELIF"
}',
  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({
  "TaxOffice": "string",
  "Address": "string",
  "District": "string",
  "City": "string",
  "Country": "string",
  "PostalCode": "string",
  "PhoneNumber": "string",
  "Fax": "string",
  "Email": "string",
  "WebSite": "string",
  "PayeeFinancialAccountID": "string",
  "PaymentMeansChannelCode": "string",
  "PaymentMeansCode": "ODEMETIPIMUHTELIF"
});
var config = {
  method: 'put',
  url: 'https://apitest.nilvera.com/general/Company',
  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 %}


# Firmanın Modüllerini Getirir

## GET /Company/Modules

> Firma modüllerini getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CompanyModulesResponse":{"type":"object","properties":{"Name":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"IsActive":{"type":"boolean"},"IsActivation":{"type":"boolean"}},"additionalProperties":false}}},"paths":{"/Company/Modules":{"get":{"tags":["Company"],"summary":"Firma modüllerini getirir.","responses":{"200":{"description":"Firma modüllerini getirir.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyModulesResponse"}}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/Company/Modules", Method.Get);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/general/Company/Modules',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/Company/Modules',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Firma Sertifikalarını Getirir

## GET /Company/Certificate

> Firma sertifikalarını getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CertificateResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"SerialNo":{"type":"string","nullable":true},"TaxNumber":{"type":"string","nullable":true},"StartDate":{"type":"string","format":"date-time","nullable":true},"EndDate":{"type":"string","format":"date-time","nullable":true},"Type":{"$ref":"#/components/schemas/CertificateType"},"Password":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true}},"additionalProperties":false},"CertificateType":{"enum":["MALIMUHUR","EIMZA","HSM"],"type":"string"}}},"paths":{"/Company/Certificate":{"get":{"tags":["Company"],"summary":"Firma sertifikalarını getirir.","responses":{"200":{"description":"Firma sertifikalarını getirir.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CertificateResponse"}}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/Company/Certificate", Method.Get);
request.AddHeader("Authorization", "APIKEY");
RestResponse response = await client.ExecuteAsync(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/general/Company/Certificate',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/Company/Certificate',
  headers: { 
    'Authorization': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Firmaya Sertifika Ekler

## POST /Company/Certificate

> Firmaya sertifika ekler.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CreateCompanyCertificateCommand":{"type":"object","properties":{"SerialNo":{"type":"string","nullable":true},"StartDate":{"type":"string","format":"date-time","nullable":true},"EndDate":{"type":"string","format":"date-time","nullable":true},"Type":{"$ref":"#/components/schemas/CertificateType"},"Password":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true}},"additionalProperties":false},"CertificateType":{"enum":["MALIMUHUR","EIMZA","HSM"],"type":"string"}}},"paths":{"/Company/Certificate":{"post":{"tags":["Company"],"summary":"Firmaya sertifika ekler.","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CreateCompanyCertificateCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/CreateCompanyCertificateCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateCompanyCertificateCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateCompanyCertificateCommand"}}}},"responses":{"200":{"description":"Firmaya sertifika ekler.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
    MaxTimeout = -1,
};

var client = new RestClient(options);
var request = new RestRequest("/general/Company/Certificate", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "APIKEY");

var body = new
{
    SerialNo = "string",
    StartDate = DateTime.Parse("2024-07-04T08:15:04.102Z"),
    EndDate = DateTime.Parse("2024-07-04T08:15:04.102Z"),
    Type = "MALIMUHUR",
    Password = "string",
    Description = "string"
};

request.AddJsonBody(body);
RestResponse response = await client.ExecuteAsync(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/general/Company/Certificate',
  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 =>'{
  "SerialNo": "string",
  "StartDate": "2024-07-04T08:15:04.102Z",
  "EndDate": "2024-07-04T08:15:04.102Z",
  "Type": "MALIMUHUR",
  "Password": "string",
  "Description": "string"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "SerialNo": "string",
  "StartDate": "2024-07-04T08:15:04.102Z",
  "EndDate": "2024-07-04T08:15:04.102Z",
  "Type": "MALIMUHUR",
  "Password": "string",
  "Description": "string"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/Company/Certificate',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'APIKEY'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Firma Sertifikasını Günceller

## PUT /Company/Certificate

> Firma sertifikasını günceller.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"UpdateCompanyCertificateCommand":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"SerialNo":{"type":"string","nullable":true},"StartDate":{"type":"string","format":"date-time","nullable":true},"EndDate":{"type":"string","format":"date-time","nullable":true},"Type":{"$ref":"#/components/schemas/CertificateType"},"Password":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true}},"additionalProperties":false},"CertificateType":{"enum":["MALIMUHUR","EIMZA","HSM"],"type":"string"}}},"paths":{"/Company/Certificate":{"put":{"tags":["Company"],"summary":"Firma sertifikasını günceller.","requestBody":{"content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/UpdateCompanyCertificateCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCompanyCertificateCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateCompanyCertificateCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateCompanyCertificateCommand"}}}},"responses":{"200":{"description":"Firma sertifikasını günceller.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
    MaxTimeout = -1,
};

var client = new RestClient(options);
var request = new RestRequest("/general/Company/Certificate", Method.Put);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "APIKEY");

var body = new
{
    ID = 0,
    SerialNo = "string",
    StartDate = DateTime.Parse("2024-07-04T08:17:14.738Z"),
    EndDate = DateTime.Parse("2024-07-04T08:17:14.738Z"),
    Type = "MALIMUHUR",
    Password = "string",
    Description = "string"
};

request.AddJsonBody(body);
RestResponse response = await client.ExecuteAsync(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/general/Company/Certificate',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
  "ID": 0,
  "SerialNo": "string",
  "StartDate": "2024-07-04T08:17:14.738Z",
  "EndDate": "2024-07-04T08:17:14.738Z",
  "Type": "MALIMUHUR",
  "Password": "string",
  "Description": "string"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "ID": 0,
  "SerialNo": "string",
  "StartDate": "2024-07-04T08:17:14.738Z",
  "EndDate": "2024-07-04T08:17:14.738Z",
  "Type": "MALIMUHUR",
  "Password": "string",
  "Description": "string"
});

let config = {
  method: 'put',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/Company/Certificate',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'APIKEY'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Seri Numarasına Göre Sertifika Getirir

## GET /Company/Certificate/{SerialNumber}

> Seri numarasına göre sertifika getirilir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CertificateResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"SerialNo":{"type":"string","nullable":true},"TaxNumber":{"type":"string","nullable":true},"StartDate":{"type":"string","format":"date-time","nullable":true},"EndDate":{"type":"string","format":"date-time","nullable":true},"Type":{"$ref":"#/components/schemas/CertificateType"},"Password":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true}},"additionalProperties":false},"CertificateType":{"enum":["MALIMUHUR","EIMZA","HSM"],"type":"string"}}},"paths":{"/Company/Certificate/{SerialNumber}":{"get":{"tags":["Company"],"summary":"Seri numarasına göre sertifika getirilir.","parameters":[{"name":"SerialNumber","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Seri numarasına göre sertifika getirilir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CertificateResponse"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/Company/Certificate/aa", Method.Get);
request.AddHeader("Authorization", "APIKEY");
RestResponse response = await client.ExecuteAsync(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/general/Company/Certificate/aa',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/Company/Certificate/aa',
  headers: { 
    'Authorization': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Firma Sertifikasını Siler

## DELETE /Company/Certificate/{ID}

> Firma sertifikasını siler.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Company/Certificate/{ID}":{"delete":{"tags":["Company"],"summary":"Firma sertifikasını siler.","parameters":[{"name":"ID","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Firma sertifikasını siler.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/Company/Certificate/0", Method.Delete);
request.AddHeader("Authorization", "APIKEY");
RestResponse response = await client.ExecuteAsync(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/general/Company/Certificate/0',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');

let config = {
  method: 'delete',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/Company/Certificate/0',
  headers: { 
    'Authorization': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Kullanıcıya Tanımlı Firmaları Getirir

## GET /Company/List

> Kullanıcıya tanımlı firmaları getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Company/List":{"get":{"tags":["Company"],"summary":"Kullanıcıya tanımlı firmaları getirir.","responses":{"200":{"description":"Kullanıcıya tanımlı firmaları getirir."},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/Company/List", Method.Get);
request.AddHeader("Authorization", "APIKEY");
RestResponse response = await client.ExecuteAsync(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/general/Company/List',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/Company/List", Method.Get);
request.AddHeader("Authorization", "APIKEY");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
```

{% endtab %}
{% endtabs %}


# Kampanya


# Kampanyaları Getirir

## GET /Campaigns

> Kampanyaları getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CampaignResponse":{"type":"object","properties":{"Name":{"type":"string","nullable":true},"CreatedDate":{"type":"string","format":"date-time"},"EndDate":{"type":"string","format":"date-time"},"Content":{"type":"string","nullable":true},"Subject":{"type":"string","nullable":true},"IsActive":{"type":"boolean"},"Url":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/Campaigns":{"get":{"tags":["Campaigns"],"summary":"Kampanyaları getirir.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CampaignResponse"}}}}}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/Campaigns", Method.Get);
request.AddHeader("Authorization", "APIKEY");
RestResponse response = await client.ExecuteAsync(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/general/Campaigns',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/Campaigns',
  headers: { 
    'Authorization': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Firma Kimlik Bilgileri

{% hint style="info" %}
Firmaya ait kimlik bilgilerini (MersisNo,SicilNo vb.) sorgulama ve güncelleme işlemlerini buradan yapabilirsiniz.
{% endhint %}


# Firma Kimlik Bilgilerini Listeler

## GET /CompanyIdentification

> Firma kimlik bilgilerini listeler.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CompanyIdentificationResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"CompanyID":{"type":"integer","format":"int32"},"Name":{"type":"string","nullable":true},"Value":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/CompanyIdentification":{"get":{"tags":["CompanyIdentification"],"summary":"Firma kimlik bilgilerini listeler.","responses":{"200":{"description":"Firma kimlik bilgilerini listeler.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CompanyIdentificationResponse"}}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/CompanyIdentification");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/CompanyIdentification',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/CompanyIdentification',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Firmaya Yeni Kimlik Bilgisi Ekler

## POST /CompanyIdentification

> Firmaya yeni kimlik bilgisi ekler.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CompanyIdentificationType":{"enum":["HIZMETNO","MUSTERINO","TESISATNO","TELEFONNO","DISTRIBUTORNO","TICARETSICILNO","TAPDKNO","BAYINO","ABONENO","SAYACNO","EPDKNO","SUBENO","PASAPORTNO","URETICINO","ARACIKURUMETIKET","ARACIKURUMVKN","CIFTCINO","IMALATCINO","DOSYANO","HASTANO","MERSISNO"],"type":"string"},"CompanyIdentificationResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"CompanyID":{"type":"integer","format":"int32"},"Name":{"type":"string","nullable":true},"Value":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/CompanyIdentification":{"post":{"tags":["CompanyIdentification"],"summary":"Firmaya yeni kimlik bilgisi ekler.","parameters":[{"name":"Name","in":"query","description":"","schema":{"$ref":"#/components/schemas/CompanyIdentificationType"}},{"name":"Value","in":"query","description":"","schema":{"type":"string"}}],"responses":{"200":{"description":"Firmaya yeni kimlik bilgisi ekler.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyIdentificationResponse"}}}},"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/general/CompanyIdentification?Name=HIZMETNO&Value=1234567890");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/CompanyIdentification?Name=HIZMETNO&Value=1234567890',
  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_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'post',
  url: 'https://apitest.nilvera.com/general/CompanyIdentification?Name=HIZMETNO&Value=1234567890',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Firmadan Kimlik Bilgisi Siler

## DELETE /CompanyIdentification/{ID}

> Firmadan kimlik bilgisi siler.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/CompanyIdentification/{ID}":{"delete":{"tags":["CompanyIdentification"],"summary":"Firmadan kimlik bilgisi siler.","parameters":[{"name":"ID","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Firmadan kimlik bilgisi siler.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"},"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/general/CompanyIdentification/1234567890");
client.Timeout = -1;
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"["3fa85f64-5717-4562-b3fc-2c963f66afa6"]";
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/general/CompanyIdentification/1234567890',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_POSTFIELDS =>'[
  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
]',
  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([
  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
]);
var config = {
  method: 'delete',
  url: 'https://apitest.nilvera.com/general/CompanyIdentification/1234567890',
  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 %}


# Kredi

{% hint style="info" %}
Firmanın kontör bilgilerinin sorgulandığı kısımdır.
{% endhint %}


# Kredi Bilgileri Getirir

## GET /Credits

> Kredi bilgisi getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CreditResponse":{"type":"object","properties":{"Name":{"type":"string","nullable":true},"ModuleID":{"type":"integer","format":"int32"},"TaxNumber":{"type":"string","nullable":true},"TotalCredit":{"type":"integer","format":"int32"},"UsedCredit":{"type":"integer","format":"int32"},"RemainingCredit":{"type":"integer","format":"int32"},"UsePercentage":{"type":"number","format":"double"},"DurationType":{"$ref":"#/components/schemas/DurationType"},"EndDate":{"type":"string","format":"date-time"},"IsControl":{"type":"boolean"}},"additionalProperties":false},"DurationType":{"enum":["Indefinite","Year","Month"],"type":"string"}}},"paths":{"/Credits":{"get":{"tags":["Credits"],"summary":"Kredi bilgisi getirir.","responses":{"200":{"description":"Kredi bilgisi getirir.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreditResponse"}}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/Credits");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/Credits',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/Credits',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Müşteriler

Gelen e-faturalar için api uçları

{% hint style="info" %}
Firmanın müşterileri ile ilgili sorgulama, ekleme, silme veya güncelleme işlemlerini bu kısımda yapabilirsiniz.
{% endhint %}


# Müşteri Listeler

## GET /Customers

> Müşteri listeler.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"SortType":{"enum":["ASC","DESC"],"type":"string"},"CustomerResponsePagination":{"type":"object","properties":{"Page":{"type":"integer","format":"int32"},"PageSize":{"type":"integer","format":"int32"},"TotalCount":{"type":"integer","format":"int32","nullable":true},"TotalPages":{"type":"integer","format":"int32","nullable":true,"readOnly":true},"Content":{"type":"array","items":{"$ref":"#/components/schemas/CustomerResponse"},"nullable":true}},"additionalProperties":false},"CustomerResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"TaxNumber":{"type":"string","nullable":true},"Name":{"type":"string","nullable":true},"TaxDepartment":{"type":"string","nullable":true},"Address":{"type":"string","nullable":true},"Country":{"type":"string","nullable":true},"City":{"type":"string","nullable":true},"District":{"type":"string","nullable":true},"PostalCode":{"type":"string","nullable":true},"Phone":{"type":"string","nullable":true},"Fax":{"type":"string","nullable":true},"Email":{"type":"string","nullable":true},"WebSite":{"type":"string","nullable":true},"IsExport":{"type":"boolean"}},"additionalProperties":false}}},"paths":{"/Customers":{"get":{"tags":["Customers"],"summary":"Müşteri listeler.","parameters":[{"name":"Search","in":"query","schema":{"type":"string"}},{"name":"PageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Page","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"SortColumn","in":"query","schema":{"type":"string"}},{"name":"SortType","in":"query","schema":{"$ref":"#/components/schemas/SortType"}}],"responses":{"200":{"description":"Müşteri listeler.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponsePagination"}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/Customers");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/Customers',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/Customers',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Müşteri Ekler

## POST /Customers

> Müşteri ekler.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CustomerDto":{"type":"object","properties":{"TaxNumber":{"type":"string","nullable":true},"Name":{"type":"string","nullable":true},"TaxDepartment":{"type":"string","nullable":true},"Address":{"type":"string","nullable":true},"Country":{"type":"string","nullable":true},"City":{"type":"string","nullable":true},"District":{"type":"string","nullable":true},"PostalCode":{"type":"string","nullable":true},"Phone":{"type":"string","nullable":true},"Fax":{"type":"string","nullable":true},"Email":{"type":"string","nullable":true},"WebSite":{"type":"string","nullable":true},"IsExport":{"type":"boolean"}},"additionalProperties":false}}},"paths":{"/Customers":{"post":{"tags":["Customers"],"summary":"Müşteri ekler.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDto"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDto"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDto"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerDto"}}}}},"responses":{"200":{"description":"Müşteri ekler.","content":{"application/json":{"schema":{"type":"string"}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/Customers");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"["TaxNumber": "string",
"Name": "string",
"TaxDepartment": "string",
"Address": "string",
"Country": "string",
"City": "string",
"District": "string",
"PostalCode": "string",
"Phone": "string",
"Fax": "string",
"Email": "string",
"WebSite": "string",
"IsExport"": true]";
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/general/Customers',
  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 =>'[
  {
    "TaxNumber": "string",
    "Name": "string",
    "TaxDepartment": "string",
    "Address": "string",
    "Country": "string",
    "City": "string",
    "District": "string",
    "PostalCode": "string",
    "Phone": "string",
    "Fax": "string",
    "Email": "string",
    "WebSite": "string",
    "IsExport": true
  }
]',
  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([
  {
    "TaxNumber": "string",
    "Name": "string",
    "TaxDepartment": "string",
    "Address": "string",
    "Country": "string",
    "City": "string",
    "District": "string",
    "PostalCode": "string",
    "Phone": "string",
    "Fax": "string",
    "Email": "string",
    "WebSite": "string",
    "IsExport": true
  }
]);
var config = {
  method: 'post',
  url: 'https://apitest.nilvera.com/general/Customers',
  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 %}


# Müşteri Günceller

## PUT /Customers

> Müşteri günceller.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"UpdateCustomerCommand":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"TaxNumber":{"type":"string","nullable":true},"Name":{"type":"string","nullable":true},"TaxDepartment":{"type":"string","nullable":true},"Address":{"type":"string","nullable":true},"Country":{"type":"string","nullable":true},"City":{"type":"string","nullable":true},"District":{"type":"string","nullable":true},"PostalCode":{"type":"string","nullable":true},"Phone":{"type":"string","nullable":true},"Fax":{"type":"string","nullable":true},"Email":{"type":"string","nullable":true},"WebSite":{"type":"string","nullable":true},"IsExport":{"type":"boolean"}},"additionalProperties":false}}},"paths":{"/Customers":{"put":{"tags":["Customers"],"summary":"Müşteri günceller.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateCustomerCommand"}}}},"responses":{"200":{"description":"Müşteri günceller.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/Customers");
client.Timeout = -1;
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"{"ID": 0,
"TaxNumber": "string",
"Name": "string",
"TaxDepartment": "string",
"Address": "string",
"Country": "string",
"City": "string",
"District": "string",
"PostalCode": "string",
"Phone": "string",
"Fax": "string",
"Email": "string",
"WebSite": "string",
"IsExport": true}";
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/general/Customers',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
  "ID": 0,
  "TaxNumber": "string",
  "Name": "string",
  "TaxDepartment": "string",
  "Address": "string",
  "Country": "string",
  "City": "string",
  "District": "string",
  "PostalCode": "string",
  "Phone": "string",
  "Fax": "string",
  "Email": "string",
  "WebSite": "string",
  "IsExport": true
}',
  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({
  "ID": 0,
  "TaxNumber": "string",
  "Name": "string",
  "TaxDepartment": "string",
  "Address": "string",
  "Country": "string",
  "City": "string",
  "District": "string",
  "PostalCode": "string",
  "Phone": "string",
  "Fax": "string",
  "Email": "string",
  "WebSite": "string",
  "IsExport": true
});
var config = {
  method: 'put',
  url: 'https://apitest.nilvera.com/general/Customers',
  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 %}


# Müşteri Bilgisini Getirir

## GET /Customers/GetCustomerInfo/{TaxNumber}

> Müşteri bilgisini getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CustomerResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"TaxNumber":{"type":"string","nullable":true},"Name":{"type":"string","nullable":true},"TaxDepartment":{"type":"string","nullable":true},"Address":{"type":"string","nullable":true},"Country":{"type":"string","nullable":true},"City":{"type":"string","nullable":true},"District":{"type":"string","nullable":true},"PostalCode":{"type":"string","nullable":true},"Phone":{"type":"string","nullable":true},"Fax":{"type":"string","nullable":true},"Email":{"type":"string","nullable":true},"WebSite":{"type":"string","nullable":true},"IsExport":{"type":"boolean"}},"additionalProperties":false}}},"paths":{"/Customers/GetCustomerInfo/{TaxNumber}":{"get":{"tags":["Customers"],"summary":"Müşteri bilgisini getirir.","parameters":[{"name":"TaxNumber","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Müşteri bilgisini getirir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/Customers/GetCustomerInfo/34918613960");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/Customers/GetCustomerInfo/34918613960',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/Customers/GetCustomerInfo/34918613960',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Müşteri Siler

## DELETE /Customers/{ID}

> Müşteri Siler.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Customers/{ID}":{"delete":{"tags":["Customers"],"summary":"Müşteri Siler.","parameters":[{"name":"ID","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Müşteri Siler.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/Customers/12345432");
client.Timeout = -1;
var request = new RestRequest(Method.DELETE);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"["3fa85f64-5717-4562-b3fc-2c963f66afa6"]";
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/general/Customers/12345432',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_POSTFIELDS =>'[
  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
]',
  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([
  "3fa85f64-5717-4562-b3fc-2c963f66afa6"
]);
var config = {
  method: 'delete',
  url: 'https://apitest.nilvera.com/general/Customers/12345432',
  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 %}


# Müşterileri Toplu Siler

## DELETE /Customers/Bulk

> Müşteri Toplu Siler.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Customers/Bulk":{"delete":{"tags":["Customers"],"summary":"Müşteri Toplu Siler.","requestBody":{"content":{"application/json-patch+json":{"schema":{"type":"array","items":{"type":"integer","format":"int32"}}},"application/json":{"schema":{"type":"array","items":{"type":"integer","format":"int32"}}},"text/json":{"schema":{"type":"array","items":{"type":"integer","format":"int32"}}},"application/*+json":{"schema":{"type":"array","items":{"type":"integer","format":"int32"}}}}},"responses":{"200":{"description":"Müşteri Toplu Siler.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"}}}}}}
```

## DELETE /Customers/{ID}

> Müşteri Siler.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Customers/{ID}":{"delete":{"tags":["Customers"],"summary":"Müşteri Siler.","parameters":[{"name":"ID","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Müşteri Siler.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("general/Customers/{ID}")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Delete);
request.AddHeader("Authorization", "APIKEY");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
```

{% endtab %}

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

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'general/Customers/{ID}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');

let config = {
  method: 'delete',
  maxBodyLength: Infinity,
  url: 'general/Customers/{ID}',
  headers: { 
    'Authorization': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Müşteri Listesinde Ararma Yapar

## GET /Customers/Search/{searchText}

> Müşteri Arar.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CustomerResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"TaxNumber":{"type":"string","nullable":true},"Name":{"type":"string","nullable":true},"TaxDepartment":{"type":"string","nullable":true},"Address":{"type":"string","nullable":true},"Country":{"type":"string","nullable":true},"City":{"type":"string","nullable":true},"District":{"type":"string","nullable":true},"PostalCode":{"type":"string","nullable":true},"Phone":{"type":"string","nullable":true},"Fax":{"type":"string","nullable":true},"Email":{"type":"string","nullable":true},"WebSite":{"type":"string","nullable":true},"IsExport":{"type":"boolean"}},"additionalProperties":false}}},"paths":{"/Customers/Search/{searchText}":{"get":{"tags":["Customers"],"summary":"Müşteri Arar.","parameters":[{"name":"searchText","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Müşteri Arar.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CustomerResponse"}}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/Customers/Search/alaattin");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/Customers/Search/alaattin',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/Customers/Search/alaattin',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Vergi Numarası İle Müşteri Bilgisini Getirir

## GET /Customers/GetCustomerInfo/{TaxNumber}

> Müşteri bilgisini getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CustomerResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"TaxNumber":{"type":"string","nullable":true},"Name":{"type":"string","nullable":true},"TaxDepartment":{"type":"string","nullable":true},"Address":{"type":"string","nullable":true},"Country":{"type":"string","nullable":true},"City":{"type":"string","nullable":true},"District":{"type":"string","nullable":true},"PostalCode":{"type":"string","nullable":true},"Phone":{"type":"string","nullable":true},"Fax":{"type":"string","nullable":true},"Email":{"type":"string","nullable":true},"WebSite":{"type":"string","nullable":true},"IsExport":{"type":"boolean"}},"additionalProperties":false}}},"paths":{"/Customers/GetCustomerInfo/{TaxNumber}":{"get":{"tags":["Customers"],"summary":"Müşteri bilgisini getirir.","parameters":[{"name":"TaxNumber","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Müşteri bilgisini getirir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("/general/Customers/GetCustomerInfo/{TaxNumber}")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Delete);
request.AddHeader("Authorization", "APIKEY");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
```

{% endtab %}

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

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => '/general/Customers/GetCustomerInfo/{TaxNumber}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');

let config = {
  method: 'delete',
  maxBodyLength: Infinity,
  url: '/general/Customers/GetCustomerInfo/{TaxNumber}',
  headers: { 
    'Authorization': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Döviz Bilgileri

{% hint style="info" %}
Merkez Bankasından döviz bilgilerininçekildiği kısımdır.
{% endhint %}


# Döviz Bilgileri Getirir

## GET /ExchangeRate

> Döviz kurlarını getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"ExchangeRateResponse":{"type":"object","properties":{"USDBuy":{"type":"string","nullable":true},"USDSale":{"type":"string","nullable":true},"EUROBuy":{"type":"string","nullable":true},"EUROSale":{"type":"string","nullable":true},"GBPBuy":{"type":"string","nullable":true},"GBPSale":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/ExchangeRate":{"get":{"tags":["ExchangeRate"],"summary":"Döviz kurlarını getirir.","responses":{"200":{"description":"Döviz kurlarını getirir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeRateResponse"}}}},"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>"},"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/general/ExchangeRate");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/ExchangeRate',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/ExchangeRate',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# GİB Kullanıcı Bilgileri


# GİB Kullanıcı Adı ve Parolasını Getirir

## GET /GibEArchiveAccount

> Gib kullanıcı adı ve parola getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"GibEArchiveResponse":{"type":"object","properties":{"UserName":{"type":"string","nullable":true},"Password":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/GibEArchiveAccount":{"get":{"tags":["GibEArchiveAccount"],"summary":"Gib kullanıcı adı ve parola getirir.","responses":{"200":{"description":"Gib kullanıcı adı ve parola getirir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GibEArchiveResponse"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/GibEArchiveAccount", Method.Get);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/general/GibEArchiveAccount',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/GibEArchiveAccount',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# GİB Kullanıcı Adı ve Parolasını Günceller

## PUT /GibEArchiveAccount

> Gib kullanıcı adı ve parola günceller.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/GibEArchiveAccount":{"put":{"tags":["GibEArchiveAccount"],"summary":"Gib kullanıcı adı ve parola günceller.","parameters":[{"name":"UserName","in":"query","description":"","schema":{"type":"string"}},{"name":"Password","in":"query","description":"","schema":{"type":"string"}}],"responses":{"200":{"description":"Gib kullanıcı adı ve parola günceller.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
    MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/GibEArchiveAccount?UserName=aa&Password=aa", Method.Put);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer <API KEY>");
var body = @"
{
    ""ELedgerProperties"": {
        ""Nace"": ""string"",
        ""Creator"": ""string"",
        ""TaxType"": ""IncludeTax"",
        ""LineCount"": 0,
        ""IsBranch"": true,
        ""BranchName"": ""string"",
        ""BranchNumber"": ""string"",
        ""LedgerPeriod"": true,
        ""FiscalYearStart"": ""2024-04-03T11:14:43.050Z"",
        ""FiscalYearEnd"": ""2024-04-03T11:14:43.050Z"",
        ""AccountingPeriod"": ""AccountingPeriod"",
        ""IsLiquidate"": true,
        ""LiquidateYearStart"": ""2024-04-03T11:14:43.050Z""
    }
}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(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/general/GibEArchiveAccount?UserName=aa&Password=aa',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
  "ELedgerProperties": {
    "Nace": "string",
    "Creator": "string",
    "TaxType": "IncludeTax",
    "LineCount": 0,
    "IsBranch": true,
    "BranchName": "string",
    "BranchNumber": "string",
    "LedgerPeriod": true,
    "FiscalYearStart": "2024-04-03T11:14:43.050Z",
    "FiscalYearEnd": "2024-04-03T11:14:43.050Z",
    "AccountingPeriod": "AccountingPeriod",
    "IsLiquidate": true,
    "LiquidateYearStart": "2024-04-03T11:14:43.050Z"
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "ELedgerProperties": {
    "Nace": "string",
    "Creator": "string",
    "TaxType": "IncludeTax",
    "LineCount": 0,
    "IsBranch": true,
    "BranchName": "string",
    "BranchNumber": "string",
    "LedgerPeriod": true,
    "FiscalYearStart": "2024-04-03T11:14:43.050Z",
    "FiscalYearEnd": "2024-04-03T11:14:43.050Z",
    "AccountingPeriod": "AccountingPeriod",
    "IsLiquidate": true,
    "LiquidateYearStart": "2024-04-03T11:14:43.050Z"
  }
});
let config = {
  method: 'put',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/GibEArchiveAccount?UserName=aa&Password=aa',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer <API KEY>'
  },
  data : data
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Mükellef İşlemleri

{% hint style="info" %}
Mükellef işlemlerinin yapıldığı bu kısımda girilen VKN veya TCKN'nin <mark style="color:blue;">e-Fatura</mark> veya <mark style="color:blue;">e-İrsaliye</mark> mükellefi olup olmadığını kontrol edebilir ve işlemlerinizi ona göre yapabilirsiniz.
{% endhint %}


# E-Fatura Mükelleflerini Listeler

{% hint style="info" %}
GIB'de kayıtlı bütün E-Fatura mükelleflerini çekmek için kullanılır.
{% endhint %}

## GET /GlobalCompany

> Mükellef listesi getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"GlobalCustomerResponsePagination":{"type":"object","properties":{"Page":{"type":"integer","format":"int32"},"PageSize":{"type":"integer","format":"int32"},"TotalCount":{"type":"integer","format":"int32","nullable":true},"TotalPages":{"type":"integer","format":"int32","nullable":true,"readOnly":true},"Content":{"type":"array","items":{"$ref":"#/components/schemas/GlobalCustomerResponse"},"nullable":true}},"additionalProperties":false},"GlobalCustomerResponse":{"type":"object","properties":{"TaxNumber":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"AccountType":{"type":"string","nullable":true},"FirstCreationTime":{"type":"string","format":"date-time"},"Type":{"type":"string","nullable":true},"Aliases":{"type":"array","items":{"$ref":"#/components/schemas/Alias"},"nullable":true,"readOnly":true}},"additionalProperties":false},"Alias":{"type":"object","properties":{"Name":{"type":"string","nullable":true},"CreationTime":{"type":"string","format":"date-time"},"DeletionTime":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false}}},"paths":{"/GlobalCompany":{"get":{"tags":["GlobalCompany"],"summary":"Mükellef listesi getirir.","parameters":[{"name":"PageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Page","in":"query","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Mükellef listesi getirir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalCustomerResponsePagination"}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/GlobalCompany");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/GlobalCompany',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/GlobalCompany',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Mükellef Listesi İçinde Arama Yapar

{% hint style="info" %}
Mükellef Listesinde <mark style="color:blue;">ÜNVAN</mark> ile arama yapmak için kullanılır.
{% endhint %}

## GET /GlobalCompany/Search/{searchText}

> Mükellef listesi içerisinde arama yapar.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"GlobalUserType":{"enum":["Invoice","DespatchAdvice"],"type":"string"},"SearchGlobalCompanyResponse":{"type":"object","properties":{"TaxNumber":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"TaxDepartment":{"type":"string","nullable":true},"Address":{"type":"string","nullable":true},"Country":{"type":"string","nullable":true},"City":{"type":"string","nullable":true},"District":{"type":"string","nullable":true},"PostalCode":{"type":"string","nullable":true},"Phone":{"type":"string","nullable":true},"Fax":{"type":"string","nullable":true},"Email":{"type":"string","nullable":true},"Type":{"type":"string","nullable":true},"WebSite":{"type":"string","nullable":true},"ModuleType":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/GlobalCompany/Search/{searchText}":{"get":{"tags":["GlobalCompany"],"summary":"Mükellef listesi içerisinde arama yapar.","parameters":[{"name":"searchText","in":"path","description":"","required":true,"schema":{"type":"string"}},{"name":"globalUserType","in":"query","description":"","schema":{"$ref":"#/components/schemas/GlobalUserType"}}],"responses":{"200":{"description":"Mükellef listesi içerisinde arama yapar.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SearchGlobalCompanyResponse"}}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/GlobalCompany/Search/Furkan?globalUserType=Invoice");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/GlobalCompany/Search/Furkan?globalUserType=Invoice',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/GlobalCompany/Search/Furkan?globalUserType=Invoice',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Mükellef Bilgisini Getirir

{% hint style="info" %}
Mükellefin <mark style="color:blue;">ETİKET</mark> bilgilerini getirmek için kullanılır.
{% endhint %}

## GET /GlobalCompany/GetGlobalCustomerInfo/{TaxNumber}

> Mükellef bilgisini getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"GlobalUserType":{"enum":["Invoice","DespatchAdvice"],"type":"string"},"GlobalCustomerInfoResponse":{"type":"object","properties":{"TaxNumber":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"TaxDepartment":{"type":"string","nullable":true},"Address":{"type":"string","nullable":true},"Country":{"type":"string","nullable":true},"City":{"type":"string","nullable":true},"District":{"type":"string","nullable":true},"PostalCode":{"type":"string","nullable":true},"Phone":{"type":"string","nullable":true},"Fax":{"type":"string","nullable":true},"Email":{"type":"string","nullable":true},"Type":{"type":"string","nullable":true},"WebSite":{"type":"string","nullable":true},"ModuleType":{"type":"string","nullable":true},"FirstCreationTime":{"type":"string","format":"date-time"},"Aliases":{"type":"array","items":{"$ref":"#/components/schemas/Alias"},"nullable":true,"readOnly":true}},"additionalProperties":false},"Alias":{"type":"object","properties":{"Name":{"type":"string","nullable":true},"CreationTime":{"type":"string","format":"date-time"},"DeletionTime":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false}}},"paths":{"/GlobalCompany/GetGlobalCustomerInfo/{TaxNumber}":{"get":{"tags":["GlobalCompany"],"summary":"Mükellef bilgisini getirir.","parameters":[{"name":"TaxNumber","in":"path","description":"","required":true,"schema":{"type":"string"}},{"name":"globalUserType","in":"query","description":"","schema":{"$ref":"#/components/schemas/GlobalUserType"}}],"responses":{"200":{"description":"Mükellef bilgisini getirir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalCustomerInfoResponse"}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/GlobalCompany/GetGlobalCustomerInfo/34918613960?globalUserType=Invoice");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/GlobalCompany/GetGlobalCustomerInfo/34918613960?globalUserType=Invoice',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/GlobalCompany/GetGlobalCustomerInfo/34918613960?globalUserType=Invoice',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Mükellef Bilgisini Liste Halinde Getirir

{% hint style="info" %}
Mükelleflerin <mark style="color:blue;">ETİKET</mark> bilgilerini getirmek için kullanılır.
{% endhint %}

## POST /GlobalCompany/GetGlobalCustomerInfo

> Mükellef bilgisini liste halinde getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"GlobalUserType":{"enum":["Invoice","DespatchAdvice"],"type":"string"},"GlobalCustomerAliasesResponse":{"type":"object","properties":{"TaxNumber":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"Type":{"type":"string","nullable":true},"ModuleType":{"type":"string","nullable":true},"FirstCreationTime":{"type":"string","format":"date-time"},"Aliases":{"type":"array","items":{"$ref":"#/components/schemas/Alias"},"nullable":true,"readOnly":true}},"additionalProperties":false},"Alias":{"type":"object","properties":{"Name":{"type":"string","nullable":true},"CreationTime":{"type":"string","format":"date-time"},"DeletionTime":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false}}},"paths":{"/GlobalCompany/GetGlobalCustomerInfo":{"post":{"tags":["GlobalCompany"],"summary":"Mükellef bilgisini liste halinde getirir.","parameters":[{"name":"globalUserType","in":"query","description":"","schema":{"$ref":"#/components/schemas/GlobalUserType"}}],"requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"type":"array","items":{"type":"string"}}},"application/json":{"schema":{"type":"array","items":{"type":"string"}}},"text/json":{"schema":{"type":"array","items":{"type":"string"}}},"application/*+json":{"schema":{"type":"array","items":{"type":"string"}}}}},"responses":{"200":{"description":"Mükellef bilgisini liste halinde getirir.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GlobalCustomerAliasesResponse"}}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/GlobalCompany/GetGlobalCustomerInfo?globalUserType=Invoice");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"["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/general/GlobalCompany/GetGlobalCustomerInfo?globalUserType=Invoice',
  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 =>'[
  "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([
  "string"
]);
var config = {
  method: 'post',
  url: 'https://apitest.nilvera.com/general/GlobalCompany/GetGlobalCustomerInfo?globalUserType=Invoice',
  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 %}


# VKN ile Sorgular

{% hint style="info" %}
Bir firma/kişinin e-Fatura mükellefi olup olmadığını <mark style="color:blue;">VKN/TCKN</mark> ile sorgulamak için kullanılır.
{% endhint %}

## GET /GlobalCompany/Check/TaxNumber/{TaxNumber}

> Vergi numarasından mükellef olup olmadığı sorgular.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"GlobalUserType":{"enum":["Invoice","DespatchAdvice"],"type":"string"},"GlobalCompanyInfoResponse":{"type":"object","properties":{"TaxNumber":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"FirstCreatedTime":{"type":"string","format":"date-time"},"CreationTime":{"type":"string","format":"date-time"},"DocumentType":{"type":"string","nullable":true},"Name":{"type":"string","nullable":true},"Type":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/GlobalCompany/Check/TaxNumber/{TaxNumber}":{"get":{"tags":["GlobalCompany"],"summary":"Vergi numarasından mükellef olup olmadığı sorgular.","parameters":[{"name":"TaxNumber","in":"path","description":"","required":true,"schema":{"type":"string"}},{"name":"globalUserType","in":"query","description":"","schema":{"$ref":"#/components/schemas/GlobalUserType"}}],"responses":{"200":{"description":"Vergi numarasından mükellef olup olmadığı sorgular.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GlobalCompanyInfoResponse"}}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/GlobalCompany/Check/TaxNumber/34918613960?globalUserType=Invoice");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/GlobalCompany/Check/TaxNumber/34918613960?globalUserType=Invoice',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/GlobalCompany/Check/TaxNumber/34918613960?globalUserType=Invoice',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Ünvan ile Sorgular

{% hint style="info" %}
Bir firma/kişinin e-Fatura mükellefi olup olmadığını <mark style="color:blue;">ÜNVAN</mark> ile sorgulamak için kullanılır.
{% endhint %}

## GET /GlobalCompany/Check/Name/{Name}

> Ünvandan mükellef olup olmadığı sorgular.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"GlobalUserType":{"enum":["Invoice","DespatchAdvice"],"type":"string"},"GlobalCompanyInfoResponse":{"type":"object","properties":{"TaxNumber":{"type":"string","nullable":true},"Title":{"type":"string","nullable":true},"FirstCreatedTime":{"type":"string","format":"date-time"},"CreationTime":{"type":"string","format":"date-time"},"DocumentType":{"type":"string","nullable":true},"Name":{"type":"string","nullable":true},"Type":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/GlobalCompany/Check/Name/{Name}":{"get":{"tags":["GlobalCompany"],"summary":"Ünvandan mükellef olup olmadığı sorgular.","parameters":[{"name":"Name","in":"path","description":"","required":true,"schema":{"type":"string"}},{"name":"globalUserType","in":"query","description":"","schema":{"$ref":"#/components/schemas/GlobalUserType"}}],"responses":{"200":{"description":"Ünvandan mükellef olup olmadığı sorgular.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GlobalCompanyInfoResponse"}}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/GlobalCompany/Check/Name/furkan?globalUserType=Invoice");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/GlobalCompany/Check/Name/furkan?globalUserType=Invoice',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/GlobalCompany/Check/Name/furkan?globalUserType=Invoice',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Mükellef Listesi zip Olarak Dönülür

## GET /GlobalCompany/{AliasType}/{GlobalUserType}

> Mükellef listesi ZIP olarak dönülür

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"AliasType":{"enum":["PK","GB"],"type":"string"},"GlobalUserType":{"enum":["Invoice","DespatchAdvice"],"type":"string"}}},"paths":{"/GlobalCompany/{AliasType}/{GlobalUserType}":{"get":{"tags":["GlobalCompany"],"summary":"Mükellef listesi ZIP olarak dönülür","parameters":[{"name":"AliasType","in":"path","description":"","required":true,"schema":{"$ref":"#/components/schemas/AliasType"}},{"name":"GlobalUserType","in":"path","description":"","required":true,"schema":{"$ref":"#/components/schemas/GlobalUserType"}}],"responses":{"200":{"description":"OK","content":{"text/plain":{"schema":{"type":"string","format":"byte"}},"application/json":{"schema":{"type":"string","format":"byte"}},"text/json":{"schema":{"type":"string","format":"byte"}}}}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/GlobalCompany/PK/Invoice", Method.Get);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/general/GlobalCompany/PK/Invoice',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/GlobalCompany/PK/Invoice',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Mail İşlemleri


# Mail Ayarlarını Getirir

## GET /Mailing/Setting

> Mail ayarlarını getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"MailingSettingResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"CompanyID":{"type":"integer","format":"int32"},"ModuleID":{"$ref":"#/components/schemas/Module"},"IsActive":{"type":"boolean"}},"additionalProperties":false},"Module":{"enum":["Portal","Sms","WhatsApp"],"type":"string"}}},"paths":{"/Mailing/Setting":{"get":{"tags":["Mailing"],"summary":"Mail ayarlarını getirir.","responses":{"200":{"description":"Mail ayarlarını getirir.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MailingSettingResponse"}}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/Mailing/Setting", Method.Get);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/general/Mailing/Setting',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/Mailing/Setting',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Whatsapp Özelliğini Değiştirir

## POST /Mailing/Whatsapp/Setting/{IsActive}

> Whatsapp özelliğini değiştirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Mailing/Whatsapp/Setting/{IsActive}":{"post":{"tags":["Mailing"],"summary":"Whatsapp özelliğini değiştirir.","parameters":[{"name":"IsActive","in":"path","description":"","required":true,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Whatsapp özelliğini değiştirir.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/Mailing/Whatsapp/Setting/true", Method.Post);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/general/Mailing/Whatsapp/Setting/true',
  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_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/Mailing/Whatsapp/Setting/true',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Mail Özelliğini Değiştirir

## POST /Mailing/Email/Setting/{IsActive}

> Mail özelliğini değiştirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Mailing/Email/Setting/{IsActive}":{"post":{"tags":["Mailing"],"summary":"Mail özelliğini değiştirir.","parameters":[{"name":"IsActive","in":"path","description":"","required":true,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Mail özelliğini değiştirir.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/Mailing/Email/Setting/true", Method.Post);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/general/Mailing/Email/Setting/true',
  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_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/Mailing/Email/Setting/true',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# SMS Özelliğini Değiştirir

## POST /Mailing/Sms/Setting/{IsActive}

> Sms özelliğini değiştirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Mailing/Sms/Setting/{IsActive}":{"post":{"tags":["Mailing"],"summary":"Sms özelliğini değiştirir.","parameters":[{"name":"IsActive","in":"path","description":"","required":true,"schema":{"type":"boolean"}}],"responses":{"200":{"description":"Sms özelliğini değiştirir.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/Mailing/Sms/Setting/true", Method.Post);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/general/Mailing/Sms/Setting/true',
  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_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/Mailing/Sms/Setting/true',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Stoklar

Gelen e-faturalar için api uçları

{% hint style="info" %}
Firmanın stokları ile ilgili sorgulama, ekleme, silme veya güncelleme işlemlerini bu kısımda yapabilirsiniz.
{% endhint %}


# Stokları Listeler

## GET /Stocks

> Stokları getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"SortType":{"enum":["ASC","DESC"],"type":"string"},"StockResponsePagination":{"type":"object","properties":{"Page":{"type":"integer","format":"int32"},"PageSize":{"type":"integer","format":"int32"},"TotalCount":{"type":"integer","format":"int32","nullable":true},"TotalPages":{"type":"integer","format":"int32","nullable":true,"readOnly":true},"Content":{"type":"array","items":{"$ref":"#/components/schemas/StockResponse"},"nullable":true}},"additionalProperties":false},"StockResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Name":{"type":"string","nullable":true},"UnitCode":{"type":"string","nullable":true},"UnitName":{"type":"string","nullable":true},"Price":{"type":"number","format":"double"},"SellerCode":{"type":"string","nullable":true},"BuyerCode":{"type":"string","nullable":true},"ManufacturerCode":{"type":"string","nullable":true},"IsActive":{"type":"boolean"},"CreatedDate":{"type":"string","format":"date-time"},"GTIPCode":{"type":"string","nullable":true},"Brand":{"type":"string","nullable":true},"Model":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"Note":{"type":"string","nullable":true},"DeliveryCode":{"type":"string","nullable":true},"ShippingCode":{"type":"string","nullable":true},"TaxPercent":{"type":"number","format":"double"}},"additionalProperties":false}}},"paths":{"/Stocks":{"get":{"tags":["Stocks"],"summary":"Stokları getirir.","parameters":[{"name":"Search","in":"query","schema":{"type":"string"}},{"name":"PageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Page","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"SortColumn","in":"query","schema":{"type":"string"}},{"name":"SortType","in":"query","schema":{"$ref":"#/components/schemas/SortType"}},{"name":"IsActive","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Stokları getirir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockResponsePagination"}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/Stocks");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/Stocks',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/Stocks',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Stok Ekler

## POST /Stocks

> Stok ekler.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"StockDto":{"type":"object","properties":{"Name":{"type":"string","nullable":true},"UnitCode":{"type":"string","nullable":true},"UnitName":{"type":"string","nullable":true},"Price":{"type":"number","format":"double"},"SellerCode":{"type":"string","nullable":true},"BuyerCode":{"type":"string","nullable":true},"ManufacturerCode":{"type":"string","nullable":true},"IsActive":{"type":"boolean"},"GTIPCode":{"type":"string","nullable":true},"Brand":{"type":"string","nullable":true},"Model":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"Note":{"type":"string","nullable":true},"DeliveryCode":{"type":"string","nullable":true},"ShippingCode":{"type":"string","nullable":true},"TaxPercent":{"type":"number","format":"double"}},"additionalProperties":false}}},"paths":{"/Stocks":{"post":{"tags":["Stocks"],"summary":"Stok ekler.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StockDto"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StockDto"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StockDto"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StockDto"}}}}},"responses":{"200":{"description":"Stok ekler.","content":{"application/json":{"schema":{"type":"string"}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/Stocks");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"["Name": "string",
"UnitCode": "string",
"UnitName": "string",
"Price": 0,
"SellerCode": "string",
"BuyerCode": "string",
"ManufacturerCode": "string",
"IsActive": true,
"GTIPCode": "string",
"Brand": "string",
"Model": "string",
"Description": "string",
"Note": "string",
"DeliveryCode": "string",
"ShippingCode": "string",
"TaxPercent": 0]";
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/general/Stocks',
  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 =>'[
  {
    "Name": "string",
    "UnitCode": "string",
    "UnitName": "string",
    "Price": 0,
    "SellerCode": "string",
    "BuyerCode": "string",
    "ManufacturerCode": "string",
    "IsActive": true,
    "GTIPCode": "string",
    "Brand": "string",
    "Model": "string",
    "Description": "string",
    "Note": "string",
    "DeliveryCode": "string",
    "ShippingCode": "string",
    "TaxPercent": 0
  }
]',
  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([
  {
    "Name": "string",
    "UnitCode": "string",
    "UnitName": "string",
    "Price": 0,
    "SellerCode": "string",
    "BuyerCode": "string",
    "ManufacturerCode": "string",
    "IsActive": true,
    "GTIPCode": "string",
    "Brand": "string",
    "Model": "string",
    "Description": "string",
    "Note": "string",
    "DeliveryCode": "string",
    "ShippingCode": "string",
    "TaxPercent": 0
  }
]);

var config = {
  method: 'post',
  url: 'https://apitest.nilvera.com/general/Stocks',
  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 %}


# Stok Günceller

## PUT /Stocks

> Stok Günceller.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"UpdateStockCommand":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Name":{"type":"string","nullable":true},"UnitCode":{"type":"string","nullable":true},"UnitName":{"type":"string","nullable":true},"Price":{"type":"number","format":"double"},"SellerCode":{"type":"string","nullable":true},"BuyerCode":{"type":"string","nullable":true},"ManufacturerCode":{"type":"string","nullable":true},"IsActive":{"type":"boolean"},"GTIPCode":{"type":"string","nullable":true},"Brand":{"type":"string","nullable":true},"Model":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"Note":{"type":"string","nullable":true},"ShippingCode":{"type":"string","nullable":true},"DeliveryCode":{"type":"string","nullable":true},"TaxPercent":{"type":"number","format":"double"}},"additionalProperties":false}}},"paths":{"/Stocks":{"put":{"tags":["Stocks"],"summary":"Stok Günceller.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/UpdateStockCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStockCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateStockCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateStockCommand"}}}},"responses":{"200":{"description":"Stok Günceller.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/Stocks");
client.Timeout = -1;
var request = new RestRequest(Method.PUT);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"{"ID": 0,
"Name": "string",
"UnitCode": "string",
"UnitName": "string",
"Price": 0,
"SellerCode": "string",
"BuyerCode": "string",
"ManufacturerCode": "string",
"IsActive": true,
"GTIPCode": "string",
"Brand": "string",
"Model": "string",
"Description": "string",
"Note": "string",
"ShippingCode": "string",
"DeliveryCode": "string",
"TaxPercent": 0}";
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/general/Stocks',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
  "ID": 0,
  "Name": "string",
  "UnitCode": "string",
  "UnitName": "string",
  "Price": 0,
  "SellerCode": "string",
  "BuyerCode": "string",
  "ManufacturerCode": "string",
  "IsActive": true,
  "GTIPCode": "string",
  "Brand": "string",
  "Model": "string",
  "Description": "string",
  "Note": "string",
  "ShippingCode": "string",
  "DeliveryCode": "string",
  "TaxPercent": 0
}',
  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({
  "ID": 0,
  "Name": "string",
  "UnitCode": "string",
  "UnitName": "string",
  "Price": 0,
  "SellerCode": "string",
  "BuyerCode": "string",
  "ManufacturerCode": "string",
  "IsActive": true,
  "GTIPCode": "string",
  "Brand": "string",
  "Model": "string",
  "Description": "string",
  "Note": "string",
  "ShippingCode": "string",
  "DeliveryCode": "string",
  "TaxPercent": 0
});
var config = {
  method: 'put',
  url: 'https://apitest.nilvera.com/general/Stocks',
  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 %}


# Stok Getirir

## GET /Stocks/{ID}

> Stok Getirir.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"StockResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Name":{"type":"string","nullable":true},"UnitCode":{"type":"string","nullable":true},"UnitName":{"type":"string","nullable":true},"Price":{"type":"number","format":"double"},"SellerCode":{"type":"string","nullable":true},"BuyerCode":{"type":"string","nullable":true},"ManufacturerCode":{"type":"string","nullable":true},"IsActive":{"type":"boolean"},"CreatedDate":{"type":"string","format":"date-time"},"GTIPCode":{"type":"string","nullable":true},"Brand":{"type":"string","nullable":true},"Model":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"Note":{"type":"string","nullable":true},"DeliveryCode":{"type":"string","nullable":true},"ShippingCode":{"type":"string","nullable":true},"TaxPercent":{"type":"number","format":"double"}},"additionalProperties":false}}},"paths":{"/Stocks/{ID}":{"get":{"tags":["Stocks"],"summary":"Stok Getirir.","parameters":[{"name":"ID","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Stok Getirir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StockResponse"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/Stocks/1", Method.Get);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/general/Stocks/1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/Stocks/1',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Stok Siler

## DELETE /Stocks/{ID}

> Stok siler.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Stocks/{ID}":{"delete":{"tags":["Stocks"],"summary":"Stok siler.","parameters":[{"name":"ID","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Stok siler.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/general/Stocks/1", Method.Delete);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/general/Stocks/1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'delete',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/general/Stocks/1',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Stokları Toplu Olarak Siler

## Stokları Toplu Siler.

> Stokları Toplu silmek için bu uç kullanılır.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Stocks/Bulk":{"delete":{"tags":["Stocks"],"summary":"Stokları Toplu Siler.","description":"Stokları Toplu silmek için bu uç kullanılır.","requestBody":{"content":{"application/json-patch+json":{"schema":{"type":"array","items":{"type":"integer","format":"int32"}}},"application/json":{"schema":{"type":"array","items":{"type":"integer","format":"int32"}}},"text/json":{"schema":{"type":"array","items":{"type":"integer","format":"int32"}}},"application/*+json":{"schema":{"type":"array","items":{"type":"integer","format":"int32"}}}}},"responses":{"200":{"description":"Stokları Toplu Siler.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"},"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 options = new RestClientOptions("/general/Stocks/Bulk")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Delete);
request.AddHeader("Authorization", "APIKEY");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);
```

{% endtab %}

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

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => '/general/Stocks/Bulk',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');

let config = {
  method: 'delete',
  maxBodyLength: Infinity,
  url: '/general/Stocks/Bulk',
  headers: { 
    'Authorization': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Stok Listesinde Arama Yapar

## GET /Stocks/SearchStock/{searchText}

> Stok arar.

```json
{"openapi":"3.0.1","info":{"title":"General API","version":"v1"},"servers":[{"url":"/general"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"StockResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Name":{"type":"string","nullable":true},"UnitCode":{"type":"string","nullable":true},"UnitName":{"type":"string","nullable":true},"Price":{"type":"number","format":"double"},"SellerCode":{"type":"string","nullable":true},"BuyerCode":{"type":"string","nullable":true},"ManufacturerCode":{"type":"string","nullable":true},"IsActive":{"type":"boolean"},"CreatedDate":{"type":"string","format":"date-time"},"GTIPCode":{"type":"string","nullable":true},"Brand":{"type":"string","nullable":true},"Model":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"Note":{"type":"string","nullable":true},"DeliveryCode":{"type":"string","nullable":true},"ShippingCode":{"type":"string","nullable":true},"TaxPercent":{"type":"number","format":"double"}},"additionalProperties":false}}},"paths":{"/Stocks/SearchStock/{searchText}":{"get":{"tags":["Stocks"],"summary":"Stok arar.","parameters":[{"name":"searchText","in":"path","description":"","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stok arar.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StockResponse"}}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/general/Stocks/SearchStock/adfghjkl");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/general/Stocks/SearchStock/adfghjkl',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/general/Stocks/SearchStock/adfghjkl',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# RAPOR API


# Muhasebe Raporu

{% hint style="info" %}
Firmanın tüm e-Fatura, e-Arşiv Fatura, e-İrsaliye vb. belgelerini excel raporu olarak istenilen şablonda alındığı kısımdır.
{% endhint %}


# Raporları Listeler

## GET /Accounting

> Muhasebe raporlarını listeler.

```json
{"openapi":"3.0.1","info":{"title":"Report API","version":"v1"},"servers":[{"url":"/report"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"ReportType":{"enum":["Invoice","Voucher","Producer"],"type":"string"},"AccountingReportResponsePagination":{"type":"object","properties":{"Page":{"type":"integer","format":"int32"},"PageSize":{"type":"integer","format":"int32"},"TotalCount":{"type":"integer","format":"int32","nullable":true},"TotalPages":{"type":"integer","format":"int32","nullable":true,"readOnly":true},"Content":{"type":"array","items":{"$ref":"#/components/schemas/AccountingReportResponse"},"nullable":true}},"additionalProperties":false},"AccountingReportResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Title":{"type":"string","nullable":true},"TaxNumber":{"type":"string","nullable":true},"CreatedDate":{"type":"string","format":"date-time"},"Email":{"type":"string","nullable":true},"StartDate":{"type":"string","format":"date-time"},"EndDate":{"type":"string","format":"date-time"},"TemplateID":{"type":"integer","format":"int32"},"UUID":{"type":"string","nullable":true},"Status":{"type":"string","nullable":true},"Type":{"type":"integer","format":"int32"},"ReportType":{"$ref":"#/components/schemas/ReportType"}},"additionalProperties":false}}},"paths":{"/Accounting":{"get":{"tags":["Accounting"],"summary":"Muhasebe raporlarını listeler.","parameters":[{"name":"PageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Page","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Search","in":"query","schema":{"type":"string"}},{"name":"StartDate","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"EndDate","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"ReportType","in":"query","schema":{"$ref":"#/components/schemas/ReportType"}}],"responses":{"200":{"description":"Muhasebe raporlarını listeler.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingReportResponsePagination"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/report/Accounting", Method.Get);
request.AddHeader("Authorization", "APIKEY");
RestResponse response = await client.ExecuteAsync(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/report/Accounting',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/report/Accounting',
  headers: { 
    'Authorization': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Rapor Oluşturur

## POST /Accounting

> Muhasebe raporu oluşturur.

```json
{"openapi":"3.0.1","info":{"title":"Report API","version":"v1"},"servers":[{"url":"/report"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"GenerateAccountingReportCommand":{"type":"object","properties":{"Title":{"type":"string","nullable":true},"StartDate":{"type":"string","format":"date-time"},"EndDate":{"type":"string","format":"date-time"},"Type":{"type":"integer","format":"int32"},"TemplateID":{"type":"integer","format":"int32"},"Email":{"type":"string","nullable":true},"ReportType":{"$ref":"#/components/schemas/ReportType"}},"additionalProperties":false},"ReportType":{"enum":["Invoice","Voucher","Producer"],"type":"string"}}},"paths":{"/Accounting":{"post":{"tags":["Accounting"],"summary":"Muhasebe raporu oluşturur.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/GenerateAccountingReportCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAccountingReportCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/GenerateAccountingReportCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/GenerateAccountingReportCommand"}}}},"responses":{"200":{"description":"Muhasebe raporu oluşturur.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
    MaxTimeout = -1,
};

var client = new RestClient(options);
var request = new RestRequest("/report/Accounting", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "APIKEY");

var body = new
{
    Title = "string",
    StartDate = DateTime.Parse("2024-07-04T08:36:14.479Z"),
    EndDate = DateTime.Parse("2024-07-04T08:36:14.479Z"),
    Type = 0,
    TemplateID = 0,
    Email = "string",
    ReportType = "Invoice"
};

request.AddJsonBody(body);
RestResponse response = await client.ExecuteAsync(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/report/Accounting',
  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 =>'{
  "Title": "string",
  "StartDate": "2024-07-04T08:36:14.479Z",
  "EndDate": "2024-07-04T08:36:14.479Z",
  "Type": 0,
  "TemplateID": 0,
  "Email": "string",
  "ReportType": "Invoice"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "Title": "string",
  "StartDate": "2024-07-04T08:36:14.479Z",
  "EndDate": "2024-07-04T08:36:14.479Z",
  "Type": 0,
  "TemplateID": 0,
  "Email": "string",
  "ReportType": "Invoice"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/report/Accounting',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'APIKEY'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Rapor İndirir

## POST /Accounting/{UUID}/download

> Muhasebe raporunu indirir.

```json
{"openapi":"3.0.1","info":{"title":"Report API","version":"v1"},"servers":[{"url":"/report"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Accounting/{UUID}/download":{"post":{"tags":["Accounting"],"summary":"Muhasebe raporunu indirir.","parameters":[{"name":"UUID","in":"path","description":"","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Muhasebe raporunu indirir.","content":{"application/json":{"schema":{"type":"string"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/report/Accounting/d1fdf61e-0ab5-433d-9b19-de09425b1e46/download", Method.Post);
request.AddHeader("Authorization", "APIKEY");
var body = @"";
request.AddParameter("text/plain", body,  ParameterType.RequestBody);
RestResponse response = await client.ExecuteAsync(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/report/Accounting/d1fdf61e-0ab5-433d-9b19-de09425b1e46/download',
  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_HTTPHEADER => array(
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');
let data = '';

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/report/Accounting/d1fdf61e-0ab5-433d-9b19-de09425b1e46/download',
  headers: { 
    'Authorization': 'APIKEY'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Rapor Şablonu Listeler

## GET /Accounting/Template

> Muhasebe rapor şablonu listeler.

```json
{"openapi":"3.0.1","info":{"title":"Report API","version":"v1"},"servers":[{"url":"/report"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"ReportType":{"enum":["Invoice","Voucher","Producer"],"type":"string"},"AccountingReportTemplateResponsePagination":{"type":"object","properties":{"Page":{"type":"integer","format":"int32"},"PageSize":{"type":"integer","format":"int32"},"TotalCount":{"type":"integer","format":"int32","nullable":true},"TotalPages":{"type":"integer","format":"int32","nullable":true,"readOnly":true},"Content":{"type":"array","items":{"$ref":"#/components/schemas/AccountingReportTemplateResponse"},"nullable":true}},"additionalProperties":false},"AccountingReportTemplateResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Name":{"type":"string","nullable":true},"CreatedDate":{"type":"string","format":"date-time"},"Type":{"type":"integer","format":"int32"},"ReportType":{"$ref":"#/components/schemas/ReportType"}},"additionalProperties":false}}},"paths":{"/Accounting/Template":{"get":{"tags":["Accounting"],"summary":"Muhasebe rapor şablonu listeler.","parameters":[{"name":"PageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Page","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Search","in":"query","schema":{"type":"string"}},{"name":"ReportType","in":"query","schema":{"$ref":"#/components/schemas/ReportType"}}],"responses":{"200":{"description":"Muhasebe rapor şablonu listeler.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingReportTemplateResponsePagination"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/report/Accounting/Template", Method.Get);
request.AddHeader("Authorization", "APIKEY");
RestResponse response = await client.ExecuteAsync(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/report/Accounting/Template',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/report/Accounting/Template',
  headers: { 
    'Authorization': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Muhasebe Rapor Şablonu Oluşturur

## POST /Accounting/Template

> Muhasebe rapor şablonu oluşturur.

```json
{"openapi":"3.0.1","info":{"title":"Report API","version":"v1"},"servers":[{"url":"/report"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CreateAccountingReportTemplateCommand":{"required":["ReportType"],"type":"object","properties":{"Name":{"type":"string","nullable":true},"Type":{"type":"integer","format":"int32"},"Columns":{"type":"array","items":{"$ref":"#/components/schemas/AccountingReportTemplateColumn"},"nullable":true},"ReportType":{"$ref":"#/components/schemas/ReportType"}},"additionalProperties":false},"AccountingReportTemplateColumn":{"type":"object","properties":{"Name":{"type":"string","nullable":true},"ID":{"type":"integer","format":"int32"}},"additionalProperties":false},"ReportType":{"enum":["Invoice","Voucher","Producer"],"type":"string"},"AccountingReportTemplate":{"type":"object","properties":{"Name":{"type":"string","nullable":true},"CreatedDate":{"type":"string","format":"date-time"},"Columns":{"type":"string","nullable":true},"Type":{"type":"integer","format":"int32"},"ID":{"type":"integer","format":"int32"}},"additionalProperties":false}}},"paths":{"/Accounting/Template":{"post":{"tags":["Accounting"],"summary":"Muhasebe rapor şablonu oluşturur.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CreateAccountingReportTemplateCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/CreateAccountingReportTemplateCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateAccountingReportTemplateCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateAccountingReportTemplateCommand"}}}},"responses":{"200":{"description":"Muhasebe rapor şablonu oluşturur.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountingReportTemplate"}}}},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
    MaxTimeout = -1,
};

var client = new RestClient(options);
var request = new RestRequest("/report/Accounting/Template", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "APIKEY");

var body = new
{
    Name = "string",
    Type = 0,
    Columns = new List<object>
    {
        new
        {
            Name = "string",
            ID = 0
        }
    },
    ReportType = "Invoice"
};

request.AddJsonBody(body);
RestResponse response = await client.ExecuteAsync(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/report/Accounting/Template',
  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 =>'{
  "Name": "string",
  "Type": 0,
  "Columns": [
    {
      "Name": "string",
      "ID": 0
    }
  ],
  "ReportType": "Invoice"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "Name": "string",
  "Type": 0,
  "Columns": [
    {
      "Name": "string",
      "ID": 0
    }
  ],
  "ReportType": "Invoice"
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/report/Accounting/Template',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'APIKEY'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Rapor Şablonu Günceller

## PUT /Accounting/Template

> Muhasebe rapor şablonunu günceller.

```json
{"openapi":"3.0.1","info":{"title":"Report API","version":"v1"},"servers":[{"url":"/report"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"UpdateAccountingReportTemplateCommand":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Name":{"type":"string","nullable":true},"Columns":{"type":"array","items":{"$ref":"#/components/schemas/AccountingReportTemplateColumn"},"nullable":true}},"additionalProperties":false},"AccountingReportTemplateColumn":{"type":"object","properties":{"Name":{"type":"string","nullable":true},"ID":{"type":"integer","format":"int32"}},"additionalProperties":false}}},"paths":{"/Accounting/Template":{"put":{"tags":["Accounting"],"summary":"Muhasebe rapor şablonunu günceller.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/UpdateAccountingReportTemplateCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountingReportTemplateCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountingReportTemplateCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateAccountingReportTemplateCommand"}}}},"responses":{"200":{"description":"Muhasebe rapor şablonunu günceller.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
    MaxTimeout = -1,
};

var client = new RestClient(options);
var request = new RestRequest("/report/Accounting/Template", Method.Put);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "APIKEY");

var body = new
{
    ID = 0,
    Name = "string",
    Columns = new List<object>
    {
        new
        {
            Name = "string",
            ID = 0
        }
    }
};

request.AddJsonBody(body);
RestResponse response = await client.ExecuteAsync(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/report/Accounting/Template',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
  "ID": 0,
  "Name": "string",
  "Columns": [
    {
      "Name": "string",
      "ID": 0
    }
  ]
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "ID": 0,
  "Name": "string",
  "Columns": [
    {
      "Name": "string",
      "ID": 0
    }
  ]
});

let config = {
  method: 'put',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/report/Accounting/Template',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'APIKEY'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Rapor Şablonu Siler

## DELETE /Accounting/Template/{ID}

> Muhasebe rapor şablonunu siler.

```json
{"openapi":"3.0.1","info":{"title":"Report API","version":"v1"},"servers":[{"url":"/report"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Accounting/Template/{ID}":{"delete":{"tags":["Accounting"],"summary":"Muhasebe rapor şablonunu siler.","parameters":[{"name":"ID","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Muhasebe rapor şablonunu siler.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/report/Accounting/Template/0", Method.Delete);
request.AddHeader("Authorization", "APIKEY");
RestResponse response = await client.ExecuteAsync(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/report/Accounting/Template/0',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');

let config = {
  method: 'delete',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/report/Accounting/Template/0',
  headers: { 
    'Authorization': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Rapor Şablon Kolonları Listeler

## GET /Accounting/Columns/{Type}/{ReportType}

> Muhasebe rapor şablonun bütün kolonlarını getirir.

```json
{"openapi":"3.0.1","info":{"title":"Report API","version":"v1"},"servers":[{"url":"/report"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"ReportType":{"enum":["Invoice","Voucher","Producer"],"type":"string"},"GetAccountingReportTemplateColumnResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"Name":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/Accounting/Columns/{Type}/{ReportType}":{"get":{"tags":["Accounting"],"summary":"Muhasebe rapor şablonun bütün kolonlarını getirir.","parameters":[{"name":"Type","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}},{"name":"ReportType","in":"path","description":"","required":true,"schema":{"$ref":"#/components/schemas/ReportType"}}],"responses":{"200":{"description":"Muhasebe rapor şablonun bütün kolonlarını getirir.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GetAccountingReportTemplateColumnResponse"}}}}},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/report/Accounting/Columns/1/Invoice", Method.Get);
request.AddHeader("Authorization", "APIKEY");
RestResponse response = await client.ExecuteAsync(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/report/Accounting/Columns/1/Invoice',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/report/Accounting/Columns/1/Invoice',
  headers: { 
    'Authorization': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# Rapor Şablon Kolonlarını Getirir

## GET /Accounting/Columns/Current/{ID}

> Muhasebe rapor şablonunun mevcut kolonlarını getirir.

```json
{"openapi":"3.0.1","info":{"title":"Report API","version":"v1"},"servers":[{"url":"/report"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"Column":{"type":"object","properties":{"Columns":{"type":"array","items":{"$ref":"#/components/schemas/AccountingReportTemplateColumn"},"nullable":true,"readOnly":true}},"additionalProperties":false},"AccountingReportTemplateColumn":{"type":"object","properties":{"Name":{"type":"string","nullable":true},"ID":{"type":"integer","format":"int32"}},"additionalProperties":false}}},"paths":{"/Accounting/Columns/Current/{ID}":{"get":{"tags":["Accounting"],"summary":"Muhasebe rapor şablonunun mevcut kolonlarını getirir.","parameters":[{"name":"ID","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Muhasebe rapor şablonunun mevcut kolonlarını getirir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Column"}}}},"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
const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/report/Accounting/Columns/Current/0',
  headers: { 
    'Authorization': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}

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

```php
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://apitest.nilvera.com/report/Accounting/Columns/Current/0',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: APIKEY'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

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

```javascript
const axios = require('axios');

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/report/Accounting/Columns/Current/0',
  headers: { 
    'Authorization': 'APIKEY'
  }
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});

```

{% endtab %}
{% endtabs %}


# E-FATURA API

### E-Fatura Genel tanımları

{% hint style="info" %}
Bu dökümanda e-Fatura genel bilgilendirme yapılmaktadır. E-Fatura kullanımında iki tür fatura profili kullanılmaktadır <mark style="color:yellow;">`TEMELFATURA`</mark> ve <mark style="color:yellow;">`TICARIFATURA`</mark>.
{% endhint %}

### TEMELFATURA Senaryosu

* **Tanım :** Temel fatura senaryosu, faturalama ve faturanın alıcısına ulaştırılmasıdır. Bu senaryo, sadece fatura düzenleme ve gönderme sürecine yönelik olduğu için `“`<mark style="color:yellow;">`Temel Fatura Senaryosu`</mark>`”` olarak adlandırılmıştır. Fatura alıcısı fatura üzerinde herhangi bir teknik problem olmadığı müddetçe faturayı kabul etmekle yükümlüdür. Alıcının temel e-faturayı reddetme seçeneği yoktur.
* **Kapsam :** Temel Fatura senaryosu kapsamları
  * Her ölçek ve sektördeki kamu veya özel sektör satıcı ve alıcıları
  * Her türlü mal veya hizmet satışını
* **Taraflar ve Rolleri**
  * **Satıcı :** e-Faturayı gönderen taraftır. Ayrıca alacaklı olarak da adlandırılır.
  * **Alıcı :** e-Faturayı alan taraftır. Ayrıca borçlu olarak da adlandırılır.

### TICARIFATURA Senaryosu

* **Tanım :** Bu senaryo, yapılacak mal ve hizmet satışları dolayısıyla fatura düzenlenmesi, söz konusu faturaların kabul edilmesi, reddedilmesi veya iade faturası düzenlenmesi durumları için kullanılacak senaryodur. Senaryo kapsamında düzenlenen fatura, vergi kanunları ve ilgili düzenlemelere bağlı olarak düzenlenen faturayı ifade eder. Bu senaryoda fatura kesilen tarafın faturaya <mark style="color:green;">`KABUL`</mark> veya <mark style="color:red;">`RED`</mark>red seçeneği sunulur. Alıcı taraf(fatura kesilen taraf) Faturayı kabul etmesi durumundan sonra herhangi bir mal/hizmet iade durumunda <mark style="color:red;">`iade`</mark> işlemlerinin bu senaryoda açıklanan esaslar dahilinde düzenlenmesi gerekmektedir.Bu senaryo kapsamında düzenlenen fatura, <mark style="color:blue;">**Temel fatura**</mark> senaryosunda düzenlenen faturadan farklı değildir. **Temel fatura** senaryosundan farklı olarak, <mark style="color:blue;">**Ticari Fatura**</mark> Senaryosunda <mark style="color:yellow;">`RED`</mark> ve <mark style="color:yellow;">`KABUL`</mark> seçeneğinin kullanımına imkan verilmiştir. <mark style="color:blue;">**Ticari Fatura**</mark> Senaryosu kapsamında faturalaşma, tarafların bu konuda gösterecekleri açık rızaya bağlıdır.
* **Kapsam :** Ticari Fatura senaryosu kapsamları
  * Her ölçek ve sektördeki kamu ve özel sektör alıcı ve satıcılarını
  * Her türlü mal ve hizmet satışı nedeniyle e-fatura düzenlenmesini
  * Faturaların alıcılar tarafından yanıt vermesi suretiyle kabul edilebilmesini
  * Faturaların alıcılar tarafından yanıt vermesi suretiyle reddedilebilmesini
  * İade faturası düzenlenmesini
* **Taraflar ve Rolleri**
  * **Satıcı :** Faturayı düzenleyerek alıcıya gönderen taraftır. Genel olarak faturalaşma sürecinde alacaklı olan taraftır. Satıcı alıcı ile önceden anlaşmış olmak koşulu ile düzenlediği faturanın alıcı tarafından kabulünü talep edebilir.
  * **Alıcı :** Faturayı alan veya adına fatura düzenlenen taraftır, faturanın borçlusudur. Faturayı kabul etmek yanında belli şartlar dahilinde reddeden taraftır. Ayrıca belli koşulların gerçekleşmesi halinde iade faturası düzenleyebilmektedir.

{% hint style="info" %}
<https://apitest.nilvera.com/swagger/docs/v1/einvoice>
{% endhint %}


# Taslak Faturalar


# Taslak Faturaları Listeler

## Taslak faturaları listeler.

> Taslak faturaları listelemek için bu ucu kullanabilirsiniz.> \
> \<br />&#x20;> \
> \*\*Search\*\* parametresiyle liste içerisinde arama yapabilirsiniz.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"DraftInvoiceResponsePagination":{"type":"object","properties":{"Page":{"type":"integer","format":"int32"},"PageSize":{"type":"integer","format":"int32"},"TotalCount":{"type":"integer","format":"int32","nullable":true},"TotalPages":{"type":"integer","format":"int32","nullable":true,"readOnly":true},"Content":{"type":"array","items":{"$ref":"#/components/schemas/DraftInvoiceResponse"},"nullable":true}},"additionalProperties":false},"DraftInvoiceResponse":{"type":"object","properties":{"UUID":{"type":"string","nullable":true},"TaxNumber":{"type":"string","nullable":true},"InvoiceNumber":{"type":"string","nullable":true},"InvoiceProfile":{"$ref":"#/components/schemas/InvoiceProfile"},"InvoiceStatusDescription":{"type":"string","nullable":true},"InvoiceType":{"$ref":"#/components/schemas/InvoiceType"},"IssueDate":{"type":"string","format":"date-time","nullable":true},"CreatedDate":{"type":"string","format":"date-time"},"Status":{"type":"integer","format":"int32","nullable":true},"CurrencyCode":{"type":"string","nullable":true},"PayableAmount":{"type":"number","format":"double"},"Alias":{"type":"string","nullable":true},"ReceiverName":{"type":"string","nullable":true},"ReceiverTaxNumber":{"type":"string","nullable":true},"ReceiverAlias":{"type":"string","nullable":true},"IsPrint":{"type":"boolean"},"Tags":{"type":"array","items":{"$ref":"#/components/schemas/Tags"},"nullable":true,"readOnly":true},"SpecialCode":{"type":"string","nullable":true}},"additionalProperties":false},"InvoiceProfile":{"enum":["TEMELFATURA","TICARIFATURA","IHRACAT","YOLCUBERABERFATURA","EARSIVFATURA","KAMU","HKS","ENERJI","ILAC_TIBBICIHAZ","OZELFATURA","YATIRIMTESVIK","IDIS"],"type":"string"},"InvoiceType":{"enum":["SATIS","IADE","ISTISNA","TEVKIFAT","IHRACKAYITLI","IPTAL","OZELMATRAH","SGK","TEVKIFATIADE","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","KONAKLAMAVERGISI","SARJ","SARJANLIK","TEKNOLOJIDESTEK","YTBSATIS","YTBISTISNA","YTBIADE","YTBTEVKIFAT","YTBTEVKIFATIADE"],"type":"string"},"Tags":{"type":"object","properties":{"UUID":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"Name":{"type":"string","nullable":true},"Color":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/Draft":{"get":{"tags":["Draft"],"summary":"Taslak faturaları listeler.","description":"Taslak faturaları listelemek için bu ucu kullanabilirsiniz.\r\n<br /> \r\n**Search** parametresiyle liste içerisinde arama yapabilirsiniz.","parameters":[{"name":"PageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Page","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Search","in":"query","schema":{"type":"string"}},{"name":"StartDate","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"EndDate","in":"query","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Taslak faturaları listeler.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftInvoiceResponsePagination"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Draft", Method.Get);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/einvoice/Draft',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Draft',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Taslak Faturaları Siler

## Taslak faturaları siler.

> Taslak faturaları liste halinde silmek için bu uç kullanılır.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Draft":{"delete":{"tags":["Draft"],"summary":"Taslak faturaları siler.","description":"Taslak faturaları liste halinde silmek için bu uç kullanılır.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},"text/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},"application/*+json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"responses":{"200":{"description":"Taslak faturaları siler.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"},"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("//einvoice/Draft");
client.Timeout = -1;
var request = new RestRequest(Method.DELETE);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "Bearer <API KEY>");
var body = @"[
"ec3be92c-27ed-2004-ccfd-04b425dced54",
"a07f9c7e-a182-d507-057d-b87d185deb27"]";
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 => '//einvoice/Draft',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_POSTFIELDS =>'[
  "ec3be92c-27ed-2004-ccfd-04b425dced54",
  "a07f9c7e-a182-d507-057d-b87d185deb27"
]',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Accept: text/plain',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var data = JSON.stringify([
  "ec3be92c-27ed-2004-ccfd-04b425dced54",
  "a07f9c7e-a182-d507-057d-b87d185deb27"
]);
var config = {
  method: 'delete',
  url: '//einvoice/Draft',
  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);
});
```

{% endtab %}
{% endtabs %}


# Taslağın Html'i Getirilir

## Html dosyasını indirir.

> Belgeye ait html dosyasını indirmek için bu ucu kullanabilirsiniz.> \
> \<br />&#x20;> \
> \*\*Search\*\* parametresiyle liste içerisinde arama yapabilirsiniz.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Draft/{UUID}/html":{"get":{"tags":["Draft"],"summary":"Html dosyasını indirir.","description":"Belgeye ait html dosyasını indirmek için bu ucu kullanabilirsiniz.\r\n<br /> \r\n**Search** parametresiyle liste içerisinde arama yapabilirsiniz.","parameters":[{"name":"UUID","in":"path","description":"","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Html dosyasını indirir.","content":{"text/plain":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"string"}},"text/json":{"schema":{"type":"string"}}}},"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>"},"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("//einvoice/Draft/8ab80d6a-4bd3-ef1a-48a1-8fa1f76d9e62/html");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "Bearer <API KEY>");
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 => '//einvoice/Draft/8ab80d6a-4bd3-ef1a-48a1-8fa1f76d9e62/html',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Accept: text/plain',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: '//einvoice/Draft/8ab80d6a-4bd3-ef1a-48a1-8fa1f76d9e62/html',
  headers: { 
    'Accept': 'text/plain', 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Taslağın Pdf'i Getirilir

## Pdf dosyasını indirir.

> Belgeye ait pdf dosyasını indirmek için bu ucu kullanabilirsiniz.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Draft/{UUID}/pdf":{"get":{"tags":["Draft"],"summary":"Pdf dosyasını indirir.","description":"Belgeye ait pdf dosyasını indirmek için bu ucu kullanabilirsiniz.","parameters":[{"name":"UUID","in":"path","description":"","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Pdf dosyasını indirir.","content":{"application/json":{"schema":{"type":"string","format":"byte"}}}},"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>"},"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("//einvoice/Draft/8ab80d6a-4bd3-ef1a-48a1-8fa1f76d9e62/pdf");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "Bearer <API KEY>");
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 => '//einvoice/Draft/8ab80d6a-4bd3-ef1a-48a1-8fa1f76d9e62/pdf',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Accept: text/plain',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');

var config = {
  method: 'get',
  url: '//einvoice/Draft/8ab80d6a-4bd3-ef1a-48a1-8fa1f76d9e62/pdf',
  headers: { 
    'Accept': 'text/plain', 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Taslağın Xml'i Getirilir

## GET /Draft/{UUID}/xml

> XML dosyasını indirir.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Draft/{UUID}/xml":{"get":{"tags":["Draft"],"summary":"XML dosyasını indirir.","parameters":[{"name":"UUID","in":"path","description":"","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"XML dosyasını indirir.","content":{"application/json":{"schema":{"type":"string"}}}},"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>"},"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("//einvoice/Draft/8ab80d6a-4bd3-ef1a-48a1-8fa1f76d9e62/xml");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "Bearer <API KEY>");
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 => '//einvoice/Draft/8ab80d6a-4bd3-ef1a-48a1-8fa1f76d9e62/xml',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Accept: text/plain',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: '//einvoice/Draft/8ab80d6a-4bd3-ef1a-48a1-8fa1f76d9e62/xml',
  headers: { 
    'Accept': 'text/plain', 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Taslağın Modeli Getirilir

## GET /Draft/{UUID}/model

> Model olarak indirir.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"EInvoiceDto":{"type":"object","properties":{"InvoiceInfo":{"$ref":"#/components/schemas/InvoiceInfoDto"},"CompanyInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"CustomerInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"BuyerCustomerInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"ExportCustomerInfo":{"$ref":"#/components/schemas/ExportCustomerInfoDto"},"InvoiceLines":{"type":"array","items":{"$ref":"#/components/schemas/EInvoiceLineDto"},"nullable":true},"Notes":{"type":"array","items":{"type":"string"},"nullable":true}},"additionalProperties":false},"InvoiceInfoDto":{"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},"InvoiceProfile":{"$ref":"#/components/schemas/InvoiceProfile"},"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"},"ReturnInvoiceInfo":{"type":"array","items":{"$ref":"#/components/schemas/ReturnInvoiceInfoDto"},"nullable":true},"AccountingCost":{"type":"string","nullable":true},"InvoicePeriod":{"$ref":"#/components/schemas/InvoicePeriodDto"},"SGKInfo":{"$ref":"#/components/schemas/SGKInfoDto"},"Expenses":{"type":"array","items":{"$ref":"#/components/schemas/ExpensesDto"},"nullable":true},"InvestmentIncentive":{"$ref":"#/components/schemas/InvestmentIncentiveDto"},"ShipmentNumber":{"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"},"InsuranceValueAmount":{"type":"number","format":"double"},"DeclaredForCarriageValueAmount":{"type":"number","format":"double"}},"additionalProperties":false},"InvoiceType":{"enum":["SATIS","IADE","ISTISNA","TEVKIFAT","IHRACKAYITLI","IPTAL","OZELMATRAH","SGK","TEVKIFATIADE","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","KONAKLAMAVERGISI","SARJ","SARJANLIK","TEKNOLOJIDESTEK","YTBSATIS","YTBISTISNA","YTBIADE","YTBTEVKIFAT","YTBTEVKIFATIADE"],"type":"string"},"InvoiceProfile":{"enum":["TEMELFATURA","TICARIFATURA","IHRACAT","YOLCUBERABERFATURA","EARSIVFATURA","KAMU","HKS","ENERJI","ILAC_TIBBICIHAZ","OZELFATURA","YATIRIMTESVIK","IDIS"],"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},"ReturnInvoiceInfoDto":{"type":"object","properties":{"InvoiceNumber":{"type":"string","nullable":true},"IssueDate":{"type":"string","format":"date-time"}},"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},"SGKInfoDto":{"type":"object","properties":{"RegisterName":{"type":"string","nullable":true},"DocumentNumber":{"type":"string","nullable":true},"RegisterCode":{"type":"string","nullable":true}},"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"},"InvestmentIncentiveDto":{"type":"object","properties":{"DocumentNumber":{"type":"string","nullable":true},"DocumentDate":{"type":"string","format":"date-time"}},"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},"ExportCustomerInfoDto":{"type":"object","properties":{"TaxNumber":{"type":"string","nullable":true},"LegalRegistrationName":{"type":"string","nullable":true},"PersonName":{"type":"string","nullable":true},"PersonSurName":{"type":"string","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},"EInvoiceLineDto":{"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},"DeliveryInfo":{"$ref":"#/components/schemas/DeliveryInfoDto"},"ManufacturerCode":{"type":"string","nullable":true},"BrandName":{"type":"string","nullable":true},"ModelName":{"type":"string","nullable":true},"Note":{"type":"string","nullable":true},"AdditionalInfoId":{"type":"string","nullable":true},"SerialID":{"type":"string","nullable":true},"ProductTraceID":{"type":"string","nullable":true},"InvestmentIncentiveExpenseType":{"$ref":"#/components/schemas/InvestmentIncentiveExpenseType"},"LabelNumber":{"type":"string","nullable":true},"BuyerDIBLineCode":{"type":"string","nullable":true},"SellerDIBLineCode":{"type":"string","nullable":true},"GTIPNo":{"type":"string","nullable":true},"OzelMatrahReason":{"type":"string","nullable":true},"OzelMatrahTotal":{"type":"number","format":"double","nullable":true},"VatAmountWithoutTevkifat":{"type":"number","format":"double","nullable":true},"MedicineAndMedicalDevice":{"$ref":"#/components/schemas/MedicineAndMedicalDeviceDto"},"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},"DeliveryInfoDto":{"type":"object","properties":{"GTIPNo":{"type":"string","nullable":true},"DeliveryTermCode":{"type":"string","nullable":true},"TransportModeCode":{"type":"string","nullable":true},"PackageBrandName":{"type":"string","nullable":true},"ProductTraceID":{"type":"string","nullable":true},"PackageID":{"type":"string","nullable":true},"PackageQuantity":{"type":"number","format":"double","nullable":true},"PackageTypeCode":{"type":"string","nullable":true},"DeliveryAddress":{"$ref":"#/components/schemas/AddressInfoDto"}},"additionalProperties":false},"AddressInfoDto":{"type":"object","properties":{"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},"InvestmentIncentiveExpenseType":{"enum":["MachineAndSoftware","Construction","LandAndPlotSale","Other"],"type":"string"},"MedicineAndMedicalDeviceDto":{"type":"object","properties":{"Medicine":{"type":"array","items":{"$ref":"#/components/schemas/MedicineDto"},"nullable":true},"MedicalDevice":{"type":"array","items":{"$ref":"#/components/schemas/MedicalDeviceDto"},"nullable":true},"ProductType":{"$ref":"#/components/schemas/ProductType"}},"additionalProperties":false},"MedicineDto":{"type":"object","properties":{"GTIN":{"type":"string","nullable":true},"BatchNumber":{"type":"string","nullable":true},"SerialNumber":{"type":"string","nullable":true},"ExpirationDate":{"type":"string","format":"date-time"}},"additionalProperties":false},"MedicalDeviceDto":{"type":"object","properties":{"ProductNumber":{"type":"string","nullable":true},"LotNumber":{"type":"string","nullable":true},"SerialNumber":{"type":"string","nullable":true},"ProductionDate":{"type":"string","format":"date-time"}},"additionalProperties":false},"ProductType":{"enum":["MEDICINE","MEDICALDEVICE","OTHER"],"type":"string"},"AdditionalItemIdentificationDto":{"type":"object","properties":{"TagNumber":{"type":"string","nullable":true},"OwnerName":{"type":"string","nullable":true},"OwnerTaxNumber":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/Draft/{UUID}/model":{"get":{"tags":["Draft"],"summary":"Model olarak indirir.","parameters":[{"name":"UUID","in":"path","description":"","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Model olarak indirir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EInvoiceDto"}}}},"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>"},"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("//einvoice/Draft/8ab80d6a-4bd3-ef1a-48a1-8fa1f76d9e62/model");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "Bearer <API KEY>");
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 => '//einvoice/Draft/8ab80d6a-4bd3-ef1a-48a1-8fa1f76d9e62/model',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Accept: text/plain',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: '//einvoice/Draft/8ab80d6a-4bd3-ef1a-48a1-8fa1f76d9e62/model',
  headers: { 
    'Accept': 'text/plain', 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Taslak Faturaya Etiket Ataması Yapar

## PUT /Draft/Tags

> Taslak faturaya etiket atama yapılır.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"DraftInvoiceAssignTagCommand":{"type":"object","properties":{"DocumentUUID":{"type":"string","format":"uuid"},"Tags":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true}},"additionalProperties":false}}},"paths":{"/Draft/Tags":{"put":{"tags":["Draft"],"summary":"Taslak faturaya etiket atama yapılır.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/DraftInvoiceAssignTagCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/DraftInvoiceAssignTagCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/DraftInvoiceAssignTagCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/DraftInvoiceAssignTagCommand"}}}},"responses":{"200":{"description":"Faturaya etiket atama yapılır.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"},"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
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Draft/Tags", Method.Put);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer <API KEY>");
var body = "{"DocumentUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"Tags": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"]}";
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(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/einvoice/Draft/Tags',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
  "DocumentUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "Tags": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ]
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "DocumentUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "Tags": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ]
});
let config = {
  method: 'put',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Draft/Tags',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer <API KEY>'
  },
  data : data
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Taslak Faturanın Etiket Bilgisini Getirir.

## GET /Draft/{UUID}/Tags

> Taslak faturanın etiket bilgilerini getirir.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"Tags":{"type":"object","properties":{"UUID":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true},"Name":{"type":"string","nullable":true},"Color":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/Draft/{UUID}/Tags":{"get":{"tags":["Draft"],"summary":"Taslak faturanın etiket bilgilerini getirir.","parameters":[{"name":"UUID","in":"path","description":"","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Taslak faturanın etiket bilgilerini getirir.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tags"}}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Draft/3fa85f64-5717-4562-b3fc-2c963f66afa6/Tags", Method.Get);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/einvoice/Draft/Tags',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
  "DocumentUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "Tags": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ]
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Draft/3fa85f64-5717-4562-b3fc-2c963f66afa6/Tags',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Taslakları Toplu Dışarı Aktarır

## Belgelerinizi toplu olarak dışarı aktarır.

> Belgelerinizi toplu olarak dışarı aktarmak isterseniz bu ucu kullanabilirsiniz.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"DraftExportType":{"enum":["Xml","Pdf","OnePagePdf"],"type":"string"}}},"paths":{"/Draft/Export/{fileType}":{"post":{"tags":["Draft"],"summary":"Belgelerinizi toplu olarak dışarı aktarır.","description":"Belgelerinizi toplu olarak dışarı aktarmak isterseniz bu ucu kullanabilirsiniz.","parameters":[{"name":"fileType","in":"path","description":"","required":true,"schema":{"$ref":"#/components/schemas/DraftExportType"}}],"requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},"text/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},"application/*+json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"responses":{"200":{"description":"Belgelerinizi toplu olarak dışarı aktarır.","content":{"application/json":{"schema":{"type":"string"}}}},"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>"},"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("//einvoice/Draft/Export/OnePagePdf");
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 = @"["ec3be92c-27ed-2004-ccfd-04b425dced54","a07f9c7e-a182-d507-057d-b87d185deb27"]";
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 => '//einvoice/Draft/Export/OnePagePdf',
  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 =>'[
  "ec3be92c-27ed-2004-ccfd-04b425dced54",
  "a07f9c7e-a182-d507-057d-b87d185deb27"
]',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Accept: text/plain',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var data = JSON.stringify([
  "ec3be92c-27ed-2004-ccfd-04b425dced54",
  "a07f9c7e-a182-d507-057d-b87d185deb27"
]);
var config = {
  method: 'post',
  url: '//einvoice/Draft/Export/OnePagePdf',
  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);
});
```

{% endtab %}
{% endtabs %}


# Taslaklara Yeni Durum Atar

## Belgelere toplu olarak yeni durum atar.

> Belgelere toplu olarak yeni durum atamak için bu uç kullanılabilir.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"DraftOperationType":{"enum":["UnPrint","Print"],"type":"string"}}},"paths":{"/Draft/Operation/{operationType}":{"put":{"tags":["Draft"],"summary":"Belgelere toplu olarak yeni durum atar.","description":"Belgelere toplu olarak yeni durum atamak için bu uç kullanılabilir.","parameters":[{"name":"operationType","in":"path","description":"Yazdırılmadı, Yazdırıldı","required":true,"schema":{"$ref":"#/components/schemas/DraftOperationType"}}],"requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},"application/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},"text/json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}},"application/*+json":{"schema":{"type":"array","items":{"type":"string","format":"uuid"}}}}},"responses":{"200":{"description":"Belgelere toplu olarak yeni durum atar.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"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("//einvoice/Draft/Operation/Print");
client.Timeout = -1;
var request = new RestRequest(Method.PUT);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "text/plain");
request.AddHeader("Authorization", "Bearer <API KEY>");
var body = @"["ec3be92c-27ed-2004-ccfd-04b425dced54","a07f9c7e-a182-d507-057d-b87d185deb27"]";
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 => '//einvoice/Draft/Operation/Print',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'[
  "ec3be92c-27ed-2004-ccfd-04b425dced54",
  "a07f9c7e-a182-d507-057d-b87d185deb27"
]',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Accept: text/plain',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var data = JSON.stringify([
  "ec3be92c-27ed-2004-ccfd-04b425dced54",
  "a07f9c7e-a182-d507-057d-b87d185deb27"
]);
var config = {
  method: 'put',
  url: '//einvoice/Draft/Operation/Print',
  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);
});
```

{% endtab %}
{% endtabs %}


# Taslağı Onaylayıp Gönderir

## Taslak faturayı onaylayıp gönderir.

> Taslak olarak oluşturduğunuz belgeyi faturayı göndermek için bu ucu kullanabilirsiniz.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"SendInvoiceModel":{"type":"object","properties":{"Alias":{"type":"string","nullable":true},"UUID":{"type":"string","format":"uuid"}},"additionalProperties":false}}},"paths":{"/Draft/ConfirmAndSend":{"post":{"tags":["Draft"],"summary":"Taslak faturayı onaylayıp gönderir.","description":"Taslak olarak oluşturduğunuz belgeyi faturayı göndermek için bu ucu kullanabilirsiniz.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SendInvoiceModel"}}},"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SendInvoiceModel"}}},"text/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SendInvoiceModel"}}},"application/*+json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SendInvoiceModel"}}}}},"responses":{"200":{"description":"Taslak faturayı onaylayıp gönderir.","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"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("//einvoice/Draft/ConfirmAndSend");
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 = "[
  {
    "Alias": "string",
    "UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  }
]";
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 => '//einvoice/Draft/ConfirmAndSend',
  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 =>'[
  {
    "Alias": "string",
    "UUID": "b9c71e22-fe8f-cd06-3d8e-f60a9db7de9e"
  }
]',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Accept: text/plain',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var data = JSON.stringify([
  {
    "Alias": "string",
    "UUID": "b9c71e22-fe8f-cd06-3d8e-f60a9db7de9e"
  }
]);
var config = {
  method: 'post',
  url: '//einvoice/Draft/ConfirmAndSend',
  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);
});
```

{% endtab %}
{% endtabs %}


# Taslağı Düzenleyip Gönderir

## Taslak faturayı 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-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"EditAndSendCommand":{"type":"object","properties":{"EInvoice":{"$ref":"#/components/schemas/EInvoiceDto"},"CustomerAlias":{"type":"string","nullable":true}},"additionalProperties":false},"EInvoiceDto":{"type":"object","properties":{"InvoiceInfo":{"$ref":"#/components/schemas/InvoiceInfoDto"},"CompanyInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"CustomerInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"BuyerCustomerInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"ExportCustomerInfo":{"$ref":"#/components/schemas/ExportCustomerInfoDto"},"InvoiceLines":{"type":"array","items":{"$ref":"#/components/schemas/EInvoiceLineDto"},"nullable":true},"Notes":{"type":"array","items":{"type":"string"},"nullable":true}},"additionalProperties":false},"InvoiceInfoDto":{"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},"InvoiceProfile":{"$ref":"#/components/schemas/InvoiceProfile"},"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"},"ReturnInvoiceInfo":{"type":"array","items":{"$ref":"#/components/schemas/ReturnInvoiceInfoDto"},"nullable":true},"AccountingCost":{"type":"string","nullable":true},"InvoicePeriod":{"$ref":"#/components/schemas/InvoicePeriodDto"},"SGKInfo":{"$ref":"#/components/schemas/SGKInfoDto"},"Expenses":{"type":"array","items":{"$ref":"#/components/schemas/ExpensesDto"},"nullable":true},"InvestmentIncentive":{"$ref":"#/components/schemas/InvestmentIncentiveDto"},"ShipmentNumber":{"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"},"InsuranceValueAmount":{"type":"number","format":"double"},"DeclaredForCarriageValueAmount":{"type":"number","format":"double"}},"additionalProperties":false},"InvoiceType":{"enum":["SATIS","IADE","ISTISNA","TEVKIFAT","IHRACKAYITLI","IPTAL","OZELMATRAH","SGK","TEVKIFATIADE","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","KONAKLAMAVERGISI","SARJ","SARJANLIK","TEKNOLOJIDESTEK","YTBSATIS","YTBISTISNA","YTBIADE","YTBTEVKIFAT","YTBTEVKIFATIADE"],"type":"string"},"InvoiceProfile":{"enum":["TEMELFATURA","TICARIFATURA","IHRACAT","YOLCUBERABERFATURA","EARSIVFATURA","KAMU","HKS","ENERJI","ILAC_TIBBICIHAZ","OZELFATURA","YATIRIMTESVIK","IDIS"],"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},"ReturnInvoiceInfoDto":{"type":"object","properties":{"InvoiceNumber":{"type":"string","nullable":true},"IssueDate":{"type":"string","format":"date-time"}},"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},"SGKInfoDto":{"type":"object","properties":{"RegisterName":{"type":"string","nullable":true},"DocumentNumber":{"type":"string","nullable":true},"RegisterCode":{"type":"string","nullable":true}},"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"},"InvestmentIncentiveDto":{"type":"object","properties":{"DocumentNumber":{"type":"string","nullable":true},"DocumentDate":{"type":"string","format":"date-time"}},"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},"ExportCustomerInfoDto":{"type":"object","properties":{"TaxNumber":{"type":"string","nullable":true},"LegalRegistrationName":{"type":"string","nullable":true},"PersonName":{"type":"string","nullable":true},"PersonSurName":{"type":"string","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},"EInvoiceLineDto":{"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},"DeliveryInfo":{"$ref":"#/components/schemas/DeliveryInfoDto"},"ManufacturerCode":{"type":"string","nullable":true},"BrandName":{"type":"string","nullable":true},"ModelName":{"type":"string","nullable":true},"Note":{"type":"string","nullable":true},"AdditionalInfoId":{"type":"string","nullable":true},"SerialID":{"type":"string","nullable":true},"ProductTraceID":{"type":"string","nullable":true},"InvestmentIncentiveExpenseType":{"$ref":"#/components/schemas/InvestmentIncentiveExpenseType"},"LabelNumber":{"type":"string","nullable":true},"BuyerDIBLineCode":{"type":"string","nullable":true},"SellerDIBLineCode":{"type":"string","nullable":true},"GTIPNo":{"type":"string","nullable":true},"OzelMatrahReason":{"type":"string","nullable":true},"OzelMatrahTotal":{"type":"number","format":"double","nullable":true},"VatAmountWithoutTevkifat":{"type":"number","format":"double","nullable":true},"MedicineAndMedicalDevice":{"$ref":"#/components/schemas/MedicineAndMedicalDeviceDto"},"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},"DeliveryInfoDto":{"type":"object","properties":{"GTIPNo":{"type":"string","nullable":true},"DeliveryTermCode":{"type":"string","nullable":true},"TransportModeCode":{"type":"string","nullable":true},"PackageBrandName":{"type":"string","nullable":true},"ProductTraceID":{"type":"string","nullable":true},"PackageID":{"type":"string","nullable":true},"PackageQuantity":{"type":"number","format":"double","nullable":true},"PackageTypeCode":{"type":"string","nullable":true},"DeliveryAddress":{"$ref":"#/components/schemas/AddressInfoDto"}},"additionalProperties":false},"AddressInfoDto":{"type":"object","properties":{"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},"InvestmentIncentiveExpenseType":{"enum":["MachineAndSoftware","Construction","LandAndPlotSale","Other"],"type":"string"},"MedicineAndMedicalDeviceDto":{"type":"object","properties":{"Medicine":{"type":"array","items":{"$ref":"#/components/schemas/MedicineDto"},"nullable":true},"MedicalDevice":{"type":"array","items":{"$ref":"#/components/schemas/MedicalDeviceDto"},"nullable":true},"ProductType":{"$ref":"#/components/schemas/ProductType"}},"additionalProperties":false},"MedicineDto":{"type":"object","properties":{"GTIN":{"type":"string","nullable":true},"BatchNumber":{"type":"string","nullable":true},"SerialNumber":{"type":"string","nullable":true},"ExpirationDate":{"type":"string","format":"date-time"}},"additionalProperties":false},"MedicalDeviceDto":{"type":"object","properties":{"ProductNumber":{"type":"string","nullable":true},"LotNumber":{"type":"string","nullable":true},"SerialNumber":{"type":"string","nullable":true},"ProductionDate":{"type":"string","format":"date-time"}},"additionalProperties":false},"ProductType":{"enum":["MEDICINE","MEDICALDEVICE","OTHER"],"type":"string"},"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 faturayı 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 faturayı 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("//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);
```

{% endtab %}

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

```php
<?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;
```

{% endtab %}

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

```javascript
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);
});
```

{% endtab %}
{% endtabs %}


# Taslak Oluşturur

## Taslak fatura oluşturur.

> Taslak fatura oluşturmak için bu ucu kullanabilirsiniz.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CreateDraftCommand":{"type":"object","properties":{"EInvoice":{"$ref":"#/components/schemas/EInvoiceDto"},"CustomerAlias":{"type":"string","nullable":true}},"additionalProperties":false},"EInvoiceDto":{"type":"object","properties":{"InvoiceInfo":{"$ref":"#/components/schemas/InvoiceInfoDto"},"CompanyInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"CustomerInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"BuyerCustomerInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"ExportCustomerInfo":{"$ref":"#/components/schemas/ExportCustomerInfoDto"},"InvoiceLines":{"type":"array","items":{"$ref":"#/components/schemas/EInvoiceLineDto"},"nullable":true},"Notes":{"type":"array","items":{"type":"string"},"nullable":true}},"additionalProperties":false},"InvoiceInfoDto":{"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},"InvoiceProfile":{"$ref":"#/components/schemas/InvoiceProfile"},"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"},"ReturnInvoiceInfo":{"type":"array","items":{"$ref":"#/components/schemas/ReturnInvoiceInfoDto"},"nullable":true},"AccountingCost":{"type":"string","nullable":true},"InvoicePeriod":{"$ref":"#/components/schemas/InvoicePeriodDto"},"SGKInfo":{"$ref":"#/components/schemas/SGKInfoDto"},"Expenses":{"type":"array","items":{"$ref":"#/components/schemas/ExpensesDto"},"nullable":true},"InvestmentIncentive":{"$ref":"#/components/schemas/InvestmentIncentiveDto"},"ShipmentNumber":{"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"},"InsuranceValueAmount":{"type":"number","format":"double"},"DeclaredForCarriageValueAmount":{"type":"number","format":"double"}},"additionalProperties":false},"InvoiceType":{"enum":["SATIS","IADE","ISTISNA","TEVKIFAT","IHRACKAYITLI","IPTAL","OZELMATRAH","SGK","TEVKIFATIADE","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","KONAKLAMAVERGISI","SARJ","SARJANLIK","TEKNOLOJIDESTEK","YTBSATIS","YTBISTISNA","YTBIADE","YTBTEVKIFAT","YTBTEVKIFATIADE"],"type":"string"},"InvoiceProfile":{"enum":["TEMELFATURA","TICARIFATURA","IHRACAT","YOLCUBERABERFATURA","EARSIVFATURA","KAMU","HKS","ENERJI","ILAC_TIBBICIHAZ","OZELFATURA","YATIRIMTESVIK","IDIS"],"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},"ReturnInvoiceInfoDto":{"type":"object","properties":{"InvoiceNumber":{"type":"string","nullable":true},"IssueDate":{"type":"string","format":"date-time"}},"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},"SGKInfoDto":{"type":"object","properties":{"RegisterName":{"type":"string","nullable":true},"DocumentNumber":{"type":"string","nullable":true},"RegisterCode":{"type":"string","nullable":true}},"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"},"InvestmentIncentiveDto":{"type":"object","properties":{"DocumentNumber":{"type":"string","nullable":true},"DocumentDate":{"type":"string","format":"date-time"}},"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},"ExportCustomerInfoDto":{"type":"object","properties":{"TaxNumber":{"type":"string","nullable":true},"LegalRegistrationName":{"type":"string","nullable":true},"PersonName":{"type":"string","nullable":true},"PersonSurName":{"type":"string","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},"EInvoiceLineDto":{"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},"DeliveryInfo":{"$ref":"#/components/schemas/DeliveryInfoDto"},"ManufacturerCode":{"type":"string","nullable":true},"BrandName":{"type":"string","nullable":true},"ModelName":{"type":"string","nullable":true},"Note":{"type":"string","nullable":true},"AdditionalInfoId":{"type":"string","nullable":true},"SerialID":{"type":"string","nullable":true},"ProductTraceID":{"type":"string","nullable":true},"InvestmentIncentiveExpenseType":{"$ref":"#/components/schemas/InvestmentIncentiveExpenseType"},"LabelNumber":{"type":"string","nullable":true},"BuyerDIBLineCode":{"type":"string","nullable":true},"SellerDIBLineCode":{"type":"string","nullable":true},"GTIPNo":{"type":"string","nullable":true},"OzelMatrahReason":{"type":"string","nullable":true},"OzelMatrahTotal":{"type":"number","format":"double","nullable":true},"VatAmountWithoutTevkifat":{"type":"number","format":"double","nullable":true},"MedicineAndMedicalDevice":{"$ref":"#/components/schemas/MedicineAndMedicalDeviceDto"},"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},"DeliveryInfoDto":{"type":"object","properties":{"GTIPNo":{"type":"string","nullable":true},"DeliveryTermCode":{"type":"string","nullable":true},"TransportModeCode":{"type":"string","nullable":true},"PackageBrandName":{"type":"string","nullable":true},"ProductTraceID":{"type":"string","nullable":true},"PackageID":{"type":"string","nullable":true},"PackageQuantity":{"type":"number","format":"double","nullable":true},"PackageTypeCode":{"type":"string","nullable":true},"DeliveryAddress":{"$ref":"#/components/schemas/AddressInfoDto"}},"additionalProperties":false},"AddressInfoDto":{"type":"object","properties":{"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},"InvestmentIncentiveExpenseType":{"enum":["MachineAndSoftware","Construction","LandAndPlotSale","Other"],"type":"string"},"MedicineAndMedicalDeviceDto":{"type":"object","properties":{"Medicine":{"type":"array","items":{"$ref":"#/components/schemas/MedicineDto"},"nullable":true},"MedicalDevice":{"type":"array","items":{"$ref":"#/components/schemas/MedicalDeviceDto"},"nullable":true},"ProductType":{"$ref":"#/components/schemas/ProductType"}},"additionalProperties":false},"MedicineDto":{"type":"object","properties":{"GTIN":{"type":"string","nullable":true},"BatchNumber":{"type":"string","nullable":true},"SerialNumber":{"type":"string","nullable":true},"ExpirationDate":{"type":"string","format":"date-time"}},"additionalProperties":false},"MedicalDeviceDto":{"type":"object","properties":{"ProductNumber":{"type":"string","nullable":true},"LotNumber":{"type":"string","nullable":true},"SerialNumber":{"type":"string","nullable":true},"ProductionDate":{"type":"string","format":"date-time"}},"additionalProperties":false},"ProductType":{"enum":["MEDICINE","MEDICALDEVICE","OTHER"],"type":"string"},"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/Create":{"post":{"tags":["Draft"],"summary":"Taslak fatura oluşturur.","description":"Taslak fatura oluşturmak için bu ucu kullanabilirsiniz.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CreateDraftCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/CreateDraftCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateDraftCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateDraftCommand"}}}},"responses":{"200":{"description":"Taslak fatura oluşturur","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("//einvoice/Draft/Create");
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);
```

{% endtab %}

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

```php
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
  CURLOPT_URL => '//einvoice/Draft/Create',
  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;
```

{% endtab %}

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

```javascript
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/Create',
  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);
});
```

{% endtab %}
{% endtabs %}


# Toplu Taslak Fatura Oluşturur

## POST /Draft/CreateBulk

> Toplu Taslak fatura oluşturur.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CreateBulkDraftCommand":{"type":"object","properties":{"EInvoices":{"type":"array","items":{"$ref":"#/components/schemas/BulkEInvoiceDto"},"nullable":true}},"additionalProperties":false},"BulkEInvoiceDto":{"type":"object","properties":{"Invoice":{"$ref":"#/components/schemas/EInvoiceDto"},"CustomerAlias":{"type":"string","nullable":true},"Tags":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"SpecialCode":{"type":"string","nullable":true}},"additionalProperties":false},"EInvoiceDto":{"type":"object","properties":{"InvoiceInfo":{"$ref":"#/components/schemas/InvoiceInfoDto"},"CompanyInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"CustomerInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"BuyerCustomerInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"ExportCustomerInfo":{"$ref":"#/components/schemas/ExportCustomerInfoDto"},"InvoiceLines":{"type":"array","items":{"$ref":"#/components/schemas/EInvoiceLineDto"},"nullable":true},"Notes":{"type":"array","items":{"type":"string"},"nullable":true}},"additionalProperties":false},"InvoiceInfoDto":{"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},"InvoiceProfile":{"$ref":"#/components/schemas/InvoiceProfile"},"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"},"ReturnInvoiceInfo":{"type":"array","items":{"$ref":"#/components/schemas/ReturnInvoiceInfoDto"},"nullable":true},"AccountingCost":{"type":"string","nullable":true},"InvoicePeriod":{"$ref":"#/components/schemas/InvoicePeriodDto"},"SGKInfo":{"$ref":"#/components/schemas/SGKInfoDto"},"Expenses":{"type":"array","items":{"$ref":"#/components/schemas/ExpensesDto"},"nullable":true},"InvestmentIncentive":{"$ref":"#/components/schemas/InvestmentIncentiveDto"},"ShipmentNumber":{"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"},"InsuranceValueAmount":{"type":"number","format":"double"},"DeclaredForCarriageValueAmount":{"type":"number","format":"double"}},"additionalProperties":false},"InvoiceType":{"enum":["SATIS","IADE","ISTISNA","TEVKIFAT","IHRACKAYITLI","IPTAL","OZELMATRAH","SGK","TEVKIFATIADE","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","KONAKLAMAVERGISI","SARJ","SARJANLIK","TEKNOLOJIDESTEK","YTBSATIS","YTBISTISNA","YTBIADE","YTBTEVKIFAT","YTBTEVKIFATIADE"],"type":"string"},"InvoiceProfile":{"enum":["TEMELFATURA","TICARIFATURA","IHRACAT","YOLCUBERABERFATURA","EARSIVFATURA","KAMU","HKS","ENERJI","ILAC_TIBBICIHAZ","OZELFATURA","YATIRIMTESVIK","IDIS"],"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},"ReturnInvoiceInfoDto":{"type":"object","properties":{"InvoiceNumber":{"type":"string","nullable":true},"IssueDate":{"type":"string","format":"date-time"}},"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},"SGKInfoDto":{"type":"object","properties":{"RegisterName":{"type":"string","nullable":true},"DocumentNumber":{"type":"string","nullable":true},"RegisterCode":{"type":"string","nullable":true}},"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"},"InvestmentIncentiveDto":{"type":"object","properties":{"DocumentNumber":{"type":"string","nullable":true},"DocumentDate":{"type":"string","format":"date-time"}},"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},"ExportCustomerInfoDto":{"type":"object","properties":{"TaxNumber":{"type":"string","nullable":true},"LegalRegistrationName":{"type":"string","nullable":true},"PersonName":{"type":"string","nullable":true},"PersonSurName":{"type":"string","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},"EInvoiceLineDto":{"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},"DeliveryInfo":{"$ref":"#/components/schemas/DeliveryInfoDto"},"ManufacturerCode":{"type":"string","nullable":true},"BrandName":{"type":"string","nullable":true},"ModelName":{"type":"string","nullable":true},"Note":{"type":"string","nullable":true},"AdditionalInfoId":{"type":"string","nullable":true},"SerialID":{"type":"string","nullable":true},"ProductTraceID":{"type":"string","nullable":true},"InvestmentIncentiveExpenseType":{"$ref":"#/components/schemas/InvestmentIncentiveExpenseType"},"LabelNumber":{"type":"string","nullable":true},"BuyerDIBLineCode":{"type":"string","nullable":true},"SellerDIBLineCode":{"type":"string","nullable":true},"GTIPNo":{"type":"string","nullable":true},"OzelMatrahReason":{"type":"string","nullable":true},"OzelMatrahTotal":{"type":"number","format":"double","nullable":true},"VatAmountWithoutTevkifat":{"type":"number","format":"double","nullable":true},"MedicineAndMedicalDevice":{"$ref":"#/components/schemas/MedicineAndMedicalDeviceDto"},"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},"DeliveryInfoDto":{"type":"object","properties":{"GTIPNo":{"type":"string","nullable":true},"DeliveryTermCode":{"type":"string","nullable":true},"TransportModeCode":{"type":"string","nullable":true},"PackageBrandName":{"type":"string","nullable":true},"ProductTraceID":{"type":"string","nullable":true},"PackageID":{"type":"string","nullable":true},"PackageQuantity":{"type":"number","format":"double","nullable":true},"PackageTypeCode":{"type":"string","nullable":true},"DeliveryAddress":{"$ref":"#/components/schemas/AddressInfoDto"}},"additionalProperties":false},"AddressInfoDto":{"type":"object","properties":{"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},"InvestmentIncentiveExpenseType":{"enum":["MachineAndSoftware","Construction","LandAndPlotSale","Other"],"type":"string"},"MedicineAndMedicalDeviceDto":{"type":"object","properties":{"Medicine":{"type":"array","items":{"$ref":"#/components/schemas/MedicineDto"},"nullable":true},"MedicalDevice":{"type":"array","items":{"$ref":"#/components/schemas/MedicalDeviceDto"},"nullable":true},"ProductType":{"$ref":"#/components/schemas/ProductType"}},"additionalProperties":false},"MedicineDto":{"type":"object","properties":{"GTIN":{"type":"string","nullable":true},"BatchNumber":{"type":"string","nullable":true},"SerialNumber":{"type":"string","nullable":true},"ExpirationDate":{"type":"string","format":"date-time"}},"additionalProperties":false},"MedicalDeviceDto":{"type":"object","properties":{"ProductNumber":{"type":"string","nullable":true},"LotNumber":{"type":"string","nullable":true},"SerialNumber":{"type":"string","nullable":true},"ProductionDate":{"type":"string","format":"date-time"}},"additionalProperties":false},"ProductType":{"enum":["MEDICINE","MEDICALDEVICE","OTHER"],"type":"string"},"AdditionalItemIdentificationDto":{"type":"object","properties":{"TagNumber":{"type":"string","nullable":true},"OwnerName":{"type":"string","nullable":true},"OwnerTaxNumber":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/Draft/CreateBulk":{"post":{"tags":["Draft"],"summary":"Toplu Taslak fatura oluşturur.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CreateBulkDraftCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/CreateBulkDraftCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateBulkDraftCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateBulkDraftCommand"}}}},"responses":{"200":{"description":"Toplu Taslak fatura oluşturur","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"}}}}},"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/einvoice/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 = @"{"EInvoices": [
    {
      "EInvoice": {
        "InvoiceInfo": {
          "UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "TemplateBase64String": "string",
          "InvoiceType": "SATIS",
          "InvoiceSerieOrNumber": "string",
          "IssueDate": "2022-12-30T14:10:40.952Z",
          "CurrencyCode": "string",
          "ExchangeRate": 0,
          "InvoiceProfile": "TEMELFATURA",
          "DespatchDocumentReference": [
            {
              "IssueDate": "2022-12-30T14:10:40.952Z",
              "Value": "string"
            }
          ],
          "OrderReference": {
            "IssueDate": "2022-12-30T14:10:40.952Z",
            "Value": "string"
          },
          "OrderReferenceDocument": {
            "ID": "string",
            "IssueDate": "2022-12-30T14:10:40.952Z",
            "DocumentType": "string",
            "DocumentTypeCode": "string",
            "DocumentDescription": "string",
            "Attachment": {
              "Base64Data": "string",
              "MimeCode": "string",
              "FileName": "string"
            }
          },
          "AdditionalDocumentReferences": [
            {
              "ID": "string",
              "IssueDate": "2022-12-30T14:10:40.952Z",
              "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-12-30T14:10:40.952Z",
            "PayeeFinancialAccountID": "string",
            "Note": "string"
          },
          "OKCInfo": {
            "ID": "string",
            "IssueDate": "2022-12-30T14:10:40.952Z",
            "Time": "string",
            "ZNo": "string",
            "EndPointID": "string",
            "DocumentDescription": "string"
          },
          "ReturnInvoiceInfo": [
            {
              "InvoiceNumber": "string",
              "IssueDate": "2022-12-30T14:10:40.952Z"
            }
          ],
          "AccountingCost": "string",
          "InvoicePeriod": {
            "StartDate": "2022-12-30T14:10:40.952Z",
            "StartTime": "2022-12-30T14:10:40.952Z",
            "EndDate": "2022-12-30T14:10:40.952Z",
            "EndTime": "2022-12-30T14:10:40.952Z",
            "DurationMeasureValue": 0,
            "Description": "string"
          },
          "SGKInfo": {
            "RegisterName": "string",
            "DocumentNumber": "string",
            "RegisterCode": "string"
          },
          "Expenses": [
            {
              "ExpenseType": "HKSKOMISYON",
              "Percent": 0,
              "Amount": 0
            }
          ],
          "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"
        },
        "TaxFreeInfo": {
          "TouristInfo": {
            "Name": "string",
            "SurName": "string",
            "CountryCode": "string",
            "PassportNo": "string",
            "PassportDate": "2022-12-30T14:10:40.952Z",
            "AddressInfo": {
              "Address": "string",
              "District": "string",
              "City": "string",
              "Country": "string",
              "PostalCode": "string",
              "Phone": "string",
              "Fax": "string",
              "Mail": "string",
              "WebSite": "string"
            },
            "FinancialAccountInfo": {
              "BankName": "string",
              "BranchName": "string",
              "ID": "string",
              "CurrencyCode": "string",
              "PaymentNote": "string"
            }
          },
          "TaxRepresentativeInfo": {
            "RegisterNumber": "string",
            "Alias": "string",
            "Address": {
              "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,
            "AdditionalItemIdentification": {
              "TagNumber": "string",
              "OwnerName": "string",
              "OwnerTaxNumber": "string"
            }
          }
        ],
        "Notes": [
          "string"
        ]
      },
      "CustomerAlias": "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/einvoice/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 =>'{
  "EInvoices": [
    {
      "EInvoice": {
        "InvoiceInfo": {
          "UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "TemplateBase64String": "string",
          "InvoiceType": "SATIS",
          "InvoiceSerieOrNumber": "string",
          "IssueDate": "2022-12-30T14:10:40.952Z",
          "CurrencyCode": "string",
          "ExchangeRate": 0,
          "InvoiceProfile": "TEMELFATURA",
          "DespatchDocumentReference": [
            {
              "IssueDate": "2022-12-30T14:10:40.952Z",
              "Value": "string"
            }
          ],
          "OrderReference": {
            "IssueDate": "2022-12-30T14:10:40.952Z",
            "Value": "string"
          },
          "OrderReferenceDocument": {
            "ID": "string",
            "IssueDate": "2022-12-30T14:10:40.952Z",
            "DocumentType": "string",
            "DocumentTypeCode": "string",
            "DocumentDescription": "string",
            "Attachment": {
              "Base64Data": "string",
              "MimeCode": "string",
              "FileName": "string"
            }
          },
          "AdditionalDocumentReferences": [
            {
              "ID": "string",
              "IssueDate": "2022-12-30T14:10:40.952Z",
              "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-12-30T14:10:40.952Z",
            "PayeeFinancialAccountID": "string",
            "Note": "string"
          },
          "OKCInfo": {
            "ID": "string",
            "IssueDate": "2022-12-30T14:10:40.952Z",
            "Time": "string",
            "ZNo": "string",
            "EndPointID": "string",
            "DocumentDescription": "string"
          },
          "ReturnInvoiceInfo": [
            {
              "InvoiceNumber": "string",
              "IssueDate": "2022-12-30T14:10:40.952Z"
            }
          ],
          "AccountingCost": "string",
          "InvoicePeriod": {
            "StartDate": "2022-12-30T14:10:40.952Z",
            "StartTime": "2022-12-30T14:10:40.952Z",
            "EndDate": "2022-12-30T14:10:40.952Z",
            "EndTime": "2022-12-30T14:10:40.952Z",
            "DurationMeasureValue": 0,
            "Description": "string"
          },
          "SGKInfo": {
            "RegisterName": "string",
            "DocumentNumber": "string",
            "RegisterCode": "string"
          },
          "Expenses": [
            {
              "ExpenseType": "HKSKOMISYON",
              "Percent": 0,
              "Amount": 0
            }
          ],
          "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"
        },
        "TaxFreeInfo": {
          "TouristInfo": {
            "Name": "string",
            "SurName": "string",
            "CountryCode": "string",
            "PassportNo": "string",
            "PassportDate": "2022-12-30T14:10:40.952Z",
            "AddressInfo": {
              "Address": "string",
              "District": "string",
              "City": "string",
              "Country": "string",
              "PostalCode": "string",
              "Phone": "string",
              "Fax": "string",
              "Mail": "string",
              "WebSite": "string"
            },
            "FinancialAccountInfo": {
              "BankName": "string",
              "BranchName": "string",
              "ID": "string",
              "CurrencyCode": "string",
              "PaymentNote": "string"
            }
          },
          "TaxRepresentativeInfo": {
            "RegisterNumber": "string",
            "Alias": "string",
            "Address": {
              "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,
            "AdditionalItemIdentification": {
              "TagNumber": "string",
              "OwnerName": "string",
              "OwnerTaxNumber": "string"
            }
          }
        ],
        "Notes": [
          "string"
        ]
      },
      "CustomerAlias": "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({
  "EInvoices": [
    {
      "EInvoice": {
        "InvoiceInfo": {
          "UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "TemplateUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "TemplateBase64String": "string",
          "InvoiceType": "SATIS",
          "InvoiceSerieOrNumber": "string",
          "IssueDate": "2022-12-30T14:10:40.952Z",
          "CurrencyCode": "string",
          "ExchangeRate": 0,
          "InvoiceProfile": "TEMELFATURA",
          "DespatchDocumentReference": [
            {
              "IssueDate": "2022-12-30T14:10:40.952Z",
              "Value": "string"
            }
          ],
          "OrderReference": {
            "IssueDate": "2022-12-30T14:10:40.952Z",
            "Value": "string"
          },
          "OrderReferenceDocument": {
            "ID": "string",
            "IssueDate": "2022-12-30T14:10:40.952Z",
            "DocumentType": "string",
            "DocumentTypeCode": "string",
            "DocumentDescription": "string",
            "Attachment": {
              "Base64Data": "string",
              "MimeCode": "string",
              "FileName": "string"
            }
          },
          "AdditionalDocumentReferences": [
            {
              "ID": "string",
              "IssueDate": "2022-12-30T14:10:40.952Z",
              "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-12-30T14:10:40.952Z",
            "PayeeFinancialAccountID": "string",
            "Note": "string"
          },
          "OKCInfo": {
            "ID": "string",
            "IssueDate": "2022-12-30T14:10:40.952Z",
            "Time": "string",
            "ZNo": "string",
            "EndPointID": "string",
            "DocumentDescription": "string"
          },
          "ReturnInvoiceInfo": [
            {
              "InvoiceNumber": "string",
              "IssueDate": "2022-12-30T14:10:40.952Z"
            }
          ],
          "AccountingCost": "string",
          "InvoicePeriod": {
            "StartDate": "2022-12-30T14:10:40.952Z",
            "StartTime": "2022-12-30T14:10:40.952Z",
            "EndDate": "2022-12-30T14:10:40.952Z",
            "EndTime": "2022-12-30T14:10:40.952Z",
            "DurationMeasureValue": 0,
            "Description": "string"
          },
          "SGKInfo": {
            "RegisterName": "string",
            "DocumentNumber": "string",
            "RegisterCode": "string"
          },
          "Expenses": [
            {
              "ExpenseType": "HKSKOMISYON",
              "Percent": 0,
              "Amount": 0
            }
          ],
          "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"
        },
        "TaxFreeInfo": {
          "TouristInfo": {
            "Name": "string",
            "SurName": "string",
            "CountryCode": "string",
            "PassportNo": "string",
            "PassportDate": "2022-12-30T14:10:40.952Z",
            "AddressInfo": {
              "Address": "string",
              "District": "string",
              "City": "string",
              "Country": "string",
              "PostalCode": "string",
              "Phone": "string",
              "Fax": "string",
              "Mail": "string",
              "WebSite": "string"
            },
            "FinancialAccountInfo": {
              "BankName": "string",
              "BranchName": "string",
              "ID": "string",
              "CurrencyCode": "string",
              "PaymentNote": "string"
            }
          },
          "TaxRepresentativeInfo": {
            "RegisterNumber": "string",
            "Alias": "string",
            "Address": {
              "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,
            "AdditionalItemIdentification": {
              "TagNumber": "string",
              "OwnerName": "string",
              "OwnerTaxNumber": "string"
            }
          }
        ],
        "Notes": [
          "string"
        ]
      },
      "CustomerAlias": "string"
    }
  ]
});
var config = {
  method: 'post',
  url: 'https://apitest.nilvera.com/einvoice/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);
}
```

{% endtab %}
{% endtabs %}


# Whatsapp İşlem Geçmişini Getirir

## GET /Draft/{UUID}/Whatsapphistories

> Whatsapp ın işlem geçmişini getirir.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"DraftInvoiceMailingWhatsappResponse":{"type":"object","properties":{"SID":{"type":"string","nullable":true},"CreatedDate":{"type":"string","format":"date-time"},"To":{"type":"string","nullable":true},"Status":{"type":"string","nullable":true},"TaxNumber":{"type":"string","nullable":true},"UUID":{"type":"string","nullable":true},"DateUpdated":{"type":"string","format":"date-time"}},"additionalProperties":false}}},"paths":{"/Draft/{UUID}/Whatsapphistories":{"get":{"tags":["Draft"],"summary":"Whatsapp ın işlem geçmişini getirir.","parameters":[{"name":"UUID","in":"path","description":"","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Whatsapp ın işlem geçmişini getirir.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DraftInvoiceMailingWhatsappResponse"}}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/einvoice/Draft/9cf58e0d-67d0-4e5b-b75e-5597e3f49f30/Whatsapphistories");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"["22d6b2ca-ba6b-47dc-a07e-846cc0e51a0e"]";
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/einvoice/Draft/9cf58e0d-67d0-4e5b-b75e-5597e3f49f30/Whatsapphistories',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS =>'[
  "22d6b2ca-ba6b-47dc-a07e-846cc0e51a0e"
]',
  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([
  "22d6b2ca-ba6b-47dc-a07e-846cc0e51a0e"
]);
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/einvoice/Draft/9cf58e0d-67d0-4e5b-b75e-5597e3f49f30/Whatsapphistories',
  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 %}


# Taslak Faturayı Whatsapp Üzerinden Gönderir

{% openapi src="<https://apitest.nilvera.com/swagger/docs/v1/einvoice>" path="/einvoice/Draft/Whatsapp/Send" method="post" expanded="true" %}
<https://apitest.nilvera.com/swagger/docs/v1/einvoice>
{% endopenapi %}

## POST /Draft/Whatsapp/Send

> Taslak faturayı whatsapp üzerinden gönderir.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"SendDraftInvoiceMailingWhatsappCommand":{"type":"object","properties":{"UUID":{"type":"string","format":"uuid"},"Phone":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/Draft/Whatsapp/Send":{"post":{"tags":["Draft"],"summary":"Taslak faturayı whatsapp üzerinden gönderir.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/SendDraftInvoiceMailingWhatsappCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/SendDraftInvoiceMailingWhatsappCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/SendDraftInvoiceMailingWhatsappCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/SendDraftInvoiceMailingWhatsappCommand"}}}},"responses":{"200":{"description":"Taslak faturayı whatsapp üzerinden gönderir","content":{"application/json":{"schema":{"type":"string"}}}},"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>"},"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/einvoice/Draft/Whatsapp/Send");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"{
"UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"Phone": "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/einvoice/Draft/Whatsapp/Send',
  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 =>'{
  "UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "Phone": "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({
  "UUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "Phone": "string"
});
var config = {
  method: 'post',
  url: 'https://apitest.nilvera.com/einvoice/Draft/Whatsapp/Send',
  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 %}


# Taslak Faturaya Özel Kod Ataması Yapılır.

## PUT /Draft/SpecialCode

> Taslak Faturaya özel kod ataması yapılır.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"DraftInvoiceUpdateSpecialCodeCommand":{"type":"object","properties":{"UUID":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"SpecialCode":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/Draft/SpecialCode":{"put":{"tags":["Draft"],"summary":"Taslak Faturaya özel kod ataması yapılır.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/DraftInvoiceUpdateSpecialCodeCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/DraftInvoiceUpdateSpecialCodeCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/DraftInvoiceUpdateSpecialCodeCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/DraftInvoiceUpdateSpecialCodeCommand"}}}},"responses":{"200":{"description":"Taslak Faturaya özel kod ataması yapılır.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Draft/SpecialCode", Method.Put);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer <API KEY>");
var body = {"UUID": ["3fa85f64-5717-4562-b3fc-2c963f66afa6" ],"SpecialCode": "string"};
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(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/einvoice/Draft/SpecialCode',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
  "UUID": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "SpecialCode": "string"
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "UUID": [
    "3fa85f64-5717-4562-b3fc-2c963f66afa6"
  ],
  "SpecialCode": "string"
});
let config = {
  method: 'put',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Draft/SpecialCode',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer <API KEY>'
  },
  data : data
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Bilgilendirme Ayarları


# Satış Faturalarına Ait Bildirim Ayarlarını Listeler.

## Satış faturasına ait bildirim kurallarını listeler.

> Satış faturasına ait kuralları listelemek için bu ucu kullanabilirsiniz.> \
> \<br />&#x20;> \
> \*\*Search\*\* parametresiyle liste içerisinde arama yapabilirsiniz.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"SaleNotificationResponsePagination":{"type":"object","properties":{"Page":{"type":"integer","format":"int32"},"PageSize":{"type":"integer","format":"int32"},"TotalCount":{"type":"integer","format":"int32","nullable":true},"TotalPages":{"type":"integer","format":"int32","nullable":true,"readOnly":true},"Content":{"type":"array","items":{"$ref":"#/components/schemas/SaleNotificationResponse"},"nullable":true}},"additionalProperties":false},"SaleNotificationResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"RuleName":{"type":"string","nullable":true},"ContactList":{"type":"array","items":{"$ref":"#/components/schemas/NotificationContactModel"},"nullable":true,"readOnly":true},"IsActive":{"type":"boolean"},"CreatedDate":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false},"NotificationContactModel":{"type":"object","properties":{"NotificationValue":{"type":"string","nullable":true},"NotificationValueType":{"$ref":"#/components/schemas/NotificationValueType"}},"additionalProperties":false},"NotificationValueType":{"enum":["Whatsapp","Sms","Mail"],"type":"string"}}},"paths":{"/Notification/Sale":{"get":{"tags":["Notification"],"summary":"Satış faturasına ait bildirim kurallarını listeler.","description":"Satış faturasına ait kuralları listelemek için bu ucu kullanabilirsiniz.\r\n<br /> \r\n**Search** parametresiyle liste içerisinde arama yapabilirsiniz.","parameters":[{"name":"PageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Page","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Search","in":"query","schema":{"type":"string"}},{"name":"IsActive","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Satış faturasına ait kuralları listeler.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaleNotificationResponsePagination"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Notification/Sale", Method.Get);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/einvoice/Notification/Sale',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Notification/Sale',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Satış Faturasına Ait Bildirim Kuralı Oluşturur.

## Satış faturasına ait bildirim kuralı oluşturur.

> Satış faturasına ait bildirim kuralı oluşturmak için bu ucu kullanabilirsiniz.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CreateSaleInvoiceNotificationCommand":{"type":"object","properties":{"NotificationDto":{"$ref":"#/components/schemas/NotificationDto"}},"additionalProperties":false},"NotificationDto":{"type":"object","properties":{"ID":{"type":"integer","format":"int32","nullable":true},"RuleName":{"type":"string","nullable":true},"Rules":{"type":"array","items":{"$ref":"#/components/schemas/NotificationRuleModel"},"nullable":true},"Contact":{"type":"array","items":{"$ref":"#/components/schemas/NotificationContactModel"},"nullable":true},"IsActive":{"type":"boolean"}},"additionalProperties":false},"NotificationRuleModel":{"type":"object","properties":{"Property":{"$ref":"#/components/schemas/NotificationProperty"},"Operator":{"$ref":"#/components/schemas/NotificatioOperator"},"ValueFirst":{"type":"string","nullable":true},"ValueSecond":{"type":"string","nullable":true}},"additionalProperties":false},"NotificationProperty":{"enum":["DocumentProfile","DocumentType","TaxNumber","PayableAmount","TaxableAmount","AllowanceTotal","SendType"],"type":"string"},"NotificatioOperator":{"enum":["GreaterOrEqual","SmallOrEqual","Equal","NotEqual","Between"],"type":"string"},"NotificationContactModel":{"type":"object","properties":{"NotificationValue":{"type":"string","nullable":true},"NotificationValueType":{"$ref":"#/components/schemas/NotificationValueType"}},"additionalProperties":false},"NotificationValueType":{"enum":["Whatsapp","Sms","Mail"],"type":"string"}}},"paths":{"/Notification/Sale":{"post":{"tags":["Notification"],"summary":"Satış faturasına ait bildirim kuralı oluşturur.","description":"Satış faturasına ait bildirim kuralı oluşturmak için bu ucu kullanabilirsiniz.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CreateSaleInvoiceNotificationCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/CreateSaleInvoiceNotificationCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateSaleInvoiceNotificationCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateSaleInvoiceNotificationCommand"}}}},"responses":{"200":{"description":"Satış faturasına ait kural oluşturur.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Notification/Sale", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer <API KEY>");
var body ={"NotificationDto": {"ID": 0,"RuleName": "string","Rules": [{"Property": "DocumentProfile","Operator": "GreaterOrEqual",
"ValueFirst":"string",
"ValueSecond":"string"}],
"Contact":[{ "NotificationValue":"string",
"NotificationValueType":"Whatsapp"}],
"IsActive":true"}};
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(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/einvoice/Notification/Sale',
  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 =>'{
  "NotificationDto": {
    "ID": 0,
    "RuleName": "string",
    "Rules": [
      {
        "Property": "DocumentProfile",
        "Operator": "GreaterOrEqual",
        "ValueFirst": "string",
        "ValueSecond": "string"
      }
    ],
    "Contact": [
      {
        "NotificationValue": "string",
        "NotificationValueType": "Whatsapp"
      }
    ],
    "IsActive": true
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "NotificationDto": {
    "ID": 0,
    "RuleName": "string",
    "Rules": [
      {
        "Property": "DocumentProfile",
        "Operator": "GreaterOrEqual",
        "ValueFirst": "string",
        "ValueSecond": "string"
      }
    ],
    "Contact": [
      {
        "NotificationValue": "string",
        "NotificationValueType": "Whatsapp"
      }
    ],
    "IsActive": true
  }
});
let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Notification/Sale',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer <API KEY>'
  },
  data : data
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Satış Faturasına Ait Bildirimi Günceller.

## PUT /Notification/Sale

> Satış faturasına ait bildirim kuralını günceller.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"UpdateSaleInvoiceNotificationCommand":{"type":"object","properties":{"NotificationDto":{"$ref":"#/components/schemas/NotificationDto"}},"additionalProperties":false},"NotificationDto":{"type":"object","properties":{"ID":{"type":"integer","format":"int32","nullable":true},"RuleName":{"type":"string","nullable":true},"Rules":{"type":"array","items":{"$ref":"#/components/schemas/NotificationRuleModel"},"nullable":true},"Contact":{"type":"array","items":{"$ref":"#/components/schemas/NotificationContactModel"},"nullable":true},"IsActive":{"type":"boolean"}},"additionalProperties":false},"NotificationRuleModel":{"type":"object","properties":{"Property":{"$ref":"#/components/schemas/NotificationProperty"},"Operator":{"$ref":"#/components/schemas/NotificatioOperator"},"ValueFirst":{"type":"string","nullable":true},"ValueSecond":{"type":"string","nullable":true}},"additionalProperties":false},"NotificationProperty":{"enum":["DocumentProfile","DocumentType","TaxNumber","PayableAmount","TaxableAmount","AllowanceTotal","SendType"],"type":"string"},"NotificatioOperator":{"enum":["GreaterOrEqual","SmallOrEqual","Equal","NotEqual","Between"],"type":"string"},"NotificationContactModel":{"type":"object","properties":{"NotificationValue":{"type":"string","nullable":true},"NotificationValueType":{"$ref":"#/components/schemas/NotificationValueType"}},"additionalProperties":false},"NotificationValueType":{"enum":["Whatsapp","Sms","Mail"],"type":"string"}}},"paths":{"/Notification/Sale":{"put":{"tags":["Notification"],"summary":"Satış faturasına ait bildirim kuralını günceller.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/UpdateSaleInvoiceNotificationCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSaleInvoiceNotificationCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdateSaleInvoiceNotificationCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdateSaleInvoiceNotificationCommand"}}}},"responses":{"200":{"description":"Satış faturasına ait bildirim kuralını günceller.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Notification/Sale", Method.Put);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer <API KEY>");
var body = {"NotificationDto": {"ID": 0,"RuleName": "string","Rules": [{"Property": "DocumentProfile","Operator": "GreaterOrEqual","ValueFirst": "string","ValueSecond":"string"}],"Contact": [{"NotificationValue": "string","NotificationValueType": "Whatsapp"}],"IsActive": true}};
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(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/einvoice/Notification/Sale',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
  "NotificationDto": {
    "ID": 0,
    "RuleName": "string",
    "Rules": [
      {
        "Property": "DocumentProfile",
        "Operator": "GreaterOrEqual",
        "ValueFirst": "string",
        "ValueSecond": "string"
      }
    ],
    "Contact": [
      {
        "NotificationValue": "string",
        "NotificationValueType": "Whatsapp"
      }
    ],
    "IsActive": true
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "NotificationDto": {
    "ID": 0,
    "RuleName": "string",
    "Rules": [
      {
        "Property": "DocumentProfile",
        "Operator": "GreaterOrEqual",
        "ValueFirst": "string",
        "ValueSecond": "string"
      }
    ],
    "Contact": [
      {
        "NotificationValue": "string",
        "NotificationValueType": "Whatsapp"
      }
    ],
    "IsActive": true
  }
});
let config = {
  method: 'put',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Notification/Sale',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer <API KEY>'
  },
  data : data
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Satış Faturasına Ait Bildirim Ayarını Siler.

## DELETE /Notification/Sale/{ID}

> Satış faturasına ait bildirim kuralını siler.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Notification/Sale/{ID}":{"delete":{"tags":["Notification"],"summary":"Satış faturasına ait bildirim kuralını siler.","parameters":[{"name":"ID","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Satış faturasına ait bildirim kuralını siler.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Notification/Sale/1", Method.Delete);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/einvoice/Notification/Sale/1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'delete',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Notification/Sale/1',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Satış Faturasına Ait Bildirim Kuralını Getirir.

## GET /Notification/Sale/{ID}

> Satış faturasına ait bildirim kuralını getirir.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"NotificationResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"RuleName":{"type":"string","nullable":true},"IsActive":{"type":"boolean"},"RuleList":{"type":"array","items":{"$ref":"#/components/schemas/NotificationRuleModel"},"nullable":true,"readOnly":true},"ContactList":{"type":"array","items":{"$ref":"#/components/schemas/NotificationContactModel"},"nullable":true,"readOnly":true}},"additionalProperties":false},"NotificationRuleModel":{"type":"object","properties":{"Property":{"$ref":"#/components/schemas/NotificationProperty"},"Operator":{"$ref":"#/components/schemas/NotificatioOperator"},"ValueFirst":{"type":"string","nullable":true},"ValueSecond":{"type":"string","nullable":true}},"additionalProperties":false},"NotificationProperty":{"enum":["DocumentProfile","DocumentType","TaxNumber","PayableAmount","TaxableAmount","AllowanceTotal","SendType"],"type":"string"},"NotificatioOperator":{"enum":["GreaterOrEqual","SmallOrEqual","Equal","NotEqual","Between"],"type":"string"},"NotificationContactModel":{"type":"object","properties":{"NotificationValue":{"type":"string","nullable":true},"NotificationValueType":{"$ref":"#/components/schemas/NotificationValueType"}},"additionalProperties":false},"NotificationValueType":{"enum":["Whatsapp","Sms","Mail"],"type":"string"}}},"paths":{"/Notification/Sale/{ID}":{"get":{"tags":["Notification"],"summary":"Satış faturasına ait bildirim kuralını getirir.","parameters":[{"name":"ID","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Satış faturasına ait bildirim kuralını getirir.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationResponse"}}}}},"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>"},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Notification/Sale/1", Method.Get);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/einvoice/Notification/Sale/1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Notification/Sale/1',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Alış Faturalarına Ait Bildirim Ayarlarını Listeler.

## Alış faturaları için bildirim kurallarını listeler.

> Alış faturalarına ait bildirim kurallarını listelemek için bu ucu kullanabilirsiniz.> \
> \<br />&#x20;> \
> \*\*Search\*\* parametresiyle liste içerisinde arama yapabilirsiniz.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"PurchaseNotificationResponsePagination":{"type":"object","properties":{"Page":{"type":"integer","format":"int32"},"PageSize":{"type":"integer","format":"int32"},"TotalCount":{"type":"integer","format":"int32","nullable":true},"TotalPages":{"type":"integer","format":"int32","nullable":true,"readOnly":true},"Content":{"type":"array","items":{"$ref":"#/components/schemas/PurchaseNotificationResponse"},"nullable":true}},"additionalProperties":false},"PurchaseNotificationResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"RuleName":{"type":"string","nullable":true},"ContactList":{"type":"array","items":{"$ref":"#/components/schemas/NotificationContactModel"},"nullable":true,"readOnly":true},"IsActive":{"type":"boolean"},"CreatedDate":{"type":"string","format":"date-time","nullable":true}},"additionalProperties":false},"NotificationContactModel":{"type":"object","properties":{"NotificationValue":{"type":"string","nullable":true},"NotificationValueType":{"$ref":"#/components/schemas/NotificationValueType"}},"additionalProperties":false},"NotificationValueType":{"enum":["Whatsapp","Sms","Mail"],"type":"string"}}},"paths":{"/Notification/Purchase":{"get":{"tags":["Notification"],"summary":"Alış faturaları için bildirim kurallarını listeler.","description":"Alış faturalarına ait bildirim kurallarını listelemek için bu ucu kullanabilirsiniz.\r\n<br /> \r\n**Search** parametresiyle liste içerisinde arama yapabilirsiniz.","parameters":[{"name":"PageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Page","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Search","in":"query","schema":{"type":"string"}},{"name":"IsActive","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Alış faturaları için bildirim kurallarını listeler.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseNotificationResponsePagination"}}}},"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>"}}}}}}
```

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

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Notification/Purchase", Method.Get);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/einvoice/Notification/Purchase',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Notification/Purchase',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Alış Faturasına Ait Bildirim Kuralı Oluşturur.

## Satış faturasına ait bildirim kuralı oluşturur.

> Satış faturasına ait bildirim kuralı oluşturmak için bu ucu kullanabilirsiniz.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"CreateSaleInvoiceNotificationCommand":{"type":"object","properties":{"NotificationDto":{"$ref":"#/components/schemas/NotificationDto"}},"additionalProperties":false},"NotificationDto":{"type":"object","properties":{"ID":{"type":"integer","format":"int32","nullable":true},"RuleName":{"type":"string","nullable":true},"Rules":{"type":"array","items":{"$ref":"#/components/schemas/NotificationRuleModel"},"nullable":true},"Contact":{"type":"array","items":{"$ref":"#/components/schemas/NotificationContactModel"},"nullable":true},"IsActive":{"type":"boolean"}},"additionalProperties":false},"NotificationRuleModel":{"type":"object","properties":{"Property":{"$ref":"#/components/schemas/NotificationProperty"},"Operator":{"$ref":"#/components/schemas/NotificatioOperator"},"ValueFirst":{"type":"string","nullable":true},"ValueSecond":{"type":"string","nullable":true}},"additionalProperties":false},"NotificationProperty":{"enum":["DocumentProfile","DocumentType","TaxNumber","PayableAmount","TaxableAmount","AllowanceTotal","SendType"],"type":"string"},"NotificatioOperator":{"enum":["GreaterOrEqual","SmallOrEqual","Equal","NotEqual","Between"],"type":"string"},"NotificationContactModel":{"type":"object","properties":{"NotificationValue":{"type":"string","nullable":true},"NotificationValueType":{"$ref":"#/components/schemas/NotificationValueType"}},"additionalProperties":false},"NotificationValueType":{"enum":["Whatsapp","Sms","Mail"],"type":"string"}}},"paths":{"/Notification/Sale":{"post":{"tags":["Notification"],"summary":"Satış faturasına ait bildirim kuralı oluşturur.","description":"Satış faturasına ait bildirim kuralı oluşturmak için bu ucu kullanabilirsiniz.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/CreateSaleInvoiceNotificationCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/CreateSaleInvoiceNotificationCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/CreateSaleInvoiceNotificationCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/CreateSaleInvoiceNotificationCommand"}}}},"responses":{"200":{"description":"Satış faturasına ait kural oluşturur.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Notification/Purchase", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer <API KEY>");
var body ={"NotificationDto": {"ID": 0,"RuleName": "string","Rules": [{"Property": "DocumentProfile","Operator": "GreaterOrEqual",
"ValueFirst":"string",
"ValueSecond":"string"}],
"Contact":[{ "NotificationValue":"string",
"NotificationValueType":"Whatsapp"}],
"IsActive":true"}};
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(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/einvoice/Notification/Purchase',
  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 =>'{
  "NotificationDto": {
    "ID": 0,
    "RuleName": "string",
    "Rules": [
      {
        "Property": "DocumentProfile",
        "Operator": "GreaterOrEqual",
        "ValueFirst": "string",
        "ValueSecond": "string"
      }
    ],
    "Contact": [
      {
        "NotificationValue": "string",
        "NotificationValueType": "Whatsapp"
      }
    ],
    "IsActive": true
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "NotificationDto": {
    "ID": 0,
    "RuleName": "string",
    "Rules": [
      {
        "Property": "DocumentProfile",
        "Operator": "GreaterOrEqual",
        "ValueFirst": "string",
        "ValueSecond": "string"
      }
    ],
    "Contact": [
      {
        "NotificationValue": "string",
        "NotificationValueType": "Whatsapp"
      }
    ],
    "IsActive": true
  }
});
let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Notification/Purchase',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer <API KEY>'
  },
  data : data
};

axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Alış Faturasına Ait Bildirimi Günceller.

## PUT /Notification/Purchase

> Alış faturasına ait bildirim kuralını günceller.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"UpdatePurchaseInvoiceNotificationCommand":{"type":"object","properties":{"NotificationDto":{"$ref":"#/components/schemas/NotificationDto"}},"additionalProperties":false},"NotificationDto":{"type":"object","properties":{"ID":{"type":"integer","format":"int32","nullable":true},"RuleName":{"type":"string","nullable":true},"Rules":{"type":"array","items":{"$ref":"#/components/schemas/NotificationRuleModel"},"nullable":true},"Contact":{"type":"array","items":{"$ref":"#/components/schemas/NotificationContactModel"},"nullable":true},"IsActive":{"type":"boolean"}},"additionalProperties":false},"NotificationRuleModel":{"type":"object","properties":{"Property":{"$ref":"#/components/schemas/NotificationProperty"},"Operator":{"$ref":"#/components/schemas/NotificatioOperator"},"ValueFirst":{"type":"string","nullable":true},"ValueSecond":{"type":"string","nullable":true}},"additionalProperties":false},"NotificationProperty":{"enum":["DocumentProfile","DocumentType","TaxNumber","PayableAmount","TaxableAmount","AllowanceTotal","SendType"],"type":"string"},"NotificatioOperator":{"enum":["GreaterOrEqual","SmallOrEqual","Equal","NotEqual","Between"],"type":"string"},"NotificationContactModel":{"type":"object","properties":{"NotificationValue":{"type":"string","nullable":true},"NotificationValueType":{"$ref":"#/components/schemas/NotificationValueType"}},"additionalProperties":false},"NotificationValueType":{"enum":["Whatsapp","Sms","Mail"],"type":"string"}}},"paths":{"/Notification/Purchase":{"put":{"tags":["Notification"],"summary":"Alış faturasına ait bildirim kuralını günceller.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/UpdatePurchaseInvoiceNotificationCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePurchaseInvoiceNotificationCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/UpdatePurchaseInvoiceNotificationCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/UpdatePurchaseInvoiceNotificationCommand"}}}},"responses":{"200":{"description":"Alış faturasına ait bildirim kuralını günceller.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Notification/Purchase", Method.Put);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Authorization", "Bearer <API KEY>");
var body = {"NotificationDto": {"ID": 0,"RuleName": "string","Rules": [{"Property": "DocumentProfile","Operator": "GreaterOrEqual","ValueFirst": "string","ValueSecond":"string"}],"Contact": [{"NotificationValue": "string","NotificationValueType": "Whatsapp"}],"IsActive": true}};
request.AddStringBody(body, DataFormat.Json);
RestResponse response = await client.ExecuteAsync(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/einvoice/Notification/Purchase',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{
  "NotificationDto": {
    "ID": 0,
    "RuleName": "string",
    "Rules": [
      {
        "Property": "DocumentProfile",
        "Operator": "GreaterOrEqual",
        "ValueFirst": "string",
        "ValueSecond": "string"
      }
    ],
    "Contact": [
      {
        "NotificationValue": "string",
        "NotificationValueType": "Whatsapp"
      }
    ],
    "IsActive": true
  }
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let data = JSON.stringify({
  "NotificationDto": {
    "ID": 0,
    "RuleName": "string",
    "Rules": [
      {
        "Property": "DocumentProfile",
        "Operator": "GreaterOrEqual",
        "ValueFirst": "string",
        "ValueSecond": "string"
      }
    ],
    "Contact": [
      {
        "NotificationValue": "string",
        "NotificationValueType": "Whatsapp"
      }
    ],
    "IsActive": true
  }
});
let config = {
  method: 'put',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Notification/Purchase',
  headers: { 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer <API KEY>'
  },
  data : data
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Alış Faturasına Ait Bildirim Ayarını Siler.

## DELETE /Notification/Purchase/{ID}

> Alış faturasına ait bildirimi kuralını siler.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}}},"paths":{"/Notification/Purchase/{ID}":{"delete":{"tags":["Notification"],"summary":"Alış faturasına ait bildirimi kuralını siler.","parameters":[{"name":"ID","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Alış faturasına ait bildirimi kuralını siler.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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>"},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Notification/Purchase/1", Method.Delete);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/einvoice/Notification/Purchase/1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'delete',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Notification/Purchase/1',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Alış Faturasına Ait Bildirim Kuralını Getirir.

## GET /Notification/Purchase/{ID}

> Alış faturasına ait bildirim kuralını getirir.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"NotificationResponse":{"type":"object","properties":{"ID":{"type":"integer","format":"int32"},"RuleName":{"type":"string","nullable":true},"IsActive":{"type":"boolean"},"RuleList":{"type":"array","items":{"$ref":"#/components/schemas/NotificationRuleModel"},"nullable":true,"readOnly":true},"ContactList":{"type":"array","items":{"$ref":"#/components/schemas/NotificationContactModel"},"nullable":true,"readOnly":true}},"additionalProperties":false},"NotificationRuleModel":{"type":"object","properties":{"Property":{"$ref":"#/components/schemas/NotificationProperty"},"Operator":{"$ref":"#/components/schemas/NotificatioOperator"},"ValueFirst":{"type":"string","nullable":true},"ValueSecond":{"type":"string","nullable":true}},"additionalProperties":false},"NotificationProperty":{"enum":["DocumentProfile","DocumentType","TaxNumber","PayableAmount","TaxableAmount","AllowanceTotal","SendType"],"type":"string"},"NotificatioOperator":{"enum":["GreaterOrEqual","SmallOrEqual","Equal","NotEqual","Between"],"type":"string"},"NotificationContactModel":{"type":"object","properties":{"NotificationValue":{"type":"string","nullable":true},"NotificationValueType":{"$ref":"#/components/schemas/NotificationValueType"}},"additionalProperties":false},"NotificationValueType":{"enum":["Whatsapp","Sms","Mail"],"type":"string"}}},"paths":{"/Notification/Purchase/{ID}":{"get":{"tags":["Notification"],"summary":"Alış faturasına ait bildirim kuralını getirir.","parameters":[{"name":"ID","in":"path","description":"","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"Alış faturasına ait bildirim kuralını getirir.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NotificationResponse"}}}}},"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>"},"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 options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Notification/Purchase/1", Method.Get);
request.AddHeader("Authorization", "Bearer <API KEY>");
RestResponse response = await client.ExecuteAsync(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/einvoice/Notification/Purchase/1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
const axios = require('axios');
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Notification/Purchase/1',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}


# Eski Faturalar

Gelen e-faturalar için api uçları


# Eski Faturaları Listeler

## Eski faturaları listeler.

> Eski faturaları listelemek için bu ucu kullanabilirsiniz.> \
> \<br />> \
> \*\*Search\*\* parametresiyle liste içerisinde arama yapabilirsiniz.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"SortType":{"enum":["ASC","DESC"],"type":"string"},"InvoiceProfile":{"enum":["TEMELFATURA","TICARIFATURA","IHRACAT","YOLCUBERABERFATURA","EARSIVFATURA","KAMU","HKS","ENERJI","ILAC_TIBBICIHAZ","OZELFATURA","YATIRIMTESVIK","IDIS"],"type":"string"},"InvoiceType":{"enum":["SATIS","IADE","ISTISNA","TEVKIFAT","IHRACKAYITLI","IPTAL","OZELMATRAH","SGK","TEVKIFATIADE","KOMISYONCU","HKSSATIS","HKSKOMISYONCU","KONAKLAMAVERGISI","SARJ","SARJANLIK","TEKNOLOJIDESTEK","YTBSATIS","YTBISTISNA","YTBIADE","YTBTEVKIFAT","YTBTEVKIFATIADE"],"type":"string"},"OldInvoiceResponsePagination":{"type":"object","properties":{"Page":{"type":"integer","format":"int32"},"PageSize":{"type":"integer","format":"int32"},"TotalCount":{"type":"integer","format":"int32","nullable":true},"TotalPages":{"type":"integer","format":"int32","nullable":true,"readOnly":true},"Content":{"type":"array","items":{"$ref":"#/components/schemas/OldInvoiceResponse"},"nullable":true}},"additionalProperties":false},"OldInvoiceResponse":{"type":"object","properties":{"UUID":{"type":"string","nullable":true},"TaxNumber":{"type":"string","nullable":true},"InvoiceNumber":{"type":"string","nullable":true},"InvoiceProfile":{"$ref":"#/components/schemas/InvoiceProfile"},"InvoiceType":{"$ref":"#/components/schemas/InvoiceType"},"IssueDate":{"type":"string","format":"date-time"},"CurrencyCode":{"type":"string","nullable":true},"PayableAmount":{"type":"number","format":"double"},"ReceiverName":{"type":"string","nullable":true},"ReceiverTaxNumber":{"type":"string","nullable":true},"IsPrint":{"type":"boolean","nullable":true},"IsSale":{"type":"boolean","nullable":true}},"additionalProperties":false}}},"paths":{"/Old":{"get":{"tags":["Old"],"summary":"Eski faturaları listeler.","description":"Eski faturaları listelemek için bu ucu kullanabilirsiniz.\r\n<br />\r\n**Search** parametresiyle liste içerisinde arama yapabilirsiniz.","parameters":[{"name":"PageSize","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Page","in":"query","schema":{"type":"integer","format":"int32"}},{"name":"Search","in":"query","schema":{"type":"string"}},{"name":"StartDate","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"EndDate","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"SortColumn","in":"query","schema":{"type":"string"}},{"name":"SortType","in":"query","schema":{"$ref":"#/components/schemas/SortType"}},{"name":"InvoiceProfile","in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceProfile"}}},{"name":"InvoiceType","in":"query","schema":{"type":"array","items":{"$ref":"#/components/schemas/InvoiceType"}}},{"name":"IsPrint","in":"query","schema":{"type":"boolean"}},{"name":"IsSale","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Eski faturaları listeler.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OldInvoiceResponsePagination"}}}},"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>"}}}}}}
```

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

```csharp
var client = new RestClient("https://apitest.nilvera.com/einvoice/Old");
client.Timeout = -1;
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/einvoice/Old',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

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

```javascript
var axios = require('axios');
var config = {
  method: 'get',
  url: 'https://apitest.nilvera.com/einvoice/Old',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}




---

[Next Page](/llms-full.txt/1)

