Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Usage

Before implementing this method you must get Intelli to approve your implementation. The following plan should be used for querying message status

  1. Use the query to Get UnRead Final Statuses (in the User API section)-  the frequency you call this method will be determined on your message send rate and behaviour 

  2. Messages will receive  a final status not later than 49 hours after it is sent.

  3. Use the query by document Id (method shown below) to check for message status if you have not otherwise got a final status for a message after this 49 hour period. 

Endpoints

We'll have two endpoints:

  • REST (GET): /services/rest/message/status?username=[]&password=[]&documentId=[]

  • SOAP: /services/ws/message?wsdl (method: status)

...


...

...

   <soapenv:Header/>

...

   <soapenv:Body>

...

      <ser:status>

...

         <username>?</username>

...

         <password>?</password>

...

         <documentId>?</documentId>

...

      </ser:status>

...

   </soapenv:Body>

</soapenv:Envelope>

...


What information to return?

For the REST endpoint (JSON)

...

 If documentId does exist

{

    "documentId": "4fbb6c371a88393bc47baf32",

    "recipient": "48660703691",

    "messageStatus": "10"

}

...

 for  when documentId does not exist

{

    "documentId": "4fbb6c371a88393bc47baf32",

    "messageStatus": "0"

}


Note that we only guarantee to hold message for status query for 80 hours after message send datetime.

For the SOAP endpoint (XML):

...


...

   <soap:Body>

...

...

         <return>            

...

        <documentId>4fbb6cd21a88393bc47baf33</documentId>            

...

            <recipient>48660703691</recipient>

...

            <messageStatus>10</messageStatus>

...

         </

...

return>

...

...

   </soap:Body>

</soap:Envelope>

 


Status codes

Basing on https://secure.mghhosting.com/wiki/download/attachments/12386334/SMSPL-SW-807-MCOR-0001+-+Web+Services+API+-+V1.06.2.pdf?version=1&modificationDate=1337252411000 and https://secure.mghhosting.com/wiki/display/MC4API/Web+Service+to+query+status. Some status codes are omitted as they can't (yet) occur in our application.

Status code

Meaning

When?

0

Unknown

Message with the given id not found. It is possible that the message was submitted, but not yet processed by a worker. Or that such a message doesn't exist.

1

En route

Last event is "routed" or "re-routed" (after a bind failure)

2DeliveredMessage was sent and Delivery Receipt was received
3ExpiredMessage delivery failed and message expired (SMSC will no longer try to deliver it)

5

Undeliverable

Last event is "unroutable". There's no bind (even among inactive ones) that can accept the message.

7

Invalid

Last event is "validation failed" (wrong text, recipient, etc.)

8RejectedMessage rejected by SMSC
10

Submitted

Last event is "request received". Not yet routed. May be temporarily unroutable.

11

Sent

Last event is "sent"

Missing status codes: 4 (deleted), 6 (accepted), 7 (invalid, removed in favour of more detailed statuses below). 9 (pending)

Status code

Meaning

When?

-101

No username

 

-102

No password

 

-103

No document id

 

-104Invalid recipientRecipient number invalid
-105Invalid sourceSender number invalid
-106Empty textSMS text was empty
-107Missing sender or replyToBoth sender and replyTo value were missing. Exactly of them should be present.
-108Both sender and replyTo providedBoth sender and replyTo were provided. Exactly one of them is allowed.

-200

Invalid username/password

Last event: "invalid username/pass"

-201

User disabled

Last event: "user disabled"

-202User blockedLast event: "user blocked"

-210

Insufficient credits

Last event: "no credits"

-230Document ID not matchedUser does not have rights to check message status
-240Invalid (not supported) replyTo value 

-910

SMSC error

Last event: "send failure" 

-999

Internal error

 

Missing status codes:

...

Status codes
Anchor
Status_codes
Status_codes

Full list of status code is available here Message Statuses

Submission URLs

To make the URLs uniform, the endpoints to submit messages will be:

  • REST (GET/POST): /services/rest/message/sendSingle2?username=[]&password=[]&documentId=[]&text=[]&replyTo=[]&recipient=[]&sender=[]

  • SOAP: /services/ws/message?wsdl (method: sendSingle2)