Motia WS/API - CAN Summary By Vehicle

Craig Marsden
Craig Marsden
  • Updated

 

This API returns the same data as the CAN Summary By Vehicle report on the Motia Telematics Portal. This is a summarised version of the CAN-Bus Journey Report.

 

Service URL

https://ws.mycubo.online/IntegrationService.svc

Service method and input parameters

GetBCANSList(string token ,string FromDate, string ToDate, string VehicleReg)

 

- FromDate–date time (DD/MM/YYYY & HH:MM Format eg 01/01/2022%2000:00)
- ToDate– date time (DD/MM/YYYY & HH:MM Format eg 01/01/2022%2023:59)
- VehicelReg -Registration number from assets  (xyz,abc) (Multiple Reg should be in comma separated)
- ISShowAll – this will be true and false (show all record that have data or no data or only show data having record)
-Token- By Using below api to get the token (Instructions Here)

(https://ws.mycubo.online/IntegrationService.svc/AuthorizeUser?username=INTG-username&password=INTG-password)

 

Service Response

- ErrorMessage - empty for successful call

- BCANS – list of data

 

Sample Response – Expired or Invalid Token

Request

https://ws.mycubo.online/IntegrationService.svc/GetBCANSList?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS &FromDate=01/05/2022%2000:00&ToDate=01/05/2022%2023:59&VehicleReg=FJ67ZFC,FJ67ZFD,FJ67ZFE,FJ67ZFH&IsShowAll=true

Response

{

    "BCANS": null,

    "ErrorMessage": "Token was expired."

}

 

Sample Response – Invalid Credentials

Request

https://ws.mycubo.online/IntegrationService.svc/GetBCANSList?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS &FromDate=01/05/2022%2000:00&ToDate=01/05/2022%2023:59&VehicleReg=FJ67ZFC,FJ67ZFD,FJ67ZFE,FJ67ZFH&IsShowAll=true

Response

{

"BCANS": null,

"ErrorMessage": "Login failed. Please enter valid username and password."

}

 

Sample Request – Too Many Requests Per Minute

Request

https://ws.mycubo.online/IntegrationService.svc/GetBCANSList?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS &FromDate=01/05/2022%2000:00&ToDate=01/05/2022%2023:59&VehicleReg=FJ67ZFC,FJ67ZFD,FJ67ZFE,FJ67ZFH&IsShowAll=true

Response

{

"BCANS": null,

"ErrorMessage": "Last request was 3 seconds ago. Request is allowed once per

60 second period."

}

 

Sample Request – Correct Request

Request

https://ws.mycubo.online/IntegrationService.svc/GetBCANSList?token=$2a$10$PETZSdgJmRv243soXNqfeeU1I6t/RNu1XoPTmay/JpzMb2E635hhS &FromDate=01/05/2022%2000:00&ToDate=01/05/2022%2023:59&VehicleReg=FJ67ZFC,FJ67ZFD,FJ67ZFE,FJ67ZFH&IsShowAll=true

Response

{

    "BCANS": [

        {

            "BCANSList": [

null

            ],

            "Registration": " FJ67ZFC"

        },

        {

            "BCANSList": [

                {

                    "AWTM": 0.00,

                    "AdBlueUsed": 0.00,

                    "AssetID": 12064,

                    "AverageDriving": 0,

                    "AverageMPG": 0.00,

                    "AvgDistancebyHB": 0.00,

                    "BCount": 0,

                    "CO2": 0.00,

                    "Depot": "GPS",

                    "EndDate": "",

                    "FriendlyName": "DAF 03457",

                    "HBCount": 0,

                    "NOX": 0.00,

                    "OdometerEnd": 0,

                    "OdometerStart": 0,

                    "PM": 0.00,

                    "PercentageofHBs": 0.00,

                    "Reg": "FJ67ZFD",

                    "StartDate": "",

                    "TotalDistanceTravelled": 0.00,

                    "TotalEngineOnTime": "00:00",

                    "TotalExcessiveIdleTimes": "00:00",

                    "TotalFuelBurnt": 0.00,

                    "TotalFuelUsedDriving": 0.00,

                    "TotalFuelUsedOnPTO": 0.00,

                    "TotalFuelUsedonIdle": 0.00,

                    "TotalIdleTimes": "00:00",

                    "TotalJourneyCount": 0,

                    "TotalPTOTime": "00:00"

                }

            ],

            "Registration": "FJ67ZFD"

        },

        {

            "BCANSList": [

                {

                    "AWTM": 0.00,

                    "AdBlueUsed": 0.00,

                    "AssetID": 11933,

                    "AverageDriving": 0,

                    "AverageMPG": 0.00,

                    "AvgDistancebyHB": 0.00,

                    "BCount": 0,

                    "CO2": 0.00,

                    "Depot": "GPS",

                    "EndDate": "",

                    "FriendlyName": "DAF 03304",

                    "HBCount": 0,

                    "NOX": 0.00,

                    "OdometerEnd": 0,

                    "OdometerStart": 0,

                    "PM": 0.00,

                    "PercentageofHBs": 0.00,

                    "Reg": "FJ67ZFE",

                    "StartDate": "",

                    "TotalDistanceTravelled": 0.00,

                    "TotalEngineOnTime": "00:00",

                    "TotalExcessiveIdleTimes": "00:00",

                    "TotalFuelBurnt": 0.00,

                    "TotalFuelUsedDriving": 0.00,

                    "TotalFuelUsedOnPTO": 0.00,

                    "TotalFuelUsedonIdle": 0.00,

                    "TotalIdleTimes": "00:00",

                    "TotalJourneyCount": 0,

                    "TotalPTOTime": "00:00"

                }

            ],

            "Registration": "FJ67ZFE"

        },

        {

            "BCANSList": [

                {

                    "AWTM": 0.00,

                    "AdBlueUsed": 0.00,

                    "AssetID": 12077,

                    "AverageDriving": 0,

                    "AverageMPG": 0.00,

                    "AvgDistancebyHB": 0.00,

                    "BCount": 0,

                    "CO2": 0.00,

                    "Depot": "GPS",

                    "EndDate": "",

                    "FriendlyName": "DAF 03397",

                    "HBCount": 0,

                    "NOX": 0.00,

                    "OdometerEnd": 0,

                    "OdometerStart": 0,

                    "PM": 0.00,

                    "PercentageofHBs": 0.00,

                    "Reg": "FJ67ZFH",

                    "StartDate": "",

                    "TotalDistanceTravelled": 0.00,

                    "TotalEngineOnTime": "00:00",

                    "TotalExcessiveIdleTimes": "00:00",

                    "TotalFuelBurnt": 0.00,

                    "TotalFuelUsedDriving": 0.00,

                    "TotalFuelUsedOnPTO": 0.00,

                    "TotalFuelUsedonIdle": 0.00,

                    "TotalIdleTimes": "00:00",

                    "TotalJourneyCount": 0,

                    "TotalPTOTime": "00:00"

                }

            ],

            "Registration": "FJ67ZFH "

        }

    ],

    "ErrorMessage": null

}

Comments

0 comments

Article is closed for comments.