# Welcome!

Danaya is the first specialized KYC/KYB solution for Francophone Africa. \
We enable developers and non-developers to verify the identities of individuals and businesses by examining their documents. We assist them in determining whether the provided documents are authentic or forged, thereby reducing their risk of fraud or identity theft. The relevant documents may include identity cards or commercial registers, for example.

<figure><img src="https://3664010479-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fntddk9T2ZsjmA2NcvU9z%2Fuploads%2FiLSVOIDcgDbF0m4lfQHC%2Fdanaya_banniere_linkedin_pro%20ENG%402x.jpg?alt=media&amp;token=2a68f894-74ad-48f5-90a7-296caf13cd17" alt=""><figcaption></figcaption></figure>

## Core features

* **Instant KYC:** With Danaya, enable swift and precise onboarding of your users in mere seconds through verification with public and private, up-to-date databases.
* **Comprehensive Identity Checks:** Leverage our selection of ID types for thorough verification, with Danaya accommodating numerous ID forms specifically suited for Ivory Coast.

## Development environment

Danaya offers two distinct environments to support your development and testing requirements:

* **Sandbox Environment:** Utilize our demo environment for integration testing with Test IDs, ideal for validating your integration's performance before it goes live.
* **Production Environment:** Deploy your integration in a live setting to smoothly onboard users and combat fraud. Each environment is designed to provide the same user experience, with the primary difference being the use of simulated data in the sandbox versus actual data in the production environment.

## Support

Comprehensive support and help are provided to facilitate your Danaya integration. For further assistance, reach us at <contact@danaya.africa>


# Onboarding

This document provides an overview of the various KYC/KYB functionalities offered by Danaya. It is primarily intended for developers looking to integrate Danaya's APIs within their existing applications.\
This documentation is still in progress and we are very open to any feedback and/or improvement ideas.


# Get your api credentials

Before all ask for your (Api-Key and Api-Secret)

To interact with our platform, the first step is to contact Danaya at <mark style="color:green;">**<contact@danaya.africa>**</mark> to learn about the access modalities in sandbox, demo, or production.&#x20;

Following these discussions, we will provide you with an `Api-Key and Api-Secret`, which are essential for using our APIs and SDKs.


# Rest Api

The most efficient way to interact with our platform is through Rest API. Here is the list of features accessible via API.

**KYC**

* [Make ID document verification](/documentation/integration-mode/rest-api/kyc/id-document-verification)
* [Retrieve ID Document Verification Result](/documentation/integration-mode/rest-api/retrieve-document-verification-result)
* [Get ID Information Endpoint](/documentation/integration-mode/rest-api/kyc/id-informations)
* [Make Person Information Scoring Endpoint](/documentation/integration-mode/rest-api/kyc/id-verification#compute-person-information-scoring-experimental) (experimental)
* [Face match](/documentation/integration-mode/rest-api/kyc/face-match)

**KYB**

* [Create a KYB file](/documentation/integration-mode/rest-api/kyb/company-document-verification) (depreciated)
* [Get Company Information Endpoint](/documentation/integration-mode/rest-api/kyb/company-informations)
* [Make Company Information Scoring Endpoint](/documentation/integration-mode/rest-api/kyb/company-verification#compute-a-company-scoring) (experimental)
* [Make Company document verification](/documentation/integration-mode/rest-api/kyb/company-document-verification)

**Platform**

* [Get your API Consumption Status](/documentation/integration-mode/rest-api/platform#get-your-api-consumption-status)
* [Retrieve document verification results](/documentation/integration-mode/rest-api/retrieve-document-verification-result)

**Postman collections**


# Platform

<details>

<summary>Get your API Consumption Status</summary>

This endpoint is crucial because it gives you a status of the consumption of your subscribed check credits.

<mark style="background-color:green;">GET /subscriptions/status</mark>

Headers:

* &#x20;Api-Key (required)
* Api-Secret (required)

Request Body: Nonde

Responses:

* OK:
  * Code: 200
  * Body

    ```json
    {
        "id": "UUID",
        "company": {
            "id": 1000,
            "name": "Company",
            "country": "COUNTRY",
            "city": "CITY",
            "contactEmail": "email",
            "rccmNumber": "",
            "type": null,
            "ownerName": null,
            "agencies": []
        },
        "type": "CHECK_COUNT",
        "numberOfChecks": 1000,
        "status": "ACTIVE",
        "expirationDate": "2025-01-01"
    }
    ```
* ERRORS:
  * Code : 401

</details>

<details>

<summary>An other platform url endpoint ?</summary>

</details>


# KYC


# ID Informations

This feature enables the retrieval of all information about a person knowing his NNI, ID Card Number or phone Number.

Documents supported are ID Cards (old and new) and Ivorian Resident Card

<details>

<summary>Person Informations</summary>

<mark style="background-color:green;">GET /search/person</mark>

**Headers:**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): application/json

**Request Body: N/A**

**Query Params:**

In an API call, you must specify either `nni`, `idCardNumber`, or `phoneNumber`. Only one of these parameters should be provided at a time.

* **documentType** (required): `CNI` or `CARTE_RESIDENT`
* **nni**: Required for new CNI or CARTE\_RESIDENT (example: 11111111111)
* **idCardNumber**: Required for old CNI, as old CNI does not have an NNI (example: C0111111111)
* <mark style="background-color:orange;">**phoneNumber**</mark><mark style="background-color:orange;">: (not yet available)</mark>

**Responses:**&#x20;

If the person is found all the details will be return

* **OK:**

  * Code: 200
  * Body

  ```json
  {
    "uin": "string",
    "lastName": "string",
    "firstName": "string",
    "gender": "string",
    "birthDate": "string",
    "fatherFirstName": "string",
    "fatherLastName": "string",
    "fatherBirthDate": "string",
    "motherFirstName": "string",
    "motherLastName": "string",
    "motherBirthDate": "string",
    "residenceAdr1": "string",
    "nationality": "string",
    "idCardNumber": "string",
    "birthTown": "string",
    "birthCountry": "string",
    "spouseName": "string",
    "residenceTown": "string",
    "fatherUin": "string",
    "motherUin": "string",
    "residenceAdr2": "string",
    "deliveryDate": "string",
    "deliveryTown": "string",
    "expirationDate": "string",
    "fatherbirthTown": "string",
    "idImageUrl": "string"
  }
  ```
* &#x20;Code : 401
* Code: 400

</details>


# ID Verification

This feature enables the verification of ID Document

Based on the input information provided, we give you a matching score comparing the information given and the ones found in official databases.

**ID identifiers supported**

<table><thead><tr><th width="202">Document</th><th> Database Check</th><th width="141">Identifier Used</th></tr></thead><tbody><tr><td><strong>OLD CNI</strong></td><td>                                        ✅</td><td>Document Number</td></tr><tr><td><strong>NEW CNI</strong></td><td>                                        ✅</td><td>NNI</td></tr><tr><td><strong>Resident Card</strong></td><td>                                        ✅</td><td>NNI</td></tr><tr><td><strong>MTN Phone Numbers</strong></td><td>                                        ✅</td><td>Phone number</td></tr></tbody></table>

<details>

<summary>Compute  Person Information Scoring (experimental)</summary>

**Endpoint** <mark style="background-color:green;">POST /verification/personInfoScore</mark>

**Headers**

* &#x20;**Api-Key** (required): provided by Danaya
* **Api-Secret** (required): provided by Danaya
* **Content-Type** (required): application/json

**Request Body**

In an API call, you must specify either `nni`, `idCardNumber`, or `phoneNumber`. Only one of these parameters should be provided at a time.

here you have to provide all user's informations as they are on the ID Document

```json
{
  "nni": "string",
  "iDCardNumber": "string",
  "firstName": "string",
  "phoneNumber": "string", // 2250XXXXXXXXX
  "lastName": "string",
  "dateOfBirth": "30/03/2024",//respect this format
  "gender": "string"
}
```

**Responses**

* **OK**
  * Code: 200
  * Body:

```json
{
  "id": 0,
  "nni": "string",
  "iDCardNumber": "string",
  "firstNameMatchingScore": 0,
  "lastNameMatchingScore": 0,
  "dateOfBirthMatchingScore": 0,
  "genderMatchingScore": 0
}
```

* **UnAuthorized**
* **Bad Request**

</details>


# ID Document Verification

From a document you send us, we return the information contained in the document and a matching score performed with information from official databases.

**Documents supported**

All the below listed documents are supported. You will have to send us the front and/or the back image of the document. The answer will be send to you via a webhook. You will have to provide us the url to call for the webhook.&#x20;

| Document            | Databases check |
| ------------------- | --------------- |
| **CNI (old)**       | ✅               |
| **CNI**             | ✅               |
| **Resident Card**   | ✅               |
| **Consular Card**   |                 |
| **Passport**        |                 |
| **Driving License** |                 |

<details>

<summary>Verify KYC Document images V1</summary>

<mark style="background-color:green;">POST /v1/clients-files/upload-files</mark>

**Headers:**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): multipart/form-data

**Request Body:**

```json
{
  "selfie": "file",
  "cniRecto": "file", // Front National ID image
  "cniVerso": "file", // Back National ID image
  "carteConsulaireRecto": "file", // Front Consular Card image
  "carteConsulaireVerso": "file", // Back Consular Card image
  "carteResidentRecto": "file", // Front Resident Card image
  "carteResidentVerso": "file", // Back Resident Card image
  "passport": "file" // Front Passport image
}
```

<mark style="color:red;">**⚠️ supported image files are: png, jpeg and jpg**</mark>

**Responses:**&#x20;

The response will correspond to a document analysis request. The response ID can be used to retrieve the analysis result later [see this page](/documentation/integration-mode/rest-api/retrieve-document-verification-result). The analysis result will also be sent via a webhook.

* **OK:**

  * Code: 200
  * Body

  ```json
  {
      "id": "6a278893-6458-473f-9418-e1169fc7b",
      "createdAt": "2024-06-10 16:02:37",
      "addedBy": {},
      "clientFilesToAnalyzeDocuments": [
          {
              "id": "57327f5c-f67b-46ab-ae51-a6a455781",
              "type": "CNI",
              "jsonContent": null,
              "analyzed": false,
              "analyzedAt": null,
              "filesToAnalyse": [
                  {
                      "id": "648790a1-582f-414d-a372-f50a27f093d5",
                      "documentName": "CNI_back_87d93462-4b40-4f29-87ab-bb29cc8e_cni_recto.jpeg",
                      "extractedContent": null
                  },
                  {
                      "id": "39797276-470e-4620-9070-b99289425813",
                      "documentName": "CNI_front_25e2a9fd-f6bf-4600-87a7-7c523920_cni_recto.jpeg",
                      "extractedContent": null
                  }
              ]
          }
      ]
  }
  ```
* &#x20;Code : 401
* Code: 400

</details>

<details>

<summary>Verify KYC Document images V2</summary>

<mark style="background-color:green;">POST /v2/clients-files/upload-files</mark>

The API accepts the following input parameters:

* **selfie**: A file representing the user's selfie image. This parameter is optional.
* **idDocumentFront** (required): A file containing the front side of the user's identification document.
* **idDocumentBack**: A file containing the back side of the user's identification document. This parameter is optional.
* **documentType** (required): Specifies the type of identification document. The available values are:
  * `CNI` (National ID Card)
  * `PASSEPORT` (Passport)
  * `CARTE_RESIDENT` (Resident Card)
  * `CARTE_CONSULAIRE` (Consular Card)
  * `PERMIS_CONDUIRE` (Driver’s License)
* **verificationsToApply**: An array specifying the types of verifications to be applied. The available values are:

  * `DB_CHECK`
  * `MRZ_CHECK`
  * `EXPIRATION_CHECK`
  * `FACE_MATCH_CHECK`
  * `PEP_CHECK`
  * `SANCTION_CHECK`
  * `MEDIA_CHECK`
  * `TEMPLATE_CHECK`
  * `COMPANY_DB_CHECK`

  If `verificationsToApply` is not defined or an empty array, all verifications configured on the company's account will be applied by default.

**Headers:**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): multipart/form-data

**Request Body:**

```json
{
  "selfie": "file",
  "idDocumentFront": "file", //(required)
  "idDocumentBack": "file",
  "externalId": "externalId in your system",
  "documentType": //(required) Available values : CNI, PASSEPORT, CARTE_RESIDENT, CARTE_CONSULAIRE, PERMIS_CONDUIRE 
  "verificationsToApply": []// Available values : DB_CHECK, MRZ_CHECK, EXPIRATION_CHECK, FACE_MATCH_CHECK, PEP_CHECK, SANCTION_CHECK, MEDIA_CHECK, TEMPLATE_CHECK, COMPANY_DB_CHECK
}
```

<mark style="color:red;">**⚠️ supported image files are: png, jpeg and jpg**</mark>

**Responses:**&#x20;

The response will correspond to a document analysis request. The response ID can be used to retrieve the analysis result later [see this page](/documentation/integration-mode/rest-api/retrieve-document-verification-result). The analysis result will also be sent via a webhook.

* **OK:**

  * Code: 200
  * Body

  ```json
  {
      "id": "6a278893-6458-473f-9418-e1169fc7b",
      "createdAt": "2024-06-10 16:02:37",
      "addedBy": {},
      "externalId": "39797276-470e-4620-9070-b99289425813",
      "clientFilesToAnalyzeDocuments": [
          {
              "id": "57327f5c-f67b-46ab-ae51-a6a455781",
              "type": "CNI",
              "jsonContent": null,
              "analyzed": false,
              "analyzedAt": null,
              "filesToAnalyse": [
                  {
                      "id": "648790a1-582f-414d-a372-f50a27f093d5",
                      "documentName": "CNI_back_87d93462-4b40-4f29-87ab-bb29cc8e_cni_recto.jpeg",
                      "extractedContent": null
                  },
                  {
                      "id": "39797276-470e-4620-9070-b99289425813",
                      "documentName": "CNI_front_25e2a9fd-f6bf-4600-87a7-7c523920_cni_recto.jpeg",
                      "extractedContent": null
                  }
              ]
          }
      ]
  }
  ```
* &#x20;Code : 401
* Code: 400

</details>


# User filled data verifications

This feature allow to run a scoring over informations your customers provide you and informations we extracted from ID documents images you sent us.

Not Yet Available


# Face match

This feature allows identity verification based on a person's image present on an Identity document and a selfie.

This feature works with all identity documents that have a photo ID.

<details>

<summary>Verify Identity with a selfie and the provided ID document v1</summary>

<mark style="background-color:green;">POST v1/verification/face-match</mark>

**Headers:**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): multipart/form-data

**Request Body:**

```json
{
  "nni": "file", // Depreciated
  "personalImage": "file", // Depreciated (will be removed in a V2)
  "frontCNIImage": "file", // Depreciated (will be removed in a V2)
  "backCNIImage": "file", // Depreciated (will be removed in a V2)
  "selfie": "file", // Recommanded (will replace "personalImage" in a V2)
  "cniRecto": "file", // Front National ID image
  "cniVerso": "file", // Back National ID image
  "carteConsulaireRecto": "file", // Front Consular Card image
  "carteConsulaireVerso": "file", // Back Consular Card image
  "carteResidentRecto": "file", // Front Resident Card image
  "carteResidentVerso": "file", // Back Resident Card image
  "passport": "file" // Front Passport image
}
```

<mark style="color:red;">**⚠️ supported image files are: png, jpeg and jpg**</mark>

**Responses:**&#x20;

* **OK:**

  * Code: 200
  * Body

  ```json
  {
    "type": "FACE_MATCH",
    "faceMatched": true, // true if the score is > 80%
    "similarity": "string", // face matching score
    "comparedImageBase64": "string", // face detected in the provided document
    "faceMatchVerificationType": "GOVERNMENT" //OR OFFLINE; if the selfie is compared within the gov DB IMAGE --> GOVERNMENT, IF Compared with the photo on the ID Card --> OFFLINE
  }
  ```
* &#x20;Code : 401
* Code: 400

</details>

<details>

<summary>Verify Identity with a selfie and the provided ID document v2</summary>

<mark style="background-color:green;">POST v2/verification/face-match</mark>

**Headers:**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): multipart/form-data

**Request Body:** Front Consular Card image

```json
{
  "selfie": "file", // (required)
  "idDocumentFront": "file", //(required)
  "idDocumentBack": "file",
  "documentType": CNI/PASSPORT/...//(required)
}
```

<mark style="color:red;">**⚠️ supported image files are: png, jpeg and jpg**</mark>

**Responses:**&#x20;

* **OK:**

  * Code: 200
  * Body

  ```json
  {
                      "id": "dfe39085-5606-4ebb-bad0-66dae47af562",
                      "status": "EXECUTED",
                      "lastRunDate": "2024-10-11 10:07:48",
                      "type": "FACE_MATCH_CHECK",
                      "scoring": {
                          "type": "FaceMatch",
                          "faceMatched": false,
                          "similarity": "0",
                          "comparedImageBase64": null,
                          "faceMatchVerificationType": "GOVERNMENT" or "OFFLINE"
                      },
                      "clientFileDocumentId": 1255
                  }
  ```
* &#x20;Code : 401
* Code: 400

</details>


# Liveness check

Under development. Let us know if you are interested...

A liveness check is a security feature used to ensure that the person being verified is physically present and alive during the identity verification process. This is typically done to prevent fraud, such as the use of photos, videos, or deepfake technologies to impersonate someone else.

The liveness check usually involves prompting the user to perform specific actions, such as blinking, smiling, or turning their head, while their face is being scanned by a camera. The system then analyzes these actions to confirm that the movements are natural and consistent with a live human being, rather than a static image or video playback.

By incorporating liveness checks, KYC APIs can enhance the reliability and security of the identity verification process, making it harder for fraudulent actors to manipulate the system.


# KYB


# Informal Business Verification

This feature enables the verification of information about an informal business.

To determine if a business exists, we use the IDU Code, Owner Identity Document Number, or Owner Phone Number to calculate a match score between owner and business information. By setting a scoring threshold, we can assess the existence of a business.

<details>

<summary>Verify Informal Business Information</summary>

<mark style="background-color:green;">POST /verification/informal-business</mark>

**Headers:**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): application/json

here you have to provide this informal business informations to verify:

```json
{
  "iduCode": "string",
  "ownerIdentityDocumentNumber": "string",
  "phoneNumber": "string", // 
  "ownerBirthDate": "string", REQUIRED // Format yyyy-mm-dd
  "ownerBirthPlace": "string",  REQUIRED
  "activityMunicipality": "string",  REQUIRED // e.g: Cocody
  "ownerFullName": "string"  REQUIRED
}
```

**Responses:**&#x20;

For each of the values provided in the request body, we will give you a matching score ranging from 0 to 100.

* **OK:**

  * Code: 200
  * Body

  ```json
  {
    "iduCode": "string",
    "ownerBirthDateScore": 100,
    "ownerBirthPlaceScore": 53,
    "ownerNameScore": 100,
    "activityMunicipalityScore": 100,
    "isValid": false,
    "threshold": 80 // to be defined by the clients
   }
  ```
* &#x20;Code : 401

TBD

* Code: 400

TBD

</details>


# Company Informations

This feature enables the retrieval of all information about a company using its RCCM number. It is also possible to retrieve the entire history of changes the company has undergone.

<details>

<summary>Search company details knowing the registration number</summary>

<mark style="background-color:green;">GET /search/company</mark>

**Headers:**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): application/json

**Request Body: N/A**

**Query Params:**

* rccmNumber (required) : string (example: CI-ABJ-03-2024-B17-00022)

**Responses:**&#x20;

If the company is found all the details will be return

* **OK:**

  * Code: 200
  * Body

  ```json
  {
    "rccm": "string",
    "formalityNumber": "string",
    "capitalInCash": "string",
    "capital": "string",
    "industrialCapital": "string",
    "capitalInKind": "string",
    "activities": [
      "string"
    ],
    "POBox": "string",
    "applicants": "string",
    "companyName": "string",
    "startDate": "2024-04-24T09:30:41.042Z",
    "owners": [
      {
        "firstName": "string",
        "lastName": "string",
        "dateAndPlaceOfBirth": "string",
        "role": "string",
        "POBox": "string",
        "phoneNumber1": "string",
        "phoneNumber2": "string",
        "emailAddress": "string"
      }
    ],
    "duration": 0,
    "formalityDate": "2024-04-24T09:30:41.043Z",
    "modificationDate": "2024-04-24T09:30:41.043Z",
    "businessName": "string",
    "legalForm": "string",
    "modificationType": "string",
    "tradeName": "string",
    "headquarters": "string",
    "acronym": "string",
    "formalityType": "string",
    "people": "string"
  }
  ```
* &#x20;Code : 401
* Code: 400

</details>

<details>

<summary>Retrieve company's changes history</summary>

<mark style="background-color:green;">GET /search/company-changes</mark>

**Headers:**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): application/json

**Request Body: N/A**

**Query Params:**

* rccmNumber (required) : string (example: CI-ABJ-03-2024-B17-00022)

**Responses:**&#x20;

If the company is found all it's changes details will be return

* **OK:**
  * Code: 200
  * Body

```
{
  "rccm": "string",
  "historyList": [
    {
      "formalityDate": "string",
      "formalityType": "string",
      "natureOfModification": "string",
      "capital": "string",
      "headOffice": "string",
      "activities": [
        {
          "activity": "string"
        }
      ]
    }
  ]
}
```

* &#x20;Code : 401
* Code: 400

</details>


# Company Verification

This feature enables the verification of company identification documents

Based on the input information provided, we give you a matching score comparing the information given and the ones found in official databases.

<details>

<summary>Compute a Company Scoring (experimental)</summary>

<mark style="background-color:green;">POST /verification/companyScore</mark>

**Headers:**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): application/json

here you have to provide all company's informations as they are on the RCCM

```json
{
  "rccmNumber": "string",
  "duration": 0,
  "address": "string",
  "shareCapital": "string",
  "associates": [
    "string"
  ],
  "corporateName": "string",
  "legalStatus": "string"
}
```

**Responses:**&#x20;

For each of the values provided in the request body, we will give you a matching score ranging from 0 to 100.

* **OK:**

  * Code: 200
  * Body

  ```json
  {
    "id": 0,
    "companyNameScore": 0,
    "legalStatusScore": 0,
    "addressScore": 0,
    "shareCapitalScore": 0,
    "durationScore": 0
  }
  ```
* &#x20;Code : 401
* Code: 400

</details>


# Company Document Verification

From a document you send us, we return the information contained in the document and a matching score performed with information from official databases.

We consider a file to be a KYB when it contains at least one company identification document.

<details>

<summary>With document files</summary>

**Endpoint** : <mark style="background-color:green;">POST /v2/clients-files/upload-files</mark>

**Headers**:

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): multipart/form-data

**Request Body**

```json
{
  "rccm": "file", // company rccm file
  "dfe": "file" // company dfe front file (not yet supported)
}
```

<mark style="color:red;">**⚠️ supported image files are: png, jpeg and jpg**</mark>

**In the v2 the body will look like this:**

```json
{
  "selfie": "file",
  "idDocumentFront": "file",
  "idDocumentBack": "file",
  "idDocumentType": "",
  "companyRccm": "file",
  "companyDfe": "file",
  "idDocument2Front": "file",
  "idDocument2Back": "file",
  "idDocument2Type": "",
  "idDocument3Front": "file",
  "idDocument3Back": "file",
  "carteGriseFront": "file",
  "carteGriseBack": "file",
  "idDocument3Type": ""
}
```

idDocumentType, idDocument2Type, idDocument3Type can be one off this value: CNI, PASSEPORT, CARTE\_RESIDENT, CARTE\_CONSULAIRE, PERMIS\_CONDUIRE, SELFIE, AUTRE, DFE, RCCM, ENTREPRENEUR\_CARD, AUTRE\_ENTREPRISE, CARTE\_GRISE

**Responses:**&#x20;

The response will correspond to a document analysis request. The response ID can be used to retrieve the analysis result later [see this page](/documentation/integration-mode/rest-api/retrieve-document-verification-result). The analysis result will also be sent via a webhook.

OK&#x20;

* code: 200
* body

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "id": "6d879092-5d06-4bae-b5b3-3b3321d651ef",
    "createdAt": "2024-05-27 09:58:10",
    "addedBy": {
        "apiCredentials": {
            "id": 3,
            "company": null
        }
    },
    "clientFilesToAnalyzeDocuments": [
        {
            "id": "94d4aa94-3058-4905-ac11-c000bc3b1941",
            "type": "RCCM",
            "jsonContent": null,
            "analyzed": false,
            "analyzedAt": null,
            "filesToAnalyse": [
                {
                    "id": "e3762c8d-74f3-4f70-8d92-76dfd0419d21",
                    "documentName": "document_front_file_name",
                    "extractedContent": null
                }
            ]
        }
    ]
}
</code></pre>

</details>


# AML

We offer several API endpoints that enable you to determine if a name is politically exposed, listed on a sanctions registry, or associated with adverse media coverage.

[PEP](/documentation/integration-mode/rest-api/aml/pep)

[Sanctions Lists](/documentation/integration-mode/rest-api/aml/sanction-lists)

[Media Adverse](/documentation/integration-mode/rest-api/aml/media-adverse)


# PEP

<details>

<summary>Verify if a name is PEP</summary>

<mark style="background-color:green;">GET /search/pep</mark>&#x20;

**Headers**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): application/json

**Request Body : N/A**

**Query Param**:&#x20;

* personName: string (example: Cyril Ramaphosa)

**Responses**

* **OK**

  * Code : 200
  * Body: this represent a list of potential PEP matching the provided personName

  ```json
  [
    {
      "id": "string",
      "score": 0,
      "sourceId": 0,
      "lastname": "string",
      "firstname": "string",
      "nationality": "string",
      "biography": "string",
      "aka": "string",
      "libelle": "string", // 
      "countryCode": "string",
      "country": "string",
      "countries": "string",
      "politicalPosition": "string",
      "chamber": "string",
      "function": "string",
      "institutionType": "string",
      "region": "string",
      "type": "string",
      "type2": "string",
      "locationUrl": "string",
      "relatedUrl": "string",
      "otherInfo": "string"
    }
  ]
  ```
* **UnAuthorized**
* **Bad Request**

</details>


# Sanction Lists

<details>

<summary>Verify if a name is present on a sanction list</summary>

<mark style="background-color:green;">GET /search/sanctioned-person</mark>&#x20;

**Headers**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): application/json

**Request Body : N/A**

**Query Param**:&#x20;

* personName: string (example: Cyril Ramaphosa)

**Responses**

* **OK**

  * Code : 200
  * Body: this represent a list of person on sanction lists matching the provided personName

  ```json
  [
    {
      "id": "string",
      "score": 0,
      "sourceId": 0,
      "authority": "string",
      "libelle": "string",
      "relatedEntity": "string",
      "entityType": "string",
      "type": "string",
      "firstname": "string",
      "dateOfBirth": "string",
      "placeOfBirth": "string",
      "nationality": "string",
      "countryAuthority": "string",
      "logoAuthority": "string",
      "sanctionListName": "string",
      "sanctions": "string",
      "listType": "string",
      "listedOn": "string",
      "updateDate": "string",
      "complementaryInformation": "string",
      "grounds": "string",
      "category": "string",
      "description": "string",
      "source": "string"
    }
  ]
  ```
* **UnAuthorized**
* **Bad Request**

</details>


# Media Adverse

<details>

<summary>Searching for media that mentions the person name</summary>

<mark style="background-color:green;">GET /search/media</mark>&#x20;

**Headers**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): application/json

**Request Body : N/A**

**Query Param**:&#x20;

* personName: string (example: Cyril Ramaphosa)

**Responses**

* **OK**

  * Code : 200
  * Body: this represent a list of person on media articles having the person name

  ```json
  [
      {
          "title": "Profile: Laurent Nkunda",
          "link": "https://www.theguardian.com/world/2009/jan/23/profile-laurent-nkunda-congo",
          "snippet": "Profile: Laurent Nkunda ... Nkunda, 40, studied psychology and has been a soldier since 1993. Although born in Congo, he fought with the Rwandan...",
          "date": "189 months ago",
          "source": "The Guardian",
          "imageUrl": null,
          "position": 1
      },
      {
          "title": "Rwanda rejects US calls for withdrawal of missiles, troops from eastern Congo",
          "link": "https://www.africanews.com/2024/02/19/rwanda-rejects-us-calls-for-withdrawal-of-missiles-troops-from-eastern-congo/",
          "snippet": "Authorities in Rwanda on Monday rejected US calls for the withdrawal of troops and missile systems from eastern Congo, saying they are defending Rwandan...",
          "date": "2 months ago",
          "source": "Africanews",
          "imageUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcS_yh4OHlDshEHTvyGNE1CZCZomV4fmS2vyqX8y_GUQ3ybNPa8VPOtSeUeqmQ&s",
          "position": 2
      },
      {
          "title": "What does Congo's Gen. Nkunda want?",
          "link": "https://www.csmonitor.com/World/Africa/2008/1114/p06s01-woaf.html",
          "snippet": "An ordained preacher and rebel group commander, Gen. Laurent Nkunda is threatening to draw other nations into a war in eastern Congo.",
          "date": "191 months ago",
          "source": "The Christian Science Monitor",
          "imageUrl": null,
          "position": 3
      }
  ]
  ```
* **UnAuthorized**
* **Bad Request**

</details>


# Retrieve Document Verification result

Once a KYC or KYB verification request is done, the verification ID can be used to retrieve the analysis results. This result can also be sent via webhook.

<details>

<summary>Retrieve a KYC or KYB Analysis Result v1</summary>

<mark style="background-color:green;">GET v1/clients-files/client-file-to-analyze-id/{file-verification-uuid}</mark>

file-verification-uuid: is the uuid provided in the response of [this api call](/documentation/integration-mode/rest-api/kyc/id-document-verification) for KYC and [this one](/documentation/integration-mode/rest-api/kyb/company-document-verification) for KYB.

**Headers:**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): application/json

**Request Body: N/A**

**Responses**

* **OK**
  * Code: 200
  * Body:

```json
{
  "id": 0,
  "addedWithApi": 0,
  "status": "A_TRAITER",
  "mafaValid": true,
  "rccmValid": true,
  "kybConsistentValid": true,
  "reasons": [
    "string"
  ],
  "requestedDate": "2024-08-25T09:44:41.144Z",
  "documents": [
    {
      "id": 0,
      "type": "CNI",
      "personInfoScoring": {// Depreciated, moved to "verifications" list
        "type": "personInfoScoring",
        "id": 0,
        "nni": "string",
        "iDCardNumber": "string",
        "phoneNumber": "string",
        "firstNameMatchingScore": 0,
        "lastNameMatchingScore": 0,
        "dateOfBirthMatchingScore": 0,
        "genderMatchingScore": 0,
        "phoneNumberMatchingScore": 0,
        "comparedWithRealData": true,
        "rawData": "string" // JSON String of the person informations found in de GOV DB
      },
      "contentMap": { // document data extracted with OCR
        "additionalProp1": {},
        "additionalProp2": {},
        "additionalProp3": {}
      }
      "verifications": [
        {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "status": "EXECUTED",
          "lastRunDate": "2024-08-25T09:44:41.144Z",
          "type": "DB_CHECK",
          "scoring": {
            "type": "personInfoScoring",
            "id": 0,
            "nni": "string",
            "iDCardNumber": "string",
            "phoneNumber": "string",
            "firstNameMatchingScore": 0,
            "lastNameMatchingScore": 0,
            "dateOfBirthMatchingScore": 0,
            "genderMatchingScore": 0,
            "phoneNumberMatchingScore": 0,
            "comparedWithRealData": true,
            "rawData": "string" // JSON String of the person informations found in de GOV DB
          },
          "clientFileDocumentId": 0
        }
      ],
      "fullName": "string",
      "firstName": "string",
      "lastName": "string",
      "dateOfBirth": "string",
      "nni": "string",
      "documentNumber": "string",
      "gender": "string",
      "mrz": "string",
      "nationality": "string"
    },
    {
      "id": 0,
      "type": "RCCM",
       "companyScoring": {
        "type": "companyScoring",
        "id": 0,
        "comparedWithRealData": true,
        "companyNameScore": 0,
        "legalStatusScore": 0,
        "addressScore": 0,
        "shareCapitalScore": 0,
        "durationScore": 0
      },
      "verifications": [
         {
          "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
          "status": "EXECUTED",
          "lastRunDate": "2024-08-25T09:44:41.144Z",
          "type": "DB_CHECK",
          "scoring": {
            "type": "companyScoring",
            "comparedWithRealData": true,
            "companyNameScore": 0,
            "legalStatusScore": 0,
            "addressScore": 0,
            "shareCapitalScore": 0,
            "durationScore": 0
          },
          "clientFileDocumentId": 0
        }
      ],
      "companyName": "string",
      "companyAddress": "string",
      "companyDuration": 0,
      "legalStatus": "string",
      "rccmNumber": "string",
      "shareCapital": "string",
    }
  ],
  "clientFileToAnalyzeId": "3fa85f64-5717-4562-b3fc-2c990f66afa6",
  "company": {
    "id": 0
  },
  "kyc": true,
  "kyb": true
}
```

Details of the response:

**documents\[x].verifications\[x].scoring** : corresponds to the comparison scoring we conducted between the information extracted by OCR from the transmitted identity document image and the official database.

**documents\[x].verifications\[x].scoring.rawData** : corresponds to raw data retrieved from the partner database if the person is found.

**documents\[x].verifications\[x].scoring.comparedWithRealData** : is set to true if the scoring was done with data found in the partner database

**documents\[x].contentMap:** contains the data we were able to extract from the document image you sent us

* **UnAuthorized**
* **Bad Request**

</details>

<details>

<summary>Retrieve a KYC or KYB Analysis Result v2</summary>

<mark style="background-color:green;">GET v2/clients-files/client-file-to-analyze-id/{file-verification-uuid}</mark>

file-verification-uuid: is the uuid provided in the response of [this api call](/documentation/integration-mode/rest-api/kyc/id-document-verification) for KYC and [this one](/documentation/integration-mode/rest-api/kyb/company-document-verification) for KYB.

**Headers:**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): application/json

**Request Body: N/A**

**Responses**

* **OK**
  * Code: 200
  * Body:

{% code overflow="wrap" %}

```json

{
    "id": 962,
    "createdAt": "2024-10-11 10:07:25",
    "clientFileToAnalyzeId": "1671d906-73d7-4dc-86cc-21ebf8624e3c",
    "status": "A_TRAITER",
    "additionalData": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "externalId": "externalId1",
    "errors": [
        {
            "code": "DUPLICATED_EXTERNAL_IDS",
            "duplicatedExternalIds": [
                "externalId1",
                "externalId2"
            ]
        }
    ]
    "score": 0,
    "company": {
        "id": 1,
        "name": "Danaya",
        "verifications": [
            "MRZ_CHECK",
            "DB_CHECK",
            "EXPIRATION_CHECK",
            "PEP_CHECK",
            "FACE_MATCH_CHECK",
            "SANCTION_CHECK",
            "MEDIA_CHECK"
        ]
    },
    "documents": [
        {
            "id": 1256,
            "type": "SELFIE",
            "frontUrl": "url",
            "verificationResults": []
        },
        {
            "id": 1255,
            "type": "CARTE_RESIDENT",
            "frontUrl": "url",
            "backUrl": "url",
             "ocrExtractedData": {
                "mrz": "",
                "nni": "11111111111",
                "image": null,
                "state": null,
                "gender": "M",
                "height": "1,75",
                "message": null,
                "ocr_raw": null,
                "last_name": "",
                "first_name": "name",
                "profession": "NAME",
                "father_name": null,
                "mother_name": null,
                "nationality": "",
                "country_code": null,
                "date_of_birth": "dd/mm/yyyy",
                "document_code": "",
                "place_of_birth": "",
                "document_expiry": "dd/mm/yyyy",
                "document_number": "",
                "father_birthday": null,
                "mother_birthday": null,
                "personal_number": null,
                "permanent_address": null,
                "date_of_birth_yyyy_mm_dd": null,
                "document_expiry_yyyy_mm_dd": null
            },
            "verificationResults": [
                {
                    "id": "ff0226d1-9f0e-4d21-b49e-40e9c442ccf0",
                    "status": "EXECUTED",
                    "lastRunDate": "2024-10-11 10:07:37",
                    "type": "SANCTION_CHECK",
                    "scoring": {
                        "type": "PersonSanctionedScoring",
                        "results": [],
                        "allResults": []
                    },
                    "clientFileDocumentId": 1255
                },
                {
                    "id": "057fe8a8-bfec-4bd4-adb7-2746b5773a77",
                    "status": "EXECUTED",
                    "lastRunDate": "2024-10-11 10:07:48",
                    "type": "EXPIRATION_CHECK",
                    "scoring": {
                        "type": "ExpiryDateScoring",
                        "score": "EXPIRED"
                    },
                    "clientFileDocumentId": 1255
                },
                {
                    "id": "1a14e3d4-0154-4e0e-8356-76eba251c0c1",
                    "status": "EXECUTED",
                    "lastRunDate": "2024-10-11 10:07:41",
                    "type": "MEDIA_CHECK",
                    "scoring": {
                        "type": "MediaScoring",
                        "results": []
                    },
                    "clientFileDocumentId": 1255
                },
                {
                    "id": "fd74cc61-ecf0-43ef-ba6b-d033f618c8ef",
                    "status": "EXECUTED",
                    "lastRunDate": "2024-10-11 10:07:34",
                    "type": "PEP_CHECK",
                    "scoring": {
                        "type": "PepScoring",
                        "results": [],
                        "allResults": [
                     
                        ]
                    },
                    "clientFileDocumentId": 1255
                },
                {
                    "id": "09672d60-22fc-4a52-9ed0-848dc36a57db",
                    "status": "EXECUTED",
                    "lastRunDate": "2024-10-11 10:07:48",
                    "type": "MRZ_CHECK",
                    "scoring": {
                        "type": "MRZScoring",
                        "errors": [
                            "INVALID_MRZ_FOUND"
                        ],
                        "valid": false
                    },
                    "clientFileDocumentId": 1255
                },
                {
                    "id": "dfe39085-5606-4ebb-bad0-66dae47af562",
                    "status": "EXECUTED",
                    "lastRunDate": "2024-10-11 10:07:48",
                    "type": "FACE_MATCH_CHECK",
                    "scoring": {
                        "type": "FaceMatch",
                        "faceMatched": false,
                        "similarity": "0",
                        "comparedImageBase64": null,
                        "faceMatchVerificationType": "GOVERNMENT"
                    },
                    "clientFileDocumentId": 1255
                },
                {
                    "type": "DB_CHECK",
                    "scoring": {
                        "type": "PersonInfoScoring",
                        "id": 611,
                        "nni": "11111111111111",
                        "iDCardNumber": null,
                        "phoneNumber": null,
                        "firstNameMatchingScore": 100,
                        "lastNameMatchingScore": 100,
                        "dateOfBirthMatchingScore": 100,
                        "genderMatchingScore": 100,
                        "phoneNumberMatchingScore": 0,
                        "comparedWithRealData": true,
                        "rawData": "{}"// JSON containing the gov DB Data
                    },
                    "clientFileDocumentId": 1255
                }
            ]
        }
    ]
}
```

{% endcode %}

* **UnAuthorized**
* **Bad Request**

</details>

<details>

<summary>Retrieve all KYC or KYB verifications</summary>

<mark style="background-color:green;">GET v2/clients-files/?page=1\&startDate=yyyy-mm-dd\&endDate=yyyy-mm-dd</mark>

**Headers:**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): application/json

**Requests Params**

* **page**: An integer specifying the page number for pagination. The default value is `1`.
* **startDate** (required): The start date for the search query. It must be provided in the format `yyyy-mm-dd`.
* **endDate** (required): The end date for the search query. It must be provided in the format `yyyy-mm-dd`.

These parameters allow you to filter results by a specific date range and retrieve data in paginated format. The **startDate** and **endDate** parameters are mandatory and ensure that results fall within the specified date range.

**Request Body: N/A**

**Responses**

* Code: 200
* Body:

```json
{
    "content": [], // a list of Response of Retrieve a KYC or KYB Analysis Result v2 (above)
    "pageNumber": 1,
    "pageSize": 10,
    "totalElements": 0,
    "totalPages": 0,
    "last": true,
    "first": false
}

```

</details>

<details>

<summary>Retrieve a KYC or KYB Analysis Result By ExternalID</summary>

<mark style="background-color:green;">GET /v2/clients-files/by-external-id/{externalId}</mark>

externalId: is the id you provided

**Headers:**

* &#x20;Api-Key (required): provided by Danaya
* Api-Secret (required): provided by Danaya
* Content-Type (required): application/json

**Request Body: N/A**

**Responses**

* **OK**
  * Code: 200
  * Body:

```json

{
    "id": 962,
    "createdAt": "2024-10-11 10:07:25",
    "clientFileToAnalyzeId": "1671d906-73d7-4dc-86cc-21ebf8624e3c",
    "status": "A_TRAITER",
    "additionalData": {
      "additionalProp1": "string",
      "additionalProp2": "string",
      "additionalProp3": "string"
    },
    "externalId": "externalId1",
    "errors": [
        {
            "code": "DUPLICATED_EXTERNAL_IDS",
            "duplicatedExternalIds": [
                "externalId1",
                "externalId2"
            ]
        }
    ]
    "score": 0,
    "company": {
        "id": 1,
        "name": "Danaya",
        "verifications": [
            "MRZ_CHECK",
            "DB_CHECK",
            "EXPIRATION_CHECK",
            "PEP_CHECK",
            "FACE_MATCH_CHECK",
            "SANCTION_CHECK",
            "MEDIA_CHECK"
        ]
    },
    "documents": [
        {
            "id": 1256,
            "type": "SELFIE",
            "frontUrl": "url",
            "verificationResults": []
        },
        {
            "id": 1255,
            "type": "CARTE_RESIDENT",
            "frontUrl": "url",
            "backUrl": "url",
             "ocrExtractedData": {
                "mrz": "",
                "nni": "11111111111",
                "image": null,
                "state": null,
                "gender": "M",
                "height": "1,75",
                "message": null,
                "ocr_raw": null,
                "last_name": "",
                "first_name": "name",
                "profession": "NAME",
                "father_name": null,
                "mother_name": null,
                "nationality": "",
                "country_code": null,
                "date_of_birth": "dd/mm/yyyy",
                "document_code": "",
                "place_of_birth": "",
                "document_expiry": "dd/mm/yyyy",
                "document_number": "",
                "father_birthday": null,
                "mother_birthday": null,
                "personal_number": null,
                "permanent_address": null,
                "date_of_birth_yyyy_mm_dd": null,
                "document_expiry_yyyy_mm_dd": null
            },
            "verificationResults": [
                {
                    "id": "ff0226d1-9f0e-4d21-b49e-40e9c442ccf0",
                    "status": "EXECUTED",
                    "lastRunDate": "2024-10-11 10:07:37",
                    "type": "SANCTION_CHECK",
                    "scoring": {
                        "type": "PersonSanctionedScoring",
                        "results": [],
                        "allResults": []
                    },
                    "clientFileDocumentId": 1255
                },
                {
                    "id": "057fe8a8-bfec-4bd4-adb7-2746b5773a77",
                    "status": "EXECUTED",
                    "lastRunDate": "2024-10-11 10:07:48",
                    "type": "EXPIRATION_CHECK",
                    "scoring": {
                        "type": "ExpiryDateScoring",
                        "score": "EXPIRED"
                    },
                    "clientFileDocumentId": 1255
                },
                {
                    "id": "1a14e3d4-0154-4e0e-8356-76eba251c0c1",
                    "status": "EXECUTED",
                    "lastRunDate": "2024-10-11 10:07:41",
                    "type": "MEDIA_CHECK",
                    "scoring": {
                        "type": "MediaScoring",
                        "results": []
                    },
                    "clientFileDocumentId": 1255
                },
                {
                    "id": "fd74cc61-ecf0-43ef-ba6b-d033f618c8ef",
                    "status": "EXECUTED",
                    "lastRunDate": "2024-10-11 10:07:34",
                    "type": "PEP_CHECK",
                    "scoring": {
                        "type": "PepScoring",
                        "results": [],
                        "allResults": [
                     
                        ]
                    },
                    "clientFileDocumentId": 1255
                },
                {
                    "id": "09672d60-22fc-4a52-9ed0-848dc36a57db",
                    "status": "EXECUTED",
                    "lastRunDate": "2024-10-11 10:07:48",
                    "type": "MRZ_CHECK",
                    "scoring": {
                        "type": "MRZScoring",
                        "errors": [
                            "INVALID_MRZ_FOUND"
                        ],
                        "valid": false
                    },
                    "clientFileDocumentId": 1255
                },
                {
                    "id": "dfe39085-5606-4ebb-bad0-66dae47af562",
                    "status": "EXECUTED",
                    "lastRunDate": "2024-10-11 10:07:48",
                    "type": "FACE_MATCH_CHECK",
                    "scoring": {
                        "type": "FaceMatch",
                        "faceMatched": false,
                        "similarity": "0",
                        "comparedImageBase64": null,
                        "faceMatchVerificationType": "GOVERNMENT"
                    },
                    "clientFileDocumentId": 1255
                },
                {
                    "type": "DB_CHECK",
                    "scoring": {
                        "type": "PersonInfoScoring",
                        "id": 611,
                        "nni": "11111111111111",
                        "iDCardNumber": null,
                        "phoneNumber": null,
                        "firstNameMatchingScore": 100,
                        "lastNameMatchingScore": 100,
                        "dateOfBirthMatchingScore": 100,
                        "genderMatchingScore": 100,
                        "phoneNumberMatchingScore": 0,
                        "comparedWithRealData": true,
                        "rawData": "{}"// JSON containing the gov DB Data
                    },
                    "clientFileDocumentId": 1255
                }
            ]
        }
    ]
}

```

* **UnAuthorized**
* **Bad Request**

</details>


# SDK

Coming soon


# JS

Not Yet Available.

Contact us if you are interested&#x20;


# Java / Kotlin

Not Yet Available.

Contact us if you are interested&#x20;


# Python

Not Yet Available.

Contact us if you are interested&#x20;


# No-Code

Coming soon


# Danaya Forms

Coming Soon


# WebView or iFrame

## 📥 Integration URL

Your integration URL should follow this structure:

```
https://{baseUrl}/v2/onboarding/{uuid}?product=productName&externalId=xxxxxx&partnerName=companyName&type=kyc
```

Parameters:

<table><thead><tr><th>parameters</th><th>Description</th><th width="116.6953125">required</th></tr></thead><tbody><tr><td>uuid</td><td>Unique identifier for the onboarding session, provided by Danaya.</td><td>yes</td></tr><tr><td>product</td><td>The product type</td><td>yes</td></tr><tr><td>type</td><td>The onboarding type: kyc (individual) or kyb (business).</td><td>yes</td></tr><tr><td>externalId</td><td>Your internal user ID — used to match this onboarding session with your user.</td><td>yes</td></tr><tr><td>partnerName</td><td>Your partner identifier — used to verify your access.</td><td>yes</td></tr><tr><td>baseUrl</td><td>prod:app.danaya.africa<br>demo: demo.danaya.africa</td><td>yes</td></tr></tbody></table>

## ✅ Completion Callback

Once the user completes (or cancels) the onboarding flow, we redirect to:

```
https://{baseUrl}/v2/onboarding/end?isSuccess=true&requestId=uuid-verfication-request
```

| parameters | Description                                                                                                                                                                                                                                   |   |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - |
| isSuccess  | **true** is the documents are sent successfully and **false** if not                                                                                                                                                                          |   |
| requestId  | <p>the file-verification-uuid. This will allow you to fetch the documents verification results.<br><br>See this <a href="/documentation/integration-mode/rest-api/retrieve-document-verification-result">page</a> to how to use this id. </p> |   |

## Optional: JavaScript Event

We can also emit a JavaScript event if you’re embedding in an iframe:

```
window.addEventListener("message", (event) => {
  if (event.data === "danaya:onboarding:complete") {
    // Close iframe or take appropriate action
    // do something with event.payload...
  }
});
```

Let us know if you’d like to use this event-based approach.

## 📄 Required Documents

Depending on the onboarding type (kyc or kyb), the user will need to provide specific documents:<br>

**KYC (Individual)**

* Selfie (required)

One of the following:

* National ID (CNI)
* Resident Permit
* Passport

**KYB (Business)**

* Selfie (required)

One of the following:

* National ID (CNI)
* Resident Permit
* Passport

And company document

* RCCM (required)
* DFE (optional)

## 📡 Verification Results

#### 1. Webhook

* We will send verification results to the webhook URL you provided during onboarding setup.

#### 2. API Access

* You can retrieve the verification results using either:
  * The requestId returned upon form submission [here](/documentation/integration-mode/rest-api/retrieve-document-verification-result#retrieve-a-kyc-or-kyb-analysis-result-v2)
  * The externalId you used during initialization [here](/documentation/integration-mode/rest-api/retrieve-document-verification-result#retrieve-a-kyc-or-kyb-analysis-result-by-externalid)

## 🔁 Handling Duplicates

* You can safely initiate multiple onboarding sessions using the same externalId.
* When retrieving verification results by externalId, we will return only the most recent verification associated with it.

#### 🚫 If a document is reused under a different externalId:

If a user uploads the same identity document with a new externalId, we will return an error when you try to retrieve the results:

```json
{
  "code": "DUPLICATED_EXTERNAL_IDS",
  "duplicatedExternalIds": [
    "externalId-1",
    "externalId-2"
  ]
}
```

This indicates that the same document has already been processed under different externalIds.

##

## ❓Questions ?

If you have any questions or need help with the integration, please reach out to our team at <support@danaya.africa>.


# Webhook

Certain notifications can be sent to you via webhook

We can send a notification to your systems through a URL that you will need to provide us. The different use cases for notification are listed below. If you identify any additional cases, do not hesitate to contact us so we can determine whether it is possible for us to notify you in those cases.

* **End of KYC/KYB Processing or Change of Client File Status**

You have to set up an POST endpoint something like this&#x20;

**POST** **/your-end-point**

give us the full url of the endpoint and be prepare to receive a payload like this:

<details>

<summary>Webhook to receive file receive confirmation</summary>

WebHook Message Type: **DOCUMENT\_TO\_ANALYSE\_RECEIVED**

```json
{
    "webhookId": "webhook-uuid-789",
    "companyId": 123,
    "messageType": "DOCUMENT_TO_ANALYSE_RECEIVED",
    "timestamp": "2025-10-17T10:30:00Z",
    "payload": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "externalId": "EXT-FILE-2025-001234",
        "createdAt": "2025-10-17T10:30:00Z",
        "danaDropId": "9b2e8450-a12c-41d4-b716-556677889900",
        "additionalData": {
            "source": "mobile_app"
        },
        "documents": [
            {
                "id": "a1b2c3d4-e5f6-4a5b-8c9d-0e1f2a3b4c5d",
                "type": "CNI",
                "filesToAnalyse": [
                    {
                        "id": "f1e2d3c4-b5a6-7c8d-9e0f-1a2b3c4d5e6f",
                        "documentName": "cni_front.pdf"
                    },
                    {
                        "id": "g2f3e4d5-c6b7-8d9e-0f1a-2b3c4d5e6f7g",
                        "documentName": "cni_back.pdf"
                    }
                ]
            }
        ]
    }
}
```

</details>

<details>

<summary>Webhook to receive document verification results</summary>

WebHook Message Type: ANALYSIS\_RESULT

```json
{ 
  "webhookId": "webhook-uuid-123", 
  "companyId": 123, 
  "messageType": "ANALYSIS_RESULT", 
  "timestamp": "2025-10-17T11:45:00Z", 
  "payload": { 
    "id": 456, 
    "createdAt": "2025-10-17T10:30:00Z", 
    "status": "ANALYZED", 
    "company": { 
      "id": 123, 
      "name": "Entreprise ABC" 
    }, 
    "documents": [ 
      { 
        "id": 1001, 
        "type": "CNI", 
        "ocrExtractedData": { 
          "documentNumber": "CI123456789", 
          "firstName": "Jean", 
          "lastName": "Dupont" 
        }, 
        "score": 0.95 
      } 
    ], 
    "score": 0.94 
  } 
} 
```

</details>

<details>

<summary>Webhook to receive document status change</summary>

WebHook Message Type: CLIENT\_FILE\_STATUS\_CHANGED

```json
{ 
"webhookId": "webhook-uuid-456", 
"companyId": 123,
 "messageType": "CLIENT_FILE_STATUS_CHANGED", 
 "timestamp": "2025-10-17T12:15:00Z", 
 "payload": { "id": 456, "status": "VALIDER", "score": 0.94 } 
 } 
```

</details>

<details>

<summary>Webhook to receive document verification retry</summary>

WebHook Message Type: RETRY\_DOCUMENT\_VERIFICATION

```json
{
    "webhookId": "webhook-uuid-999",
    "companyId": 123,
    "messageType": "RETRY_DOCUMENT_VERIFICATION",
    "timestamp": "2025-10-17T11:45:00Z",
    "payload": {
        "id": 456,
        "createdAt": "2025-10-17T10:30:00Z",
        "status": "IN_PROGRESS",
        "company": {
            "id": 123,
            "name": "Entreprise ABC"
        },
        "documents": [
            {
                "id": 1001,
                "type": "CNI",
                "verificationResults": [
                    {
                        "verificationType": "FACE_MATCH",
                        "status": "RETRY",
                        "confidence": 0.72,
                        "attempt": 2
                    }
                ],
                "score": 0.84
            }
        ],
        "errors": [
        ],
        "score": 0.86,
        "externalId": "EXT-CLIENT-789"
    }
}
```

</details>

* Expired or Near-Expiration Identification Document (To Be Defined)


