Skip to main content

User Incoming Calls API

Each user API request in TeleCMI platform includes user login token. After getting the user login token, make a POST request to the below base URL to retrieve the user incoming missed and answered call details.

Base URL

Send your POST method request with valid parameters, to the following base URL.

https://rest.telecmi.com/v2/user/in_cdr

Required Parameters

These are the required POST method parameters with description

Parameter NameTypeDescription
typenumberThe call type, it can be missed or answered.
  • type: 0 - missed,
  • type: 1 - answered
*tokenstringYour user token
*fromnumberThe timestamp of from date and time in UTC timezone.
*tonumberThe timestamp of to date and time in UTC timezone.
pagenumberThe Number of page per 10 record. By default the page is 1.
limitnumberThe Number of record for request, By default the limit is 10. Maximum limit is 10.
Note
The * marked parameter is mandatory.

Sample JSON Request

Below is the following sample JSON POST method request

{
"type": 0,
"token": "xxxx-xxxx-xxxx-xxxx",
"from": 1569911400000,
"to": 1570167249853,
"page": 1,
"limit": 10
}

Sample Response

If the provided information is valid, your web server will get a sample response from TeleCMI Platform as given below

{
"count": 7,
"cdr": [
{
"cmiuid": "a0b0d95b-1d58-45f4-a210-1239e29547ec",
"duration": 18,
"notes": [
{
"msg": "Support Query",
"date": 1639554230141,
"agent": "101_1111112"
},
{
"msg": "Regarding the order status",
"date": 1639554230141,
"agent": "101_1111112"
}
],
"billedsec": 6,
"rate": 0.01,
"name": "unknown",
"from": 918000000000,
"time": 1639554230141
},
{
"cmiuid": "dc3a4178-1af4-4c60-b340-3497696b6631",
"duration": 21,
"billedsec": 15,
"rate": 0.01,
"name": "unknown",
"from": 919000000000,
"time": 1639490151341
},
{
"cmiuid": "eb8cd960-4015-49d0-b419-ae6955362741",
"duration": 32,
"billedsec": 29,
"rate": 0.01,
"name": "unknown",
"from": 16500000000,
"time": 1637729869399
},
{
"cmiuid": "88fbbebb-0e2a-43c6-bc25-651b8c3491bb",
"duration": 9,
"billedsec": 5,
"rate": 0.01,
"name": "unknown",
"from": 550000000000,
"time": 1636170495230
},
{
"cmiuid": "7cd0d2bf-2a50-4760-acc5-f94bc5defaa1",
"duration": 9,
"billedsec": 6,
"rate": 0.01,
"name": "unknown",
"from": 919000000000,
"time": 1635855576344
},
{
"cmiuid": "e1c5973b-237e-4770-813d-b6a19dde0afc",
"duration": 10,
"billedsec": 6,
"rate": 0.01,
"name": "unknown",
"from": 919000000000,
"time": 1635855539410
},
{
"cmiuid": "0fc6f46a-5317-48b4-b1ef-43ec7477cda3",
"duration": 9,
"billedsec": 5,
"rate": 0.01,
"name": "unknown",
"from": 919000000000,
"time": 1635855472552
}
],
"code": 200
}

Properties

These are the list of properties and its description

PropertyTypeDescription
countnumberThe total count of call detail record(cdr) available
cdrJSON arrayThe list of total cdr in detail
cmiuidstringA unique identifier of this call
durationnumberThe duration of call in seconds
notesJSON arrayThe entire notes information of the caller or calle
msgstringThe notes information of the caller or calle
datenumberTimestamp of the added notes in UTC timezone
agentstringThe user ID for the added note
billedsecnumberThe billed duration of call in seconds
ratenumberThe call cost of the call
namestringThe name of the caller
fromnumberThe number the call came from
timenumberTimestamp of the call in UTC timezone

HTTP status codes

TeleCMI API platform represents the following status code to identity the errors.

Status codeStatus TypeDescription
200OKWe received the request
404ErrorInvalid user token, Failed to authenticate token
400ErrorParameter missing, Parameter limit lesser then equals 10