{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/rewards/history.json","auth":"required","results":{"codes":[{"status":200,"language":"json","code":"{  \n   \"rewardHistoryFeed\":{  \n      \"code\":200,\n      \"message\":\"Success\",\n      \"reason\":null,\n      \"generatedAtInMillis\":1451384766578,\n      \"rewardsHistory\":[  \n         {  \n            \"driverName\":\"Daniel Mayers\",\n            \"rewardId\":\"7a6b04aa-13aa-4a97-b36a-3f3b21fded3d\",\n            \"rewardAmount\":50,\n            \"rewardSubject\":\"Azuga Rewards\",\n            \"rewardMessage\":\"Good Job!!\",\n            \"brand\":\"Amazon\",\n            \"status\":\"Redeemed\",\n            \"sentAt\":1450185186000,\n            \"sender\":\"Neil Patrick\",\n            \"vehicleName\":\"Daniel SUV\",\n            \"redeemedAt\":1451038386000,\n            \"redemptionCode\":\"VX48-35XFJW-ERAL\",\n            \"challengeKey\":null,\n            \"brandId\":1\n         },\n         {  \n            \"driverName\":\"Kate Joe\",\n            \"rewardId\":\"f7393e10-311b-4766-850b-3afa1f3ad495\",\n            \"rewardAmount\":10,\n            \"rewardSubject\":\"Azuga Rewards\",\n            \"rewardMessage\":\"Good job!!\",\n            \"brand\":null,\n            \"status\":\"Pending\",\n            \"sentAt\":1449042306000,\n            \"sender\":\"Neil Patrick\",\n            \"vehicleName\":\"Joe's truck,\n            \"redeemedAt\":null,\n            \"redemptionCode\":null,\n            \"challengeKey\":null,\n            \"brandId\":null\n         }\n      ]\n   }\n}","name":""}]},"settings":"559288b86bf22f170075b794","examples":{"codes":[]},"method":"get","params":[{"name":"fromDate","type":"timestamp","default":"","desc":"Start date of the period for which details need to be retrieved (in milliseconds)","required":true,"in":"query","ref":"","_id":"564181959417b40d00c0fbce"},{"name":"toDate","type":"timestamp","default":"","desc":"End date of the period for which details need to be retrieved (in milliseconds)","required":true,"in":"query","ref":"","_id":"564181959417b40d00c0fbcd"},{"name":"status","type":"string","default":"","desc":"Status of the reward i.e. whether it is pending or redeemed","required":false,"in":"query","ref":"","_id":"564181959417b40d00c0fbcc"}]},"next":{"description":"","pages":[]},"title":"Reward History","type":"endpoint","slug":"rewards-history","excerpt":"This API provides you with information of rewards that have been awarded to drivers. Rewards are gift cards given to drivers based on their driving behaviour. The API response includes status of the rewards, reward amount, driver names etc.","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"https://api.azuga.com/azuga-ws/v1/rewards/history.json?fromDate=1448955906000&toDate=1451375106000&status=all\",\n  \"title\": \"Sample Request\"\n}\n[/block]\n##API Response explanation\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"code\",\n    \"1-0\": \"message\",\n    \"3-0\": \"generatedAtInMillis\",\n    \"0-1\": \"API Status Code\",\n    \"1-1\": \"API Message\",\n    \"3-1\": \"API generation timestamp in milliseconds\",\n    \"2-0\": \"reason\",\n    \"2-1\": \"Reason for failure\",\n    \"4-0\": \"rewardsHistory\",\n    \"4-1\": \"An array of rewardsHistory objects\",\n    \"5-0\": \"driverName\",\n    \"6-0\": \"rewardId\",\n    \"7-0\": \"rewardAmount\",\n    \"8-0\": \"rewardSubject\",\n    \"9-0\": \"rewardMessage\",\n    \"10-0\": \"brand\",\n    \"11-0\": \"status\",\n    \"12-0\": \"sentAt\",\n    \"13-0\": \"sender\",\n    \"14-0\": \"vehicleName\",\n    \"15-0\": \"redeemedAt\",\n    \"16-0\": \"redemptionCode\",\n    \"17-0\": \"challengeKey\",\n    \"18-0\": \"brandId\",\n    \"5-1\": \"Name of the driver\",\n    \"6-1\": \"Unique identifier of the reward\",\n    \"7-1\": \"Amount that has been rewarded to the driver\",\n    \"8-1\": \"Subject of the Reward\",\n    \"9-1\": \"Message from the supervisor in the reward\",\n    \"10-1\": \"Brand at which the reward was redeemed\",\n    \"11-1\": \"Status of the reward\",\n    \"12-1\": \"Timestamp at which the reward was sent (in milliseconds)\",\n    \"13-1\": \"Sender of the reward\",\n    \"14-1\": \"Name of the vehicle\",\n    \"15-1\": \"Timestamp at which the reward was redeemed (in milliseconds)\",\n    \"16-1\": \"Code for redeeming the reward\",\n    \"18-1\": \"Unique identifier of the brand\",\n    \"17-1\": \"PIN used for obtaining the redemption code\"\n  },\n  \"cols\": 2,\n  \"rows\": 19\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"This API provides information only for a driver and does not provide aggregated information for a group of vehicles. Admins should not use these APIs, but should look at other sections of the documentation.\",\n  \"title\": \"Disclaimer\"\n}\n[/block]","updates":[],"order":5,"isReference":true,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5641803203881c0d00ac2153","createdAt":"2015-11-10T05:27:14.167Z","version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["559286c7c39c4b2d00127a72","55928a98c39c4b2d00127a83","5592bd7b9a68220d00f1c3db","5593dcaf0e82e81700334e25","5594342f0c33bd0d000595a3","563081713998420d00a509e4","5630941c7581b80d00c51c86","56309f4ff1c0580d00fac666","567923b8239fac0d00c7df25","573306dea6a9c40e00e13875","577a288fd051530e00f65563","579af3982b865e17005a4357","57ee06aa1e42900e0014a374","5951f49a63f39000159e7ef1","5951f4c563f39000159e7ef2","598951542a9dfc000fcacd40","5b3375cc98cb500003e4b363","5bbcd4e29667280003084100"],"_id":"559286c6c39c4b2d00127a71","createdAt":"2015-06-30T12:08:38.768Z","project":"55926c913735880d005f7c65","releaseDate":"2015-06-30T12:08:38.768Z","__v":18,"forked_from":"559286b6c39c4b2d00127a6e"},"githubsync":"","parentDoc":null,"category":{"sync":{"isSync":false,"url":""},"pages":["55928fd16bf22f170075b7b4","5592bd5a6bf22f170075b851","56416d6803881c0d00ac214b","5641702a03881c0d00ac214d","56417262b0dc090d00f88396","5641748f9f4ed50d008be04d","56417a76f424a10d00118215","56417c7b9417b40d00c0fbc6","56417f7f9417b40d00c0fbca","5641803203881c0d00ac2153","5641842903881c0d00ac2155","56418c259f4ed50d008be062","56418e30b0dc090d00f883a6","564192599417b40d00c0fbd1","564195c403881c0d00ac2162","5641988502fe811900f076c3","5641b8dc03881c0d00ac217c","5641c06238e37e0d0049fe6b","5656e88da795770d00a2aee0"],"title":"MOBILE","slug":"fleet-mobile","order":1,"from_sync":false,"reference":true,"_id":"55928a98c39c4b2d00127a83","version":"559286c6c39c4b2d00127a71","project":"55926c913735880d005f7c65","__v":19,"createdAt":"2015-06-30T12:24:56.461Z"},"user":"55926c39cf9cdb2100b57022","__v":3,"editedParams":true,"editedParams2":true,"project":"55926c913735880d005f7c65"}

getReward History

This API provides you with information of rewards that have been awarded to drivers. Rewards are gift cards given to drivers based on their driving behaviour. The API response includes status of the rewards, reward amount, driver names etc.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Query Params

fromDate:
required
timestamp
Start date of the period for which details need to be retrieved (in milliseconds)
toDate:
required
timestamp
End date of the period for which details need to be retrieved (in milliseconds)
status:
string
Status of the reward i.e. whether it is pending or redeemed

Result Format


Documentation

[block:callout] { "type": "info", "body": "https://api.azuga.com/azuga-ws/v1/rewards/history.json?fromDate=1448955906000&toDate=1451375106000&status=all", "title": "Sample Request" } [/block] ##API Response explanation [block:parameters] { "data": { "h-0": "Field", "h-1": "Description", "0-0": "code", "1-0": "message", "3-0": "generatedAtInMillis", "0-1": "API Status Code", "1-1": "API Message", "3-1": "API generation timestamp in milliseconds", "2-0": "reason", "2-1": "Reason for failure", "4-0": "rewardsHistory", "4-1": "An array of rewardsHistory objects", "5-0": "driverName", "6-0": "rewardId", "7-0": "rewardAmount", "8-0": "rewardSubject", "9-0": "rewardMessage", "10-0": "brand", "11-0": "status", "12-0": "sentAt", "13-0": "sender", "14-0": "vehicleName", "15-0": "redeemedAt", "16-0": "redemptionCode", "17-0": "challengeKey", "18-0": "brandId", "5-1": "Name of the driver", "6-1": "Unique identifier of the reward", "7-1": "Amount that has been rewarded to the driver", "8-1": "Subject of the Reward", "9-1": "Message from the supervisor in the reward", "10-1": "Brand at which the reward was redeemed", "11-1": "Status of the reward", "12-1": "Timestamp at which the reward was sent (in milliseconds)", "13-1": "Sender of the reward", "14-1": "Name of the vehicle", "15-1": "Timestamp at which the reward was redeemed (in milliseconds)", "16-1": "Code for redeeming the reward", "18-1": "Unique identifier of the brand", "17-1": "PIN used for obtaining the redemption code" }, "cols": 2, "rows": 19 } [/block] [block:callout] { "type": "warning", "body": "This API provides information only for a driver and does not provide aggregated information for a group of vehicles. Admins should not use these APIs, but should look at other sections of the documentation.", "title": "Disclaimer" } [/block]

User Information

Try It Out

get
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}