# Get Model of Draft

## GET /Draft/{UUID}/model

> Model dosyasını indirir.

```json
{"openapi":"3.0.1","info":{"title":"E-Sigorta Komisyon Gider Belgesi API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API anahtar� giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"InsuranceDto":{"required":["CustomerInfo","InsuranceInfo","InsuranceLines"],"type":"object","properties":{"InsuranceInfo":{"$ref":"#/components/schemas/InsuranceInfoDto"},"CompanyInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"CustomerInfo":{"$ref":"#/components/schemas/PartyInfoDto"},"InsuranceLines":{"minItems":1,"type":"array","items":{"$ref":"#/components/schemas/EInsuranceLineDto"}},"Notes":{"type":"array","items":{"type":"string"},"nullable":true}},"additionalProperties":false},"InsuranceInfoDto":{"required":["CurrencyCode","InsuranceSerieOrNumber","IssueDate"],"type":"object","properties":{"UUID":{"type":"string","format":"uuid"},"TemplateUUID":{"type":"string","format":"uuid"},"TemplateBase64String":{"type":"string","nullable":true},"InsuranceSerieOrNumber":{"minLength":1,"type":"string","allOf":[{"pattern":"(?:(\\b[A-Z0-9]{3}[0-9]{4}[0-9]{9}$\\b)|\\b^[A-Z0-9]{3}$\\b).*$"},{"pattern":"(?:(\\b[A-Z0-9]{3}[0-9]{4}[0-9]{9}$\\b)|\\b^[A-Z0-9]{3}$\\b).*$"},{"pattern":"(?:(\\b[A-Z0-9]{3}[0-9]{4}[0-9]{9}$\\b)|\\b^[A-Z0-9]{3}$\\b).*$"},{"pattern":"(?:(\\b[A-Z0-9]{3}[0-9]{4}[0-9]{9}$\\b)|\\b^[A-Z0-9]{3}$\\b).*$"},{"pattern":"(?:(\\b[A-Z0-9]{3}[0-9]{4}[0-9]{9}$\\b)|\\b^[A-Z0-9]{3}$\\b).*$"},{"pattern":"(?:(\\b[A-Z0-9]{3}[0-9]{4}[0-9]{9}$\\b)|\\b^[A-Z0-9]{3}$\\b).*$"}]},"IssueDate":{"minLength":1,"type":"string","format":"date-time"},"CurrencyCode":{"maxLength":3,"minLength":3,"type":"string"},"ExchangeRate":{"type":"number","format":"double","nullable":true},"InvoicePeriod":{"$ref":"#/components/schemas/InvoicePeriodDto"}},"additionalProperties":false},"InvoicePeriodDto":{"required":["Description","EndDate","StartDate"],"type":"object","properties":{"StartDate":{"minLength":1,"type":"string","format":"date-time"},"StartTime":{"type":"string","nullable":true},"EndDate":{"minLength":1,"type":"string","format":"date-time"},"EndTime":{"type":"string","nullable":true},"DurationMeasureValue":{"type":"number","format":"double","nullable":true},"Description":{"minLength":1,"type":"string"}},"additionalProperties":false},"PartyInfoDto":{"required":["Address","City","Country","District","Name","TaxNumber"],"type":"object","properties":{"TaxNumber":{"maxLength":11,"minLength":10,"type":"string","allOf":[{"pattern":"^[\\d]+$"},{"pattern":"^[\\d]+$"},{"pattern":"^[\\d]+$"},{"pattern":"^[\\d]+$"},{"pattern":"^[\\d]+$"},{"pattern":"^[\\d]+$"}]},"Name":{"minLength":1,"type":"string"},"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":{"minLength":1,"type":"string"},"District":{"minLength":1,"type":"string"},"City":{"minLength":1,"type":"string"},"Country":{"minLength":1,"type":"string"},"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":{"required":["SchemeID","Value"],"type":"object","properties":{"SchemeID":{"minLength":1,"type":"string"},"Value":{"minLength":1,"type":"string"}},"additionalProperties":false},"EInsuranceLineDto":{"required":["Name"],"type":"object","properties":{"Name":{"minLength":1,"type":"string"},"CancelledCommissionAmount":{"minimum":0,"type":"number","format":"double"},"IssuedCommissionAmount":{"minimum":0,"type":"number","format":"double"}},"additionalProperties":false}}},"paths":{"/Draft/{UUID}/model":{"get":{"tags":["Draft"],"summary":"Model dosyasını indirir.","parameters":[{"name":"UUID","in":"path","description":"","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Model dosyasını indirir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsuranceDto"}}}},"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("//einsurance/Draft/<uuid>/model")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Get);
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {{bearerToken}}");
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 => '//einsurance/Draft/<uuid>/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: application/json',
    'Authorization: Bearer {{bearerToken}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

```

{% endtab %}

{% tab title="Node.js - Axios" %}

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

let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: '//einsurance/Draft/<uuid>/model',
  headers: { 
    'Accept': 'application/json', 
    'Authorization': 'Bearer {{bearerToken}}'
  }
};

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

{% endtab %}
{% endtabs %}
