Senegal ๐Ÿ‡ธ๐Ÿ‡ณ

Extract PII data from Senegalese ID documents

How It Works

Appruve's OCR API allows you to extract the Personally identifiable information from a Senegalese ID document including the ID face photo. This API also performs an analyses on each document uploaded to determine if the document is legit or not. Document analyses include Template Matching, Barcode and MRZ checks.

The endpoint is constructed as follows.{id_type}

id_type should be replaced with the specific ID type. Supported ID types are national_id and passport.

The request is a multipart POST request as shown in the example below. The front_id_image and back_id_image parameters are required and their values could be a File Object or a web URL.

Example National ID Request

curl --location --request POST '' \
--header 'Authorization: Bearer TOKEN' \
--form 'front_id_image=@"/path/sn_national_id_front.jpg"' \
--form 'back_id_image=@"/path/sn_national_id_back.jpg"'

An example response is given below.

    "id_details": {
        "id_type": "national_id",
        "front_id": {
            "first_name": "John",
            "last_name": "Doe",
            "id_number": "12345678910",
            "date_of_birth": "1993-05-11",
            "issue_date": "2020-04-27",
            "expiry_date": "2030-04-26",
            "gender": "M",
            "place_of_birth": "",
            "height": "173 cm",
            "home_address": "",
            "registration_center": "Consulat Abidjan"
        "back_id": {
            "country_name": "Senegal",
            "country_code": "SEN",
            "voter_id_number": "101234567",
            "diplomatic_representation": "",
            "nin": "1081234567",
            "locality": "",
            "polling_station": "",
            "mothers_name": "",
            "fathers_name": "",
            "region": "",
            "department": ""
        "is_id_valid": true
    "document_country": "sn",
    "front_id_submitted": "URL",
    "back_id_submitted": "URL",
    "front_id_face_photo": "URL",
    "transaction_reference": "8bc12a80-1bbb-4003-aa46-3dc0f7174c90",
    "document_analyses": [
            "type": "TEMPLATE_MATCHING",
            "is_check_successful": true,
            "data": null
    "id_confidence_score": 100,
    "face_sharpness": 7.59,
    "face_brightness": 66.06,
    "is_reenrollment": false

The returned transaction_reference value should be used for the Upload Selfie endpoint.

Last updated