Search Results

Message Report

Overview

API Interface: HTTPS
Resource: Message Report
URI: /v4/reports
Methods: GET
Response Schemas: JSON, XML, CSV (within JSON or XML)

The Report Resource provides the ability to access message reports by a specified date range. Please note that these reports are only available for SMS at this time.

Response Schema

Aerialink supports both JSON and XML response schemas, however the default response schema is JSON. If you wish to receive your response schema in XML or explicitly set the response schema to JSON, follow these examples as you construct your complete request URL.

/reports
(defaults to JSON automatically)

/reports.json
(explicitly sets the response to a JSON schema, same as default)

/reports.xml
(sets the response to an XML schema)

Method [GET] : Query Report

This method generates a report based on the parameters provided. The request is initiated by your application.

Request

The available request parameters for this resource and method are listed below and should be sent form-post.

Optional Parameters (Report Filters)

  • source [string(15)]
    Filters messages on source.
  • destination [string(15)]
    Filters messages on destination.
  • startDate [string(15)]
    Filters the response records by the Start Date. Defaults to today’s date.
  • endDate [string(15)]
    Filters the response records by the End Date. Defaults to today’s date.
  • startRow [integer]
    Specifies the starting transactional record to retrieve. Defaults to 1.
  • maxRows [integer]
    Specifies the maximum number of records to be returned in the response. Defaults to 50 and has a maximum allowed value of 100.
  • messageType [string(2)]
    Filters the response records by the transaction message type. The filter options are either MO (Mobile Originated) or MT (Mobile Terminated).
  • reportFormat [string(3)]
    Specifies the output format of the API response. The option values are JSON, XML or CSV (within JSON or XML). The default is JSON.

Response (Synchronous)

Response Properties

The parameters or elements returned in the response to an API request.

  • version : The requested version of the resource
  • resource : The requested resource name
  • method : The method for the request. This will always be GET.
  • type : The request type - Synchronous or Asynchronous
  • reportBody : The report details formatted in the requested report format: JSON, XML or CSV (within JSON or XML). The fields returned will include the following:
    • created : The created time stamp in UTC time zone
    • processed : The processed time stamp in UTC time zone
    • completed : The completed time stamp in UTC time zone
    • transactionGUID : The globally unique transaction ID for the message
    • source : The source number that the SMS message was sent from. This will be the end-user mobile device in the case of an inbound MO message or the Short Code/Long Code in the case of an outbound MT message.
    • destination : The destination number that the SMS message was sent to. This will be the end user mobile device in the case of an outbound MT message or the Short Code/Long Code in the case of an inbound MO message.
    • messageText : The SMS message text that was sent or received. This is limited to the general standard of 160 characters unless concatenation is enabled on your account. In some cases your character limit may be less depending on your specific use case and configuration or a carrier limitation.
    • status : The status or disposition of the message
    • type : The value will either be MO for Mobile Originated or MT for Mobile Terminated.

Response Schema

JSON Format(default schema)
Example JSON format with Report Body as JSON:

{
  "aerialink": {
    "version": "v4",
    "resource": "reports",
    "method": "get",
    "type": "synchronous",
    "reportBody": {
      "transactions": [
        {
          "transaction": {
            "created": "2015-07-10T20:38:53.910Z",
            "processed": "2015-07-10T20:38:54.050Z",
            "completed": "2015-07-10T20:38:54.163Z",
            "messageText": "Message Text",
            "status": "Success",
            "source": "12345",
            "destination": "12345678910",
            "transactionGUID": "1d2ce70c-3296-4222-a467-3d83f6f3a575",
            "type": "MT"
          }
        }
      ]
    }
  }
}

XML Format
Example XML format with Report Body as XML:

<?xml version="1.0" encoding="UTF-8"?>
<aerialink>
    <version>v4</version>
    <resource>reports</resource>
    <method>get</method>
    <type>synchronous</type>
    <reportBody>
        <transactions>
            <transaction>
                <created>2015-07-10T20:38:53.910Z</created>
                <processed>2015-07-10T20:38:54.050Z</processed>
                <completed>2015-07-10T20:38:54.163Z</completed>
                <messageText>Message Text</messageText>
                <status>Success</status>
                <source>12345</source>
                <destination>12345678910</destination>
                <transactionGUID>1d2ce70c-3296-4222-a467-3d83f6f3a575</transactionGUID>
                <type>MT</type>
            </transaction>
        </transactions>
    </reportBody>
</aerialink>