Request Call Detail Records (CDRs):
Method to request CDRs (Call Detail Records) for a specified period of time. Note that those are raw data CDRs written for each call leg. The data that can be found in the section STATISTIKEN in customer portal is based on data that has already been aggregated, meaning that all the CDRs corresponding to a specific call have already been combined into a single CDR.
POST | https://api.tenios.com/cdrs/retrieve |
Request Parameters:
access_key String |
The api access_key. You can find it in unter menu item Account Data, section API in the customer portal. |
start_date_from | The start date of the period over which you want to request CDRs. |
start_date_to | The end date of the period over which you want to request CDRs |
page | The page number to request. |
page_size | The page size, e.g. the number of CDRs included in a page. |
Output parameters:
answer_stamp | The time and date when the call was answered. |
billusec | Number in microseconds of the call which are billable. |
bleg_uuid | The uuid of the corresponding call which has been connected. |
main_leg_uuid | If the call_type is INBOUND this field is always null |
call_type |
The type of call leg. It can have the following values:
|
callerid_name | The caller id name. This filed is only provided when a call is forwarded via SIP and not routed to the PSTN. |
callerid_number | The caller id number. |
destination_number | The destination number of the call. If the call_type is INBOUND this is usually the service number. |
start_stamp | The timestamp when the call has started |
end_stamp | The timestamp when the call was ended |
duration | The total duration of the call, including call setup and ring time. |
hangup_cause String |
The hangup cause of the call. |
uuid | The uuid of the call. |
prepaid boolean |
true or false to identify if the call is related to a prepaid account |
cost | The cost of the call in EUR |
source_type | The type of the source network where the call was initiated from. Can be FIXED_LINE or MOBILE. |
routing_status | The routing status of the call. The field is null on success, otherwise a text with a description of the error. |
billing_status | The billing status of the call. The field is null on success, otherwise a text with a description of the error. |
total_items | The total number of items in the requested time frame |
page | The current page. |
page_size | The current page size. |
Example for a successful request:
Request:
{ "access_key":"9993f89f-b5c0-4f57-abe0-7ec3d929fe19", "start_date_from":"2000-01-01T00:00:00:000Z", "start_date_to":"2018-01-01T00:00:00:000Z", "page":1, "page_size": 1 }
API Response example:
Examples for invalid requests:
Count CDRs:
Method to count CDRs in a defined interval. For performance reasons the interval can be max. 1 day.
POST | https://api.tenios.com/cdrs/count |
Request Parameters:
access_key | The api access_key . You can find it in unter menu item Account Data, section API in the customer portal. |
start_date_from | The start date of the period over which you want to request CDRs. |
start_date_to | The end date of the period over which you want to request CDRs. |
Output parameters:
total_items | The number of Cdrs that have been counted in the provided interval. |
Example for a successful request:
Request:
{ "access_key ":"00000000-0000-0000-0000-000000000000 ", "start_date_from ":"2018-03-20T00:00:00.000Z ", "start_date_to ":"2018-03-20T23:00:00.000Z " }
API Response:
HTTP Status Code: 200 (OK)
{ "total_items ": 51 }