POST | /sendsms |
---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports SMSGateway.ServiceModel.Types
Imports SMSGateway.ServiceModel.Requests
Imports SMSGateway.ServiceModel.Responses
Namespace Global
Namespace SMSGateway.ServiceModel.Requests
Public Partial Class SecurityRequestDto
Public Overridable Property partner_id As String
Public Overridable Property time As String
Public Overridable Property hash As String
End Class
Public Partial Class SmsBodyDto
Public Sub New()
xtraparams = New Dictionary(Of String, String)
End Sub
Public Overridable Property service_id As String
Public Overridable Property number As String
Public Overridable Property carrier As String
Public Overridable Property message As String
Public Overridable Property encode As Integer
Public Overridable Property url As String
Public Overridable Property test As Integer
Public Overridable Property mask As String
Public Overridable Property xtraparams As Dictionary(Of String, String)
End Class
End Namespace
Namespace SMSGateway.ServiceModel.Responses
Public Partial Class ResponseSmsDto
Public Overridable Property result As ResultResponseDto
End Class
Public Partial Class ResultResponseDto
Public Overridable Property code As String
Public Overridable Property message As String
Public Overridable Property id As String
End Class
End Namespace
Namespace SMSGateway.ServiceModel.Types
Public Partial Class SendSmsRequest
Public Overridable Property security As SecurityRequestDto
Public Overridable Property notify As SmsBodyDto
End Class
End Namespace
End Namespace
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /sendsms HTTP/1.1
Host: 67.208.218.153
Accept: application/json
Content-Type: application/json
Content-Length: length
{"notify":{"carrier":"String","encode":0,"mask":"String","message":"String","number":"String","service_id":"String","test":0,"url":"String","xtraparams":[{"Key":"String","Value":"String"}]},"security":{"hash":"String","partner_id":"String","time":"String"}}
HTTP/1.1 200 OK Content-Type: application/json Content-Length: length {"result":{"code":"String","id":"String","message":"String"}}