Via API
Generate Report
Without sorting
Request: {POST}
POST curl 'https://api.syniverse.com/scg-external-api/api/v1/reportjob' -H 'Authorization: Bearer [Your TOKEN}' -H 'Content-Type: application/json;charset=UTF-8' --data-binary '{"query":{"created_date":"[2017-01-03T08:00:00.000Z,2017-01-03T023:59:59.000Z)"},"sort":[],"fields":["id","message_request_id","application_id","from_address","to_address","type","direction","body","state","created_date","failure_code","failure_details","external_id"],"report_type":"MESSAGES","attachment_name":"My_July_2019 Message_Report","attachment_filename":" My_July_2019 Message_Report.csv"}'
{"id":"wAKaR6rcx99dFfIDC3WMx4"}
Sorting by Date Range
Request: {POST}
POST curl 'https://api.syniverse.com/scg-external-api/api/v1/reportjob' -H 'Authorization: Bearer {Your TOKEN}' -H 'Content-Type: application/json;charset=UTF-8' --data-binary '{"query":{"created_date":"[2020-04-22T22:46:24.131Z,2020-04-30T06:59:59.131Z]"},"sort":["-created_date"],"fields":["id","external_message_request_id","message_request_id","application_id","from_address","to_address","type","direction","body","price","pnv_price","translation_price","state","fragment_count","created_date","verify_sms","external_id"],"report_type":"MESSAGES","attachment_name":"messagesReportExport_Apr_29_2020-15_46_24.csv","attachment_filename":"messagesReportExport_Apr_29_2020-15_46_24.csv"}
{"id":"N6FlqDkWpjyX84qLRvrkd4"}
Get Report (wait until state is COMPLETED)
Request: {GET}
curl https://api.syniverse.com/scg-external-api/api/v1/reportjob/ N6FlqDkWpjyX84qLRvrkd4 -H 'Authorization: Bearer {Your TOKEN}'
Response:
{
"application_id":66823,
"created_date":1480625458156,
"last_updated_date":1480625477007,
"version_number":3,
"id":"IKQvbxI7NUKtWMlooi2gL",
"state":"COMPLETED",
"started_date":1480625458156,
"completed_date":1480625477007,
"failed_count":0,
"query":{},
"fields":[
"id",
"message_request_id",
"application_id",
"from_address",
"to_address",
"type",
"direction",
"body",
"state",
"created_date",
"failure_code",
"failure_details",
"external_id",
],
"sort":[
"-last_updated_date"
],
"report_attachment_id":"U1M14Td1SLIf8mz7NxnNO3",
"report_type":"MESSAGES",
"count":0
}
Create AccessToken (use "report_attachment_id" value for resource_id)
Request: {POST}
curl 'https://api.syniverse.com/scg-external-api/api/v1/access_tokens' -H 'Authorization: Bearer {Your Token}' -H 'Content-Type: application/json;charset=UTF-8' --data-binary '{"resource":"ATTACHMENT","resource_id":" U1M14Td1SLIf8mz7NxnNO3"}'
Response:
{"id":"GF19O3hneA1KUg1JboTqP6"}
Get XLS File
Download your report.
Request: {GET}
curl 'https://api.syniverse.com/scg-attachment/api/v1/messaging/attachments/GF19O3hneA1KUg1JboTqP6/content' -H 'Authorization: Bearer {Your Token}'
mv report_job.txt report_job.csv
Download Transaction reports via SCG Message Console
- Log in to SCG Message Console
- On the left side Navigation bar, Click on Reports
- Select Report type (Messages for SMS, MMS transaction, Calls for Voice related transactions)
- In the Report menu, in the Channel type field, select the appropriate Channel, you want to view/download a report for e.g. SMS or MMS. Note that you can leave blank and this will pull transactions for all Channel types
- Next, select a Date Range and click the View Report Button
- You should be able to View the transactions for the Date range specified
- To export the Generated report in a .csv format, click on the button to begin the processing of the data for download. You can check the status of the process by clicking the “Last Export Status” button
- Once the process as been completed, click “Download your Export” to download your report.
0 Comments