Manuales Técnicos
SERVICIOS REST
solución de Identificación & Servicios Biométricos
Manual | Código TE-MT-002 |
Versión: 3.3 |
|
Fecha emisión 06/10/2022 |
Titulo Integración servicios REST |
||
Elaborado por: Camilo García |
Revisado por: Ingrid Mercado |
Aprobado por: Oscar castañeda |
VERSIÓN | FECHA EMISIÓN | DESCRIPCIÓN DE CAMBIOS |
---|---|---|
3.2 | 6 de octubre de 2022 | Versionamiento del documento |
3.3 | 14 de octubre de 2022 | La validación del SDKVersion sale por el código 400 en el DocumentBackSide y la validación del producto solo sale por código 404 en el CustomerVerification |
GET SERVICES
VALIDATION
GET web service that allows querying a transaction by specifying its unique identifier.
Name | Validation |
---|---|
URL | {URL_Base}/api/{ProjectName}/Validation/{id} |
TYPE | GET |
Name | Data Type | Parameter Type | Required | Description |
---|---|---|---|---|
ProjectName | String | Path | Yes | The assigned project name |
apiKey | String | Header | Yes | The key assigned to the project |
id | Int | path | Yes | The unique identifier of the transaction to be queried |
returnImages | Boolean | query | Yes | Determines whether images are returned in the query |
returnDocuments | boolean | header | Yes | Parameter that determines whether signed documents are returned or not. |
returnVideoLiveness | boolean | header | Yes | Parameter that determines whether the Liveness video will be returned in Base64 format. |
Authorization | string | header | No | Access token |
Code | Response | Description |
---|---|---|
401 | client not authorized to make requests The api key value is required Authorization is required to use this method |
The ApiKey, ProjectName, or DocType parameter is incorrect. |
404 | The specified project was not found Transaction not found |
There are no records for the pair of document type and number, and the condition of a successful process. |
200 | Response Object Description | JSON-formatted object containing the information of the queried transaction. |
500 | An error has occurred, please check the error and try again. |
The Images field displays ImageTypeId, which are described in 'RESPONSE DICTIONARY IMAGES'; in the same array, the Liveness video is returned.
FINDBYNUMBERID
GET web service that returns the last case for the specified client.
Name | FindByNumberId |
---|---|
URL | {URL_Base}/api/{ProjectName}/FindByNumberId |
TYPE | GET |
Name | Data Type | Parameter Type | Required | Description |
---|---|---|---|---|
ProjectName | String | Path | Yes | The assigned project name |
apiKey | String | Header | Yes | The key assigned to the project |
identification | String | query | Yes | The customer's identification number |
docType | String | query | Yes | Document type to be queried |
returnImages | Boolean | query | Yes | Determines whether the images of the transaction will be returned. |
Authorization | string | header | No | Access token |
Code | Response | Description |
---|---|---|
401 | ApiKey or Project or DocType not valid | The ApiKey, ProjectName, or DocType parameter is incorrect. |
404 | Client not found. | There are no records for the pair of document type and number. |
200 | { "Uid": "string", "StartingDate": "string", "CreationDate": "string", "CreationIP": "string", "DocumentType": 0, "IdNumber": "string", "FirstName": "string", "SecondName": "string", "FirstSurname": "string", "SecondSurname": "string", "Gender": "string", "BirthDate": "string", "Street": "string", "CedulateCondition": "string", "Spouse": "string", "Home": "string", "MaritalStatus": "string", "DateOfIdentification": "string", "DateOfDeath": "string", "MarriageDate": "string", "Instruction": "string", "PlaceBirth": "string", "Nationality": "string", "MotherName": "string", "FatherName": "string", "HouseNumber": "string", "Profession": "string", "TransactionType": 0, "TransactionTypeName": "string", "IssueDate": "string", "BarcodeText": "string", "OcrTextSideOne": "string", "OcrTextSideTwo": "string", "SideOneWrongAttempts": 0, "SideTwoWrongAttempts": 0, "FoundOnAdoAlert": false, "AdoProjectId": "string", "TransactionId": "string", "ProductId": "string", "ComparationFacesSuccesful": false, "FaceFound": false, "FaceDocumentFrontFound": false, "BarcodeFound": false, "ResultComparationFaces": 0, "ComparationFacesAproved": false, "Extras":{ "IdState": "string", "StateName": "string" }, "NumberPhone": "string", "CodFingerprint": "string", "ResultQRCode": "string", "DactilarCode": "string", "ResponseControlList": "string", "Images":[ { "Id": int, "ImageTypeId": "String", "ImageTypeName: "String", "Image": "Imagen base 64", } ], "SignedDocuments": ["String"], "Scores":[ { "Id": 0, "StateName": "string", "StartingDate": "string", "Observation": "string" } ], "Parameters": "String", "StateSignatureDocument":"String" } |
JSON-formatted object containing the information of the queried transaction. |
The Images field displays ImageTypeId and ImageTypeName, which are described in 'RESPONSE DICTIONARY IMAGES'.
FINDBYNUMBERIDSUCCESS
Endpoint that returns the most recent case with a rating of 'Satisfactory Process', which corresponds to code 2, for the queried document.
Name | FindByNumberIdSuccess |
---|---|
URL | {URL_Base}/api/{ProjectName}/FindByNumberIdSuccess |
TYPE | GET |
Name | Data Type | Parameter Type | Required | Description |
---|---|---|---|---|
ProjectName | String | Path | Yes |
The assigned project name |
apiKey | String | Header | Yes |
The key assigned to the project |
identification | String | query | Yes |
The client's identification number |
doctype | Integer ($int32) | query | Yes |
The type of document to be queried |
returnImages | Boolean | query | Yes |
Indicates whether the transaction images will be returned |
Authorization | string | header | No |
Access token |
Enrol | Boolean | query | No |
This parameter indicates whether the process will be queried with enrollment or not; this depends on the site configuration and whether enrollment is enabled |
The 'Images' field displays 'ImageTypeId' and 'ImageTypeName', which are described in the 'Images Response Dictionary'
IDENTIFICATIONTYPES
GET web service that returns all identification types defined in the application
Name | FindByNumberId |
---|---|
URL | {URL_Base}/api/{ProjectName}/IdentificationTypes |
TYPE | GET |
Name | Data Type | Parameter Type | Required | Description |
---|---|---|---|---|
ProjectName | String | Path | Yes | The assigned project name |
apiKey | String | Header | Yes | The key assigned to the project |
Authorization | string | Header | No | Access token |
Code | Response | Description |
---|---|---|
200 | { "Id": int, "IdentitificationName": "String", "Active": boolean, "Locked": boolean, "ActiveDescription": "String", "LockedDescription": "String" } |
JSON-formatted object containing the information of the queried transaction. |
The document type ID can be found in 'DOCUMENT DICTIONARY'.
TEMPLATES
GET web service that returns the templates by enrolled identification in the application.
Name | Templates |
---|---|
URL | {URL_Base}/api/{ProjectName}/Templates |
TYPE | GET |
Name | Data Type | Parameter Type | Required | Description |
---|---|---|---|---|
ProjectName | String | Path | Yes | The assigned project name |
apiKey | String | Header | Yes | The key assigned to the project |
DocumentType | Integer | Query | Yes | Number of the registered document type in the platform. |
IdentificationNumber | String | Query | Yes | Identification number |
Authorization | string | Header | No | Access token. |
Code | Response | Description |
---|---|---|
200 | { IdentificationTypeId: Integer, IdentificationType: "String", IdentificationNumber: "String", FirstName: "String", SecondName: "String", FirstSurname: "String", SecondSurname: "String", Gender: "String", Templates: [ TemplateType: "String", Template: "String", ] } |
JSON-formatted object containing the information of the queried transaction. |
401 | ApiKey or Project or Authorization not valid | The ApiKey, ProjectName, or Authorization field is incorrect. |
404 | Customer not Found | Identification number not enrolled in the platform. |
The TemplateType field has two options: 'FaceTemplate,' which corresponds to the enrolled face template, and 'FingerTemplate,' which corresponds to the fingerprint template that is enrolled when fingerprint reading applies.
RISKCLASIFICATION
GET web service that returns the risk levels per configured transaction.
Name | Templates |
---|---|
URL | {URL_Base}/api/Integration/GetRiskClassification |
TYPE | GET |
Code | Response | Description |
---|---|---|
200 | { Id: Int, From: Int, To: Int } |
"JSON-formatted object containing the information of the configured risk levels. Each risk level includes the following three parameters. |
This would be an example of how risk levels could be configured in the platform. Intervals cannot overlap; each new ID must respect the value of X+1.
Id | From | To |
---|---|---|
1 | $0 | $1.000.000 |
2 | $1.000.001 | $15.000.000 |
3 | $15.000.001 | $50.000.000 |
4 | $50.000.001 | $100.000.000 |
POST Services
GET TOKEN
This service should only be consumed when OAuth is active in the application. It generates a token to consume the other services.
PARAMETER | TYPE | MEDIUM | DESCRIPTION |
---|---|---|---|
grant_type | String | FormData | Type of Authorization |
username | String | FormData | Username assigned by Ado for the token query. |
password | String | FormData | Password corresponding to the assigned user for the token query, must be in SHA-1 hash format. |
Example consumption:
1
|
curl -X POST "http://localhost:62859/api/token" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=password&username=username&password=sha1password" |
Code | Description |
---|---|
200 | JSON object containing the token and other fields described in the RESPONSE FIELDS table |
400 | unsupported_grant_type The user name or password is incorrect. |
Field Name | TYPE | DESCRIPTION |
---|---|---|
access_token | String | El token emitido. |
token_type | String | Tipo de token generado. |
expires_in | Int | Tiempo de vigencia del token en minutos. |
issued | String | Fecha y hora de emisión de emisión del token. |
expires | String | Fecha y hora de vencimiento del token. |
Example response:
1
2
3
4
5
6
7
|
{ "access_token" : "laK8SdjrKUAN7ja4SicUS-mL8eNWW74OTU2ZmSzjABLCGUgZknEifQkNtd5F20pBQiWvDpVwda9Bf31hB-mnzJLWmuKYY1sygHT37RQGI3Ym1HkLHwduutHwze2m9ZSBWCSV9NgOjO5Zd0Rcl9eexjFOS7cR6lOIZxxu31rLI_mHMbgtdSMAG-gToiHkgeXw6zbYjVaO1IzKMDjczyLZuvlYOfKNiJeh-3XbfjRxUy0" , "token_type" : "bearer" , "expires_in" : 59, ".issued" : "Mon, 27 Jul 2020 20:38:24 GMT" , ".expires" : "Mon, 27 Jul 2020 20:39:24 GMT" } |