API Reference

Início de Rota

Um objeto com o status on_route é enviado quando o operador inicia a rota a ele atribuída.

{
  "current": {
    "_id": "5eab0965c9732214e9b4bdad",
    "entity": {
      "status": "on_route",
      "id": "5eab0839c9732214e9b4bd5f",
      "type": "job"
    },
    "eventType": "action",
    "date": "2020-04-30T17:22:45.281Z",
    "action": "start",
    "sender":{
          "firstName": "Operador",
          "lastName": "ou Analista",
          "username": "operador",
          "updated": "2020-02-21T18:12:08.340Z",
          "created": "2020-02-21T18:12:08.340Z",
          "authentication_type": "email",
          "email": "[email protected]",
          "phone": "91111-1111",
          "status": {
            "position": {
              "date": "2020-02-21T18:12:08.340Z",
              "lat":-23.6179656,
              "lng":-46.6378011,
            },
            "last_login": {
              "date": "2021-05-17T19:45:12.289Z",
              "device": {
                "_id": "60a2c7c88366d12584f50dce"
              }
            }
          },
          "company_bound": "none",
          "_id": "5e501d78be3cc67dfe61e8b6",
          "displayName": "Operador ou Analista",
          "__v": 0,
          "id": "5e501d78be3cc67dfe61e8b6"
        },
    "values": {},
    "created": "2020-04-30T17:22:45.282Z",
    "__v": 0,
    "job": {
      "id": "5eab0839c9732214e9b4bd5f",
      "due_date": "2020-04-30T17:17:45.737Z",
      "routing": "5eab0397c9732214e9b4bc8e",
      "route": {
        "id": "5eab0821c9732214e9b4bd46",
        "name": "Rota 2"
      },
      "operator": {
        "displayName": "Josué da Silva",
        "documentNumber": "12345667899",
        "license_plate": "ABC-1234",
        "phone": [
          "119999-0909"
        ]
      }
    },
    "company": {
            "id": "5e416e0e0c50b02c6183c777",
            "name": "Sua Empresa",
            "company_info": {
              "logo": "",
              "domain": "routeasy"
            }
          },
    "site":{
            "id": "5e416e0e0c50b02c6183c799",
            "code": "Código Filial",
            "name": "Nome Filial"
          }
  },
  "previous": null
}