How to get the latest call detail records of an account. The module is named cdrs and it will work like that.
Parameter: from (date)
Parameter: to (date)
Parameter: show (how many results)
GET http://login.42call.com/api/rest/v2/?cdrs&from=14.02.2014&to=19.02.2014&show=2
Request Headers:
Connection: keep-alive x-date: 2014-02-20 18:23:38.000000 GMT+0000 x-authorization: demo:2ZigDbwB0bX32zmjGgKB+vB/Q74= Host: login.42call.com
Response Body:
{ "error": false, "codes": [ { "code": 200, "description": "OK" } ], "body": { "table": { "caption": "Call detail records", "thead": { "datestart": "datestart", "dateend": "dateend", "time": "time", "customername": "customername", "number": "number", "destination": "destination", "amount": "amount", "amounttax": "amounttax", "type": "type" }, "tbody": { "tr": { "td": [ { "datestart": "2014-02-14 15:40:00", "dateend": "2014-02-14 15:40:10", "time": "00:00:10", "customername": "Doe, Jon", "number": "ONNET214806", "destination": "Free CALL", "amount": "0.00", "amounttax": "0.00", "type": "VOIP" }, { "datestart": "2014-02-19 16:50:48", "dateend": "2014-02-19 16:50:49", "time": "00:10:01", "customername": "Doe, Jon", "number": "0049123465798", "destination": "Germany Mobile O2", "amount": "0.01", "amounttax": "0.02", "type": "CALLTHROUGH" } ] } }, "tfoot": "" }, "customernumber": "1234", "accountnumber": "1234", "username": "demo", "customercurrency": "eur", "customeraccountstate": "18,40" } }
You’ll receive the latest two calls formatted as a table record set.
If there is no record available right now, the whole body tree is missing in the result.