Get started

    API Endpoint

        https://www.RoadBays.com/api
                

Welcome to the RoadBays API documentation! First you will need to get an API key by signing into your account, navigating to the company settings page and clicking “API”.

RoadBays uses API keys and basic HTTP Bearer Authorization to allow access to the API. All API requests must be sent over HTTPS. You can register a new RoadBays API key by signing into RoadBays and navigating to the settings page.





List Cases


    # Here is a curl example
    curl --location --request 
    GET 'https://www.roadbays.com/api/v1_Cases?startdate=10-1-2021&enddate=10-4-2021' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'

To get a list of cases by date range you need to make a GET call to the following url :
https://www.roadbays.com/api/v1_Cases




    Result example :

    [
        {
            "id": 408500,
            "dateCreated": "2021-10-03T09:07:13.84",
            "inactive": 0,
            "accountID": 0,
            "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
            "subAccountID": null,
            "dateOpened": "2021-10-03T09:07:13.84",
            "dateCompleted": "2021-10-03T09:09:56.12",
            "dateClosed": "2021-10-03T09:09:56.12",
            "dateCallBack": null,
            "dateEstCompletion": null,
            "dateRolling": null,
            "dateModified": "2021-10-03T09:09:56.12",
            "createdBy": "b5b1032a-6336-4d51-c1z3-bad295795192",
            "modifiedBy": "b5b1032a-6336-4d51-c1z3-bad295795192",
            "assignedUser": 81,
            "vendors": {
            "id": 10464,
            "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
            "subAccountID": 0,
            "inactive": 0,
            "dateCreated": "2021-10-02T06:54:38.93",
            "name": "Shop Location 1",
            "searchName": "Shop Location 1 (1234 Main Ave Green Bay )",
            "address": "1234 Main Ave",
            "city": "Green Bay",
            "stateId": 49,
            "state": null,
            "zip": "54304",
            "email": "test@email.com",
            "phone": "92012345687",
            "phone2": null,
            "fax": null,
            "hours": null,
            "locationId": null,
            "notes": null,
            "latitude": 47.254547,
            "longitude": -67.9403301,
            "vendorType": "CustomerShop",
            "ranking": 6
        },
            "vendorsId": 10464,
            "caseNumber": 8,
            "driverId": null,
            "caseStatus": {
            "id": 3,
            "name": "Closed"
        },
            "caseStatusId": 3,
            "description": "Test Header",
            "locationDescription": null,
            "units": {
            "id": 1030,
            "dateCreated": "2021-08-20T11:04:50.503",
            "inactive": 0,
            "accountID": 0,
            "keepTruckinId": null,
            "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
            "subAccountID": 0,
            "unitNumber": "3345",
            "description": "Mack Truck",
            "unitTypes": null,
            "unitTypesId": 1014,
            "customers": null,
            "customersId": null,
            "serialNo": "1XPBDP956AD486131",
            "engine": "MP8",
            "engineManufacturer": "MACK",
            "engineStrokeCycles": null,
            "engineNumberofCylinders": null,
            "license": null,
            "unitMake": "MACK",
            "unitModel": "Anthem",
            "modelYear": "2020",
            "fuelType": null,
            "wheelBase": null,
            "bodyType": null,
            "unitSearchLabel": "3345 Tractor"
        },
            "unitsId": 1030,
            "unitsIdSecondary": null,
            "repairReasons": null,
            "repairReasonsId": 12,
            "offSet": "-05:00",
            "latitude": null,
            "longitude": null,
            "priority": {
                "id": 5,
                "value": "5"
        },
            "priorityId": 5
            "maintenanceBoard": 1
        }
    ]

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.
startdate DateTime (required) Start Date of cases by Open Date
enddate DateTime (required) End Date of cases by Open Date

Get Case


    # Here is a curl example
    curl --location --request
    GET 'https://www.roadbays.com/api/v1_Cases/408500' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'

To get case details you need to make a GET call to the following url :
https://www.roadbays.com/api/v1_Cases/caseId




    Result example :

    {
        "id": 408500,
        "dateCreated": "2021-10-03T09:07:13.84",
        "inactive": 0,
        "accountID": 0,
        "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
        "subAccountID": null,
        "dateOpened": "2021-10-03T09:07:13.84",
        "dateCompleted": "2021-10-03T09:09:56.12",
        "dateClosed": "2021-10-03T09:09:56.12",
        "dateCallBack": null,
        "dateEstCompletion": null,
        "dateRolling": null,
        "dateModified": "2021-10-03T09:09:56.12",
        "createdBy": "b5b1032a-6336-4d51-c1z3-bad295795192",
        "modifiedBy": "b5b1032a-6336-4d51-c1z3-bad295795192",
        "assignedUser": 81,
        "vendors": null,
        "vendorsId": 10464,
        "caseNumber": 8,
        "driverId": null,
        "caseStatus": null,
        "caseStatusId": 3,
        "description": "This is a case description",
        "locationDescription": null,
        "units": null,
        "unitsId": 100030,
        "unitsIdSecondary": null,
        "repairReasons": null,
        "repairReasonsId": 12,
        "offSet": "-05:00",
        "latitude": null,
        "longitude": null,
        "priority": null,
        "priorityId": 5
        "maintenanceBoard": 1
    }

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.
Case Id integer (required) RoadBays system generated Id

Create Case by VIN


    # Here is a curl example
    curl --location --request
    POST 'https://www.roadbays.com/api/v1_Cases?vin=1XPCEP6Y0JD486131&description=Case Description&assignedUser=81' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'description=Case Description' \
    --data-urlencode 'vin=1XPCEP6Y0JD486131' \
    --data-urlencode 'assignedUser=81'
    --data-urlencode 'locDescription=located in NE corner of lot'
    --data-urlencode 'latitude=44.503807048107156'
    --data-urlencode 'longitude=-88.0080488474994'
    --data-urlencode 'userField1=custom field data 1'
    --data-urlencode 'userField2=custom field data 2'

To Create a case by an asset you need to make a POST call to the following url with an assets VIN, Case Description, and Assigned User :
https://www.roadbays.com/api/v1_Cases




    Result example :

    {
        "id": 4102,
        "dateCreated": "2021-10-24T20:40:44.428835-05:00",
        "inactive": 0,
        "accountID": 0,
        "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
        "subAccountID": null,
        "dateOpened": "2021-10-24T20:40:44.428835-05:00",
        "dateCompleted": null,
        "dateClosed": null,
        "dateCallBack": null,
        "dateEstCompletion": null,
        "dateRolling": null,
        "dateModified": null,
        "createdBy": null,
        "modifiedBy": null,
        "assignedUser": 81,
        "vendors": null,
        "vendorsId": null,
        "caseNumber": 39,
        "driverId": null,
        "caseStatus": null,
        "caseStatusId": 1,
        "description": "test111",
        "locationCreated": null,
        "units": null,
        "unitsId": 1030,
        "unitsIdSecondary": null,
        "repairReasons": null,
        "repairReasonsId": null,
        "offSet": "-05:00",
        "latitude": null,
        "longitude": null,
        "priority": null,
        "priorityId": 5
        "maintenanceBoard": 1
    }

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.
VIN string (required) Unit within Roadbays with associated VIN
UserId integer (required) RoadBays system generated Id for a registered User
Description String (required) Case Description
LocDescription String (optional) Location Description
Latitude String (optional) Case Latitude
Longitude String (optional) Case Longitude
userField1 String (optional) Custom field 1 on case
userField2 String (optional) Custom field 2 on case

Create Case Note


    # Here is a curl example
    curl --location --request 
       POST 'https://www.roadbays.com/api/v1_CaseNotes?caseId=4102¬eText=HelloWorld' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'caseId=4102' \
    --data-urlencode 'noteText=Hello World'

To Create a case note you need to make a POST call to the following url with the caseId and note text :
https://www.roadbays.com/api/v1_CaseNotes




    Result example :

    {
        "id": 2176,
        "dateCreated": "2021-10-24T20:42:57.4429432-05:00",
        "accountID": 0,
        "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
        "subAccountID": 0,
        "createdBy": "Roadbays API_External",
        "createdByName": "Roadbays API_External",
        "note": "Hello World",
        "caseID": 4102,
        "offSet": "-05:00"
    }

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.
Case Id integer (required) RoadBays system generated Id
Note Text string (required) note text to POST into case

Case Notification


    # Here is a curl example
    curl --location --request
    POST 'https://www.roadbays.com/api/v1CaseNotifications?caseId=4102&NotificationTypesId=3&NotificationContact=9207640865&CaseHeader=True&CaseNotes=True' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'CaseId=4102' \
    --data-urlencode 'NotificationTypesId=3'
    --data-urlencode 'NotificationContact=9207640865'
    --data-urlencode 'CaseHeader=True'
    --data-urlencode 'CaseNotes=True'

To Create a case notification you need to make a POST call to the following url with the caseId, NotificationTypesId, NotificationContact, CaseHeader, and CaseNotes parameters :
https://www.roadbays.com/api/v1CaseNotifications




    Result example :

    {
    "id": 39,
    "caseId": 4102,
    "invoiceId": 0,
    "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
    "inactive": 0,
    "dateCreated": "2021-12-05T05:59:37",
    "notificationTypes": null,
    "notificationTypesId": 3,
    "notificationContact": "9207640865",
    "firstName": null,
    "lastName": null,
    "caseHeader": true,
    "caseNotes": true,
    "invoiceHeader": null
    }

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.
CaseId integer (required) RoadBays system generated Id
NotificationTypesId int (required) RoadBays notification types; Email = 2 SMS = 3
NotificationContact String (required) Email or Phone number
CaseHeader bool (required) Notifications for case header only; True or False value
CaseNotes bool (required) Notifications for case notes only; True or False value

Share Case


    # Here is a curl example
    curl --location --request
    GET 'https://www.roadbays.com/api/v1_CaseShare?caseId=4102' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'caseId=4102' \

To Create share a case you need to make a GET call to the following url with the caseId :
https://www.roadbays.com/api/v1_CaseShare




    Result example :

    "{\"url\":\"https://www.roadbays.com/caseShared/details?key=KsOKGoz5uZLPi2&caseId=4102&invoiceId=0"}"

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.
Case Id integer (required) RoadBays system generated Id

List Invoices


    # Here is a curl example
    curl --location --request 
    GET 'https://www.roadbays.com/api/v1_Invoices?startdate=10-1-2021&enddate=10-4-2021' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'

To get a list of invoices by date range you need to make a GET call to the following url :
https://www.roadbays.com/api/v1_Invoices




    Result example :
    [
        {
            "id": 4074,
            "dateCreated": "2022-02-08T12:39:42.78",
            "inactive": 0,
            "accountID": 0,
            "accountGUID": "aae3e95d-dbd7-42fe-8786-440e867f4176",
            "stripeInvoiceId": null,
            "subAccountID": 0,
            "unitsId": 2379,
            "units": {
                "id": 2379,
                "dateCreated": "2021-12-20T08:39:41.94",
                "inactive": 0,
                "accountID": 0,
                "externalID": "0",
                "source": null,
                "keepTruckinId": null,
                "accountGUID": "aae3e95d-dbd7-42fe-8786-440e867f4176",
                "subAccountID": 0,
                "unitNumber": "98765",
                "description": "2018 Peterbilt MX13",
                "unitTypes": null,
                "unitTypesId": 1020,
                "customers": null,
                "customersId": 19,
                "serialNo": "1XPBDP9X0JD486131",
                "engine": "MP8",
                "engineManufacturer": "PACCAR",
                "engineStrokeCycles": null,
                "engineNumberofCylinders": null,
                "engineCapacity": null,
                "chassisWheelBase": null,
                "driveLineType": null,
                "frontAxlePosition": null,
                "brakeSystem": null,
                "gvwr": null,
                "wmi": null,
                "engineHorsePower": null,
                "transmission": null,
                "license": null,
                "unitMake": "Peterbilt",
                "unitModel": "MX13",
                "modelYear": "2018",
                "fuelType": null,
                "wheelBase": null,
                "bodyType": null,
                "tireSize": null,
                "length": null,
                "color": null,
                "unitSearchLabel": "98765 Tractor (1XPBDP9X0JD486131)"
        },
        "drivers": null,
        "driverId": 0,
        "vendorId": 1033,
        "vendors": null,
        "dateOpened": "2022-02-08T06:39:02",
        "dateCompleted": null,
        "dateClosed": null,
        "dateCallBack": null,
        "dateEstCompletion": null,
        "dateRolling": null,
        "dateModified": null,
        "vendorEta": null,
        "createdBy": "5d3c4dd2-149f-4de8-b324-e5278d9aa04a",
        "modifiedBy": null,
        "assignedUser": null,
        "caseNumber": 6,
        "invoiceNumber": 5,
        "invoiceStatus": {
                "id": 1,
                "name": "Open"
        },
        "invoiceStatusId": 1,
        "description": "test",
        "locationDescription": null,
        "poNumber": null,
        "secondaryPONumber": null,
        "odometer": 0,
        "vendorRating": 0,
        "vendorComment": null,
        "offSet": "-06:00"
        }
     ]

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.
startdate DateTime (required) Start Date of invoices by Open Date
enddate DateTime (required) End Date of invoices by Open Date

Get Invoice


    # Here is a curl example
    curl --location --request
    GET 'https://www.roadbays.com/api/v1_Invoices/408500' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'

To get invoice details you need to make a GET call to the following url :
https://www.roadbays.com/api/v1_Invoices/invoiceId




    Result example :

    {
        "id": 4149,
        "dateCreated": "2022-09-27T13:46:03.3531728+00:00",
        "inactive": 0,
        "accountID": 0,
        "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
        "stripeInvoiceId": null,
        "subAccountID": 0,
        "unitsId": 3779,
        "units": null,
        "drivers": null,
        "driverId": 0,
        "vendorId": 0,
        "vendors": null,
        "dateOpened": "2022-09-27T13:46:03.3531728+00:00",
        "dateCompleted": null,
        "dateClosed": null,
        "dateCallBack": null,
        "dateEstCompletion": null,
        "dateRolling": null,
        "dateModified": null,
        "vendorEta": null,
        "createdBy": null,
        "modifiedBy": null,
        "assignedUser": null,
        "caseNumber": 20,
        "invoiceNumber": 0,
        "invoiceStatus": null,
        "invoiceStatusId": 1,
        "description": "testinvoice",
        "locationDescription": "locationDescription",
        "poNumber": null,
        "secondaryPONumber": null,
        "odometer": 0,
        "vendorRating": 0,
        "vendorComment": null,
        "offSet": "-05:00"
    }

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.
Invoice Id integer (required) RoadBays system generated Id

Create Invoice by VIN


    # Here is a curl example
    curl --location --request
    POST 'https://www.roadbays.com/api/v1_Invoices?vin=1XPCEP6Y0JD486131&description=Invoice Description&caseNumber=44&locDescription=located in NE corner of lot' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'description=Invoice Description' \
    --data-urlencode 'vin=1XPCEP6Y0JD486131' \
    --data-urlencode 'locDescription=located in NE corner of lot'
    --data-urlencode 'caseNumber=44'

To Create a invoice by an asset you need to make a POST call to the following url with an assets VIN, and Invoice Description:
https://www.roadbays.com/api/v1_Invoices




    Result example :

    {
        "id": 4149,
        "dateCreated": "2022-09-27T13:46:03.3531728+00:00",
        "inactive": 0,
        "accountID": 0,
        "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
        "stripeInvoiceId": null,
        "subAccountID": 0,
        "unitsId": 3779,
        "units": null,
        "drivers": null,
        "driverId": 0,
        "vendorId": 0,
        "vendors": null,
        "dateOpened": "2022-09-27T13:46:03.3531728+00:00",
        "dateCompleted": null,
        "dateClosed": null,
        "dateCallBack": null,
        "dateEstCompletion": null,
        "dateRolling": null,
        "dateModified": null,
        "vendorEta": null,
        "createdBy": null,
        "modifiedBy": null,
        "assignedUser": null,
        "caseNumber": 20,
        "invoiceNumber": 0,
        "invoiceStatus": null,
        "invoiceStatusId": 1,
        "description": "testinvoice",
        "locationDescription": "locationDescription",
        "poNumber": null,
        "secondaryPONumber": null,
        "odometer": 0,
        "vendorRating": 0,
        "vendorComment": null,
        "offSet": "-05:00"
    }

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.
VIN string (required) Unit within Roadbays with associated VIN
caseNumber integer (required) RoadBays system generated case number
Description String (required) Invoice Description
LocDescription String (optional) Location Description

List Reasons


    # Here is a curl example
    curl --location --request
    GET 'https://www.roadbays.com/api/v1_RepairReasons' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'

To get a list of repair reasons you need to make a GET call to the following url :
https://www.roadbays.com/api/v1_RepairReasons




    Result example :

    [
        {
        "id": 11,
        "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
        "inactive": 0,
        "dateCreated": "2021-08-20T11:01:30.07",
        "name": "Breakdown",
        "notes": null
        },
        {
        "id": 12,
        "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
        "inactive": 0,
        "dateCreated": "2021-08-20T11:01:33.757",
        "name": "Driver Abuse",
        "notes": null
        },
        {
        "id": 13,
        "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
        "inactive": 0,
        "dateCreated": "2021-08-20T11:01:37.433",
        "name": "Accident",
        "notes": null
        }
    ]

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.

List Users


    # Here is a curl example
    curl --location --request
    GET 'https://www.roadbays.com/api/v1_CustomerUsers' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'

To get a list of users you need to make a GET call to the following url :
https://www.roadbays.com/api/v1_CustomerUsers




    Result example :

    [
        {
        "id": 81,
        "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
        "inactive": 0,
        "dateCreated": "2021-08-20T11:00:10",
        "userTypes": null,
        "userTypesId": 2,
        "email": "demo@roadbays.com",
        "firstName": "Demo",
        "lastName": "User"
        }
    ]

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.

List Drivers


    # Here is a curl example
    curl --location --request
    GET 'https://www.roadbays.com/api/v1_Drivers' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'

To get a list of drivers you need to make a GET call to the following url :
https://www.roadbays.com/api/v1_Drivers




    Result example :

    [
        {
            "id": 1011,
            "accountID": 0,
            "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
            "inactive": 0,
            "dateCreated": "2022-02-21T05:32:48.15",
            "firstName": "Demo",
            "lastName": "User",
            "email": "demo@roadbays.com",
            "employeeId": "111111",
            "balance": "1000",
            "phone": "9203141144"
        }
    ]

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.

Create Driver


    # Here is a curl example
    curl --location --request
    POST 'https://www.roadbays.com/api/v1_Drivers?firstName=Demo&lastName=User&balance=1000&phone=9203141144&employeeId=1111111&email=demo@roadbays.com' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'firstName=Demo' \
    --data-urlencode 'lastName=User' \
    --data-urlencode 'balance=1000' \
    --data-urlencode 'phone=9203141144' \
    --data-urlencode 'employeeId=1111111' \
    --data-urlencode 'email=demo@roadbays.com' \

To Create a Driver you need to make a POST call to the following url with a fistName, lastName, and email as required parameters :
https://www.roadbays.com/api/v1_Drivers




    Result example :
    {
        "id": 1011,
        "accountID": 0,
        "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
        "inactive": 0,
        "dateCreated": "2022-02-21T05:32:48.15",
        "firstName": "Demo",
        "lastName": "User",
        "email": "demo@roadbays.com",
        "employeeId": "111111",
        "balance": "1000",
        "phone": "9203141144"
    }

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.
FirstName String (required)
LastName String (required)
Email String (required)
Balance String
Phone String
EmployeeId String

List Units


    # Here is a curl example
    curl --location --request
    GET 'https://www.roadbays.com/api/v1_Units' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'

To get a list of all your assets you need to make a GET call to the following url :
https://www.roadbays.com/api/v1_Units




    Result example :

    [
        {
            "id": 1030,
            "dateCreated": "2021-08-20T11:04:50.503",
            "inactive": 0,
            "accountID": 0,
            "keepTruckinId": null,
            "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
            "subAccountID": 0,
            "unitNumber": "3345",
            "description": "Mack Truck",
            "unitTypes": null,
            "unitTypesId": 1014,
            "serialNo": "1XAPDP9X0PD486131",
            "engine": "MP8",
            "engineManufacturer": "MACK",
            "engineStrokeCycles": null,
            "engineNumberofCylinders": null,
            "license": null,
            "unitMake": "MACK",
            "unitModel": "Anthem",
            "modelYear": "2020",
            "fuelType": null,
            "wheelBase": null,
            "bodyType": null
        }
    ]

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.

Get Unit


    # Here is a curl example
    curl --location --request
    GET 'https://www.roadbays.com/api/v1_Units/1030' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'

To get asset details you need to make a GET call to the following url :
https://www.roadbays.com/api/v1_Units/unitId




    Result example :

    {
        "id": 1030,
        "dateCreated": "2021-08-20T11:04:50.503",
        "inactive": 0,
        "accountID": 0,
        "keepTruckinId": null,
        "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
        "subAccountID": 0,
        "unitNumber": "3345",
        "description": "Mack Truck",
        "unitTypes": null,
        "unitTypesId": 1014,
        "serialNo": "1XAPDP9X0PD486131",
        "engine": "MP8",
        "engineManufacturer": "MACK",
        "engineStrokeCycles": null,
        "engineNumberofCylinders": null,
        "license": null,
        "unitMake": "MACK",
        "unitModel": "Anthem",
        "modelYear": "2020",
        "fuelType": null,
        "wheelBase": null,
        "bodyType": null
    }

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.
Unit Id integer (required) RoadBays system generated Id

Create Unit


    # Here is a curl example
    curl --location --request
    POST 'https://www.roadbays.com/api/v1_Units?vin=1XPCEP6Y0JD486131&unitNumber=12345&unitTypeId=1001&license=1XY23Z45' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'vin=1XPCEP6Y0JD486131' \
    --data-urlencode 'unitNumber=12345' \
    --data-urlencode 'unitTypeId=1001' \
    --data-urlencode 'license=1XY23Z45' \

To Create a Unit you need to make a POST call to the following url with an assets VIN, and UnitNumber :
https://www.roadbays.com/api/v1_Units




    Result example :

    {
    "id": 1030,
    "dateCreated": "2021-08-20T11:04:50.503",
    "inactive": 0,
    "accountID": 0,
    "keepTruckinId": null,
    "accountGUID": "b5b1032a-6336-4d51-c1z3-bad295795192",
    "subAccountID": 0,
    "unitNumber": "3345",
    "description": "Mack Truck",
    "unitTypes": null,
    "unitTypesId": 1014,
    "serialNo": "1XAPDP9X0PD486131",
    "engine": "MP8",
    "engineManufacturer": "MACK",
    "engineStrokeCycles": null,
    "engineNumberofCylinders": null,
    "license": null,
    "unitMake": "MACK",
    "unitModel": "Anthem",
    "modelYear": "2020",
    "fuelType": null,
    "wheelBase": null,
    "bodyType": null
    }

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.
VIN string (required) Unit within Roadbays with associated VIN
UnitTypeId integer (required) RoadBays system generated Id for Unit Type
Unit Number String (required) Company Unit Number
License String Company License Number

Create Fault Code


    # Here is a curl example
    curl --location --request
    POST 'https://www.roadbays.com/api/v1_FaultCodes?vin=1XPCEP6Y0JD486131&code=P1401&codeDescription=CrankcaseAirPressure&platform=api&status=Open&source=Crankcase&externalId=367423' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'vin=1XPCEP6Y0JD486131' \
    --data-urlencode 'code=P1401' \
    --data-urlencode 'codeDescription=Crank Case Air Pressure' \
    --data-urlencode 'status=open' \
    --data-urlencode 'source=Crankcase' \
    --data-urlencode 'platform=api' \
    --data-urlencode 'externalId=367423' \

You can add your asset fault codes to RoadBays by posting each code by by the VIN. Create a fault code you need to make a POST call to the following url with an assets VIN, and the code :
https://www.roadbays.com/api/v1_FaultCodes




    Result example :

    {
        "id": 68139,
        "externalId": "111",
        "dateCreated": "2022-03-21T15:15:09",
        "inactive": 0,
        "accountGUID": "b6b1032b-3150-4c51-2548-f7b3b7a8e9f70",
        "units": null,
        "unitsId": 3379,
        "caseId": 5141,
        "serialNo": "23TYG1EG0GFA91368",
        "code": "P054A",
        "codeDescription": "Cold Start \"B\" Camshaft Position Timing Over-Advanced Bank 1",
        "source": "CANBUS_SECONDARY_PASSENGER_15765",
        "platform": null,
        "status": "closed",
        "type": null,
        "firstObserved": "3/20/2022 4:13:01 PM",
        "lastObserved": "3/20/2022 4:13:01 PM"
    }

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.
VIN string (required) Unit within Roadbays with associated VIN
Code string (required) Fault Code
Code Description String (optional) Description of Code
Platform String (optional) Label which platform the fault code originated from
Status String (optional) is fault code still open
Source String (optional) Source of the fault code
ExternalId String (optional) External Id of the fault code. This can be used to update fault code status

Update Fault Code


    # Here is a curl example
    curl --location --request
    PUT 'https://www.roadbays.com/api/v1_FaultCodes?id=145585&status=closed' \
    --header 'Authorization: Bearer C-A5D0FOiHDQgtadfadsfSo42ExhPoO5HgzweNZL8_-lEh6E'
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'id=145585' \
    --data-urlencode 'externalId=1455a58s45' \
    --data-urlencode 'status=closed' \

Roadbays allows fault codes to be updated by RoadBays internal Id or an external Id assigned upon creating the fault code. You need to make a PUT call to the following url with an assets Id or externalId, along with the status change :
https://www.roadbays.com/api/v1_FaultCodes




    Result example :

    {
        "id": 68139,
        "externalId": "111",
        "dateCreated": "2022-03-21T15:15:09",
        "inactive": 0,
        "accountGUID": "b6b1032b-3150-4c51-2548-f7b3b7a8e9f70",
        "units": null,
        "unitsId": 3379,
        "caseId": 5141,
        "serialNo": "23TYG1EG0GFA91368",
        "code": "P054A",
        "codeDescription": "Cold Start \"B\" Camshaft Position Timing Over-Advanced Bank 1",
        "source": "CANBUS_SECONDARY_PASSENGER_15765",
        "platform": null,
        "status": "closed",
        "type": null,
        "firstObserved": "3/20/2022 4:13:01 PM",
        "lastObserved": "3/20/2022 4:13:01 PM"
    }

QUERY PARAMETERS

Field Type Description
Bearer Token String Your API key.
Id string (optional/required) RoadBays internally assigned Id. You must assign this ID or the external Id to update a fault code
ExternalId string (optional/required) You must assign the externalId or the RoadBays interal Id to update a fault code
Status String (required) Is the status of the fault code still (Open, Closed)

Errors

The RoadBays API uses the following error codes:

Error Code Meaning
401 Unauthorized – Verify that you have passed your company’s subdomain and API key correctly.
403 Forbidden – The endpoint that you have tried to access you do not have privileges to.
404 Not Found – The resource in the endpoint could not be found. Verify the resource id.
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarially offline for maintanance. Please try again later.