FMCSA Web Services

The Hours of Service platform provides support for two Data Transfer methods  under the telematics group (aside from the local transfer methods: USB 2.0 and Bluetooth®). These methods are used to transfer ELD data from the application to the FMCSA enforcement personnel.

The first method is the ELD Web Service Interface which allows drivers to send ELD data in a plain POST request that will in turn SUBMIT the data to the FMCSA Web Service, where it will be validated. This method also comes with a PING method that can be accessed using a GET request to conduct a connectivity diagnostic check without submitting any data to the FMCSA service.

Submit

API PATH: /api/v2/fmcsa/submit
METHOD: POST
EXAMPLE REQUEST:
{
  "eldIdentifier": "TESTXX",
  "eldRegistrationId": "TEST",
  "comment": "This is a comment",
  "eldFilename": "Drive3322111317-000000000.csv",
  "eldFileContent": "ELD_CSV_FILE_CONTENT" 
}
SUCCESS RESPONSE:
{
  "status": "Valid",
  "errorCount": 0,
  "errors":[],
  "broadcast": "Global message from FMCSA",
  "submissionId": "4cc71e38-cc9f-4504-886b-8a58509018e6"
}
ERROR RESPONSE
{
  "status": "Warning",
  "errorCount": 1,
  "errors":[
    {
      "errorType": "Warning",
      "message": "Parameter Mismatch",
      "detail": "<p>The ELD Registration ID passed when the file was submitted (TEST) does not match the values contained in the ELD Output FIle (TEXT).</p>",
      "line": 8,
      "start": 1,
      "end": 4
    }
  ],
  "broadcast": "Global message from FMCSA",
  "submissionId": "4cc71e38-cc9f-4504-886b-8a58509018e6"
}

Multiple Submit

API PATH: /api/v2/fmcsa/multipleSubmit
METHOD: POST
EXAMPLE REQUEST:
{
  "comment": "This is a comment 2018.02.28",
  "fromDateTime": "2018-02-27T16:00:00Z",
  "toDateTime": "2018-02-28T15:59:59Z",
  "driverIds": [
    1334248,
    1334249
  ],
  "assetIds": [
    1461302,
    1461303,
    1461304
  ]
}
RESPONSE:
[ 
  { 
    "driverId": 1334248,
    "assetIds": [ 
      1461302,
      1461303,
      1461304
    ],
    "driverName": "Driver1 FMCSA",
    "fmcsaResponse": { 
      "status": "Valid",
      "errorCount": 0,
      "errors": [],
      "broadcast": "Global message from FMCSA",
      "submissionId": "372c4bbb-8d90-4561-886c-926d43910d9b"
     }
  },
  { 
    "driverId": 1334249,
    "assetIds": [ 
      1461302,
      1461303,
      1461304
    ],
    "driverName": "Driver2 FMCSA",
    "fmcsaResponse": { 
      "status": "Valid",
      "errorCount": 0,
      "errors": [],
      "broadcast": "Global message from FMCSA",
      "submissionId": "2dfa9deb-94b1-4d7f-9aa8-c66ce9635ef8"
    }
  }
]

Ping

API PATH: /api/v2/fmcsa/ping
METHOD: GET
PARAMETERS: eld-identifier – The ELD Identifier of the Account
eld-registration-id – The ELD Registration ID of the device used by the Driver
QUERY STRING EXAMPLES: Test the connection to FMCSA Web Service using a specific ELD Identifier and ELD Registration id: api/v2/fmcsa/ping?eld-identifier=TESTXX&eld-registration-id=TEST
SUCCESS REQUEST:
{
  "status": "Success",
  "broadcast": "Global message from FMCSA"
}
ERROR RESPONSE:
{
  "status": "InvalidRegistrationData",
  "broadcast": "Global message from FMCSA"
}

The second method is the ELD Email Interface which allows Drivers to send ELD data in a multipart POST request containing a CSV file with the ELD data inside it. The file will be sent to the server, encrypted and then sent to the FMCSA enforcement personnel for decryption and verification.

Email

API PATH: /api/v2/fmcsa/email
METHOD: POST
PARAMETERS eld-identifier – The ELD Identifier of the Account
eld-registration-id – The ELD Registration ID of the device used by the Driver
EXAMPLE REQUEST: To send an email to FMCSA Web Service using the email interface, the request must be a multipart.
Header

Content-Type: multipart/form-data; boundary=-------------------------acebdf13572468
User-Agent: Fiddler
Authorization: Basic [base64_Credentials]
Host: staging.vistracks.com

Body

---------------------------acebdf13572468
Content-Disposition: form-data; name="eld-file"; filename="Drive3322111317-000000000.csv"
Content-Type: text/csv

<@INCLUDE *C:\Users\VT\Desktop\Drive3322111317-000000000.csv*@>
---------------------------acebdf13572468--
RESPONSE: An email will be sent to the system’s configured email address, informing whether or not the request was successful, along with error messages if it wasn’t.