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.
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports digitaluapi.ServiceModel

Namespace Global

    Namespace digitaluapi.ServiceModel

        Public Partial Class ClickatellMessage
            Public Overridable Property channel As String
            Public Overridable Property to As String
            Public Overridable Property content As String
            Public Overridable Property clientMessageId As String
        End Class

        Public Partial Class ClickatellMessageResponse
            Public Overridable Property messages As List(Of ClickatellResponsesMsg)
            Public Overridable Property error As String
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class

        Public Partial Class ClickatellResponsesMsg
            Public Overridable Property apiMessageId As String
            Public Overridable Property accepted As Boolean
            Public Overridable Property to As String
            Public Overridable Property error As String
            Public Overridable Property msg As ClickatellMessage
        End Class

        Public Partial Class GrandcomMessage
            Public Overridable Property channel As String
            Public Overridable Property to As String
            Public Overridable Property content As String
            Public Overridable Property clientMessageId As String
        End Class

        Public Partial Class GrandcomMsgResponse
            Public Overridable Property messages As List(Of GrandcomResponseMsg)
            Public Overridable Property error As String
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class

        Public Partial Class GrandcomResponseMsg
            Public Overridable Property apiMessageId As String
            Public Overridable Property accepted As Boolean
            Public Overridable Property to As String
            Public Overridable Property error As String
            Public Overridable Property hasError As Boolean
            Public Overridable Property msg As GrandcomMessage
        End Class

        Public Partial Class SendSmsRequest
            '''<Summary>
            '''Messages to be Sent
            '''</Summary>
            <ApiMember(Description:="Messages to be Sent", IsRequired:=true)>
            Public Overridable Property Messages As List(Of SmsMessage) = New List(Of SmsMessage)
        End Class

        Public Partial Class SMPPMessage
            Public Overridable Property channel As String
            Public Overridable Property to As String
            Public Overridable Property content As String
            Public Overridable Property clientMessageId As String
        End Class

        Public Partial Class SMPPMsgResponse
            Public Overridable Property messages As List(Of SMPPResponseMsg)
            Public Overridable Property error As String
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class

        Public Partial Class SMPPResponseMsg
            Public Overridable Property apiMessageId As String
            Public Overridable Property accepted As Boolean
            Public Overridable Property to As String
            Public Overridable Property error As String
            Public Overridable Property msg As SMPPMessage
        End Class

        Public Partial Class SmsMessage
            Public Overridable Property channel As String
            Public Overridable Property to As String
            Public Overridable Property content As String
            Public Overridable Property clientMessageId As String
        End Class

        Public Partial Class SmsMsgResponse
            Public Overridable Property grandcomMsgResponse As GrandcomMsgResponse
            Public Overridable Property clickatellMsgResponse As ClickatellMessageResponse
            Public Overridable Property SMPPMsgResponse As SMPPMsgResponse
            Public Overridable Property error As String
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class
    End Namespace
End Namespace

VB.NET SendSmsRequest DTOs

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

HTTP + JSV

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: text/jsv
Content-Type: text/jsv
Content-Length: length

{
	Messages: 
	[
		{
			channel: String,
			to: String,
			content: String,
			clientMessageId: String
		}
	]
}
HTTP/1.1 200 OK
Content-Type: text/jsv
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
		}
	}
}