digitaluapi

<back to all web services

SendSmsRequest

Requires Authentication
Requires any of the roles:Client, Admin, Partner
The following routes are available for this service:
POST/communication/message/smsSends an SMS to phone numbers provided.
import java.math.*
import java.util.*
import java.io.InputStream
import net.servicestack.client.*


open class SendSmsRequest
{
    /**
    * Messages to be Sent
    */
    @ApiMember(Description="Messages to be Sent", IsRequired=true)
    open var Messages:ArrayList<SmsMessage> = ArrayList<SmsMessage>()
}

open class SmsMessage
{
    open var channel:String? = null
    open var to:String? = null
    open var content:String? = null
    open var clientMessageId:String? = null
}

open class SmsMsgResponse
{
    open var grandcomMsgResponse:GrandcomMsgResponse? = null
    open var clickatellMsgResponse:ClickatellMessageResponse? = null
    open var SMPPMsgResponse:SMPPMsgResponse? = null
    open var error:String? = null
    open var ResponseStatus:ResponseStatus? = null
}

open class GrandcomMsgResponse
{
    open var messages:ArrayList<GrandcomResponseMsg>? = null
    open var error:String? = null
    open var ResponseStatus:ResponseStatus? = null
}

open class GrandcomResponseMsg
{
    open var apiMessageId:String? = null
    open var accepted:Boolean? = null
    open var to:String? = null
    open var error:String? = null
    open var hasError:Boolean? = null
    open var msg:GrandcomMessage? = null
}

open class GrandcomMessage
{
    open var channel:String? = null
    open var to:String? = null
    open var content:String? = null
    open var clientMessageId:String? = null
}

open class ClickatellMessageResponse
{
    open var messages:ArrayList<ClickatellResponsesMsg>? = null
    open var error:String? = null
    open var ResponseStatus:ResponseStatus? = null
}

open class ClickatellResponsesMsg
{
    open var apiMessageId:String? = null
    open var accepted:Boolean? = null
    open var to:String? = null
    open var error:String? = null
    open var msg:ClickatellMessage? = null
}

open class ClickatellMessage
{
    open var channel:String? = null
    open var to:String? = null
    open var content:String? = null
    open var clientMessageId:String? = null
}

open class SMPPMsgResponse
{
    open var messages:ArrayList<SMPPResponseMsg>? = null
    open var error:String? = null
    open var ResponseStatus:ResponseStatus? = null
}

open class SMPPResponseMsg
{
    open var apiMessageId:String? = null
    open var accepted:Boolean? = null
    open var to:String? = null
    open var error:String? = null
    open var msg:SMPPMessage? = null
}

open class SMPPMessage
{
    open var channel:String? = null
    open var to:String? = null
    open var content:String? = null
    open var clientMessageId:String? = null
}

Kotlin SendSmsRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /communication/message/sms HTTP/1.1 
Host: duengageapi.uat.scadsoftware.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"Messages":[{"channel":"String","to":"String","content":"String","clientMessageId":"String"}]}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"grandcomMsgResponse":{"messages":[{"apiMessageId":"String","accepted":false,"to":"String","error":"String","hasError":false,"msg":{"channel":"String","to":"String","content":"String","clientMessageId":"String"}}],"error":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}},"clickatellMsgResponse":{"messages":[{"apiMessageId":"String","accepted":false,"to":"String","error":"String","msg":{"channel":"String","to":"String","content":"String","clientMessageId":"String"}}],"error":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}},"SMPPMsgResponse":{"messages":[{"apiMessageId":"String","accepted":false,"to":"String","error":"String","msg":{"channel":"String","to":"String","content":"String","clientMessageId":"String"}}],"error":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}},"error":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}