> For the complete documentation index, see [llms.txt](https://lumin-soft.gitbook.io/ekyc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lumin-soft.gitbook.io/ekyc/integration-throw-api/onboarding-api/5-national-id-scan.md).

# #5 National Id Scan

## #5.1 Select National Id Step (True)  :

This API is only required when the national id or passport configuration is enabled .

If you enable the **National ID** or **Passport** option in the **Personality Confirmation** section of the **Organization Configuration**, then during the onboarding process you must specify the type of document you want to use for onboarding — either **National ID** or **Passport**.

## POST /Onboarding/api/v1/onboarding/Request/SelectNationalIdStep/{isNationalID}

>

```json
{"openapi":"3.0.1","info":{"title":"eKYC Onboarding APIs (Local Env.)","version":"1.0"},"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"CustomException":{"type":"object","properties":{"message":{"type":"string","nullable":true,"description":"Error description message"},"errorCode":{"type":"string","nullable":true,"description":"Error Code"}},"additionalProperties":false}}},"paths":{"/Onboarding/api/v1/onboarding/Request/SelectNationalIdStep/{isNationalID}":{"post":{"tags":["Request"],"parameters":[{"name":"isNationalID","in":"path","required":true,"description":"True if onboarding using National Id, false if passport","style":"simple","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Success"},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomException"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomException"}}}}}}}}}
```

## #5.2 Upload National Id Front Image :

This API is to upload front-side image of National Id.

## POST /Onboarding/api/v1/onboarding/NationalId/UploadFrontImage

>

```json
{"openapi":"3.0.1","info":{"title":"eKYC Onboarding APIs (Local Env.)","version":"1.0"},"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"UploadDocumentDto":{"type":"object","required":["image"],"properties":{"image":{"type":"string","nullable":false,"description":"This attribute is base64 front-side, back-side or passport image."}},"additionalProperties":false},"DocumentScanResultDto":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"message":{"type":"string","nullable":true},"errorCode":{"type":"string","nullable":true},"customerData":{"$ref":"#/components/schemas/GetCustomerDataDto"}},"additionalProperties":false},"GetCustomerDataDto":{"type":"object","properties":{"customerId":{"type":"string","nullable":true,"description":"Client unique identifier."},"idFrontScan":{"type":"string","nullable":true,"description":"National Id detected at front-side image."},"idBackScan":{"type":"string","nullable":true,"description":"National Id detected at back-side image."},"photo":{"type":"string","nullable":false,"description":"Path of detected client image at national Id front-side."},"fullName":{"type":"string","nullable":false,"description":"Arabic full name of client."},"fullNameEn":{"type":"string","nullable":true,"description":"English full name of client."},"firstName":{"type":"string","nullable":false,"description":"Arabic first name of client."},"firstNameEn":{"type":"string","nullable":true,"description":"English first name of client."},"familyName":{"type":"string","nullable":false,"description":"Arabic family name of client."},"familyNameEn":{"type":"string","nullable":true,"description":"English family name of client."},"address":{"type":"string","nullable":false,"description":"Address of client."},"state":{"type":"string","nullable":false,"description":"Address state of client."},"birthdate":{"type":"string","format":"date-time","nullable":false,"description":"Birthdate of client."},"idNumber":{"type":"string","nullable":false,"description":"National ID number of client."},"idNumberBack":{"type":"string","nullable":true,"description":"National Id number detected at back-side of national Id."},"documentNumber":{"type":"string","nullable":true,"description":"Factory number detected at front-side of national Id."},"documentTypeId":{"type":"string","nullable":true,"description":"Documet type detected at while scanning. Can be Identity-type or passport"},"documentTypeCode":{"type":"string","nullable":true,"description":"Documet type code detected at while scanning. Can be Identity-type or passport (EGY)"},"issueDate":{"type":"string","format":"date-time","nullable":true,"description":"Issue date of national Id card."},"profession":{"type":"string","nullable":true,"description":"Job detected at national Id card."},"maritalStatus":{"type":"string","nullable":true,"description":"Marital status detected at national Id card."},"religion":{"type":"string","nullable":true,"description":"Relegious detected at national Id card."},"gender":{"type":"string","nullable":true,"description":"Gender detected at national Id card."},"nationality":{"type":"string","nullable":true,"description":"Nationality code of client (egy)."},"detectedAge":{"type":"integer","format":"int32","description":"Detected age from client photo."},"detectedGender":{"type":"string","nullable":true,"description":"Detected gender from client photo."},"expirationDate":{"type":"string","format":"date-time","nullable":true,"description":"National id card expiration date."}},"additionalProperties":false},"CustomException":{"type":"object","properties":{"message":{"type":"string","nullable":true,"description":"Error description message"},"errorCode":{"type":"string","nullable":true,"description":"Error Code"}},"additionalProperties":false}}},"paths":{"/Onboarding/api/v1/onboarding/NationalId/UploadFrontImage":{"post":{"tags":["NationalId"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadDocumentDto"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentScanResultDto"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomException"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomException"}}}}}}}}}
```

## #5.3 Upload National Id Back Image :

This API is to upload back-side image of National Id.

## POST /Onboarding/api/v1/onboarding/NationalId/UploadBackImage

>

```json
{"openapi":"3.0.1","info":{"title":"eKYC Onboarding APIs (Local Env.)","version":"1.0"},"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"UploadDocumentDto":{"type":"object","required":["image"],"properties":{"image":{"type":"string","nullable":false,"description":"This attribute is base64 front-side, back-side or passport image."}},"additionalProperties":false},"DocumentScanResultDto":{"type":"object","properties":{"isSuccess":{"type":"boolean"},"message":{"type":"string","nullable":true},"errorCode":{"type":"string","nullable":true},"customerData":{"$ref":"#/components/schemas/GetCustomerDataDto"}},"additionalProperties":false},"GetCustomerDataDto":{"type":"object","properties":{"customerId":{"type":"string","nullable":true,"description":"Client unique identifier."},"idFrontScan":{"type":"string","nullable":true,"description":"National Id detected at front-side image."},"idBackScan":{"type":"string","nullable":true,"description":"National Id detected at back-side image."},"photo":{"type":"string","nullable":false,"description":"Path of detected client image at national Id front-side."},"fullName":{"type":"string","nullable":false,"description":"Arabic full name of client."},"fullNameEn":{"type":"string","nullable":true,"description":"English full name of client."},"firstName":{"type":"string","nullable":false,"description":"Arabic first name of client."},"firstNameEn":{"type":"string","nullable":true,"description":"English first name of client."},"familyName":{"type":"string","nullable":false,"description":"Arabic family name of client."},"familyNameEn":{"type":"string","nullable":true,"description":"English family name of client."},"address":{"type":"string","nullable":false,"description":"Address of client."},"state":{"type":"string","nullable":false,"description":"Address state of client."},"birthdate":{"type":"string","format":"date-time","nullable":false,"description":"Birthdate of client."},"idNumber":{"type":"string","nullable":false,"description":"National ID number of client."},"idNumberBack":{"type":"string","nullable":true,"description":"National Id number detected at back-side of national Id."},"documentNumber":{"type":"string","nullable":true,"description":"Factory number detected at front-side of national Id."},"documentTypeId":{"type":"string","nullable":true,"description":"Documet type detected at while scanning. Can be Identity-type or passport"},"documentTypeCode":{"type":"string","nullable":true,"description":"Documet type code detected at while scanning. Can be Identity-type or passport (EGY)"},"issueDate":{"type":"string","format":"date-time","nullable":true,"description":"Issue date of national Id card."},"profession":{"type":"string","nullable":true,"description":"Job detected at national Id card."},"maritalStatus":{"type":"string","nullable":true,"description":"Marital status detected at national Id card."},"religion":{"type":"string","nullable":true,"description":"Relegious detected at national Id card."},"gender":{"type":"string","nullable":true,"description":"Gender detected at national Id card."},"nationality":{"type":"string","nullable":true,"description":"Nationality code of client (egy)."},"detectedAge":{"type":"integer","format":"int32","description":"Detected age from client photo."},"detectedGender":{"type":"string","nullable":true,"description":"Detected gender from client photo."},"expirationDate":{"type":"string","format":"date-time","nullable":true,"description":"National id card expiration date."}},"additionalProperties":false},"CustomException":{"type":"object","properties":{"message":{"type":"string","nullable":true,"description":"Error description message"},"errorCode":{"type":"string","nullable":true,"description":"Error Code"}},"additionalProperties":false}}},"paths":{"/Onboarding/api/v1/onboarding/NationalId/UploadBackImage":{"post":{"tags":["NationalId"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadDocumentDto"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentScanResultDto"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomException"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomException"}}}}}}}}}
```

## #5.4 Approve National Id Front Image :

This API is to approve the OCR result data of front-side National Id.&#x20;

## POST /Onboarding/api/v1/onboarding/NationalId/ApproveFrontImage

>

```json
{"openapi":"3.0.1","info":{"title":"eKYC Onboarding APIs (Local Env.)","version":"1.0"},"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"ApproveNationalIdFrontDto":{"type":"object","properties":{"fullNameEn":{"type":"string","nullable":true,"description":"Client english full name.\n Attribute is used when translation feature was enabled from admin panel configuration.\n If the english full name has no changes you can pass the same value of OCR translated result.\n It is mandatory if trasnslate feature was enabled."},"firstNameEn":{"type":"string","nullable":true,"description":"Client english first name.\n Attribute is used when translation feature was enabled from admin panel configuration.\n If the english first name has no changes you can pass the same value of OCR translated result.\n It is mandatory if trasnslate feature was enabled."},"familyNameEn":{"type":"string","nullable":true,"description":"Client english family name.\n Attribute is used when translation feature was enabled from admin panel configuration.\n If the english family name has no changes you can pass the same value of OCR translated result.\n It is mandatory if trasnslate feature was enabled."}},"additionalProperties":false},"CustomException":{"type":"object","properties":{"message":{"type":"string","nullable":true,"description":"Error description message"},"errorCode":{"type":"string","nullable":true,"description":"Error Code"}},"additionalProperties":false}}},"paths":{"/Onboarding/api/v1/onboarding/NationalId/ApproveFrontImage":{"post":{"tags":["NationalId"],"parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApproveNationalIdFrontDto"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomException"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomException"}}}}}}}}}
```

## #5.5 Approve National Id Back Image :&#x20;

This API is to approve the OCR result data of back-side National Id.&#x20;

## POST /Onboarding/api/v1/onboarding/NationalId/ApproveBackImage

>

```json
{"openapi":"3.0.1","info":{"title":"eKYC Onboarding APIs (Local Env.)","version":"1.0"},"security":[{"JWT":[]}],"components":{"securitySchemes":{"JWT":{"type":"apiKey","description":"Please insert JWT with Bearer into field","name":"Authorization","in":"header"}},"schemas":{"CustomException":{"type":"object","properties":{"message":{"type":"string","nullable":true,"description":"Error description message"},"errorCode":{"type":"string","nullable":true,"description":"Error Code"}},"additionalProperties":false}}},"paths":{"/Onboarding/api/v1/onboarding/NationalId/ApproveBackImage":{"post":{"tags":["NationalId"],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"boolean"}}}},"400":{"description":"BadRequest","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomException"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomException"}}}}}}}}}
```
