Body
-
external_id string
Locations's ID generated from a third-party system such as a CRM, POS, or accounting software
-
name string
-
line_1 string Required
Location's first required address
-
line_2 string
-
city string
-
region string
-
country string Required
Country code in ISO-2 format
-
coordinates object Required
-
directions string
-
zip_code string
-
abilities array[number]
1 => Pickup,
2 => Transfer,
3 => Delivery,
4 => ReturnValues are
1
,2
,3
, or4
. -
allowed_vehicle_types array[number]
1 => Scooter,
2 => Car,
3 => Van,
4 => Small Truck,
5 => Medium Truck,
6 => Large TruckValues are
1
,2
,3
,4
,5
, or6
.
POST /locations
curl \
-X POST https://{workspace}.fleetrunnr.com/api/v1/locations \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"external_id":"12hhrr","name":"Main Warehouse","line_1":"2313 Retreat Avenue","line_2":"Ste 300","city":"Birmingham","region":"Alabama","country":"US","coordinates":{"lat":-90,"lng":-180},"directions":"","zip_code":"35203","abilities":[1],"allowed_vehicle_types":[2]}'
Request example
{
"external_id": "12hhrr",
"name": "Main Warehouse",
"line_1": "2313 Retreat Avenue",
"line_2": "Ste 300",
"city": "Birmingham",
"region": "Alabama",
"country": "US",
"coordinates": {
"lat": -90,
"lng": -180
},
"directions": "",
"zip_code": "35203",
"abilities": [
1
],
"allowed_vehicle_types": [
2
]
}
Response examples (200)
{
"message": "success",
"data": {
"location": "15f20760-76a7-41ee-b509-705d3ffd8eb5"
}
}