Get Request ID
Each API request in PIOPIY platform includes app id and app secret. Get your App id and secret in PIOPIY dashboard. After getting the app id and secret, make a POST request to the below base URL to get the request ID details.
Base URL
Send your POST method request with valid parameters, to the following base URL.
https://piopiy.telecmi.com/v1/piopiy/requestid_cdr
Required Parameters
These are the required POST method parameters with description
Parameter Name | Type | Description |
---|---|---|
*appid | number | Your app ID |
*secret | string | Your app secret |
*request_id | string | The Unique ID for this call |
Note
The * marked parameter is mandatory.
Sample JSON Request
Below is the following sample JSON POST method request
{"appid": 2222222,"secret": "xxxx-xxxx-xxx-xxx-xxxx","request_id": "8DI2mXpy2K7qPI2Wi919AKS5LlzNEJKy7kb2Vg3IN9h"}
Sample Response
If the provided information is valid, your web server will get a sample response from TeleCMI Platform as given below
{"count": 2,"cdr": [{"duration": 4,"balance": 1135.14,"rate": 0.39,"from": 4471000000,"to": 9100000000,"time": 1637069609000,"leg": "b","direction": "outbound","status": "answered"},{"duration": 10,"balance": 1134.75,"rate": 0.39,"from": 4471000000,"to": 9200000000,"time": 1637069609000,"leg": "a","direction": "outbound","status": "answered"}],"code": 200}
Properties
These are the list of properties and its description
Property | Type | Description |
---|---|---|
duration | number | The total duration of this call in seconds |
balance | number | The total available account balance after this call |
rate | number | The billed call rate for this call |
from | number | Your default DID Number |
to | number | The number the call was made to |
time | number | Timestamp of this call |
leg | string | Define the leg of the call either a or b |
direction | string | Direction of this call |
status | string | Status of this call |
HTTP status codes
TeleCMI API platform represents the following status code to identity the errors.
Status code | Status Type | Description |
---|---|---|
200 | Success | We received the request |
404 | Error | Invalid app id or secret, authentication failed, Missing parameter |