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
Specification of the transactionInfo field
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 requiredApi 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.
Validation/Images/DocumentBackSide
TYPE POST
Specification of the sideTwoInfo field
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
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.