Several operations are available for the SMS interface using the REST API. All of these operations are based on the Parlay X 2.1 standard.
Provides a subset of that standard's functionality. This interface is for sending an SMS to a terminal, for example from a Web page or desktop application. This lets you send an SMS to one or more terminals, for example mobile phones or SMS-enabled laptop computers.
POST path/sms?version=1.0&address=tel:+447990123456& address=tel:+447990121212& message=Hello%20World& correlator=123456& notifyURL=http://myapp.developer.com/deliveryreceipt& senderName=Bob HTTP/1.1 Host: www.example.com
HTTP Status: 201 Created <SMSResponse version= “1.0” messageid=“ID123ABC”/>
POST http://localhost:9080/ShortMessageService/services/JSON/sms {"addresses": ["tel:9845054321", "tel:9632112333"], "senderName": "JDoe", "charging": { "description": "someDesc", currency": "INR", "amount": "0.50", "code": "SMS- national" }, "message":"hello" }
HTTP/1.1 200 OK { "result":"ID123ABC" }
When you send an SMS message, it is sent through an SMS router (SMSC) in the operator network. This queues and sends your message to the recipient or recipients. This method lets you know if that message has been delivered.
GET path/sms?version=1.0&messageId=1234 HTTP/1.1 Host: www.example.com
<DeliveryStatusResponse version="1.0"> <Message address=tel:+447990123456 status="DeliveredToNetwork" /> <Message address=tel:+447990121212 status="MessageWaiting" /> </DeliveryStatusResponse>
POST http://localhost:9080/ShortMessageService/services/JSON/smsDeliveryStatus { "requestIdentifier":"1234" }
{"result": [ { "address": "tel:1234", "deliveryStatus":"DeliveryImpossible" }, { "address":"tel:123445 "deliveryStatus":"DeliveredToNetwork" }, { "address":"tel:098787878", "deliveryStatus":"DeliveryUncertain" } ]}
Used for notifying the application when an SMS is delivered to a terminal or if delivery was impossible.
POST path/smsDeliveryReceipt?correlator=123456 HTTP/1.1 Host: myapp.developer.com ----------HTTP – Body------------- <deliveryStatus version=”1.0"> <Message address=tel:+447990123456 status=”DeliveredToTerminal”/> <address=tel:+447990121212 status=”DeliveryImpossible” > </deliveryStatus
HTTP Status: 204 No Content.
POST http://localhost:9080/SmsNotificationService/services/JSON/smsDeliveryReceipt { "correlator": "ABC123", "deliveryStatus": { "address": "http://www.your.org", "deliveryStatus":"DeliveryImpossible" } }
HTTP Status: 200 OK {}
Enables the application to "poll" for any SMS messages received.
GET path/receivedSms?version=1.0®istrationId=6789 HTTP/1.1 Host: www.example.com
HTTP Status: 200 OK <ReceivedSmsResponse version=”1.0”> <Message content=”Vote A” sender=”tel:+447790123456” destination=”81771” datetime= Tue, 15 Nov 1994 08:12:31 GMT”/> <Message content=”Vote B” sender=”tel:+447790121212” destination=”81771” datetime=”Tue, 15 Nov 1994 08:12:31 GMT”/> </ReceivedSmsResponse>
POST http://localhost:9080/ShortMessageService/services/JSON/receivedSms {"registrationIdentifier":"1234"}
{"result":[ { "message": "Vote A", "senderAddress": "tel:123", smsServiceActivationNumber": "tel:5555" }, { "message": "Vote B", "senderAddress": "tel:12345", "smsServiceActivationNumber": "tel:5555" } ]}
Used to start the notification of received SMS.
POST path/smsNotification?destination=81771&criteria=Vote& notifyURL= http://myapp.example.com/voting/& correlator=123456 HTTP/1.1 Host: www.example.com
HTTP Status: 204 No Content.
POST http://localhost:9080/ShortMessageService/services/JSON/startSmsNotification { "reference": { "endpoint": "http://localhost:9082/TestClientEvents/services/SmsNotification", "interfacename": "SMSNotificationManager", "correlator": "Cricket 1" }, "smsserviceactivationnumber": "tel:5555", "criteria": "VOTE B" }
HTTP/1.1 200 OK {}
Used by the application to stop the delivery receipt notifications.
DELETE path/smsNotification?correlator=123456 HTTP/1.1 Host: www.example.com
HTTP Status: 204 No Content.
POST http://localhost:9080/ShortMessageService/services/JSON/stopSmsNotification { "correlator":"123-123" }
HTTP/1.1 200 OK {}
Notifies the application when an SMS is received.
POST path/smsReception?correlator=123456 HTTP/1.1 Host: myapp.developer.com Content-Type: text/xml ----------HTTP – Body------------- <ReceivedSms version=”1.0”> <Message content="Vote A" sender=tel:+447790123456" destination="81771" datetime=”Tue, 15 Nov 1994 08:12:31 GMT"/> <Message content="Vote B" sender="tel:+447790121212" destination="81771" datetime="Tue, 15 Nov 1994 08:12:31 GMT"/> </ReceivedSms>
HTTP Status: 204 No Content
POST http://localhost:9080/SmsNotificationService/services/JSON/smsReception { correlator":"Cricket", "message":{ "message":"voteA", "senderAddress":"tel:+9880663630", "smsServiceActivationNumber":"5500", dateTime":"2003-08-09T00:18:37" }
HTTP Status: 200 OK {}