SimpliRoute pode enviar um Webhook quando um plano é editado usando o endpoint https://api.simpliroute.com/v2/plans/edit-plan/.
Para usar esse webhook, o cliente deve ter um webservice preparado para processar uma chamada tipo POST com as informações detalhadas nas seguintes tabelas.
Para configurar o webhook, o cliente deve enviar a URL e os headers opcionais para o email [email protected] ou entrar em contato com a equipe pelo chat da plataforma.
Exemplo de Payload
{
"id": "9b420e42-m492-29m1-a214-f2ad927707b4",
"account": {
"id": 1,
"name": "[email protected]"
},
"end_date": "2019-12-24",
"reset_day": 1,
"start_date": "2019-12-24",
"fleet_id": 647,
"routes": [
{
"id": "900787e1-k582-0185-9eeb-d93b68c98b85",
"planned_date": "2019-12-24",
"total_load": 50,
"total_load_2": 0,
"total_load_3": 0,
"estimated_time_end": "11:37:00",
"estimated_time_start": "09:00:00",
"comment": null,
"driver": {
"id": 1,
"name": "Driver Demo"
},
"vehicle": {
"id": 1,
"reference": "XXXX11",
"name": "Vehicle Demo"
},
"visits": [
{
"id": 20661418,
"title": "foo",
"planned_date": "2019-12-24",
"latitude": "-33.370405",
"longitude": "-70.684798",
"load": 0,
"load_2": 0,
"load_3": 0,
"duration": "0:10:00",
"estimated_time_departure": "09:30:00",
"estimated_time_arrival": "09:20:00",
"notes": "",
"order": 1
},
{
"load": 25,
"estimated_time_departure": "10:00:00",
"planned_date": "2019-12-24",
"load_3": 0,
"load_2": 0,
"duration": "0:15:00",
"estimated_time_arrival": "09:45:00",
"id": 20661406,
"title": "bar",
"notes": "",
"longitude": "-70.758134",
"latitude": "-33.384390",
"order": 2
},
{
"load": 0,
"estimated_time_departure": "10:24:00",
"planned_date": "2019-12-24",
"load_3": 0,
"load_2": 0,
"duration": "0:10:00",
"estimated_time_arrival": "10:14:00",
"id": 20661420,
"title": "foo-bar",
"notes": "",
"longitude": "-70.703681",
"latitude": "-33.427045",
"order": 3
}
]
}
]
}