DVIR Report Send Email is used to send the DVIR Report(s) to a specific email address. The API accepts a plain HTTP request with parameters specifying which PDF(s) to be retrieved from the server, or a multipart request with parameters and the PDF(s) to be sent to the email address specified. All parameters are required in order to construct the email subject and body.
Send by HTTP request
API PATH: | /api/v2/dvirReportSendEmail |
METHOD: | POST |
PARAMETERS: | user-id – Retrieves the DVIR Report of the User specified dvir-timestamp – Retrieves the DVIR Report from the server based on the DVIR timestamp specified dvir-type – Retrieves the DVIR Report from the server based on the DVIR type specified email-address – Specifies the email address to which the DVIR Report PDF(s) will be sent |
QUERY STRING EXAMPLES: | Retrieves and sends the specified User’s DVIR Report to the specified email address: dvirReportSendEmail?user-id=1322500&email-address=useradmin@mail.com&dvir-timestamp=2018-01-11T04%3A33%3A13.725Z&dvir-type=pre-trip |
RESPONSE: |
DVIR Report was emailed successfully |
Send by multipart HTTP request
API PATH: | /api/v2/dvirReportSendEmail |
METHOD: | POST |
PARAMETERS | user-id – Retrieves the DVIR Report of the User specified dvir-timestamp – Retrieves the DVIR Report from the server based on the DVIR timestamp specified dvir-type – Retrieves the DVIR Report from the server based on the DVIR type specified email-address – Specifies the email address to which the DVIR Report PDF(s) will be sent |
QUERY STRING EXAMPLES: | Reads from the multipart request and sends the PDF file to the specified email address: dvirReportSendEmail?user-id=1322500&email-address=useradmin@mail.com&dvir-timestamp=2018-01-11T04%3A33%3A13.725Z&dvir-type=pre-trip |
EXAMPLE REQUEST: |
To send a DVIR Report through a multipart request, it must have a PDF file. The PDF must have a name of “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="DVIRReport.pdf" Content-Type: application/pdf <@INCLUDE *C:\Users\User\Desktop\DVIRReport.pdf*@> ---------------------------acebdf13572468-- |
RESPONSE: |
DVIR Report was emailed successfully |