Show Profile
Este endpoint permite recuperar la información de un perfil, señalado indicada por la variable de ruta uuid, en el servicio Trust IDP.
En la respuesta, se entrega toda la información que conforma un perfil: uuid, nin, username, phone_number, email, origin, name, lastname, birthday, nationality, timezone, two_factor_authentication, active, identification_provider. Para mayor información sobre estos campos, revisar endpoint de creación de perfil de usuario.
Endpoint
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
Authorization | Bearer {{access_token}} | access_token obtained in Atenea |
Method: GET
URL: https://api.trust.lat/trust-idp/v1/companies/:company_id/profiles/:uuid
Query Params
Los filtros disponibles son los siguientes:
Field | Description |
---|---|
disabled_profile | Campo booleano que indica si la busqueda debe incluir perfiles deshabilitados. Sólo puede tomar el valor true |
Path Variables:
Key | Value Example | Description |
---|---|---|
company_id | -1 | Identificador de la compañia, provisto por la empresa Trust. Obligatorio |
uuid | ffffffff-ffff-ffff-ffff-ffffffffffff | Identificador único del perfil de usuario. Obligatorio. |
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/trust-idp/v1/companies/:company_id/profiles/:uuid' \
--header 'Authorization: Bearer `{{access_token}}`'
import requests
url = "https://api.trust.lat/trust-idp/v1/companies/:company_id/profiles/:uuid"
payload={}
headers = {
'Authorization': 'Bearer `{{access_token}}`'
}
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/trust-idp/v1/companies/:company_id/profiles/:uuid',
headers: {
'Authorization': 'Bearer `{{access_token}}`'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Responses
HTTP Code: 200 OK
Profile Found
{
"code": 200,
"resource": "Profile",
"data": {
"uuid": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"nin": "123456789",
"username": null,
"phone_number": null,
"email": null,
"origin": "test_idp",
"name": "trust",
"lastname": "latin",
"birthday": null,
"nationality": null,
"timezone": null,
"two_factor_authentication": [],
"active": true,
"identification_provider": "trust"
},
"message": "Found"
}
Profile Disabled Found
{
"code": 200,
"resource": "Profile",
"data": {
"uuid": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"nin": "123456789",
"username": null,
"phone_number": null,
"email": null,
"name": "trust",
"origin": "test_idp",
"lastname": "latin",
"birthday": null,
"nationality": null,
"timezone": null,
"two_factor_authentication": [],
"active": false,
"identification_provider": "trust"
},
"message": "Found"
}
HTTP Code: 401 Unauthorized
Missing Access Token
{
"status": 401,
"error": "Invalid or expired token"
}
HTTP Code: 404 Not Found
Profile Not Present/Not Available In Service
{
"code": 404,
"resource": "Profile",
"message": "Not found"
}