# Creates a Report

## POST /Accounting

> Muhasebe raporu 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":{"GenerateAccountingReportCommand":{"type":"object","properties":{"Title":{"type":"string","nullable":true},"StartDate":{"type":"string","format":"date-time"},"EndDate":{"type":"string","format":"date-time"},"Type":{"type":"integer","format":"int32"},"TemplateID":{"type":"integer","format":"int32"},"Email":{"type":"string","nullable":true},"ReportType":{"$ref":"#/components/schemas/ReportType"}},"additionalProperties":false},"ReportType":{"enum":["Invoice","Voucher","Producer"],"type":"string"}}},"paths":{"/Accounting":{"post":{"tags":["Accounting"],"summary":"Muhasebe raporu oluşturur.","requestBody":{"description":"","content":{"application/json-patch+json":{"schema":{"$ref":"#/components/schemas/GenerateAccountingReportCommand"}},"application/json":{"schema":{"$ref":"#/components/schemas/GenerateAccountingReportCommand"}},"text/json":{"schema":{"$ref":"#/components/schemas/GenerateAccountingReportCommand"}},"application/*+json":{"schema":{"$ref":"#/components/schemas/GenerateAccountingReportCommand"}}}},"responses":{"200":{"description":"Muhasebe raporu oluşturur.","content":{"application/json":{"schema":{"type":"boolean"}}}},"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("https://apitest.nilvera.com/general/AccountingReport");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <API KEY>");
request.AddHeader("Content-Type", "application/json");
var body = @"{"Title": "string",
"StartDate": "2023-01-09T08:51:20.483Z",
"EndDate": "2023-01-09T08:51:20.483Z",
"Type": 0,
"TemplateID": 0,
"Email": "string"}";
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',
  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 =>'{
  "Title": "string",
  "StartDate": "2023-01-09T08:51:20.483Z",
  "EndDate": "2023-01-09T08:51:20.483Z",
  "Type": 0,
  "TemplateID": 0,
  "Email": "string"
}',
  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({
  "Title": "string",
  "StartDate": "2023-01-09T08:51:20.483Z",
  "EndDate": "2023-01-09T08:51:20.483Z",
  "Type": 0,
  "TemplateID": 0,
  "Email": "string"
});

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