# Error Codes

<table data-card-size="large" data-column-title-hidden data-view="cards"><thead><tr><th>Http Status Kodlar</th><th> </th></tr></thead><tbody><tr><td><strong>200 - OK</strong></td><td>HTTP 200 status code indicates that the request was successful.</td></tr><tr><td><strong>401 - Unauthorized</strong></td><td>In this case, authorization is required to access the received response.</td></tr><tr><td><strong>403 - Forbidden</strong></td><td>It means the user doesn't have any authorization over the resource in question.</td></tr><tr><td><strong>500, 502, 503, 504 - Server Errors</strong></td><td>It indicates that the server does not support or lacks the requirements needed to fulfill the specific request.</td></tr></tbody></table>

## BadRequest - <mark style="color:red;">400</mark>

"When you receive a return from the service with a 400 HTTP code, it means that there are invalid data in the request you sent. In this case, you need to review your request parameters."

{% code title="Örnek Dönüş" %}

```json
{
  "Message": "GECERSIZ ISTEK",
  "Errors": [
    {
      "Code": 400,
      "Description": "Alias",
      "Detail": "Nesnesi Null Olamaz."
    }
  ]
}
```

{% endcode %}

## NotFound - <mark style="color:red;">404</mark>

When you receive a return from the service with a 404 HTTP code, it means that there is no record corresponding to the request you sent.

{% code title="Örnek Dönüş" %}

```json
{
  "Message": "HATALI ISTEK",
  "Errors": [
    {
      "Code": 3006,
      "Description": "Belge Bulunamadı.",
      "Detail": "61bc499c-8e77-4ec9-a358-8f7a6d657d51 Nolu belge sistemde bulunamadı."
    }
  ]
}
```

{% endcode %}

### 404 Dönebilecek Diğer Kodlar

<table><thead><tr><th width="107">Kod</th><th>Açıklama</th></tr></thead><tbody><tr><td>3000</td><td>Tag for the Recipient Not Found.</td></tr><tr><td>3001</td><td>Tag for the Sender Not Found.</td></tr><tr><td>3002</td><td>The label is not registered in the system.</td></tr><tr><td>3003</td><td>The document could not be found in the system.</td></tr><tr><td>3004</td><td>The record could not be found in the system.</td></tr><tr><td>3005</td><td>Document content is empty.</td></tr><tr><td>3006</td><td>The report could not be found in the system.</td></tr><tr><td>3007</td><td>No invoice found to report.</td></tr><tr><td>3008</td><td>No receipt found to report.</td></tr><tr><td>3009</td><td>The series is not defined for the company.</td></tr><tr><td>3010</td><td>Template not found.</td></tr><tr><td>3011</td><td>Template is not active.</td></tr><tr><td>3012</td><td>There are no templates defined for the company.</td></tr><tr><td>3013</td><td>Your email module is not active.</td></tr><tr><td>3014</td><td>Your WhatsApp module is not active.</td></tr><tr><td>3015</td><td>Your SMS module is not active.</td></tr><tr><td>3016</td><td>The company is not defined for the dealer.</td></tr><tr><td>3017</td><td>You do not have a package with this code.</td></tr><tr><td>3018</td><td>There is no sub-dealer with the specified code.</td></tr><tr><td>3019</td><td>No Invoice Found to Report.</td></tr><tr><td>3020</td><td>E-Storage Module Not Found.</td></tr><tr><td>3021</td><td>E-Ledger Settings Not Found.</td></tr><tr><td>3022</td><td>Accountant Information Not Found.</td></tr><tr><td>3023</td><td>Certificate Information Not Found.</td></tr><tr><td>3024</td><td>Company Erp Setting Area Not Found.</td></tr><tr><td>3025</td><td>E-Ledger Query Not Found.</td></tr><tr><td>3026</td><td>E-Ledger report could not be found.</td></tr><tr><td>3027</td><td>E-Ledger Signature Value Not Found.</td></tr><tr><td>3028</td><td>Fiscal Period Incorrect.</td></tr><tr><td>3029</td><td>Design Module Was Not Found.</td></tr><tr><td>3030</td><td>API Not Found.</td></tr></tbody></table>

## Conflict - <mark style="color:red;">409</mark>

When you receive a 409 HTTP code from the service, it means that the request you sent already exists in the system.

{% code title="Örnek Dönüş" %}

```json
{
  "Message": "HATALI ISTEK",
  "Errors": [
    {
      "Code": 1000,
      "Description": "ETTN Numarası Sistemde Kayıtlıdır.",
      "Detail": "e1b40d5b-24b3-4f79-8735-a01ae5577de7 ETTN Numarası Sistemde Kayıtlıdır."
    }
  ]
}
```

{% endcode %}

### 409 Dönebilecek Diğer Kodlar

<table><thead><tr><th width="106">Kod</th><th>Açıklama</th></tr></thead><tbody><tr><td>1000</td><td>The sent Tax Identification Number (TIN) does not match the company.</td></tr><tr><td>1001</td><td>The ETTN number is registered in the system.</td></tr><tr><td>1002</td><td>Mismatched OperationType information.</td></tr><tr><td>1003</td><td>The e-invoice has been automatically accepted.</td></tr><tr><td>1004</td><td>E-invoice has been previously added.</td></tr><tr><td>1005</td><td>The e-invoice series has been used before.</td></tr><tr><td>1006 </td><td>Responses to basic invoices are not provided.</td></tr><tr><td>1007</td><td>The e-invoice has been responded to before.</td></tr><tr><td>1008</td><td>The e-waybill has been automatically accepted.</td></tr><tr><td>1009</td><td>The e-waybill has been added before.</td></tr><tr><td>1010</td><td>The e-waybill series has been used before.</td></tr><tr><td>1011</td><td>The e-waybill has been responded to before.</td></tr><tr><td>1012</td><td>The e-archive invoice has been added before.</td></tr><tr><td>1013</td><td>The e-Voucher has been added before.</td></tr><tr><td>1014</td><td>E-Producer Daha Önce Eklenmiş.</td></tr><tr><td>1015</td><td>The record has been added before.</td></tr><tr><td>1016</td><td>The company has a storage package defined for the specified year.</td></tr><tr><td>1017</td><td>The e-Voucherseries has been used before.</td></tr><tr><td>1018</td><td>The e-Producerseries has been used before.</td></tr><tr><td>1019</td><td>E-Bill Series Has Been Used Before.</td></tr><tr><td>1020</td><td>E-Bill Was Added Before.</td></tr></tbody></table>

## UnprocessableEntity - <mark style="color:red;">422</mark>

When you receive a 422 HTTP code from the service, it means that the request you sent is valid, but it contains invalid values according to business rules.

{% code title="Örnek Dönüş" %}

```json
{
  "Message": "HATALI ISTEK",
  "Errors": [
    {
      "Code": 2000,
      "Description": "Yeterli Kontörünüz Bulunmamaktadır.",
      "Detail": "Yeterli Kontörünüz Bulunmamaktadır. Lütfen Kontör Alımı Yapınız."
    }
  ]
}
```

{% endcode %}

### 422 Dönebilecek Diğer Kodlar&#x20;

{% hint style="info" %}
For example, if you try to create an e-invoice for a tax number belonging to the public sector, you will receive a 422 error stating "Invoice Scenario Must Be PUBLIC". Below is a list of detail codes and the list of codes that may be returned for the errors returned from the service with a 422 code.
{% endhint %}

<table><thead><tr><th width="98">Kod</th><th>Açıklama</th></tr></thead><tbody><tr><td>2000</td><td>You do not have sufficient credits.</td></tr><tr><td>2001</td><td>An error occurred while adding company information.</td></tr><tr><td>2002   </td><td>Your storage space is insufficient. Please upgrade to a higher package.</td></tr><tr><td>2003 </td><td>An error occurred while fetching branches.</td></tr><tr><td>2004 </td><td>Registration unsuccessful.</td></tr><tr><td>2005 </td><td>File upload failed.</td></tr><tr><td>2006</td><td>Template update failed.</td></tr><tr><td>2007</td><td>The document could not be opened. (Unzip)</td></tr><tr><td>2008</td><td>The document could not be deserialized.</td></tr><tr><td>2009</td><td>Document processing error.</td></tr><tr><td>2010</td><td>Error occurred while fetching document attachments.</td></tr><tr><td>2011</td><td>An error occurred while creating a new envelope.</td></tr><tr><td>2012</td><td>The document could not be read.</td></tr><tr><td>2013</td><td>Deletion unsuccessful.</td></tr><tr><td>2014</td><td>PDF file could not be generated.</td></tr><tr><td>2015</td><td>Schema/Schematron error.</td></tr><tr><td>2016</td><td>An error occurred while fetching statistics.</td></tr><tr><td>2017</td><td>Incompatible FileType information.</td></tr><tr><td>2018</td><td>Invalid value for SEND_TYPE.</td></tr><tr><td>2019</td><td>Transaction count cannot exceed 100.</td></tr><tr><td>2020</td><td>Incompatible file content.</td></tr><tr><td>2021</td><td>Error occurred while fetching exchange rates.</td></tr><tr><td>2022</td><td>Error occurred while updating.</td></tr><tr><td>2023</td><td>Preview could not be generated.</td></tr><tr><td>2024</td><td>The document scenario must be EARSIVBELGE.</td></tr><tr><td>2025</td><td>The recipient is an e-invoice taxpayer. E-archive invoice cannot be sent.</td></tr><tr><td>2026</td><td>The e-archive invoice has been previously cancelled.</td></tr><tr><td>2027</td><td>The e-archive invoice cannot be cancelled if the report is faulty.</td></tr><tr><td>2028</td><td>The e-archive invoice cannot be cancelled if the file is in the queue or its status is unknown.</td></tr><tr><td>2029</td><td>Cancellation record for the e-archive invoice could not be created. Please try again later.</td></tr><tr><td>2030</td><td>The cancellation record is requested for an e-archive invoice that has been reported.</td></tr><tr><td>2031</td><td>The cancellation record for the e-archive invoice could not be reversed. Please try again later.</td></tr><tr><td>2032</td><td>The e-archive invoice series is not active.</td></tr><tr><td>2033</td><td>The e-archive invoice series field cannot be left empty.</td></tr><tr><td>2034</td><td>E-Voucher Has Been Canceled Before.</td></tr><tr><td>2035</td><td>E-Voucher Cannot Be Cancelled If the Report Is Erroneous.</td></tr><tr><td>2036</td><td>E-Voucher cannot be canceled if the file is in the queue or its status is unknown.</td></tr><tr><td>2037</td><td>E-Voucher Cancellation Record Could Not Be Created. Please Try Again Later.</td></tr><tr><td>2038</td><td>The E-Voucher whose cancellation record is requested to be withdrawn has been reported.</td></tr><tr><td>2039</td><td>E-Voucher Cancellation Record Could Not Be Retrieved. Please try again later.</td></tr><tr><td>2040</td><td>E-Voucher Series Not Active.</td></tr><tr><td>2041</td><td>E-Voucher Serial Field Cannot Be Empty.</td></tr><tr><td>2042</td><td>E-Producer Has Been Canceled Before.</td></tr><tr><td>2043</td><td>If the file is in the queue or its status is unknown, E-Producer cannot be cancelled.</td></tr><tr><td>2044</td><td>E-Producer Cancellation Record Could Not Be Created. Please Try Again Later.</td></tr><tr><td>2045</td><td>The E-Producer whose cancellation record is requested to be withdrawn has been reported.</td></tr><tr><td>2046</td><td>E-Producer Cancellation Record Could Not Be Retrieved. Please try again later.</td></tr><tr><td>2047</td><td>E-Producer Series Inactive.</td></tr><tr><td>2048</td><td>E-Producer Serial Field Cannot Be Empty.</td></tr><tr><td>2049</td><td>The Report Cannot Be Questioned.</td></tr><tr><td>2050</td><td>Error Creating Report.</td></tr><tr><td>2051</td><td>The Sender is not an E-Invoice Payer.</td></tr><tr><td>2052</td><td>Buyer's Label is Not in Use.</td></tr><tr><td>2053</td><td>The Buyer Became an E-Invoice Taxpayer on This Date.</td></tr><tr><td>2054</td><td>The Buyer is Not an E-Invoice Payer.</td></tr><tr><td>2055</td><td>Recipient's Label Must Be Entered.</td></tr><tr><td>2056</td><td>Buyer's Label is in Use.</td></tr><tr><td>2057</td><td>An Error Occurred While Fetching E-Invoice Labels.</td></tr><tr><td>2058</td><td>E-Invoice must be prepared as a paper or e-archive invoice.</td></tr><tr><td>2059</td><td>E-Invoice Scenario Must Be Public.</td></tr><tr><td>2060</td><td>Invoice Scenario Must Be E-Archive Invoice.</td></tr><tr><td>2061</td><td>E-Invoice Scenario Should Not Be Public.</td></tr><tr><td>2062</td><td>E-Invoice Response Could Not Be Updated.</td></tr><tr><td>2063</td><td>Since the Invoice Scenario is an E-Archive Invoice, it cannot be sent to the E-Invoice Ender.</td></tr><tr><td>2064</td><td>E-Invoice Series is Not Active.</td></tr><tr><td>2065</td><td>E-Invoice Serial Field Cannot Be Blank.</td></tr><tr><td>2066</td><td>The Sender is not an E-Delivery Note Taxpayer.</td></tr><tr><td>2067</td><td>The Buyer Became an E-Delivery Note Taxpayer on This Date.</td></tr><tr><td>2068</td><td>The Document Cannot Be Sent to the Virtual Recipient.</td></tr><tr><td>2069</td><td>The Document Must Be Sent to the Virtual Recipient. (urn:mail:defaultpk@gib.gov.tr)</td></tr><tr><td>2070</td><td>An Error Occurred While Fetching E-Delivery Note Labels.</td></tr><tr><td>2071</td><td>Delivery Note Not Waiting for Response.</td></tr><tr><td>2072</td><td>Delivery Note Scenario Must Be 'TEMELIRSALIYE' or 'HKSIRSALIYE'.</td></tr><tr><td>2073</td><td>E-Delivery Note Series is Inactive.</td></tr><tr><td>2074</td><td>E-Delivery Note Serial Field Cannot Be Blank.</td></tr><tr><td>2075</td><td>Your Top Up Package Has Expired.</td></tr><tr><td>2076</td><td>Your Storage Package is Expired.</td></tr><tr><td>2077</td><td>You do not have enough packages.</td></tr><tr><td>2078</td><td>Your Credit Package Does Not Have Enough Credit.</td></tr><tr><td>2079</td><td>E-Producer Cannot Be Cancelled If the Report Is Erroneous.</td></tr><tr><td>2080</td><td>E-Bill Has Been Canceled Before.</td></tr><tr><td>2081</td><td>If The File İs İn The Queue Or İts Status İs Unknown, E-Bill Cannot Be Cancelled.</td></tr><tr><td>2082</td><td>E-Bill Cancellation Record Could Not Be Created. Please Try Again Later.</td></tr><tr><td>2083</td><td>E-Bill Whose Cancellation Record Is Requested To Be Withdrawn Has Been Reported.</td></tr><tr><td>2084</td><td>E-Bill Cancellation Record Could Not Be Reversed. Please try again later.</td></tr><tr><td>2085</td><td>E-Bill Series is Not Active.</td></tr><tr><td>2086</td><td>E-Bill Serial Field Cannot Be Blank.</td></tr><tr><td>2087</td><td>PDF File Could Not Be Read.</td></tr><tr><td>2088</td><td>E-Ledger Has Been Created Before.</td></tr><tr><td>2089</td><td>Error While Creating E-Ledger.</td></tr><tr><td>2090</td><td>Error in E-Ledger Structure.</td></tr><tr><td>2091</td><td>E-Ledger Creation Process Continues.</td></tr><tr><td>2092</td><td>Certificates Do Not Match.</td></tr><tr><td>2093</td><td>Signing Incorrect.</td></tr><tr><td>2094</td><td>Amount Value Must Be a Number.</td></tr><tr><td>2095</td><td>EnteredDate Field is in Incorrect Format.</td></tr><tr><td>2096</td><td>E-Ledger Sending Process Continues.</td></tr><tr><td>2097</td><td>GIB not be Questioned.</td></tr><tr><td>2098</td><td>Accounting Period Must Consist of 12 Months.</td></tr><tr><td>2099</td><td>An Error Occurred While Updating Ledger Status.</td></tr><tr><td>2100</td><td>Series and Document Year Mismatch.</td></tr><tr><td>2101</td><td>E-Bill Cannot Be Cancelled If the Report Is Erroneous.</td></tr></tbody></table>
