# Giden Faturanın Statü Bilgilerini Getirir

## GET /Sale/{UUID}/Status

> Faturanın durumunu getirir.

```json
{"openapi":"3.0.1","info":{"title":"E-Invoice API","version":"v1"},"servers":[{"url":"/einvoice"}],"security":[{"Bearer":[]}],"components":{"securitySchemes":{"Bearer":{"type":"http","description":"API Key Giriniz","scheme":"Bearer","bearerFormat":"JWT"}},"schemas":{"StatusResponse":{"type":"object","properties":{"InvoiceProfile":{"$ref":"#/components/schemas/InvoiceProfile"},"IssueDate":{"type":"string","format":"date-time"},"Answer":{"$ref":"#/components/schemas/Answer"},"InvoiceStatus":{"$ref":"#/components/schemas/InvoiceStatus"},"EnvelopeInfo":{"$ref":"#/components/schemas/EnvelopeDetail"}},"additionalProperties":false},"InvoiceProfile":{"enum":["TEMELFATURA","TICARIFATURA","IHRACAT","YOLCUBERABERFATURA","EARSIVFATURA","KAMU","HKS","ENERJI","ILAC_TIBBICIHAZ","OZELFATURA","YATIRIMTESVIK","IDIS"],"type":"string"},"Answer":{"type":"object","properties":{"AnswerCode":{"$ref":"#/components/schemas/AnswerCode"},"AnswerNote":{"type":"string","nullable":true},"Description":{"type":"string","nullable":true}},"additionalProperties":false},"AnswerCode":{"enum":["unknown","waitingForApproval","approved","rejected","documentAnsweredAutomatically"],"type":"string"},"InvoiceStatus":{"type":"object","properties":{"Code":{"$ref":"#/components/schemas/StatusCode"},"Description":{"type":"string","nullable":true},"DetailDescription":{"type":"string","nullable":true}},"additionalProperties":false},"StatusCode":{"enum":["unknown","waiting","succeed","error"],"type":"string"},"EnvelopeDetail":{"type":"object","properties":{"UUID":{"type":"string","nullable":true},"GIBCode":{"type":"integer","format":"int32"},"GIBDescription":{"type":"string","nullable":true},"CreatedDate":{"type":"string","format":"date-time"}},"additionalProperties":false}}},"paths":{"/Sale/{UUID}/Status":{"get":{"tags":["Sale"],"summary":"Faturanın durumunu getirir.","parameters":[{"name":"UUID","in":"path","description":"","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Faturanın durumunu getirir.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"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>"}}}}}}
```

{% tabs %}
{% tab title="C#" %}

```csharp
var options = new RestClientOptions("https://apitest.nilvera.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/einvoice/Sale/a2a4a141-a0c2-4634-91ac-30ae2ce232bf/Status", Method.Get);
request.AddHeader("Authorization", "Bearer <API KEY>");
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/einvoice/Sale/a2a4a141-a0c2-4634-91ac-30ae2ce232bf/Status',
  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(
    'Authorization: Bearer <API KEY>'
  ),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
```

{% endtab %}

{% tab title="NodeJs - Axios" %}

```javascript
const axios = require('axios');
let config = {
  method: 'get',
  maxBodyLength: Infinity,
  url: 'https://apitest.nilvera.com/einvoice/Sale/a2a4a141-a0c2-4634-91ac-30ae2ce232bf/Status',
  headers: { 
    'Authorization': 'Bearer <API KEY>'
  }
};
axios.request(config)
.then((response) => {
  console.log(JSON.stringify(response.data));
})
.catch((error) => {
  console.log(error);
});
```

{% endtab %}
{% endtabs %}
