SimpliRoute puede enviar un Webhook cuando un plan es editado usando el endpoint https://api.simpliroute.com/v2/plans/edit-plan/.
Para usar este webhook, el cliente debe tener un webservice preparado para procesar una llamada tipo POST con la información detallada en las siguiente tablas.
Para configurar el webhook, el cliente debe enviar la url y headers opcionales al email [email protected] o contactar al equipo a través del chat de la plataforma.
Ejemplo 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
}
]
}
]
}