Add New Location
The endpoint for adding a new location for a herb Args: lon (float): the longitude of the location lat (float): the latitude of the location herb (str): the herb to add the location for token (oauth2 bearer token): the token for the user
Returns: (str) A message indicating the success of the operation
Raises: HTTPException: if the user is not logged in
POST
/api/location/add-location
curl \
-X POST http://api.example.com/api/location/add-location \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d 'lon=42.0&lat=42.0&herb=string'
Request example
{
"lon": 42.0,
"lat": 42.0,
"herb": "string"
}
Request examples
{
"lon": 42.0,
"lat": 42.0,
"herb": "string"
}
Response examples (422)
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
Response examples (422)
{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}