Message status

Retrieve summary status

Using the links provided in the message response, the user can make a new API request to retrieve the summaryStatus URL.

In the example above, the summaryStatus URL is:

https://api.<region>.whispir.com/messages/069BF68E5E0FE99B/messagestatus?view=summary&apikey=498nadsasdff09fewdsafjaa90f

So the request would look like this:

GET https://api.<region>.whispir.com/messages/069BF68E5E0FE99B/messagestatus?view=summary&apikey=498nadsasdff09fewdsafjaa90f

As this is a GET request you don’t have to provide any message body.

This response states that of the 2 people that were sent the message, both of them acknowledged it by sending a response.

Your application can use this information to easily determine the numbers of recipients in each state and show a small graph.

  • JSON
  • XML

Retrieve summary status

This sample of code will retrieve the summary status for a message:

{{codeStart}}

{

"method": "GET",

"rel": "summaryStatus",

"uri": "https://api.<region>.whispir.com/messages/069BF68E5E0FE99B/messagestatus?view=summary&apikey=498nadsasdff09fewdsafjaa90f"

}

{{codeEnd}}

Sample summary status response

This sample of code will retrieve the summary status for a message:

{{codeStart}}

{

"messageStatuses" : [ {

"link" : [ {

"uri" : "https://api.<region>.whispir.com/messages/069BF68E5E0FE99B/messagestatus?view=summary&apikey=498nadsasdff09fewdsafjaa90f",

"rel" : "self",

"method" : "GET"

} ],

"categories" : [ {

"name" : "Sent",

"recipientCount" : 0,

"percentageTotal" : "0.0%"

}, {

"name" : "Pending",

"recipientCount" : 0,

"percentageTotal" : "0.0%"

}, {

"name" : "Received",

"recipientCount" : 0,

"percentageTotal" : "0.0%"

}, {

"name" : "Acknowledged",

"recipientCount" : 2,

"percentageTotal" : "100.0%"

}, {

"name" : "Undeliverable",

"recipientCount" : 0,

"percentageTotal" : "0.0%"

} ]

} ],

"link" : [ ]

}

{{codeEnd}}