List
curl --request GET \
--url https://api.qa.sima.ag/api/v2/third_party/establishments \
--header 'Authorization: Bearer <token>' \
--header 'X-SIMA-SYSTEM-ID: <api-key>'import requests
url = "https://api.qa.sima.ag/api/v2/third_party/establishments"
headers = {
"Authorization": "Bearer <token>",
"X-SIMA-SYSTEM-ID": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-SIMA-SYSTEM-ID': '<api-key>'}
};
fetch('https://api.qa.sima.ag/api/v2/third_party/establishments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qa.sima.ag/api/v2/third_party/establishments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-SIMA-SYSTEM-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"items": [
{
"id": 93467,
"name": "UY_LOS TILOS",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93468,
"name": "UY_MONTECRISTO",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93469,
"name": "UY_PEREIRA",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93470,
"name": "UY_REMANSO",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93471,
"name": "UY_TORRE ALTA",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93472,
"name": "UY_LA CAUTIVA FEED LOT",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93473,
"name": "UY_BICHADERO_FEEDLOT",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93474,
"name": "UY_SAN JUAN_Durazno",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93475,
"name": "UY_DON FELIPE_Durazno",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93476,
"name": "UY_LA CAUTIVA",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
}
],
"current_page": 1,
"next_page": 2,
"total_pages": 21,
"total_items": 203
}{
"error": {
"code": 400,
"message": "Formato de fecha inválido. Se espera Y-m-d\\TH:i:sP.",
"exception": [
{
"file": "/var/www/html/src/Kodear/ApiBundle/Strategy/Validations/ValidationStrategy.php",
"line": 64,
"function": "checkDateFormat",
"class": "Kodear\\ApiBundle\\Strategy\\Validations\\ValidationStrategy",
"type": "->",
"args": [
"2015-01-01 15:47:44-03:00"
]
},
{
"file": "/var/www/html/src/Kodear/ApiBundle/Validations/BaseFilterValidation.php",
"line": 62,
"function": "validate",
"class": "Kodear\\ApiBundle\\Strategy\\Validations\\ValidationStrategy",
"type": "->",
"args": [
"date_format",
"deleted_from",
"2015-01-01 15:47:44-03:00"
]
},
{
"file": "/var/www/html/src/Kodear/ApiBundle/Controller/v2/ThirdParty/EstablishmentsController.php",
"line": 79,
"function": "validate",
"class": "Kodear\\ApiBundle\\Validations\\BaseFilterValidation",
"type": "->",
"args": [
{
"id": "int_null",
"only_deleted": "int_null",
"farmer_id": "int_null",
"search": "string_not_null",
"deleted_from": "date_format",
"page": "page",
"size": "size"
}
]
},
{
"file": "/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php",
"line": 151,
"function": "getList",
"class": "Kodear\\ApiBundle\\Controller\\v2\\ThirdParty\\EstablishmentsController",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php",
"line": 68,
"function": "handleRaw",
"class": "Symfony\\Component\\HttpKernel\\HttpKernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
1
]
},
{
"file": "/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php",
"line": 200,
"function": "handle",
"class": "Symfony\\Component\\HttpKernel\\HttpKernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
1,
true
]
},
{
"file": "/var/www/html/web/app_dev.php",
"line": 15,
"function": "handle",
"class": "Symfony\\Component\\HttpKernel\\Kernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
}
]
}
}{
"error": {
"code": 0,
"message": "Page \"10\" does not exist. The currentPage must be inferior to \"1\""
}
}Version 2 > Establishments
List
GET
/
api
/
v2
/
third_party
/
establishments
List
curl --request GET \
--url https://api.qa.sima.ag/api/v2/third_party/establishments \
--header 'Authorization: Bearer <token>' \
--header 'X-SIMA-SYSTEM-ID: <api-key>'import requests
url = "https://api.qa.sima.ag/api/v2/third_party/establishments"
headers = {
"Authorization": "Bearer <token>",
"X-SIMA-SYSTEM-ID": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-SIMA-SYSTEM-ID': '<api-key>'}
};
fetch('https://api.qa.sima.ag/api/v2/third_party/establishments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qa.sima.ag/api/v2/third_party/establishments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-SIMA-SYSTEM-ID: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"items": [
{
"id": 93467,
"name": "UY_LOS TILOS",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93468,
"name": "UY_MONTECRISTO",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93469,
"name": "UY_PEREIRA",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93470,
"name": "UY_REMANSO",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93471,
"name": "UY_TORRE ALTA",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93472,
"name": "UY_LA CAUTIVA FEED LOT",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93473,
"name": "UY_BICHADERO_FEEDLOT",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93474,
"name": "UY_SAN JUAN_Durazno",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93475,
"name": "UY_DON FELIPE_Durazno",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
},
{
"id": 93476,
"name": "UY_LA CAUTIVA",
"farmer_id": 74639,
"modified_by": null,
"deleted_at": null,
"active": true
}
],
"current_page": 1,
"next_page": 2,
"total_pages": 21,
"total_items": 203
}{
"error": {
"code": 400,
"message": "Formato de fecha inválido. Se espera Y-m-d\\TH:i:sP.",
"exception": [
{
"file": "/var/www/html/src/Kodear/ApiBundle/Strategy/Validations/ValidationStrategy.php",
"line": 64,
"function": "checkDateFormat",
"class": "Kodear\\ApiBundle\\Strategy\\Validations\\ValidationStrategy",
"type": "->",
"args": [
"2015-01-01 15:47:44-03:00"
]
},
{
"file": "/var/www/html/src/Kodear/ApiBundle/Validations/BaseFilterValidation.php",
"line": 62,
"function": "validate",
"class": "Kodear\\ApiBundle\\Strategy\\Validations\\ValidationStrategy",
"type": "->",
"args": [
"date_format",
"deleted_from",
"2015-01-01 15:47:44-03:00"
]
},
{
"file": "/var/www/html/src/Kodear/ApiBundle/Controller/v2/ThirdParty/EstablishmentsController.php",
"line": 79,
"function": "validate",
"class": "Kodear\\ApiBundle\\Validations\\BaseFilterValidation",
"type": "->",
"args": [
{
"id": "int_null",
"only_deleted": "int_null",
"farmer_id": "int_null",
"search": "string_not_null",
"deleted_from": "date_format",
"page": "page",
"size": "size"
}
]
},
{
"file": "/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php",
"line": 151,
"function": "getList",
"class": "Kodear\\ApiBundle\\Controller\\v2\\ThirdParty\\EstablishmentsController",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
},
{
"file": "/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php",
"line": 68,
"function": "handleRaw",
"class": "Symfony\\Component\\HttpKernel\\HttpKernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
1
]
},
{
"file": "/var/www/html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php",
"line": 200,
"function": "handle",
"class": "Symfony\\Component\\HttpKernel\\HttpKernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
},
1,
true
]
},
{
"file": "/var/www/html/web/app_dev.php",
"line": 15,
"function": "handle",
"class": "Symfony\\Component\\HttpKernel\\Kernel",
"type": "->",
"args": [
{
"attributes": {},
"request": {},
"query": {},
"server": {},
"files": {},
"cookies": {},
"headers": {}
}
]
}
]
}
}{
"error": {
"code": 0,
"message": "Page \"10\" does not exist. The currentPage must be inferior to \"1\""
}
}Authorizations
access_token obtenido via POST /api/v2/login
Identificador del sistema integrador (8 para Third-Party API)
Response
OK
The response is of type object.

