iotoms Docs

Get the active day cycle

GET
/api/v1/ops/day-cycles/active

Returns the calling salesperson's currently open day cycle, or null if none is open. Safe to call repeatedly.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Header Parameters

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when the request worked, ERROR when it did not.

message*string

Short human-readable message describing the result, for logs or display; do not parse it.

data?

The day cycle as it now stands, or null from Get the active day cycle when no day is open.

Example Request
curl -X GET 'https://beta.iotoms.com/api/v1/ops/day-cycles/active'
Example Response
{  "status": "string",  "message": "string",  "data": {    "dayCycleId": "bbed7a30-80be-4ccf-810d-a33c370a67d1",    "businessDate": "2019-08-24",    "status": "OPEN",    "startedAt": "2019-08-24T14:15:22Z",    "closedAt": "2019-08-24T14:15:22Z",    "vehicleLabel": "string",    "vehicleId": "c406adf4-e700-4483-ad7a-e7447a2941cb",    "vehicleType": "VAN",    "openingCash": 0,    "closingCash": 0,    "startOdometerKm": 0,    "endOdometerKm": 0,    "coveragePercent": 0,    "totalStores": 0,    "visitedStores": 0  }}