Depot
Manage your depot address
You need at least one depot
defined. The depot is the location from which the route starts and where the route of a vehicle ends (if the route is defined as a round trip, i.e. ROUNDTRIP_TOUR = True
).
Per default the first address in your addresses is your company address and it is set as depot per default. You can quickly check it with this call.
auth_header = {"Authorization": "JWT your.Long_Randomfghxlcnebem.Secure_AccessToken"}
api_url = "https://your_company_name.prd.smartlane.io/api/"
url = api_url + "address/1"
response = requests.get(url, headers=auth_header)
https://your_company_name.prd.smartlane.io/api/
This should return something like this, where "addresstype": "depot"
is the information we are looking for.
{
"additional": "",
"addresstype": "depot",
"city": "M\u00fcnchen",
"code": null,
"contactcompany": "Smartlane GmbH",
"contactfirstname": "Micha",
"contactlastname": "Trieba",
"country": "DE",
"customernr": null,
"default_pdt_from": null,
"default_pdt_to": null,
"distances": null,
"district": null,
"email": "[email protected]",
"housenumber": "45",
"id": 1,
"location": {
"coordinates": [
8.74001,
51.6855
],
"type": "Point"
},
"phonenr": "00491634793733",
"postalcode": "80687",
"search_vector": "'gmbh':2 'micha':3 'smartlane':1 'trieba':4",
"street": "Elsenheimerstra\u00dfe 45"
}
You can define and reference multiple depots.
Updated 7 months ago