Skip to main content

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.

PARAMETERS
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"

RESPONSES
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.

RESPONSE FIELDS:
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"
}

NEW

Sending a selfie to the server

Name New
Url {URL_Base}/api/integration/{projectName}/Validation/New
TYPE POST


PARAMETERS
Name Data Type Parameter Type Required Description
ProjectName String Query Yes The name of the associated project.
Apikey String Header Yes The key assigned to the project.
Authorization String Header No Access token.
transactionInfo Json Body Yes The data of the new transaction.


Specification of the transactionInfo field

Name Type Required Description
ProductId Int Yes Product number for the verified customer transaction.
CustomerPhoto String Yes Base64-encoded selfie image
DocumentType String No Document type ID, obtained by consuming the IDENTIFICATIONTYPES service. If it is not provided in the request, the default value assigned is Cédula de ciudadanía (ID 1).
Longitude String No Longitude of the location where the process takes place.
Latitude String No Latitude of the location where the process takes place.
IdAssociated String No Co-signer’s identification number
ClientRole String No Assigned role number for the platform
KeyProcessLiveness String No Liveness process key received during the selfie capture process
UIdDevice String No Character string that defines and identifies the device from which the request is made
IdUser String No ID registered on the ADO platform for the user making the service request
SourceDevice Integer No Number that identifies the type of device: 1 for Web, 2 for Android, and 3 for iOS.
SdkVersion string No Build or SDK version number being used, which can be found in the repository's ChangeLog.
OS string No Type of operating system from which the service is being consumed
BrowserVersion string No If the OS field is set to Web, the browser version used is sent.
IMEI string No IMEI of the mobile device consuming the service
RiskId string No Risk classification ID
Uid String No Transaction identification number. If this is the first service call, the service will return a UID that must be sent in all subsequent service requests until the Close service is executed. If a UID already exists, it must be included to associate the uploaded images with the same transaction.


RESPONSES
Code Description
200 The transaction has been successfully initiated. An object is returned containing information associated with it.
201 The face being validated is already enrolled. An object is returned containing information about the created transaction, including the unique transaction number.
400 The type of document not is valid

The risk ID is not valid

The risk ID is not valid 

The risk ID must be an integer

Document type is not active
401 The api key value is required
Api Key not valid
Can't found User with specified credentials
Can't found specified Source Device
404 The specified project was not found
406 The facial photograph does not meet the expected criteria. This may be due to the face in the image having glasses, an open mouth, or a blink..
Base64 not valid.
Image not valid.
500 An error has occurred. Please check the error and try again.

DOCUMENTBACKSIDE

Allows uploading the back side of an identity document.

Name DocumentBackSide
Url {URL_Base}api/integration/{projectName}/
Validation/Images/DocumentBackSide
TYPE POST


PARAMETERS
Name Data Type Parameter Type Required Description
ProjectName String Query Yes The name of the associated project
Apikey String Header Yes The key assigned to the project
Authorization String Header No Access token
sideTwoInfo Json Body Yes The data of the new transaction


Specification of the sideTwoInfo field

Name Type Required Description
Image String Yes Image of the back side of the document in Base64 format
DocumentType String No Document type ID, obtained by consuming the IDENTIFICATIONTYPES service. If this field is not provided, the system will default to assigning “Cédula de ciudadanía” (ID 1) as the document type.
UIdDevice String No String that defines and identifies the device from which the request is made.
SourceDevice Integer No Number that identifies the device type, with values of 1 for Web, 2 for Android, and 3 for iOS.
SdkVersion string No Build or SDK version number being used, which can be found in the repository's ChangeLog.
OS string No Type of operating system from which the service is being consumed
BrowserVersion string No If the OS field is set to Web, the browser version used is sent.
TransactionType string No Transaction type ID
ProductId string No Product number for the transaction
Uid String No Transaction identification number. If this is the first time the service is consumed, it will return a UID that must be sent in all subsequent service calls until the Close service is executed. If a UID already exists, it must be included to associate the uploaded images with the same transaction.
RiskId String No Risk classification ID


RESPONSES
Code Description
200 The transaction has been successfully initiated. An object containing information associated with it is returned. RESPONSE OBJECT DESCRIPTION
201 The client was previously registered. An object is returned containing information about the created transaction, including the unique transaction number.
400 The type of document not is valid
The specified transaction type was not found
Transaction type Id must be a valid integer
Document type is not active
Sdk Versión is not valid
401 The api key value is required
Api Key not valid
Can't found User with specified credentials
Can't found specified Source Device
404 The specified project was not found
406 Base64 not valid.
Image not valid.
500 An error has occurred. Please validate the error and try again.

FINGERPRINT

Allows uploading the fingerprint image

Name Fingerprint
Url {URL_Base}api/integration/{projectName}/
Validation/Images/Fingerprint
TYPE POST


PARAMETERS
Name Data Type Parameter Type Required Description
ProjectName String Query Yes The name of the associated project
Apikey String Header Yes The key assigned to the project
Authorization String Header No Access token
fingerInfo Json Body Yes The image encoded in Base64


Specification of the fingerInfo field

Name Type Required Description
Image String Yes Image of the front of the document in Base64 format
DocumentType String Yes

Document Type Number:

  1. Citizenship ID (Cédula de Ciudadanía)

  2. PEP with passport only

  3. Foreigner ID (Cédula de Extranjería)

  4. Identity Card (Tarjeta de Identidad)

FingerType int Yes Fingerprint enumerator, possible values: (1, 2)
Uid String Yes Transaction identification number. If this is the first time the service is consumed, it will return a UID that must be sent in all subsequent service calls until the Close service is executed. If a UID already exists, it must be included to link the uploaded images to the same transaction.
RiskId String No Risk identifier


RESPONSES
Code Description
200 The fingerprint has been successfully uploaded and the transaction information has been updated.
400 The provided data does not match the expected criteria
401 The authorization process was not successful. Please validate the project code and/or the API Key.
403 The fingerprint photograph is not valid for biometric extraction.
404 The project code and/or the specified UID does not exist.
500 An error has occurred. Please validate the provided ID number to obtain more details.

CLOSE

Allows finalizing the current transaction. Assigns a unique transaction number

Name Close
Url {URL_Base}/api/Integration/{projectName}/Validation/Close
TYPE POST


PARAMETERS
Name Data Type Parameter Type Required Description
ProjectName String Query Yes The name of the associated project
Apikey String Header Yes The key assigned to the project
Authorization String Header No Access token
info Json Body Yes The information required to close the transaction


Specification of the info field

Name Type Required Description
Uid String Yes Transaction UID
RiskId String No Risk classification ID


RESPONSES
Code Description
200 The transaction has been successfully created. An object containing information associated with it is returned — RESPONSE OBJECT DESCRIPTION
400 The risk ID is not valid
The risk ID must be an integer.
401 The api key value is required
Api Key not valid
404 The specified project was not found<404>
500 An error has occurred. Please check the error and try again.

CHECKHEALTH

POST web service that returns the overall status of the platform. If everything is functioning correctly, the Messagefield in the response will have the value “Alive.”

Name CheckHealt
URL {URL_Base}/api/Integration/CheckHealt
TYPE POST


PARAMETERS
Name Data Type Parameter Type Required Description
ProjectName String query Yes The name of the associated project
apiKey String header Yes The key assigned to the project
authorization String header Yes Access token


RESPONSES
Code Response Description
200 {
"Code": "String",
"Message": "String"
}
JSON-formatted object containing information related to the platform status

DESCRIPTION OF THE RESPONSE OBJECT


Name Type Description
{
Uid String Transaction identification number
StartingDate String Date and time when the first required image for the validation process began transmitting to the server.
CreationDate String Date and time when the full set of images required for the validation process finished transmitting to the server.
CreationIP String IP address from which the identity validation process was performed
DocumentType Int

Document Type Number:

  1. Citizenship ID

  2. PEP with passport only

  3. Foreigner ID

  4. Identity Card

IdNumber int Identification number of the validated client
FirstName String First name of the verified client
SecondName String Second name of the verified client
FirstSurname String First surname of the verified client
SecondSurname String Second surname of the verified client
Gender String Gender of the verified client
BirthDate String Date of birth of the verified client in YYYY-MM-DD format, ignoring the time
Street String Address of the verified client
CedulateCondition String  
Spouse String  
Home String  
MaritalStatus String Marital status of the verified client
DateOfIdentification String Expiration date of the national ID card in routines that query Ecuador’s civil registry, only when the service is active to retrieve this information. This field uses the YYYY-MM-DD format, ignoring the time.
DateOfDeath String DateOfDeath.
MarriageDate String MarriageDate.
Instruction String  
PlaceBirth String Place of birth of the verified client
Nationality String Nationality of the verified client
MotherName String Mother's name of the verified client
FatherName String Father's name of the verified client
HouseNumber String  
Profession String Occupation of the verified client
ExpeditionCity String ExpeditionCity.
ExpeditionDepartment String ExpeditionDepartment.
BirthCity String BirthCity.
BirthDepartment String BirthDepartment.
TransactionType int Type of transaction performed
TransactionTypeName String Name of the type of transaction performed
IssueDate String Issuance date of the document presented by the verified client in YYYY-MM-DD format, ignoring the time
BarcodeText String  
OcrTextSideOne String Text extracted from the document capture by OCR (front side of the document)
OcrTextSideTwo String Text extracted from the document capture by OCR (back side of the document)
SideOneWrongAttempts int Number of failed attempts capturing the front side of the document
SideTwoWrongAttempts int Number of failed attempts capturing the back side of the document
FoundOnAdoAlert String Returns a boolean indicating whether alerts occurred on the ADO platform
AdoProjectId String Project number in the ADO platform
TransactionId String Transaction number for the client's certification
ProductId String Product number for the verified client’s transaction
ComparationFacesSuccesful boolean Returns a boolean indicating whether the face comparison was successful
FaceFound boolean Returns a boolean indicating whether a face was detected during the transaction
FaceDocumentFrontFound boolean Returns a boolean indicating whether a face was found in the document during the transaction
BarcodeFound boolean Returns a boolean indicating whether a barcode was detected during the transaction
ResultComparationFaces int Face comparison result
ResultCompareDocumentFaces int Face comparison result between document images
ComparationFacesAproved boolean Returns a boolean indicating whether the face comparison was approved
ThresholdCompareDocumentFaces int Returns an integer representing the configured comparison threshold
CompareFacesDocumentResult string CompareFacesDocumentResult.
"extras”: {  
IdState String Rating number for the transaction
StateName String Transaction rating
}  
NumberPhone String Phone number of the verified client
CodFingerprint String  
ResultQRCode String  
DactilarCode String  
ResponseControlList String  
Latitude String Latitude
Longitude String Longitude
"Images" : [{  
Id String Image identifier number
ImageTypeId String Image type ID
ImageTypeName String Image type name
Image String Base64 image
DownloadCode String Image download code
}],  
SignedDocuments String Array Array containing the list of digitally signed documents. These documents are returned in Base64 format and must be converted to PDF for viewing.
"Scores" : [{  
Id int Rating ID
UserName String  
StateName String Rating name
StartingDate String Date and time when transmission to the server began for the first image required in the validation process
Observation String Comments or observations about the transaction
}]  
"Response_ANI": {  
Niup String Identification number of the client consulted in the ANI
FirstSurname String First surname of the client consulted in the ANI
Particula String  
SecondSurname String Second surname from the document consulted in the ANI
FirstName String First name of the document consulted in ANI.
SecondName String Middle name of the document consulted in ANI.
ExpeditionMunicipality String Municipality of issuance of the document consulted in ANI.
ExpeditionDepartment String Department of issuance of the document consulted in ANI.
ExpeditionDate String Date of issuance of the document consulted in ANI.
CedulaState String  
}  
Parameters String Parameters sent by the client associated with the transaction (JSON format).
StateSignatureDocument String Indicate whether the documents associated with the transaction have been digitally signed.
}

GETFACIALFEATURES

Service responsible for extracting facial features and a face template; these features may include whether the user is wearing glasses, has their eyes closed, and other characteristics to be described below.

Name GetFacialFeatures
URL {URL_Base}/api/GetFacialFeatures
TYPE POST

PARAMETERS
Name Data Type Parameter Type Required Description
ProjectName String Query Yes The name of the associated project.
Apikey String Header Yes The key assigned to the project.
request Json Body Yes JSON format of the information required to consume the service.

Description of the REQUEST field

Field Name Data Type Required Description
Image String Yes Facial image in Base64 format
GetFeatures Boolean Yes Specifies whether to retrieve the features of the submitted image
GetTemplete Boolean Yes Specifies whether to retrieve the template of the submitted face


For the service to respond correctly, at least one of the fields in the request parameter—either GetFeatures or GetTemplate—must be set to true; otherwise, the response will be 400



SERVICE RESPONSES
Code Description
200 Process executed successfully:The request was received by the server. The response, in JSON format, is described below.
400 Data error, check the request data: los dos valores de los campos GetFeatures y GetTemplete son False.
500 Internal server error: Internal server error.

JSON Response Object
Code Response
200 {
 "Status": "SUCCESS",
 "Message": "string",
 "Response": {
    "lstResults":[
     {
      "BoundingRect_X": 0,
      "BoundingRect_Y": 0,
      "BoundingRect_Width": 0,
      "BoundingRect_Height": 0,
      "FeaturePoints": [
         {
           "Point_X": 0,
           "Point_Y": 0,
           "Confidence": 0,
           "Code": 0,
            "Name": "string"
         }
      ],
      "Age": 0,
      "Gender": "string",
      "GenderConfidence": 0,
      "Expression": "string",
      "ExpressionConfidence": 0,
      "Blink": true,
      "BlinkConfidence": 0,
      "MouthOpen": true,
      "MouthOpenConfidence": 0,
      "Glasses": true,
      "GlassesConfidence": 0,
      "DarkGlasses": true,
      "DarkGlassesConfidence": 0,
      "EmotionAngerConfidence": 0,
      "EmotionContemptConfidence": 0,
      "EmotionDisgustConfidence": 0,
      "EmotionFearConfidence": 0,
      "EmotionHappinessConfidence": 0,
      "EmotionNeutralConfidence": 0,
      "EmotionSadnessConfidence": 0,
      "EmotionSurpriseConfidence": 0,
      "EthnicityAsianConfidence": 0,
      "EthnicityBlackConfidence": 0,
      "EthnicityHispanicConfidence": 0,
      "EthnicityIndianConfidence": 0,
      "EthnicityWhiteConfidence": 0,
      "Template": "string"
     }
    ]
 },
 "data": {}
}


The Status field may return code 6, which corresponds to NO TEMPLATE. This means that the service was unable to obtain a facial template from the submitted image.



Example of service response.

Json Code Success
{
 "Status": 1,
 "Message": null,
 "Response": {
    "lstResults":[
     {
      "BoundingRect_X": 101,
      "BoundingRect_Y": 22,
      "BoundingRect_Width": 105,
      "BoundingRect_Height": 142,
      "FeaturePoints": [
         {
           "Point_X": 179,
           "Point_Y": 179,
           "Confidence": 98,
           "Code": 449,
            "Name": "LeftEyeCenter"
         }
      ],
      "Age": 23,
      "Gender": "Female",
      "GenderConfidence": 76,
      "Expression": "Unknown",
      "ExpressionConfidence": 24,
      "Blink": false,
      "BlinkConfidence": 77,
      "MouthOpen": false,
      "MouthOpenConfidence": 60,
      "Glasses": false,
      "GlassesConfidence": 30,
      "DarkGlasses": false,
      "DarkGlassesConfidence": 34,
      "EmotionAngerConfidence": 0,
      "EmotionContemptConfidence": 69,
      "EmotionDisgustConfidence": 0,
      "EmotionFearConfidence": 0,
      "EmotionHappinessConfidence": 12,
      "EmotionNeutralConfidence": 19,
      "EmotionSadnessConfidence": 0,
      "EmotionSurpriseConfidence": 0,
      "EthnicityAsianConfidence": 12,
      "EthnicityBlackConfidence": 4,
      "EthnicityHispanicConfidence": 2,
      "EthnicityIndianConfidence": 8,
      "EthnicityWhiteConfidence": 73,
      "Template": "String del templete"
     }
    ]
 },
 "data": null
}
1
{
 "Status": 6,
 "Message": "FACE_NOT_FOUND",
 "Response": null,
 "data": null
}
6

 

CUSTOMER VERIFICATION

This service must be consumed when the FindByNumberIdSuccess service returns a JSON response indicating a successful process and the verification method must be executed. This service records the transaction and requires the following parameters.

Name CustomerVerification
URL {URL_Base}/api/CustomerVerification
TYPE POST

PARAMETERS
Name Data Type Parameter Type Required Description
ProjectName String Query Yes The name of the associated project.
ApiKey String Header Yes The key assigned to the project.
Data Json Body Yes JSON format of the information required to consume the service.

Specification of the Data field.

Name Type Yes Description
DocumentType String No Document type ID.
IdentificationNumber String SiYes NumeroIdentification de identificaciónnumber.
Face String SiYes ImagenBase64-encoded enimage baseto 64be que se desea verificarverified.
FingerPrint String No ImagenBase64-encoded defingerprint laimage huellato enbe base 64 que se desea verificarverified.
longitude String No CordenadaLocation de la ubicacióncoordinate.
Latitude String No CordenadaLocation de la ubicacióncoordinate.
ProductId Integer No IdProduct deID productocorresponding queto correspondethe alverification proceso de verificación.process.
KeyProcessLiveness String No Llave del proceso de Liveness queprocess sekey devulevereturned alafter realizarcapturing lathe captura de la selfieselfie.
SourceDevice Integer No IdID deof correspondientethe adevice dispositivofrom dewhich dondethe seprocess estais realizandobeing elcarried proceso.out.
SdkVersion String No VersiónVersion delof Sdkthe queSDK sebeing esta usando.used.
OS String No VersionOperating delsystem sistema operativo.version.
BrowserVersion String No VersionBrowser delversion navegadorbeing que se esta usando.used.
UIdDevice String No CadenaCharacter destring caracteresthat quedefines defineand eidentifies identificathe eldevice dispositivofrom dewhich dondethe serequest haceis la petición.made.
IdUser String No IdID registradoregistered enin la plataformathe ADO delplatform usuarioof quethe realizauser lamaking peticiónthe delservice servicio.request.
IMEI string No IMEI delof dispositivothe movilmobile quedevice haceconsuming elthe consumo del servicio.service.
RiskId string No IdConfigured derisk riesgoID configuradoin enthe la plataforma.platform.

RESPUESTASRESPONSES
CódigoCode DescipciónDescription
200 LaThe transaccióntransaction hahas sidobeen creadasuccessfully exitosamente.created.
400 All fields are requiredrequired.
Face not validvalid.
The type of document not is validvalid.
ElThe Idrisk deID riesgois nonot esvalid.
The validorisk ID must be an integer.
El Id de riesgo debe ser un número entero
401 The api key value is required
Authorization is required to use this method
Can't found specified Source Device
Can't found User with specified credentials
404 The specified project was not found
The specified product was not found
Customer not Found
406 La fotografiaThe facial nophotograph cumpledoes connot losmeet criteriosthe esperados,expected puedecriteria; corresponderthis amay quebe eldue rostroto enviadothe tieneperson gafas,wearing bocaglasses, abierta,having oan parpadeo().open mouth, or blinking.

RESPUESTARESPONSE
CÓDIGOCODE RESPUESTARESPONSE DESCRIPCIÓNDESCRIPTION
200 DESCRIPCIÓNRESPONSE DELOBJECT OBJETO DE RESPUESTADESCRIPTION ObjetoJSON-formatted deobject formatocontaining JSONthe contransaction la información de la transacción.information.

 

CREATESIGNDOCUMENTSTRANSACTION

Service that creates a digital signature transaction. This service requests basic client information and the documents to be signed, which must be PDF files converted to Base64 format. The required parameters are as follows:

   PARAMETERS
NameData TypeParameter TypeRequiredDescription
ModelJsonBodyYesThe information required to close the transaction.
projectNameStringPathYesProject name.
apiKeyStringHeaderYesProject API key.
AuthorizationStringHeaderNoToken de acceso.

   PARAMETERS
NameData TypeRequiredDescription
IdentificationTypeStringYesIdentification type.
IdentificationNumberStringYesIdentification number.
FirstNameStringYesFirst name.
SecondNameStringNoMiddle name.
FirstSurnameStringYesFirst surname.
SecondSurnameStringNoSecond surname.
DocumentsString ArrayYesArray of PDF documents converted to Base64.

RESPONSE
CODERESPONSE`DESCRIPTION
200
     "Uid": "string",
     "StartingDate": "string",
     "CreationDate": "string",
     "CreationIP": "string",
     "DocumentType": "string",
     "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",
     "ExpeditionCity": "string",
     "ExpeditionDepartment": "string",
     "BirthCity": "string",
     "BirthDepartment": "string",
     "TransactionType": 0,
     "TransactionTypeName": "string",
     "IssueDate": "string",
     "BarcodeText": "string",
     "OcrTextSideOne": "string",
     "OcrTextSideTwo": "string",
     "SideOneWrongAttempts": 0,
     "SideTwoWrongAttempts": 0,
     "FoundOnAdoAlert": false,
     "AdoProjectId": "string",
     "TransactionId": "int",
     "ProductId": "string",
     "ComparationFacesSuccesful": false,
     "FaceFound": false,
     "FaceDocumentFrontFound": false,
     "BarcodeFound": false,
     "ResultComparationFaces": 0,
     "ComparationFacesAproved": false,
     "Extras":{
          "IdState": "string",
          "StateName": "Pendiente"
     },
     "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 transaction information. For more details, see the section RESPONSE OBJECT DESCRIPTION.

This service returns the status as ‘Pending’ for the transaction. This indicates that the signing process has started. Twenty seconds later, the signed documents can be retrieved using the GET/Validation service.