Refugee Verification

The Refugee Verification endpoint provides comprehensive access to refugee identity records within the MVT Technologies database. This service enables authorized applications to retrieve detailed refugee information for verification purposes, compliance checks, and identity validation processes.

Refugee Verification Overview

This API endpoint allows you to verify refugee identities by querying the MVT Technologies database using a unique refugee identity number. The response includes essential details such as personal information, status, and history of the refugee.

  • 1. Token Generation: First, obtain an authentication token by calling the authentication endpoint with your credentials
  • 2. Token Usage: Include the obtained token in the Authorization header for all subsequent API calls
Endpoint Details
  • Endpoint: POST /api/RefugeeData
  • URL: {domain}/api/RefugeeData
  • Authentication Required: Yes (Bearer Token)
Headers Required:
{ 
"Content-Type": "application/json",
 "Authorization": "Bearer YOUR_TOKEN"
}
Request Parameters:
{
"fileNumber": "",
 "refugeeIDNumber": "",
}
                                        

Successful Response: Returns a JSON object containing your access token:


{
 "fileNumber": "",
 "refugeeIDNumber": "",
 "firstName": "",
 "surname": "",
 "gender": "",
 "birthDate": "",
 "age": ,
 "country": "",
 "nationality": "",
 "alternativeFileNumber": "",
 "officeOfApplication": "",
 "status": "",
 "permitNumber": "",
 "expiryDate": "",
 "photo": ""
}
  • fileNumber: Official refugee file number
  • refugeeIDNumber: Refugee identification number
  • firstName: Refugee's first name
  • surname: Refugee's surname/family name
  • gender: Gender designation
  • birthDate: Date of birth
  • age: Current age calculated from birth date
  • country: Country of current residence/application
  • nationality: Original nationality/citizenship
  • alternativeFileNumber: Secondary or alternative file reference
  • officeOfApplication: Immigration office where application was processed
  • status: Current refugee status (e.g., "Approved", "Pending", "Rejected")
  • permitNumber: Official permit/document number
  • expiryDate: Permit expiration date
  • photo: Base64 encoded photograph or photo reference

Error Response:

{  
  "message": "Error message here",
}   

Ensure to handle errors gracefully and prompt users to re-enter identity numbers if necessary.

Code Snippets

This section provides practical examples of how to obtain citizen verification data from the API. The snippets demonstrate the process in cURL, PHP and Node.js, showing how to securely send requests, handle responses, and retrieve citizen information.


const axios = require("axios");
const API_URL = "https://www.example.co.za/api/RefugeeData";
const TOKEN = "Token_from_authentication";
const requestData = {
  "fileNumber": "your_file_number",
  "refugeeIDNumber": "your_refugee_id_number"
};
async function postData() {
  try {
    const response = await axios.post(API_URL, requestData, {
      headers: {
        Authorization: `Bearer ${TOKEN}`,
        "Content-Type": "application/json",
      },
    });
    console.log("DATA:", response.data); 
  } catch (error) {
    console.error("Error data:", error.response.data);
    console.error("Error status:", error.response.status);
    console.error("Error statusText:", error.response.statusText);
  }
}
postData();

$apiUrl = "https://www.example.co.za/api/RefugeeData";
$token = "Token_from_authentication";

$context = stream_context_create([
    "http" => [
        "header" => "Authorization: Bearer $token\r\n" .
                    "Content-Type: application/json\r\n",
        "method" => "POST",
        "content" => json_encode([
            "fileNumber" => "your_file_number",
            "refugeeIDNumber" => "your_refugee_id_number"
            ]),
        "ignore_errors" => true
    ]
]);

$response = file_get_contents($apiUrl, false, $context);

if ($response === false) {
    echo "Error making request.";
} else {
    echo "Response: " . $response;
}