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" } |
NEW
Sending a selfie to the server
Name | New |
---|---|
Url | {URL_Base}/api/integration/{projectName}/Validation/New |
TYPE | POST |
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. |
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 |
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 |
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 |
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:
|
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 |
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 |
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 |
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 Message
field in the response will have the value “Alive.”
Name | CheckHealt |
---|---|
URL | {URL_Base}/api/Integration/CheckHealt |
TYPE | POST |
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 |
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:
|
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 | |
DateOfDeath | String | DateOfDeath. |
MarriageDate | String | MarriageDate. |
Instruction | String | |
PlaceBirth | String | |
Nationality | String | |
MotherName | String | |
FatherName | String | |
HouseNumber | String | |
Profession | String | |
ExpeditionCity | String | ExpeditionCity. |
ExpeditionDepartment | String | ExpeditionDepartment. |
BirthCity | String | BirthCity. |
BirthDepartment | String | BirthDepartment. |
TransactionType | int | |
TransactionTypeName | String | |
IssueDate | String | |
BarcodeText | String | |
OcrTextSideOne | String | |
OcrTextSideTwo | String | |
SideOneWrongAttempts | int | |
SideTwoWrongAttempts | int | |
FoundOnAdoAlert | String | |
AdoProjectId | String | |
TransactionId | String | |
ProductId | String | |
ComparationFacesSuccesful | boolean | |
FaceFound | boolean | |
FaceDocumentFrontFound | boolean | |
BarcodeFound | boolean | |
ResultComparationFaces | int | |
ResultCompareDocumentFaces | int | |
ComparationFacesAproved | boolean | |
ThresholdCompareDocumentFaces | int | |
CompareFacesDocumentResult | string | CompareFacesDocumentResult. |
"extras”: { | ||
IdState | String | |
StateName | String | |
} | ||
NumberPhone | String | |
CodFingerprint | String | |
ResultQRCode | String | |
DactilarCode | String | |
ResponseControlList | String | |
Latitude | String | Latitude |
Longitude | String | Longitude |
"Images" : [{ | ||
Id | String | |
ImageTypeId | String | |
ImageTypeName | String | |
Image | String | |
DownloadCode | String | |
}], | ||
SignedDocuments | String Array | |
"Scores" : [{ | ||
Id | int | |
UserName | String | |
StateName | String | |
StartingDate | String | |
Observation | String | |
}] | ||
"Response_ANI": { | ||
Niup | String | |
FirstSurname | String | |
Particula | String | |
SecondSurname | String | |
FirstName | String | |
SecondName | String | |
ExpeditionMunicipality | String | |
ExpeditionDepartment | String | |
ExpeditionDate | String | |
CedulaState | String | |
} | ||
Parameters | String | |
StateSignatureDocument | String | |
} |