City
/cities (GET)/cities/<city-identifier> (GET)/states/<state-identifier>/cities (GET)/biomes/<biome-identifier>/cities (GET)
State
/states (GET)/states/<state-identifier> (GET)
Biome
/biomes (GET)/biomes/<biome-identifier> (GET)
Farm
/lands (GET,POST)/lands/<land-identifier> (GET)
Definition
GET /cities
Response
200 OKon success
[
{
"id": 2972,
"name": "ABADIA DE GOIÁS",
"fiscal_module": 24,
"state": {
"id": 25,
"name": "Goiás"
},
"biomes": [
{
"id": 1,
"name": "Cerrado"
}
]
},
]GET /cities/<identifier>
Response
404 Not Foundif the city does not exist200 OKon success
[
{
"id": 2972,
"name": "ABADIA DE GOIÁS",
"fiscal_module": 24,
"state": {
"id": 25,
"name": "Goiás"
},
"biomes": [
{
"id": 1,
"name": "Cerrado"
}
]
},
]Definition
GET /states/<state-identifier>/cities
Response
404 Not Foundif the device does not exist200 OKon success
[
{
"id": 49,
"name": "AMPARO DE SÃO FRANCISCO"
},
{
"id": 430,
"name": "CANHOBA"
},
{
"id": 276,
"name": "AREIA BRANCA"
},
]
Definition
GET /biomes/<biome-identifier>/cities
Response
404 Not Foundif the device does not exist200 OKon success
[
{
"id": 1,
"name": "ABAETÉ"
},
{
"id": 6,
"name": "ABREULÂNDIA"
},
]
Definition
GET /states
Response
200 OKon success
[
{
"id": 2,
"name": "Acre",
"uf": "AC"
},
{
"id": 14,
"name": "Alagoas",
"uf": "AL"
},
]GET /states/<identifier>
Response
404 Not Foundif the state does not exist200 OKon success
{
"id": 1,
"name": "Rondônia",
"uf": "RO",
"createdAt": "2020-04-29T18:38:59.741Z",
"updatedAt": "2020-04-29T18:38:59.741Z"
}Definition
GET /biomes
Response
200 OKon success
[
{
"id": 1,
"name": "Cerrado"
},
{
"id": 2,
"name": "Caatinga"
},
]GET /biomes/<identifier>
Response
404 Not Foundif the biomes does not exist200 OKon success
{
"id": 1,
"name": "Cerrado"
}Definition
GET /lands
Response
200 OKon success
[
{
"id": 10,
"installation_id": "512e7afe-f136-41bb-8ffa-5c88dc40f00f",
"hectare": 601,
"licensing": true,
"city": {
"id": 1,
"name": "ABAETÉ",
"state": {
"id": 17,
"name": "Minas Gerais",
"uf": "MG"
},
"biomes": [
{
"id": 1,
"name": "Cerrado"
}
]
},
"size": {
"id": 3,
"name": "Grande Propriedade"
}
},
{
"id": 11,
"installation_id": "90778c68-e126-46f2-9166-925e3fecfffe",
"hectare": 601,
"licensing": true,
"city": {
"id": 1,
"name": "ABAETÉ",
"state": {
"id": 17,
"name": "Minas Gerais",
"uf": "MG"
},
"biomes": [
{
"id": 1,
"name": "Cerrado"
}
]
},
"size": {
"id": 3,
"name": "Grande Propriedade"
}
},
]GET /lands/<identifier>
Response
404 Not Foundif the land does not exist200 OKon success
{
"id": 40,
"installation_id": "f36a253e-7760-421b-a909-30b96b6287c8",
"hectare": 15,
"licensing": true,
"city": {
"id": 2157,
"name": "ABDON BATISTA",
"state": {
"id": 22,
"name": "Santa Catarina",
"uf": "SC"
},
"biomes": [
{
"id": 5,
"name": "Mata Atlântica"
}
]
},
"size": {
"id": 1,
"name": "Pequena Propriedade"
}
}Definition
POST /lands
Arguments
"installation_id":nullan unique Id generated from API"hectare":integera Farm size hectare number"city_id":integerCity id where Farm belongs"licensing":booleanTrue if Farm has licensing environmental
{
"installation_id": null,
"hectare": 601,
"city_id": 1,
"licensing": true
}Response
201 Createdon success
{
"id": 11,
"installation_id": "90778c68-e126-46f2-9166-925e3fecfffe",
"hectare": 601,
"city_id": 1,
"licensing": true,
"size_id": 3,
}