This function allows resellers and users to retrieve CDRs for a given customer number. The function checks the reseller’s / user’s username and password and whether the customer number is linked to that reseller/user account. On success, the function will return a JSON encoded array.


  • PROFILE_ID: reseller’s client’s / user’s profile ID (customer number)
  • START_DATE: starting date which you want to retrieve data from (must be smaller than END_DATE)
  • END_DATE: date until when you want to retrieve data (optional, if not set, the current date is selected)
  • FORMAT: can be set to CSV to download the results as a CSV file and JSON
  • USERNAME: reseller’s / user’s username
  • PASSWORD: reseller’s / user’s password


The function will fail if any of these checks are invalid:

  • The reseller’s / user’s username and password must match
  • the user defined by PROFILE_ID must be linked to the reseller/user account
  • START_DATE must be smaller than END_DATE
  • the interval between START_DATE and END_DATE cannot exceed 3 months

Return value

This function returns a multi-dimensional JSON encoded array

        [INDEX] => array(
              ['type'] => TYPE,
              ['data'] => DATA

INDEX = numerical index [0, 1, …]

TYPE = any of the following values:

  • DEV
  • FAX
  • PAY
  • SMS

DATA = array with these indexes:

  • source = who made the call if type=CALL, else the username
  • destination = which number was dialed if type=CALL, else the product name
  • destination_name = which country was dialed if type=CALL, else a product description
  • call_start = start of the call if type=CALL, else the date of billing
  • call_end = end of the call if type=CALL, else the date of billing
  • quantity = quantity billed
  • price = price in euro cents per quantity
  • invoice = invoice/report number

Example in CSV format:

CALLIN,+35220333000,35220333320,"2021-06-29 10:40:00",0,,0,0.00,N/A

Example in JSON format: