-
Start docker installed previously
-
Clone the repository code
-
Navigate to the source code folder and type:
$ docker-compose build
-
$ docker-compose up
The API is ready on address http://localhost:4000/api
1. Create a PDV - POST - http://localhost:4000/api/pdvs
{
"trading_name": "Adega da Cerveja - Pinheiros",
"owner_name": "Zé da Silva",
"document": "81355398000180",
"coverage_area": {
"type": "MultiPolygon",
"coordinates": [
[[[30, 20], [45, 40], [10, 40], [30, 20]]],
[[[15, 5], [40, 10], [10, 20], [5, 10], [15, 5]]]
]
},
"address": {
"type": "Point",
"coordinates": [-46.57421, -21.785741]
}
}
2. Get a PDV - GET - http://localhost:4000/api/pdvs/{id}
3. Search PDV - GET - http://localhost:4000/api/pdvs?lat={lat}&lng={lng}