Get Identity V1
Retorna los datos de una persona ingresando su dni.
Endpoint
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
Authorization | Bearer {{access_token}} | access_token obtained in Atenea |
Endpoint:
Method: GET
URL: https://api.trust.lat/identification/api/v1/identity/:dni
caution
Recuerda que para utilizar este endpoint es necesario un access token obtenido en el servicio Atenea
Code Examples
- Curl
- JavaScript
- Python
curl --location --request GET 'https://api.trust.lat/identification/api/v1/identity/:dni' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {{accessToken}}'
import requests
url = "https://api.trust.lat/identification/api/v1/identity/:dni"
payload={}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer {{accessToken}}'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
var axios = require('axios');
var config = {
method: 'get',
url: 'https://api.trust.lat/identification/api/v1/identity/:dni',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer {{accessToken}}'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Responses
HTTP Code: 201 Created
{
"status": true,
"identity": {
"id": 2,
"dni": "123456789-0",
"name": "Juan",
"lastname": "Perez",
"email": "jperez@correo.com",
"phone": "+56912234567",
"created_at": "2019-05-04T02:30:14.108Z",
"updated_at": "2021-01-30T02:12:02.547Z",
"status": true,
"uuid": "z10b8a62-ab41-4a6b-aa31-87f795181db",
"apple_users_id": []
}
}
HTTP Code: 204 Not Content
Cuando el endpoint no encuentre resultados enviará un código 204 indicando que no hubo éxito en la búsqueda.