Section AA - Voice billing
AA1 - Get talktime details
GET Method :
/api/v1/get_talktime/< phonenumber> with the following data:
Input :
Argument | Mandatory | Value |
---|---|---|
phonenumber | Yes | Numeric < phone number of the user> |
Sample Output :
{
"status": "success",
"message": {
"timeUsed": "0 minutes",
"timeTotal": "365 days ",
"timeUsedInSeconds": "0",
"timeTotalInSeconds": 31536000,
"startDate": "2020-04-01 00:00:00",
"endDate": "2020-05-01 00:00:00"
}
}
AA2 - Deduct talktime
POST Method :
/api/v1/deduct_talktime with the following POST data:
You can either pass phone or email to recover password but not both.
Input :
Argument | Mandatory | Value |
---|---|---|
phone | Yes | Numeric < phone number of the user> |
fromNumber | Yes | Numeric < Number of the dialer> |
toNumber | Yes | Numeric < Number of the dialed person> |
startTime | Yes | From DateTime < Date Format yyyy-mm-dd HH:ii:ss> |
endTime | Yes | To DateTime |
Sample Output :
{
"status": "success",
"message": "Data saved sucessfully.”
}