Skip to main content

Get Tags Of Person By Application Id

Este endpoint permite responde los tags y sus los valores asignados de una persona específica en determinada aplicacion movil.

Endpoint#

*Headers

KeyValueDescription
AuthorizationBearer {{access_token}}access_token obtained in Atenea

Url

Method: GET
URL: https://api.trust.lat/index/v1/app/:application_id/persons/tags/query?per_page=&page=

Query Params:

KeyValueDescription
fieldsemail, dni, created_atFiltro que permite mostrar sólo los campos solicitados, si se desea retornar todo el contenido de la respuesta, omitir el parámetro.
per_page100Número de elementos presentes dentro de una página.
page1Posición de la página a visualizar.

Path Variables:

KeyValue ExampleDescription
application_id99Identificador de aplicación provisto por empresa Trust. Obligatorio.
caution

Recuerda que para utilizar este endpoint es necesario un access token obtenido en el servicio Atenea

Como obtener un access token

tip

Si desconoces el id asociado a tu aplicacion movil, contactate con nosotros para mas informacion.

Code Examples#

curl --location --request GET 'https://api.trust.lat/index/v1/app/99/persons/tags/query' \
--header 'Authorization: Bearer ************'

Responses#

HTTP Code: 200 OK#

Tags found, default response#

{
"code": 200,
"resource": "PersonsTags",
"data": [
{
"application_id": "99",
"company_uid": "99",
"created_at": "2021-07-09T17:45:06.801Z",
"dni": "18295034-0",
"email": "abarrera@trust.lat",
"tags": {
"workspace": "home",
"workshift": "night"
},
"updated_at": "2021-07-09T21:52:05.052Z"
},
{
"application_id": "99",
"company_uid": "99",
"created_at": "2021-07-09T21:45:13.481Z",
"dni": "12345678-0",
"email": "betatester@example.test",
"tags": {
"workspace": "home"
},
"updated_at": "2021-07-09T21:45:13.481Z"
},
{
"application_id": "99",
"company_uid": "99",
"created_at": "2021-07-09T21:45:37.118Z",
"dni": "9876543-0",
"email": "gammaexampler@example.test",
"tags": {
"workspace": "home"
},
"updated_at": "2021-07-09T21:45:37.118Z"
},
{
"application_id": "99",
"company_uid": "99",
"created_at": "2021-07-09T21:49:00.080Z",
"dni": "11111111-1",
"email": "alphamale@example.test",
"tags": {
"workspace": "field",
"workshift": "everytime"
},
"updated_at": "2021-07-09T21:49:00.080Z"
}
],
"message": "Found",
"page": 1,
"per_page": 5,
"total": 4
}

Tags found, paginate response#

{
"code": 200,
"resource": "PersonsTags",
"data": [
{
"application_id": "99",
"company_uid": "99",
"created_at": "2021-07-09T17:45:06.801Z",
"dni": "18295034-0",
"email": "abarrera@trust.lat",
"tags": {},
"updated_at": "2021-07-09T21:10:30.958Z"
},
{
"application_id": "99",
"company_uid": "99",
"created_at": "2021-07-09T21:45:13.481Z",
"dni": "12345678-0",
"email": "betatester@example.test",
"tags": {
"workspace": "home"
},
"updated_at": "2021-07-09T21:45:13.481Z"
},
{
"application_id": "99",
"company_uid": "99",
"created_at": "2021-07-09T21:45:37.118Z",
"dni": "9876543-0",
"email": "gammaexampler@example.test",
"tags": {
"workspace": "home"
},
"updated_at": "2021-07-09T21:45:37.118Z"
},
{
"application_id": "99",
"company_uid": "99",
"created_at": "2021-07-09T21:49:00.080Z",
"dni": "11111111-1",
"email": "alphamale@example.test",
"tags": {
"workspace": "field",
"workshift": "everytime"
},
"updated_at": "2021-07-09T21:49:00.080Z"
}
],
"message": "Found",
"page": 1,
"per_page": 100,
"total": 4
}

Tags found, page example#

{
"code": 200,
"resource": "PersonsTags",
"data": [
{
"application_id": "99",
"company_uid": "99",
"created_at": "2021-07-09T21:45:37.118Z",
"dni": "9876543-0",
"email": "gammaexampler@example.test",
"tags": {
"workspace": "home"
},
"updated_at": "2021-07-09T21:45:37.118Z"
},
{
"application_id": "99",
"company_uid": "99",
"created_at": "2021-07-09T21:49:00.080Z",
"dni": "11111111-1",
"email": "alphamale@example.test",
"tags": {
"workspace": "field",
"workshift": "everytime"
},
"updated_at": "2021-07-09T21:49:00.080Z"
}
],
"message": "Found",
"page": 2,
"per_page": 2,
"total": 4
}

Tags found, field filters example#

{
"code": 200,
"resource": "PersonsTags",
"data": [
{
"created_at": "2021-07-09T17:45:06.801Z",
"dni": "18295034-0",
"email": "abarrera@trust.lat"
},
{
"created_at": "2021-07-09T21:45:13.481Z",
"dni": "12345678-0",
"email": "betatester@example.test"
},
{
"created_at": "2021-07-09T21:45:37.118Z",
"dni": "9876543-0",
"email": "gammaexampler@example.test"
},
{
"created_at": "2021-07-09T21:49:00.080Z",
"dni": "11111111-1",
"email": "alphamale@example.test"
}
],
"message": "Found",
"page": 1,
"per_page": 100,
"total": 4
}

HTTP Code: 404 Not Found#

Application not present in Trust Services#

{
"code": 404,
"resource": "PersonsTags",
"message": "Not found"
}

Tags not present in application#

{
"code": 404,
"resource": "PersonsTags",
"message": "Not found"
}
Last updated on by Jesus Marquez Barrera