Skip to main content
GET
/
api
/
v1
/
kyc
/
passport
Validate International Passport
curl --request GET \
  --url https://api.dojah.io/api/v1/kyc/passport \
  --header 'AppId: <appid>' \
  --header 'Authorization: <api-key>'
import requests

url = "https://api.dojah.io/api/v1/kyc/passport"

headers = {
    "AppId": "<appid>",
    "Authorization": "<api-key>"
}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {AppId: '<appid>', Authorization: '<api-key>'}};

fetch('https://api.dojah.io/api/v1/kyc/passport', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.dojah.io/api/v1/kyc/passport",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_HTTPHEADER => [
    "AppId: <appid>",
    "Authorization: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

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

func main() {

	url := "https://api.dojah.io/api/v1/kyc/passport"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("AppId", "<appid>")
	req.Header.Add("Authorization", "<api-key>")

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

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

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.dojah.io/api/v1/kyc/passport")
  .header("AppId", "<appid>")
  .header("Authorization", "<api-key>")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.dojah.io/api/v1/kyc/passport")

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

request = Net::HTTP::Get.new(url)
request["AppId"] = '<appid>'
request["Authorization"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
    "entity": {
        "passport_number": "A00123456",
        "date_of_issue": "01/02/2000",
        "expiry_date": "01/02/2000",
        "document_type": "Standard Passport",
        "issue_place": "LAGOS",
        "surname": "MUSA",
        "first_name": "JOHN",
        "other_names": "DOE",
        "date_of_birth": "10/06/1993",
        "gender": "Undecided",
        "photo": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBA..."
    }
}
{
  "error": "Invalid request parameters"
}
{
  "error": "App Couldn't be Validated"
}
AppId
string
required
Application ID from dashboard

Query parameter

passport_number
string
required
A valid passport number
surname
string
required
Surname associated with the Passport

RESPONSES

200
json
json
400
Object
401
Object
{
    "entity": {
        "passport_number": "A00123456",
        "date_of_issue": "01/02/2000",
        "expiry_date": "01/02/2000",
        "document_type": "Standard Passport",
        "issue_place": "LAGOS",
        "surname": "MUSA",
        "first_name": "JOHN",
        "other_names": "DOE",
        "date_of_birth": "10/06/1993",
        "gender": "Undecided",
        "photo": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBA..."
    }
}
{
  "error": "Invalid request parameters"
}
{
  "error": "App Couldn't be Validated"
}

Test Credentials for Sandbox

Kindly use this Test Passport Number in sandbox Environment Passport Number = A00123456