Get Company by ID
Este endpoint entrega la información relacionada a una compañía ingresando su identificación.
Endpoint
Headers
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
Authorization | Bearer {{access_token}} | access_token obtained in Atenea |
Url
Method: GET
URL: https://api.trust.lat/company/api/v1/company/:company_id
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/company/api/v1/company/1' \
--header 'Authorization: Bearer {{accessToken}}'
import requests
url = "https://api.trust.lat/company/api/v1/company/1"
payload={}
headers = {
'Authorization': 'Bearer {{accessToken}}'
}
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/company/api/v1/company/1',
headers: {
'Authorization': 'Bearer {{accessToken}}'
}
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
Responses
HTTP Code: 200 Found
{
"status": true,
"company": {
"id": 1,
"name": "Empresa de Muestra",
"description": "Muestra de creación de empresa",
"email": "empresa@gmail.com",
"img": "https://google.cl",
"created_at": "2020-04-29T21:49:39.444Z",
"updated_at": "2020-04-29T21:49:39.444Z",
"status": true,
"name_id": "empresa-de-muestra",
"industry": null,
"country": null,
"cause": "",
"phone": "",
"optional_image": null
}
}
HTTP Code: 204 No Content
Cuando el endpoint no encuentre resultados enviará un código 204 indicando que no hubo éxito en la búsqueda.