# Creates Bulk Draft

## POST /Draft/CreateBulk

> Toplu Taslak E-SKGB oluşturur.

```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":{"CreateBulkDraftCommand":{"type":"object","properties":{"Insurances":{"type":"array","items":{"$ref":"#/components/schemas/BulkInsuranceDto"},"nullable":true}},"additionalProperties":false},"BulkInsuranceDto":{"type":"object","properties":{"Insurance":{"$ref":"#/components/schemas/InsuranceDto"},"Tags":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"SpecialCode":{"type":"string","nullable":true}},"additionalProperties":false},"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/CreateBulk":{"post":{"tags":["Draft"],"summary":"Toplu Taslak E-SKGB 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 E-SKGB 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 options = new RestClientOptions("//einsurance/Draft/CreateBulk")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("Accept", "application/json");
request.AddHeader("Authorization", "Bearer {{bearerToken}}");
var body = @"{" + "\n" +
@"  ""Insurances"": [" + "\n" +
@"    {" + "\n" +
@"      ""Insurance"": {" + "\n" +
@"        ""CustomerInfo"": {" + "\n" +
@"          ""Address"": ""<string>""," + "\n" +
@"          ""City"": ""<string>""," + "\n" +
@"          ""Country"": ""<string>""," + "\n" +
@"          ""District"": ""<string>""," + "\n" +
@"          ""Name"": ""<string>""," + "\n" +
@"          ""TaxNumber"": ""8376101093""," + "\n" +
@"          ""TaxOffice"": ""<string>""," + "\n" +
@"          ""PartyIdentifications"": [" + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }" + "\n" +
@"          ]," + "\n" +
@"          ""AgentPartyIdentifications"": [" + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }" + "\n" +
@"          ]," + "\n" +
@"          ""PostalCode"": ""<string>""," + "\n" +
@"          ""Phone"": ""<string>""," + "\n" +
@"          ""Fax"": ""<string>""," + "\n" +
@"          ""Mail"": ""<string>""," + "\n" +
@"          ""WebSite"": ""<string>""" + "\n" +
@"        }," + "\n" +
@"        ""InsuranceInfo"": {" + "\n" +
@"          ""CurrencyCode"": ""<string>""," + "\n" +
@"          ""InsuranceSerieOrNumber"": ""IJG9958441078492""," + "\n" +
@"          ""IssueDate"": ""<dateTime>""," + "\n" +
@"          ""UUID"": ""<uuid>""," + "\n" +
@"          ""TemplateUUID"": ""<uuid>""," + "\n" +
@"          ""TemplateBase64String"": ""<string>""," + "\n" +
@"          ""ExchangeRate"": ""<double>""," + "\n" +
@"          ""InvoicePeriod"": {" + "\n" +
@"            ""Description"": ""<string>""," + "\n" +
@"            ""EndDate"": ""<dateTime>""," + "\n" +
@"            ""StartDate"": ""<dateTime>""," + "\n" +
@"            ""StartTime"": ""<string>""," + "\n" +
@"            ""EndTime"": ""<string>""," + "\n" +
@"            ""DurationMeasureValue"": ""<double>""" + "\n" +
@"          }" + "\n" +
@"        }," + "\n" +
@"        ""InsuranceLines"": [" + "\n" +
@"          {" + "\n" +
@"            ""Name"": ""<string>""," + "\n" +
@"            ""CancelledCommissionAmount"": ""<double>""," + "\n" +
@"            ""IssuedCommissionAmount"": ""<double>""" + "\n" +
@"          }" + "\n" +
@"        ]," + "\n" +
@"        ""CompanyInfo"": {" + "\n" +
@"          ""Address"": ""<string>""," + "\n" +
@"          ""City"": ""<string>""," + "\n" +
@"          ""Country"": ""<string>""," + "\n" +
@"          ""District"": ""<string>""," + "\n" +
@"          ""Name"": ""<string>""," + "\n" +
@"          ""TaxNumber"": ""18010318010""," + "\n" +
@"          ""TaxOffice"": ""<string>""," + "\n" +
@"          ""PartyIdentifications"": [" + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }" + "\n" +
@"          ]," + "\n" +
@"          ""AgentPartyIdentifications"": [" + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }" + "\n" +
@"          ]," + "\n" +
@"          ""PostalCode"": ""<string>""," + "\n" +
@"          ""Phone"": ""<string>""," + "\n" +
@"          ""Fax"": ""<string>""," + "\n" +
@"          ""Mail"": ""<string>""," + "\n" +
@"          ""WebSite"": ""<string>""" + "\n" +
@"        }," + "\n" +
@"        ""Notes"": [" + "\n" +
@"          ""<string>""," + "\n" +
@"          ""<string>""" + "\n" +
@"        ]" + "\n" +
@"      }," + "\n" +
@"      ""Tags"": [" + "\n" +
@"        ""<uuid>""," + "\n" +
@"        ""<uuid>""" + "\n" +
@"      ]," + "\n" +
@"      ""SpecialCode"": ""<string>""" + "\n" +
@"    }," + "\n" +
@"    {" + "\n" +
@"      ""Insurance"": {" + "\n" +
@"        ""CustomerInfo"": {" + "\n" +
@"          ""Address"": ""<string>""," + "\n" +
@"          ""City"": ""<string>""," + "\n" +
@"          ""Country"": ""<string>""," + "\n" +
@"          ""District"": ""<string>""," + "\n" +
@"          ""Name"": ""<string>""," + "\n" +
@"          ""TaxNumber"": ""16943310115""," + "\n" +
@"          ""TaxOffice"": ""<string>""," + "\n" +
@"          ""PartyIdentifications"": [" + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }" + "\n" +
@"          ]," + "\n" +
@"          ""AgentPartyIdentifications"": [" + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }" + "\n" +
@"          ]," + "\n" +
@"          ""PostalCode"": ""<string>""," + "\n" +
@"          ""Phone"": ""<string>""," + "\n" +
@"          ""Fax"": ""<string>""," + "\n" +
@"          ""Mail"": ""<string>""," + "\n" +
@"          ""WebSite"": ""<string>""" + "\n" +
@"        }," + "\n" +
@"        ""InsuranceInfo"": {" + "\n" +
@"          ""CurrencyCode"": ""<string>""," + "\n" +
@"          ""InsuranceSerieOrNumber"": ""OK1]""," + "\n" +
@"          ""IssueDate"": ""<dateTime>""," + "\n" +
@"          ""UUID"": ""<uuid>""," + "\n" +
@"          ""TemplateUUID"": ""<uuid>""," + "\n" +
@"          ""TemplateBase64String"": ""<string>""," + "\n" +
@"          ""ExchangeRate"": ""<double>""," + "\n" +
@"          ""InvoicePeriod"": {" + "\n" +
@"            ""Description"": ""<string>""," + "\n" +
@"            ""EndDate"": ""<dateTime>""," + "\n" +
@"            ""StartDate"": ""<dateTime>""," + "\n" +
@"            ""StartTime"": ""<string>""," + "\n" +
@"            ""EndTime"": ""<string>""," + "\n" +
@"            ""DurationMeasureValue"": ""<double>""" + "\n" +
@"          }" + "\n" +
@"        }," + "\n" +
@"        ""InsuranceLines"": [" + "\n" +
@"          {" + "\n" +
@"            ""Name"": ""<string>""," + "\n" +
@"            ""CancelledCommissionAmount"": ""<double>""," + "\n" +
@"            ""IssuedCommissionAmount"": ""<double>""" + "\n" +
@"          }" + "\n" +
@"        ]," + "\n" +
@"        ""CompanyInfo"": {" + "\n" +
@"          ""Address"": ""<string>""," + "\n" +
@"          ""City"": ""<string>""," + "\n" +
@"          ""Country"": ""<string>""," + "\n" +
@"          ""District"": ""<string>""," + "\n" +
@"          ""Name"": ""<string>""," + "\n" +
@"          ""TaxNumber"": ""21096462109""," + "\n" +
@"          ""TaxOffice"": ""<string>""," + "\n" +
@"          ""PartyIdentifications"": [" + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }" + "\n" +
@"          ]," + "\n" +
@"          ""AgentPartyIdentifications"": [" + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }," + "\n" +
@"            {" + "\n" +
@"              ""SchemeID"": ""<string>""," + "\n" +
@"              ""Value"": ""<string>""" + "\n" +
@"            }" + "\n" +
@"          ]," + "\n" +
@"          ""PostalCode"": ""<string>""," + "\n" +
@"          ""Phone"": ""<string>""," + "\n" +
@"          ""Fax"": ""<string>""," + "\n" +
@"          ""Mail"": ""<string>""," + "\n" +
@"          ""WebSite"": ""<string>""" + "\n" +
@"        }," + "\n" +
@"        ""Notes"": [" + "\n" +
@"          ""<string>""," + "\n" +
@"          ""<string>""" + "\n" +
@"        ]" + "\n" +
@"      }," + "\n" +
@"      ""Tags"": [" + "\n" +
@"        ""<uuid>""," + "\n" +
@"        ""<uuid>""" + "\n" +
@"      ]," + "\n" +
@"      ""SpecialCode"": ""<string>""" + "\n" +
@"    }" + "\n" +
@"  ]" + "\n" +
@"}";
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 => '//einsurance/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 =>'{
  "Insurances": [
    {
      "Insurance": {
        "CustomerInfo": {
          "Address": "<string>",
          "City": "<string>",
          "Country": "<string>",
          "District": "<string>",
          "Name": "<string>",
          "TaxNumber": "8376101093",
          "TaxOffice": "<string>",
          "PartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "AgentPartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "PostalCode": "<string>",
          "Phone": "<string>",
          "Fax": "<string>",
          "Mail": "<string>",
          "WebSite": "<string>"
        },
        "InsuranceInfo": {
          "CurrencyCode": "<string>",
          "InsuranceSerieOrNumber": "IJG9958441078492",
          "IssueDate": "<dateTime>",
          "UUID": "<uuid>",
          "TemplateUUID": "<uuid>",
          "TemplateBase64String": "<string>",
          "ExchangeRate": "<double>",
          "InvoicePeriod": {
            "Description": "<string>",
            "EndDate": "<dateTime>",
            "StartDate": "<dateTime>",
            "StartTime": "<string>",
            "EndTime": "<string>",
            "DurationMeasureValue": "<double>"
          }
        },
        "InsuranceLines": [
          {
            "Name": "<string>",
            "CancelledCommissionAmount": "<double>",
            "IssuedCommissionAmount": "<double>"
          }
        ],
        "CompanyInfo": {
          "Address": "<string>",
          "City": "<string>",
          "Country": "<string>",
          "District": "<string>",
          "Name": "<string>",
          "TaxNumber": "18010318010",
          "TaxOffice": "<string>",
          "PartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "AgentPartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "PostalCode": "<string>",
          "Phone": "<string>",
          "Fax": "<string>",
          "Mail": "<string>",
          "WebSite": "<string>"
        },
        "Notes": [
          "<string>",
          "<string>"
        ]
      },
      "Tags": [
        "<uuid>",
        "<uuid>"
      ],
      "SpecialCode": "<string>"
    },
    {
      "Insurance": {
        "CustomerInfo": {
          "Address": "<string>",
          "City": "<string>",
          "Country": "<string>",
          "District": "<string>",
          "Name": "<string>",
          "TaxNumber": "16943310115",
          "TaxOffice": "<string>",
          "PartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "AgentPartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "PostalCode": "<string>",
          "Phone": "<string>",
          "Fax": "<string>",
          "Mail": "<string>",
          "WebSite": "<string>"
        },
        "InsuranceInfo": {
          "CurrencyCode": "<string>",
          "InsuranceSerieOrNumber": "OK1]",
          "IssueDate": "<dateTime>",
          "UUID": "<uuid>",
          "TemplateUUID": "<uuid>",
          "TemplateBase64String": "<string>",
          "ExchangeRate": "<double>",
          "InvoicePeriod": {
            "Description": "<string>",
            "EndDate": "<dateTime>",
            "StartDate": "<dateTime>",
            "StartTime": "<string>",
            "EndTime": "<string>",
            "DurationMeasureValue": "<double>"
          }
        },
        "InsuranceLines": [
          {
            "Name": "<string>",
            "CancelledCommissionAmount": "<double>",
            "IssuedCommissionAmount": "<double>"
          }
        ],
        "CompanyInfo": {
          "Address": "<string>",
          "City": "<string>",
          "Country": "<string>",
          "District": "<string>",
          "Name": "<string>",
          "TaxNumber": "21096462109",
          "TaxOffice": "<string>",
          "PartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "AgentPartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "PostalCode": "<string>",
          "Phone": "<string>",
          "Fax": "<string>",
          "Mail": "<string>",
          "WebSite": "<string>"
        },
        "Notes": [
          "<string>",
          "<string>"
        ]
      },
      "Tags": [
        "<uuid>",
        "<uuid>"
      ],
      "SpecialCode": "<string>"
    }
  ]
}',
  CURLOPT_HTTPHEADER => array(
    'Content-Type: application/json',
    '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 data = JSON.stringify({
  "Insurances": [
    {
      "Insurance": {
        "CustomerInfo": {
          "Address": "<string>",
          "City": "<string>",
          "Country": "<string>",
          "District": "<string>",
          "Name": "<string>",
          "TaxNumber": "8376101093",
          "TaxOffice": "<string>",
          "PartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "AgentPartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "PostalCode": "<string>",
          "Phone": "<string>",
          "Fax": "<string>",
          "Mail": "<string>",
          "WebSite": "<string>"
        },
        "InsuranceInfo": {
          "CurrencyCode": "<string>",
          "InsuranceSerieOrNumber": "IJG9958441078492",
          "IssueDate": "<dateTime>",
          "UUID": "<uuid>",
          "TemplateUUID": "<uuid>",
          "TemplateBase64String": "<string>",
          "ExchangeRate": "<double>",
          "InvoicePeriod": {
            "Description": "<string>",
            "EndDate": "<dateTime>",
            "StartDate": "<dateTime>",
            "StartTime": "<string>",
            "EndTime": "<string>",
            "DurationMeasureValue": "<double>"
          }
        },
        "InsuranceLines": [
          {
            "Name": "<string>",
            "CancelledCommissionAmount": "<double>",
            "IssuedCommissionAmount": "<double>"
          }
        ],
        "CompanyInfo": {
          "Address": "<string>",
          "City": "<string>",
          "Country": "<string>",
          "District": "<string>",
          "Name": "<string>",
          "TaxNumber": "18010318010",
          "TaxOffice": "<string>",
          "PartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "AgentPartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "PostalCode": "<string>",
          "Phone": "<string>",
          "Fax": "<string>",
          "Mail": "<string>",
          "WebSite": "<string>"
        },
        "Notes": [
          "<string>",
          "<string>"
        ]
      },
      "Tags": [
        "<uuid>",
        "<uuid>"
      ],
      "SpecialCode": "<string>"
    },
    {
      "Insurance": {
        "CustomerInfo": {
          "Address": "<string>",
          "City": "<string>",
          "Country": "<string>",
          "District": "<string>",
          "Name": "<string>",
          "TaxNumber": "16943310115",
          "TaxOffice": "<string>",
          "PartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "AgentPartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "PostalCode": "<string>",
          "Phone": "<string>",
          "Fax": "<string>",
          "Mail": "<string>",
          "WebSite": "<string>"
        },
        "InsuranceInfo": {
          "CurrencyCode": "<string>",
          "InsuranceSerieOrNumber": "OK1]",
          "IssueDate": "<dateTime>",
          "UUID": "<uuid>",
          "TemplateUUID": "<uuid>",
          "TemplateBase64String": "<string>",
          "ExchangeRate": "<double>",
          "InvoicePeriod": {
            "Description": "<string>",
            "EndDate": "<dateTime>",
            "StartDate": "<dateTime>",
            "StartTime": "<string>",
            "EndTime": "<string>",
            "DurationMeasureValue": "<double>"
          }
        },
        "InsuranceLines": [
          {
            "Name": "<string>",
            "CancelledCommissionAmount": "<double>",
            "IssuedCommissionAmount": "<double>"
          }
        ],
        "CompanyInfo": {
          "Address": "<string>",
          "City": "<string>",
          "Country": "<string>",
          "District": "<string>",
          "Name": "<string>",
          "TaxNumber": "21096462109",
          "TaxOffice": "<string>",
          "PartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "AgentPartyIdentifications": [
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            },
            {
              "SchemeID": "<string>",
              "Value": "<string>"
            }
          ],
          "PostalCode": "<string>",
          "Phone": "<string>",
          "Fax": "<string>",
          "Mail": "<string>",
          "WebSite": "<string>"
        },
        "Notes": [
          "<string>",
          "<string>"
        ]
      },
      "Tags": [
        "<uuid>",
        "<uuid>"
      ],
      "SpecialCode": "<string>"
    }
  ]
});

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: '//einsurance/Draft/CreateBulk',
  headers: { 
    'Content-Type': 'application/json', 
    'Accept': 'application/json', 
    'Authorization': 'Bearer {{bearerToken}}'
  },
  data : data
};

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

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.nilvera.com/en/api/e-insurance-api/draft-insurances/creates-bulk-draft.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
