# Creates Accounting Report Template

## 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 client = new RestClient("https://apitest.nilvera.com/general/AccountingReport/Template");
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",
"Type": 0,
"Columns": ["Name": "string","ID": 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/AccountingReport/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
    }
  ]
}',
  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",
  "Type": 0,
  "Columns": [
    {
      "Name": "string",
      "ID": 0
    }
  ]
});

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