Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 9 Next »

 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)

 

{
    "documentId": "4fbb6c371a88393bc47baf32",
    "recipient": "48660703691",
    "messageStatus": "10"
}

 

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), 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"

-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:

  • -110 (invalid xml): not possible? It would be an WS-framework error?
  • -211 (invalid service), -930 (status query timeout): N/A
  • -900 (service not available): ?
  • -940 (query too fast)

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)
  • No labels