Skip to main content

Deactivate Profile

Este endpoint permite cambiar el estado de un perfil de usuario, deshabilitando a un usuario y restringiendo el uso ese perfil para própositos de login, cambio de contraseña y otras operaciones.

Endpoint

Headers

KeyValueDescription
Content-Typeapplication/json
AuthorizationBearer {{access_token}}access_token obtained in Atenea
Method: PATCH
URL: https://api.trust.lat/trust-idp/v1/companies/:company_id/profiles/:uuid/status

Path Variables:

KeyValue ExampleDescription
company_id-1Identificador de la compañia, provisto por la empresa Trust. Obligatorio
uuidffffffff-ffff-ffff-ffff-ffffffffffffIdentificador único del perfil de usuario. Obligatorio.
caution

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

Como obtener un access token

Body

Fields

  • operation: Parámetro utilizado para específicar la operación a ejecutar. Debe tener por valor deactivate para este endpoint. Obligatorio.

Code Examples

curl --location --request PATCH 'https://api.trust.lat/trust-idp/v1/companies/:company_id/profiles/:uuid/status' \
--header 'Authorization: Bearer `{{access_token}}`' \
--header 'Content-Type: application/json' \
--data-raw '{
"operation": "deactivate"
}'

Responses

HTTP Code: 200 OK

Profile Deactivated Succesfully

{
"code": 200,
"resource": "Profile",
"data": {
"active": false,
"uuid": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"nin": "123456789",
"username": "tlat",
"phone_number": "+56912345678",
"email": "tlat@email.com",
"name": "test",
"lastname": "latin",
"birthday": null,
"nationality": null,
"timezone": null,
"trusted_fields": {},
"field_expiration_time": {},
"two_factor_authentication": [],
"identification_provider": "test_idp"
},
"message": "Activated"
}

HTTP Code: 401 Unauthorized

Invalid Token

{
"status": 401,
"error": "Invalid or expired token"
}

HTTP Code: 403 Forbidden

Failed Validation

{
"code": 403,
"message": "Forbidden"
}

HTTP Code: 404 Not Found

Profile Not Found

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

HTTP Code: 409 Conflict

Profile Is Not Active

{
"code": 409,
"resource": "Profile",
"message": "Conflict",
"errors": "Profile is not active"
}