# Export Drafts in Bulk

## 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 %}
