Get All Identity
Este endpoint lista todas las identidades(Persona-Compañia) que se encuentran registradas en el servicio. La respuesta de esta llamada viene paginada y se pueden cambiar el tamaño de la página y la posición de ésta desde los parámetros de búsqueda. Los valores por defecto page y per_page son 1 y 5, respectivamente.
Endpoint
Headers
Key | Value | Description |
---|---|---|
Authorization | Bearer {{access_token}} | access_token obtained in Atenea |
Method: GET
URL: https://api.trust.lat/index/v1/identity
Query Params:
Key | Value Example | Description |
---|---|---|
page | 1 | Página actual |
per_page | 5 | Cantidad de elementos por página |
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/index/v1/identity?page=1&per_page=5' \
--header 'Authorization: Bearer ************'
import requests
url = "https://api.trust.lat/index/v1/identity?page=1&per_page=5"
payload={}
headers = {
'Authorization': 'Bearer ************'
}
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/index/v1/identity?page=1&per_page=5',
headers: {
'Authorization': 'Bearer ************'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Responses Examples
HTTP Code: 200 OK
Identities retrieved
{
"code": 200,
"resource": "Identity",
"data": [
{
"apps": [
{
"app_id": "1",
"created_at": "2021-05-28T23:10:41.614Z",
"person": {
"dni": "123456789",
"email": "abeta@example.test",
"updated_at": "2021-05-28T23:10:42.178Z"
},
"tags": {},
"updated_at": "2021-05-28T23:10:41.615Z",
"version": "2"
}
],
"company_uid": "1",
"created_at": "2021-05-28T23:10:41.586Z",
"dni": "12.345.678-9",
"email": "abeta@example.test",
"former_documents": null,
"img": "https://robohash.org/123412132",
"last_name": "beta",
"load_uuid": null,
"name": "alpha",
"nationality": "CHL",
"phone_number": "+56912345678",
"status": true,
"trust_id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"updated_at": "2021-05-28T23:10:42.198Z",
"uuid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
},
{
"apps": [
{
"app_id": "1",
"created_at": "2021-06-01T17:36:44.873Z",
"person": {
"dni": "123456789",
"email": "abeta@example.test",
"updated_at": "2021-06-01T17:36:45.508Z"
},
"tags": {
"systemic_sub_company": "ff963d17-828a-4578-9fb8-4f96e107246d"
},
"updated_at": "2021-06-01T17:52:17.119Z",
"version": "4"
},
{
"app_id": "6",
"created_at": "2021-06-01T17:52:43.209Z",
"person": {
"dni": "123456789",
"email": "abeta@example.test",
"updated_at": "2021-06-01T17:52:43.833Z"
},
"tags": {
"systemic_client_type": "11111111-1111-1111-1111-111111111111"
},
"updated_at": "2021-06-01T17:52:43.210Z",
"version": "1"
}
],
"company_uid": "1",
"created_at": "2021-06-01T17:35:15.510Z",
"dni": "12.345.678-9",
"email": "abeta@example.test",
"former_documents": null,
"img": "https://robohash.org/123412132",
"last_name": "beta",
"load_uuid": null,
"name": "alpha",
"nationality": "CHL",
"phone_number": "+56912345678",
"status": true,
"trust_id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"updated_at": "2021-06-01T17:52:43.921Z",
"uuid": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
}
],
"message": "Found"
}
Identities not present
{
"code": 200,
"resource": "Identity",
"data": [],
"message": "Found"
}