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