iotoms Docs

Get today's route

GET
/api/v1/ops/routes/today

Returns the signed-in salesperson's ordered store visits for their open day cycle, with coverage. Fails if no day has been started. Set includeSkipped=false to hide skipped visits.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Query Parameters

includeSkipped?boolean

Whether to include visits already marked SKIPPED. Defaults to true.

Defaulttrue

Header Parameters

Response Body

OK

*/*
  1. response
status*string

Outcome of the request: SUCCESS when it worked; errors return an error status with the reason in message.

message*string

Short human-readable message describing the outcome.

data?

Today's route for the signed-in salesperson.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/ops/routes/today'
Example Response
{  "status": "string",  "message": "string",  "data": {    "dayCycleId": "bbed7a30-80be-4ccf-810d-a33c370a67d1",    "routePlanId": "b7d64f28-bbfd-4033-80f5-b73a04c2781d",    "businessDate": "2019-08-24",    "coverageTarget": 0,    "completionPercent": 0,    "stores": [      {        "storeVisitId": "52169b4e-ab9f-4d60-adb2-503d32525cde",        "storeId": "b8adcdc8-9238-4168-90f8-77b2d14c211c",        "customerStoreId": 0,        "storeCode": "string",        "name": "string",        "sequence": 0,        "geoLat": 0,        "geoLon": 0,        "visitStatus": "PENDING",        "skipReason": "STORE_CLOSED",        "distanceMeters": 0,        "lastVisitOn": "2019-08-24"      }    ],    "lastSyncAt": "2019-08-24T14:15:22Z"  }}