> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.setup.hugin.com.tr/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.setup.hugin.com.tr/_mcp/server.

# TMC uygunluğunu sorgula

POST https://setup-test.hugin.com.tr/api/v1/tmc-eligibility
Content-Type: application/json

Verilen TCKN (11 hane) veya VKN (10 hane) için TMC satın alma uygunluğunu döner.

* Kimlik numarası kontrol hanesiyle doğrulanır; geçersizse `400` döner.
* Gerçek kişiye ait VKN verilirse TCKN GİB'den bulunur ve ÖKC izni TCKN ile sorgulanır
  (Setup kurulum akışıyla aynı).
* Uygunsa `{"tmcEligible": true}`, aksi her durumda `{"tmcEligible": false}` döner.
* GİB'e ulaşılamazsa ya da GİB oturumu geçersizse `503` döner; tekrar deneyin.
* Sonuç kısa süre önbelleğe alınabilir; önbelleği atlatma seçeneği yoktur.

Reference: https://api-docs.setup.hugin.com.tr/tmc-uygunluk-api/tmc-uygunluk/check

## Authentication

- `Authorization` header (bearer token, required) — `POST /api/v1/auth/login` yanıtındaki `session` değeri. Oturum girişten itibaren varsayılan 1 saat geçerlidir; süre dolduğunda veya çıkış yapıldığında `401 SESSION_INVALID` döner, yeniden giriş yapın.

## Request

### Body (application/json)

This endpoint expects a TmcEligibilityRequest.

- `taxId` (string, required) — 10 haneli VKN veya 11 haneli TCKN (yalnız rakam).

## Response

### 200

Sorgu tamamlandı.

- `tmcEligible` (boolean, required) — Mükellef TMC (Taksi Mali Cihaz) satın almaya uygunsa `true`.

## Errors

### 400 Bad Request Error

Kimlik numarası geçersiz.

- `error` (ErrorError, required)

### 401 Unauthorized Error

Oturum yok, geçersiz ya da süresi dolmuş.

- `error` (ErrorError, required)

### 429 Too Many Requests Error

İstek sınırı aşıldı (oturum ve IP başına).

- `error` (ErrorError, required)

### 503 Service Unavailable Error

GİB veya Partner servisine şu an ulaşılamıyor. Sonuç "uygun değil" anlamına gelmez.

- `error` (ErrorError, required)

## Types

### ErrorError

- `code` (enum, required) — Makine tarafından okunacak hata kodu.
  - Allowed values: `BAD_REQUEST`, `INVALID_CREDENTIALS`, `PASSWORD_EXPIRED`, `SSO_REQUIRED`, `UNAUTHENTICATED`, `SESSION_INVALID`, `INVALID_TAX_ID`, `RATE_LIMITED`, `UPSTREAM_UNAVAILABLE`
- `message` (string, required) — Kullanıcıya gösterilebilecek Türkçe açıklama.

## Examples

### TMC almaya uygun

**Request**

```json
{
  "taxId": "1234567890"
}
```

**Response**

```json
{
  "tmcEligible": true
}
```

**SDK Code**

```python TMC almaya uygun
import requests

url = "https://setup-test.hugin.com.tr/api/v1/tmc-eligibility"

payload = { "taxId": "1234567890" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript TMC almaya uygun
const url = 'https://setup-test.hugin.com.tr/api/v1/tmc-eligibility';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"taxId":"1234567890"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go TMC almaya uygun
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://setup-test.hugin.com.tr/api/v1/tmc-eligibility"

	payload := strings.NewReader("{\n  \"taxId\": \"1234567890\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby TMC almaya uygun
require 'uri'
require 'net/http'

url = URI("https://setup-test.hugin.com.tr/api/v1/tmc-eligibility")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"taxId\": \"1234567890\"\n}"

response = http.request(request)
puts response.read_body
```

```java TMC almaya uygun
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://setup-test.hugin.com.tr/api/v1/tmc-eligibility")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"taxId\": \"1234567890\"\n}")
  .asString();
```

```php TMC almaya uygun
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://setup-test.hugin.com.tr/api/v1/tmc-eligibility', [
  'body' => '{
  "taxId": "1234567890"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp TMC almaya uygun
using RestSharp;

var client = new RestClient("https://setup-test.hugin.com.tr/api/v1/tmc-eligibility");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"taxId\": \"1234567890\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift TMC almaya uygun
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["taxId": "1234567890"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://setup-test.hugin.com.tr/api/v1/tmc-eligibility")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Uygun değil (mükellef yok, ÖKC izni yok veya taksi faaliyetli şube yok)

**Request**

```json
{
  "taxId": "12345678901"
}
```

**Response**

```json
{
  "tmcEligible": false
}
```

**SDK Code**

```python Uygun değil (mükellef yok, ÖKC izni yok veya taksi faaliyetli şube yok)
import requests

url = "https://setup-test.hugin.com.tr/api/v1/tmc-eligibility"

payload = { "taxId": "12345678901" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Uygun değil (mükellef yok, ÖKC izni yok veya taksi faaliyetli şube yok)
const url = 'https://setup-test.hugin.com.tr/api/v1/tmc-eligibility';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"taxId":"12345678901"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Uygun değil (mükellef yok, ÖKC izni yok veya taksi faaliyetli şube yok)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://setup-test.hugin.com.tr/api/v1/tmc-eligibility"

	payload := strings.NewReader("{\n  \"taxId\": \"12345678901\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Uygun değil (mükellef yok, ÖKC izni yok veya taksi faaliyetli şube yok)
require 'uri'
require 'net/http'

url = URI("https://setup-test.hugin.com.tr/api/v1/tmc-eligibility")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"taxId\": \"12345678901\"\n}"

response = http.request(request)
puts response.read_body
```

```java Uygun değil (mükellef yok, ÖKC izni yok veya taksi faaliyetli şube yok)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://setup-test.hugin.com.tr/api/v1/tmc-eligibility")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"taxId\": \"12345678901\"\n}")
  .asString();
```

```php Uygun değil (mükellef yok, ÖKC izni yok veya taksi faaliyetli şube yok)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://setup-test.hugin.com.tr/api/v1/tmc-eligibility', [
  'body' => '{
  "taxId": "12345678901"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Uygun değil (mükellef yok, ÖKC izni yok veya taksi faaliyetli şube yok)
using RestSharp;

var client = new RestClient("https://setup-test.hugin.com.tr/api/v1/tmc-eligibility");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"taxId\": \"12345678901\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Uygun değil (mükellef yok, ÖKC izni yok veya taksi faaliyetli şube yok)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["taxId": "12345678901"] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://setup-test.hugin.com.tr/api/v1/tmc-eligibility")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```