
The Transaction model acts as a container for messages sent through the API. It is a member of the Response model.
The following example is a segment of the XML response from Send SMS . For the purposes of this example the messages element has been shortened.
<transaction type="1">
<id>118</id>
<messages/>
</transaction>
The following example is a segment the JSON Send SMS . For the purposes of this example the messages array has been emptied.
"transaction": {
"id":118,
"type": 1,
"messages":[]
}
The following is an example of the Plain response. It is a single line containing the text TRANSACTION followed by the Transaction Identifer. It will be followed by the Plain contents of the Messages model.
TRANSACTION 123

The Message model contains information related to a message sent to a single destination. For the XML format it is a member of the Messages model, otherwise it is a member of Transaction.
The following example is a segment of the response from Send SMS . In this example the sentAt and deliveredAt elements are empty because the message has not been sent to the Messaging Gateway. This is also apparent from the 0 status code.
<response method="send/sms" status="OK" version="1.2">
<transaction type="0" id="ff8080811a9b167b011a9b7e693e0002">
<messages status="0" id="ff8080811a9b167b011a9b7e69c20003"/>
</transaction>
</response>
The following example is a segment of the JSON response to the Status method.
{
"deliveredAt":"2007-06-28 18:20:00.0",
"status":1,
"sentAt":"2007-06-28 16:19:49.0",
"id":118
}
The following is an example of the Plain response. Written on a single line it contains the text MESSAGE followed by the Message ID, the sent and delivered time.
MESSAGE 12 2007-06-28 16:19:49.0 2007-06-28 18:20:00.0

A member of the Response model the Error model will occur when the API method errors.
The following is a Response from send/status . This will occur when providing an invalid Message ID.
<response method="send/status" status="FAIL" version="1.2">
<error message="Transaction identifier missing" number="4"/>
</response>
The following is a Response from send/status . This will occur when providing an invalid Message ID.
{
"response":{
"error":{
"message":"No such message ID",
"number":7
},
"version":"1.1",
"status":"FAIL"
}
}
The following is a Response from send/status . This will occur when providing an invalid Message ID.
FAIL 1.1
ERROR 7 No such message ID