Get CSV File of Export#
Returns a single .csv.gz file for corresponding Export.
Attention
Exported File Format#
The exported file contains call detail records (CDRs) or SMS records in CSV format,
depending on the export_type of the Export. The first line of the file contains the
column names listed below, in the listed order.
The columns below are those of an Export created with this API version. The file of an Export created with an earlier API version keeps the columns of that version.
Inbound CDRs#
Columns of a cdr_in Export.
Column |
Type |
Description |
|---|---|---|
Date/Time Start (UTC) |
|
Call start timestamp in UTC. |
Date/Time Connect (UTC) |
|
Call answer timestamp in UTC. |
Date/Time End (UTC) |
|
Call end timestamp in UTC. |
Status |
|
Call status. |
Source Number |
|
Caller number, as it reached DIDWW. |
Source Number Out |
|
Caller number, as delivered to the trunk. |
Source Name |
|
Caller name. |
Source Country |
|
Country of the caller number. |
Source Network |
|
Network of the caller number. |
Destination DID |
|
Destination DID number. |
Duration (sec) |
|
Call duration in seconds. |
Attempt |
|
Call attempt number. |
Disconnect Code |
|
Disconnect code. |
Response |
|
SIP response or system response. |
Disconnect Initiator |
|
Entity that initiated call termination. |
Voice IN Trunk |
|
Inbound trunk identifier or name. |
Destination |
|
Destination number. |
Trunk Group |
|
Associated trunk group. |
Capacity Group |
|
Associated capacity group. |
Toll-free (USD) |
|
Toll-free cost in USD. |
PSTN (USD) |
|
PSTN cost in USD. |
Metered (USD) |
|
Metered cost in USD. |
CNAM IN (USD) |
|
CNAM lookup cost in USD. |
Total (USD) |
|
Total cost in USD. |
Call ID |
|
Unique call identifier. |
Outbound CDRs#
Columns of a cdr_out Export.
Column |
Type |
Description |
|---|---|---|
Date/Time Start (UTC) |
|
Call start timestamp in UTC. |
Date/Time Connect (UTC) |
|
Call answer timestamp in UTC. |
Date/Time End (UTC) |
|
Call end timestamp in UTC. |
Status |
|
Call status. |
Source |
|
Source number. |
CLI |
|
Calling Line Identification. |
Destination Number |
|
Destination number. |
Call Duration (sec) |
|
Call duration in seconds. |
Billing Duration (sec) |
|
Billed duration in seconds. |
Disconnect Code |
|
Disconnect code. |
Disconnect Reason |
|
Disconnect reason description. |
Voice OUT Trunk |
|
Outbound trunk identifier or name. |
Destination Country |
|
Destination country. |
Network |
|
Destination network. |
Call Type |
|
Call type classification. |
Rate (USD) |
|
Rate per unit in USD. |
Charged (USD) |
|
Charged amount in USD. |
P-Charge-Info |
|
Charging information header. |
Call ID |
|
Unique call identifier. |
Inbound SMS#
Columns of an sms_in Export.
Column |
Type |
Description |
|---|---|---|
Time Received (UTC) |
|
Time when DIDWW received the message, in UTC. |
Time Sent (UTC) |
|
Time when the message was sent to the SMS trunk, in UTC. |
Status |
|
Delivery status: |
Error Code |
|
Error code of a failed delivery. |
Reason |
|
Reason of a failed delivery. |
Source Address |
|
Sender address. |
Destination Address |
|
Recipient address, the DID number that received the message. |
SMS Trunk |
|
Name of the SMS trunk the message was delivered to. |
Type |
|
Type of the SMS trunk: |
Destination |
|
Final destination of the SMS trunk, for example an email address for an Email trunk. |
Fragments |
|
Number of message fragments. |
SMS ID |
|
Unique message identifier. |
Billed Fragments |
|
Number of billed message fragments. |
Charged (USD) |
|
Charged amount in USD. |
Outbound SMS#
Columns of an sms_out Export.
Column |
Type |
Description |
|---|---|---|
Date/Time (UTC) |
|
Time when the message was sent, in UTC. |
Status |
|
Delivery status: |
Reason |
|
Reason of a failed delivery. |
Source Address |
|
Sender address. |
Destination Address |
|
Recipient address. |
Trunk |
|
Name of the SMS trunk the message was sent through. |
Sender ID Verification |
|
Name of the sender ID verification the message was sent under. Present only for accounts with A2P messaging enabled. |
SMS ID |
|
Unique message identifier. |
Billed Fragments |
|
Number of billed message fragments. |
Charged (USD) |
|
Charged amount in USD. |
Note
The Sender ID Verification column is included only for accounts with A2P messaging
enabled. For other accounts, SMS ID follows Trunk. The sample file shows the
columns without Sender ID Verification.
Request#
HTTP Method: GET
URI Path: /v3/exports/{filename}.csv.gz
Authenticate the request with an access token in the Authorization header, as for other
requests. This download also accepts an API key in the Api-Key header. See
Authentication.
URI Parameters#
Name |
Type |
Is Required? |
Description |
|---|---|---|---|
filename |
|
Yes |
Unique filename of a completed Export, taken from its |
Examples#
http
1GET /v3/exports/a4f6b765-f20c-45c7-98d2-80c2f3a41517.csv.gz HTTP/1.1
2Host: api.didww.com
3Authorization: Bearer [access token]
curl
1curl -i -X GET https://api.didww.com/v3/exports/a4f6b765-f20c-45c7-98d2-80c2f3a41517.csv.gz -H "Authorization: Bearer [access token]"
http
1GET /v3/exports/a4f6b765-f20c-45c7-98d2-80c2f3a41517.csv.gz HTTP/1.1
2Host: api.didww.com
3Api-Key: [API key]
curl
1curl -i -X GET https://api.didww.com/v3/exports/a4f6b765-f20c-45c7-98d2-80c2f3a41517.csv.gz -H "Api-Key: [API key]"
A successful request returns 200 OK with Content-Type: application/gzip and the
compressed CSV file in the response body. To save the file with curl, use -o with a file
name in place of -i:
curl -o a4f6b765-f20c-45c7-98d2-80c2f3a41517.csv.gz https://api.didww.com/v3/exports/a4f6b765-f20c-45c7-98d2-80c2f3a41517.csv.gz -H "Authorization: Bearer [access token]"
Other Responses#
Code |
Success |
Description |
|---|---|---|
404 |
No |
Not Found (without body). No completed Export of the account has this filename. |
401 |
No |
Unauthorized. A missing or refused API key returns no body. A refused access token returns an error document and a |
429 |
No |
The request budget of the account for the current window is spent ( |