Skip to content

You can use this service to verify Turkish Citizenship with few information. (e.g : identity number, birth year, name, surname)

License

Notifications You must be signed in to change notification settings

Genc/turkish-citizenship-verification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Turkish Citizenship Verification Service

There are three services to verify Turkish citizenship.

  • Simple Verification --> (/simple-verification)
  • Detailed Verification --> (/detailed-verification)
  • Foreigner Verification --> (/foreigner-verification)

Purpose

The purpose of this project is to provide REST service.

This service uses the services provided by Republic of Turkey Ministry of Interior General Directorate of Population and Citizenship Affairs on the backside. nvi.gov.tr services use SOAP.

Run the Application

Navigate to the root of the project. For building the project using command line, run below command :

mvn clean install

Run service in command line. Navigate to target directory.

java -jar turkish-citizenship-verification.jar

REST Endpoints

The following REST endpoints are available:

HTTP Methods Path Description Response
POST /simple-verification Simple Verificaiton for Turkish Citizenship boolean
POST /detailed-verification Detailed Verificaiton for Turkish Citizenship boolean
POST /foreigner-verification Foreigner Verificaiton for Turkish Citizenship boolean

Simple Verification Example Request

Request URL

https://trverification.omerfarukgenc.com.tr/simple-verification

JSON

{
  "identityNo": 11111111111,
  "name": "KÂZIM",
  "surname": "KARABEKİR",
  "birthYear": 1882,
}

cURL Request

curl -X POST "https://trverification.omerfarukgenc.com.tr/simple-verification" -H "accept: */*" -H "Content-Type: application/json" -d "{ \"birthYear\": 1882, \"identityNo\": 11111111111, \"name\": \"KÂZIM\", \"surname\": \"KARABEKİR\"}"

Response

false

Detailed Verification Example Request

Request URL

https://trverification.omerfarukgenc.com.tr/detailed-verification

JSON

{
  "identityNo": 11111111111,
  "name": "MUSTAFA FEVZİ",
  "surname": "ÇAKMAK",
  "hasNotSurname": false,
  "birthDay": 12,
  "hasNotDayOfBirth": false,
  "birthMonth": 1,
  "hasNotMonthOfBirth": false,
  "birthYear": 1876,
  "serialCode": null,
  "serialNumber": null,
  "documentNo": "M99F11276"
}

cURL Request

curl -X POST "https://trverification.omerfarukgenc.com.tr/detailed-verification" -H "accept: */*" -H "Content-Type: application/json" -d "{ \"identityNo\": 11111111111, \"name\": \"MUSTAFA FEVZİ\", \"surname\": \"ÇAKMAK\", \"hasNotSurname\": false, \"birthDay\": 12, \"hasNotDayOfBirth\": false, \"birthMonth\": 1, \"hasNotMonthOfBirth\": false, \"birthYear\": 1876, \"serialCode\": null, \"serialNumber\": null, \"documentNo\": \"M99F11276\"}"

Response

false

Foreigner Verification Example Request

Request URL

https://trverification.omerfarukgenc.com.tr/foreigner-verification

JSON

{
  "identityNo": 99999999999,
  "name": "MUSA",
  "surname": "ESKENAZİ",
  "birthDay": 1,
  "birthMonth": 1,
  "birthYear": 1855
}

cURL Request

curl -X POST "https://trverification.omerfarukgenc.com.tr/foreigner-verification" -H "accept: */*" -H "Content-Type: application/json" -d "{ \"identityNo\": 99999999999, \"name\": \"MUSA\", \"surname\": \"ESKENAZİ\", \"birthDay\": 1, \"birthMonth\": 1, \"birthYear\": 1855}"

Response

false

Error Handling

Request URL

https://trverification.omerfarukgenc.com.tr/simple-verification

JSON

{
  "identityNo": 11111111111,
  "birthYear": 1882,
}

cURL Request

curl -X POST "https://trverification.omerfarukgenc.com.tr/simple-verification" -H "accept: */*" -H "Content-Type: application/json" -d "{ \"birthYear\": 1882, \"identityNo\": 11111111111}"

Response

{
  "status": "BAD_REQUEST",
  "time": "2020-08-08T16:08:55.348",
  "errorList": [
    "Name cannot be blank!",
    "Surname cannot be blank!"
  ]
}

Swagger UI

https://trverification.omerfarukgenc.com.tr/swagger-ui.html

Todo

  • Will be add new verification services for other citizenships. (e.g : british.citizenshipverification.online)

License

Apache License 2.0

About

You can use this service to verify Turkish Citizenship with few information. (e.g : identity number, birth year, name, surname)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published