The Driver Daily Documents are the supporting Documents attached by the User of the Hours of Service application. The Documents are used to check their Logs for accuracy.
Fields
Tag | Data Type | Required | Description |
accountId | Long | No | The id of the Account that owns this record. |
assetId * | Long | No | The id of the Vehicle refueled based on the Fuel Receipt |
changedBy | Text | Auto | The id of the User who made the last change to this record |
city * | Character (255) | No | The city where the fuel was purchased based on the Fuel Receipt |
cost * | Double Precision | No | The price per liter of the fuel purchased based on the Fuel Receipt |
dateTime * | Text | No | The date and time when the fuel was purchased based on the Fuel Receipt Note: Format is in timestamp and timezone (YYYY-MM-DDTHH:MM:SS.sssZ, e.g: 1970-01-01T00:00:00.000Z) |
documentType | Character (255) | Yes |
Type of Document. This can either be:
|
driverDailyId | Long | No | The id of the Driver Daily record associated with Document. If this is not included in the POST, it automatically gets today’s Driver Daily id. If the Driver does not have a Driver Daily record for today yet, the API automatically creates one and uses that id. |
fuelType * | Character (255) | No | Type of the fuel purchased based on the Fuel Receipt. Can be any of the following:
|
liters * | Double Precision | No | The number of liters purchased based on the Fuel Received |
id | Auto-incremented Long | Auto | Unique identifier |
lastChangedDate | Text | Auto | Auto-generated timestamp of the last change made to this record Note: Format is in timestamp and timezone (YYYY-MM-DDTHH:MM:SS.sssZ, e.g: 1970-01-01T00:00:00.000Z) |
media | Array | Yes, (No for Fuel Receipt) | The uploaded media attached to the Document. This is not required for Fuel Receipt |
note | Text (unlimited) | No | Notes/Details about the Document. |
odometerKm | Double Precision | No | The Vehicle’s odometer value for the Fuel Receipt |
referenceNumber | Character (255) | No | The reference number of the Fuel Receipt |
state | Character (255) | No | The state where the fuel was purchased based on the Fuel Receipt |
userId | Long | Yes | The ID of the Driver of this Daily Document. |
Read
API PATH: | /api/v2/driverDailyDocuments/ |
METHOD: | GET |
PARAMETERS: |
driver-daily-id – Retrieves matching records for a Driver Daily (e.g. driver-daily-id=247446, all Driver Dailies by default) |
SORTING: | sort=id – Sort records by their id field in ascending order (DEFAULT) sort=-id – Sort records by their id field in descending order sort=last-changed-date– Sort records by their last change date field in ascending order sort=-last-changed-date– Sort records by their last change date field in descending order |
QUERY STRING EXAMPLES: | Get the Driver Daily Document with the specified id: api/v2/driverDailyDocuments/149 Get all Driver Daily Documents for the specific User: ?user-id=1250941 Get two Driver Daily Documents of the current Account with an offset of 1 : ?offset=1&limit=2 Get all Driver Daily Documents of the current Account sorted by note alphabetically: ?sort=note |
EXAMPLE RESPONSE: |
[ { "userId": 1258475, "driverDailyId": 379103, "documentType": "Fuel Receipt", "referenceNumber": "005", "note": "Sample Only", "media": [ { "name": "IMG_2018-06-11-10.30.24.jpg", "filename": "IMG_2018-06-11-22.30.24.jpg", "id": 4189 } ], "dateTime": "2018-06-11T11:00:00.000Z", "fuelType": "Gasoline", "city": "Las Vegas", "state": "NV", "odometerKm": 8, "cost": 8, "liters": 8, "assetId": 1356070, "accountId": 1248280, "id": 149, "changedBy": 1258475, "lastChangedDate": "2018-06-11T12:00:00.000Z" } ] |
Create
API PATH: | /api/v2/driverDailyDocuments/ |
METHOD: | POST |
EXAMPLE REQUEST: | To create add a Driver Daily Document. The request must be a multipart. 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="json" [ { "userId": 1258475, "driverDailyId": 379103, "documentType": "Fuel Receipt", "referenceNumber": "005", "note": "Sample Only", "media": [ { "name": "IMG_2018-06-11-22.30.24.jpg", "filename": "IMG_2018-06-11-22.30.24.jpg" } ], "dateTime": "2018-06-11T11:00:00.000Z", "fuelType": "Gasoline", "city": "Las Vegas", "state": "NV", "odometerKm": 8, "cost": 8, "liters": 8, "assetId": 1356070 } ] ---------------------------acebdf13572468 Content-Disposition: form-data; name="file"; filename="IMG_2018-06-11-22.30.24.jpg" Content-Type: image/png <@INCLUDE *C:\Users\Marc\Desktop\IMG_2018-06-11-22.30.24.jpg*@> ---------------------------acebdf13572468-- |
EXAMPLE RESPONSE: |
[ { "userId": 1258475, "driverDailyId": 379103, "documentType": "Fuel Receipt", "referenceNumber": "005", "note": "Sample Only", "media": [ { "name": "IMG_2018-06-11-22.30.24.jpg", "filename": "IMG_2018-06-11-22.30.24.jpg", "id": 4189 } ], "dateTime": "2018-06-11T12:00:00.000Z", "fuelType": "Gasoline", "city": "Las Vegas", "state": "NV", "odometerKm": 8, "cost": 8, "liters": 8, "assetId": 1356070, "accountId": 1248280, "id": 149, "changedBy": 1258475, "lastChangedDate": "2018-06-11T12:00:00.000Z" } ] |
Update
API PATH: | /api/v2/driverDailyDocuments/ |
METHOD: | PUT |
EXAMPLE REQUEST: |
[ { "userId": 1258475, "driverDailyId": 379103, "documentType": "Fuel Receipt", "referenceNumber": "005", "note": "Sample Only", "media": [ { "name": "IMG_2018-06-11-22.30.24.jpg", "filename": "IMG_2018-06-11-22.30.24.jpg", "id": 4189 } ], "dateTime": "2018-06-11T11:00:00.000Z", "fuelType": "Gasoline", "city": "Las Vegas", "state": "NV", "odometerKm": 8, "cost": 8, "liters": 8, "assetId": 1356070, "accountId": 1248280, "id": 149 } ] |
EXAMPLE RESPONSE: |
[ { "userId": 1258475, "driverDailyId": 379103, "documentType": "Fuel Receipt", "referenceNumber": "005", "note": "Sample Only", "media": [ { "name": "IMG_2018-06-11-22.30.24.jpg", "filename": "IMG_2018-06-11-22.30.24.jpg", "id": 4189 } ], "dateTime": "2018-06-11T11:00:00.000Z", "fuelType": "Gasoline", "city": "Las Vegas", "state": "NV", "odometerKm": 8, "cost": 8, "liters": 8, "assetId": 1356070, "accountId": 1248280, "id": 149, "changedBy": 1258475, "lastChangedDate": "2018-06-11T12:00:00.000Z" } ] |
Delete
API PATH: | /api/v2/driverDailyDocuments/<id> |
METHOD: | DELETE |
API error calls
ERROR MESSAGE | POSSIBLE CAUSES |
JSON read failed: <error> | JSON error with the error message |