Certified Logs

The Certified Logs API is used to view, download, upload or generate a Driver’s daily Certified Logs.

Read

API PATH: /api/v2/certifiedLogs
METHOD: GET
PARAMETERS: log-date – [REQUIRED] Retrieves the Certified Log based on the date specified.
user-id – [ONLY for USER_ADMIN and higher] Retrieves the Certified Log of the User specified. If authenticated User does not have USER_ADMIN permissions, the User’s own Certified Log is returned.
QUERY STRING EXAMPLES: Get the User’s own Certified Log on the specified date: api/v2/certifiedLogs?log-date=2017-02-20
Get the specified User’s Certified Log on the specified date (works for USER_ADMIN only) : api/v2/certifiedLogs?log-date=2017-02-20&user-id=1254763
RESPONSE: Opens the uploaded Certified Log PDF in a new browser tab.  When downloaded, the filename will be in this format: <driver_email>_DOT_<YYYY-MM-DD>.pdf
ERROR RESPONSE:

When the parameters are incorrect or there is no uploaded Certified Log for that day and User. This error message is returned.

<Error>
  <ErrorCode>3000</ErrorCode>
  <Message><![CDATA[File not found - Request URL: https://eld.azuga.com/api/v2/certifiedLogs?log-date=2017-02-20&user-id=1254763]]></Message>
  <Details><ObjectType></ObjectType></Details>
</Error>

Note: Use the HEAD method with the same parameters as the GET method to check if a Certified Log has been uploaded.

Download

API PATH: /api/v2/certifiedLogExport
METHOD: GET
PARAMETERS: from-log-date and to-log-date – [REQUIRED, should only be within 2 weeks] Retrieves the Certified Log(s) from and to the date specified.
user-id – [ONLY for USER_ADMIN and higher] Retrieves the Certified Logs of the User specified. All Users by default
terminal-id – [ONLY for USER_ADMIN and higher] Retrieves the Certified Logs of all Users from the Terminal specified. All Users from all Terminals by default
QUERY STRING EXAMPLES: Get the specified User’s Certified Logs on the specified date-range: api/v2/certifiedLogExport?from-log-date=2017-10-13&to-log-date=2017-10-19&user-id=1258963
Get the Certified Logs of all Users on the specified Terminal on the specified date-range: api/v2/certifiedLogExport?from-log-date=2017-10-13&to-log-date=2017-10-19&terminal-id=2701
RESPONSE: Downloads a zip file containing all the available Certified Log PDF(s).  When downloaded, the filename of the zip will be in this format: <Certified-Logs_All-Drivers_All-Terminals_YYYY-MM-DD_YYYY-MM-DD>.zip
Note: The All-Drivers and All-Terminals will be replaced with the Driver’s email or the Terminal name, depending on the parameters supplied. The first date indicates the start while the second indicates the end of the date range.

Upload

API PATH: /api/v2/certifiedLogs
METHOD: POST
PARAMETERS log-date – [REQUIRED] Uploads the Certified Log and sets its log date based on the date specified.
user-id – [ONLY available for USER_ADMIN and higher, OPTIONAL] Uploads the Certified Log and sets its user id based on the value specified
EXAMPLE REQUEST:

To upload a Certified Log. The request must be a multipart and must have a PDF file. 

Header

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

Body

---------------------------acebdf13572468
 Content-Disposition: form-data; name="file"; filename="CertifiedLog.pdf"
 Content-Type: application/pdf

 <@INCLUDE *C:\Users\User\Desktop\CertifiedLog.pdf*@>
 ---------------------------acebdf13572468--

Create

API PATH: /api/v2/certifiedLogReport
METHOD: POST
PARAMETERS log-date – [REQUIRED] Generates a Certified Log and sets its log date based on the date specified.
user-id – [REQUIRED] Generates a Certified Log and sets its user id based on the value specified.