Delete Identity
Este endpoint permite eliminar una identidad (Persona-Compañia) alojada dentro del servicio, utilizando su identificador uuid para reconocerla. Este identificador es entregado como una variable de ruta.
Endpoint
Headers
Key | Value | Description |
---|---|---|
Authorization | Bearer {{access_token}} | access_token obtained in Atenea |
Method: DELETE
URL: https://api.trust.lat/index/v1/identity/:uuid
Path Variables:
Key | Value Example | Description |
---|---|---|
uuid | ffffffff-ffff-ffff-ffff-ffffffffffff | Identificador único de la identidad. 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 DELETE 'https://api.trust.lat/index/v1/identity/ffffffff-ffff-ffff-ffff-ffffffffffff' \
--header 'Authorization: Bearer ************'
import requests
url = "https://api.trust.lat/index/v1/identity/ffffffff-ffff-ffff-ffff-ffffffffffff"
payload={}
headers = {
'Authorization': 'Bearer ************'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
var axios = require('axios');
var config = {
method: 'delete',
url: 'https://api.trust.lat/index/v1/identity/ffffffff-ffff-ffff-ffff-ffffffffffff',
headers: {
'Authorization': 'Bearer ************'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Responses
HTTP Code: 200 OK
Identity deleted
{
"code": 200,
"resource": "Identity",
"data": {
"apps": [
{
"app_id": "99",
"created_at": null,
"person": {
"dni": "123456789",
"email": "abeta@example.test"
},
"tags": {
"systemic_client_type": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"
},
"updated_at": null,
"version": "3"
}
],
"company_uid": "99",
"created_at": "2021-07-07T21:05:43.657Z",
"dni": "12.345.678-9",
"email": "abeta@example.test",
"former_documents": null,
"img": "https://robohash.org/123456789",
"last_name": "beta",
"load_uuid": null,
"name": "alfa",
"nationality": "CHL",
"phone_number": "+56912345678",
"status": true,
"trust_id": "ffffffff-ffff-ffff-ffff-ffffffffffff",
"updated_at": "2021-07-07T21:05:43.657Z",
"uuid": "bbbbbbbb-bbbb-bbbb-bbbb-bbbbbbbbbbbb"
},
"message": "Deleted"
}
HTTP Code: 404 Not Found
Identity not present in Index
{
"code": 404,
"resource": "Identity",
"message": "Not found in database neither in former documents"
}
Identity's uuid points to a former document
{
"code": 404,
"resource": "Identity",
"message": "Not found. Posible merge in document with uuid: ffffffff-ffff-ffff-ffff-ffffffffffff"
}