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

NameNew
Url{URL_Base}/api/integration/{projectName}/Validation/New
TYPEPOST


PARAMETERS
NameData TypeParameter TypeRequiredDescription
ProjectNameStringQueryYesThe name of the associated project.
ApikeyStringHeaderYesThe key assigned to the project.
AuthorizationStringHeaderNoAccess token.
transactionInfoJsonBodyYesThe data of the new transaction.


Specification of the transactionInfo field

NameTypeRequiredDescription
ProductIdIntYesProduct number for the verified customer transaction.
CustomerPhotoStringYesBase64-encoded selfie image
DocumentTypeStringNoDocument 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).
LongitudeStringNoLongitude of the location where the process takes place.
LatitudeStringNoLatitude of the location where the process takes place.
IdAssociatedStringNoCo-signer’s identification number
ClientRoleStringNoAssigned role number for the platform
KeyProcessLivenessStringNoLiveness process key received during the selfie capture process
UIdDeviceStringNoCharacter string that defines and identifies the device from which the request is made
IdUserStringNoID registered on the ADO platform for the user making the service request
SourceDeviceIntegerNoNumber that identifies the type of device: 1 for Web, 2 for Android, and 3 for iOS.
SdkVersionstringNoBuild or SDK version number being used, which can be found in the repository's ChangeLog.
OSstringNoType of operating system from which the service is being consumed
BrowserVersionstringNoIf the OS field is set to Web, the browser version used is sent.
IMEIstringNoIMEI of the mobile device consuming the service
RiskIdstringNoRisk classification ID
UidStringNoTransaction 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
CodeDescription
200The transaction has been successfully initiated. An object is returned containing information associated with it.
201The face being validated is already enrolled. An object is returned containing information about the created transaction, including the unique transaction number.
400The 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
401The api key value is required
Api Key not valid
Can't found User with specified credentials
Can't found specified Source Device
404The specified project was not found
406The 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.
500An error has occurred. Please check the error and try again.

 

DOCUMENTBACKSIDE

Allows uploading the back side of an identity document.

NameDocumentBackSide
Url{URL_Base}api/integration/{projectName}/
Validation/Images/DocumentBackSide
TYPEPOST


PARAMETERS
NameData TypeParameter TypeRequiredDescription
ProjectNameStringQueryYesThe name of the associated project
ApikeyStringHeaderYesThe key assigned to the project
AuthorizationStringHeaderNoAccess token
sideTwoInfoJsonBodyYesThe data of the new transaction


Specification of the sideTwoInfo field

NameTypeRequiredDescription
ImageStringYesImage of the back side of the document in Base64 format
DocumentTypeStringNoDocument 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.
UIdDeviceStringNoString that defines and identifies the device from which the request is made.
SourceDeviceIntegerNoNumber that identifies the device type, with values of 1 for Web, 2 for Android, and 3 for iOS.
SdkVersionstringNoBuild or SDK version number being used, which can be found in the repository's ChangeLog.
OSstringNoType of operating system from which the service is being consumed
BrowserVersionstringNoIf the OS field is set to Web, the browser version used is sent.
TransactionTypestringNoTransaction type ID
ProductIdstringNoProduct number for the transaction
UidStringNoTransaction 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.
RiskIdStringNoRisk classification ID


RESPONSES
CodeDescription
200The transaction has been successfully initiated. An object containing information associated with it is returned. RESPONSE OBJECT DESCRIPTION
201The client was previously registered. An object is returned containing information about the created transaction, including the unique transaction number.
400The 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
401The api key value is required
Api Key not valid
Can't found User with specified credentials
Can't found specified Source Device
404The specified project was not found
406Base64 not valid.
Image not valid.
500An error has occurred. Please validate the error and try again.