Creates a new Call Detail (CDR) Export request.
Using this API makes a request to the Flowroute servers to build an aggregated report of calls in your account based on and filtered by the query parameters you specify. You can specify any combination of query parameters in your request. If the system is unable to parse your parameters, it will issue an error. You can either refine your parameters or contact customer support to request a new search feature.
If specified, the system will POST a status update to the callback_url you specifiy. See the section on Flowroute Notifications.
Endpoint
POST /cdrs/exportsBody Parameters
data
requiredData object composed of the following:
type
requiredThis will always be cdrexport.
attributes
requiredObject composed of the following route attributes:
callback_url
A publicly available HTTP endpoint that will be notified when a change in request happens. For more information about these messages, see the Flowroute Notifications section.
filter_parameters
requiredA JSON object describing the parameters to use when filtering the data available.
start_call_start_time
datetime requiredReturn all records that begin at or after the specified UTC value.
start_call_end_time
datetime requiredReturn all records that begin before the specified UTC value.
-
number_aliases
arrayOnly include records with the number_alias containing an exact match.
-
number_aliases_contains
arrayOnly include records with the number_alias containing a partial match.
-
destination_numbers
arrayOnly include records with destination number matches one of these entries.
-
callerid_numbers
arrayOnly include records where the callerid number matches one of these entries w/wo ‘+’.
-
custom_x_tags
arrayUsed to filter the records with 'X-Tag' references in the SIP header against the list provided.
-
caller_ip
stringRestrict records to those from a specific IP address.
-
duration_greater_than
numberReturn records whose duration is longer than the value specified (in seconds).
-
duration_less_than
numberReturn records whose duration is shorter than the value specified (in seconds)
-
cost_greater_than
floatReturn records whose cost subtotal is greater than the value specified (in dollars).
-
cost_less_than
floatReturn records whose cost subtotal is less than the value specified (in dollars).
-
destination_countries_included
arrayOnly include the specified countries (see County Codes for a list of valid entries).
-
destination_countries_excluded
arrayExclude the countries listed (see County Codes for a list of valid entries).
-
tollfree_only
booleanIf True, restrict records to Toll Free numbers only with False being the default value if not specified
-
direction
stringMay be either 'inbound' or 'outbound'.
-
exclude_cancelled
booleanIf True, excludes calls with status of 'cancelled' with False being the default value if not specified
-
destination_prefix
arrayOnly include records with numbers whose destination number prefix matches one of the entries it the specified list.
-
callerid_prefix
arrayOnly include record with numbers whose calling number prefix matches one of the entries it the specified list.
Response Fields
On success, the HTTP status code in the response header is 202 Accepted and the response body contains a request object in JSON format. On error, the header status code is an error code and the response body contains an array of error objects.
-
data
objectRoute object composed of the following:
-
attributes
objectObject composed of attributes described above.
-
id
integerID of the newly created route object.
-
type
stringThis will always be cdrexport.
-
links
objectLinks object pointing to your newly created CDR request. For example, https://api.flowroute.com/v2/cdrs/exports/98396.