POST | /sendsms |
---|
namespace SMSGateway.ServiceModel.Requests
open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations
[<AllowNullLiteral>]
type ResultResponseDto() =
member val code:String = null with get,set
member val message:String = null with get,set
member val id:String = null with get,set
[<AllowNullLiteral>]
type ResponseSmsDto() =
member val result:ResultResponseDto = null with get,set
[<AllowNullLiteral>]
type SecurityRequestDto() =
member val partner_id:String = null with get,set
member val time:String = null with get,set
member val hash:String = null with get,set
[<AllowNullLiteral>]
type SmsBodyDto() =
member val service_id:String = null with get,set
member val number:String = null with get,set
member val carrier:String = null with get,set
member val message:String = null with get,set
member val encode:Int32 = new Int32() with get,set
member val url:String = null with get,set
member val test:Int32 = new Int32() with get,set
member val mask:String = null with get,set
member val xtraparams:Dictionary<String, String> = new Dictionary<String, String>() with get,set
[<AllowNullLiteral>]
type SendSmsRequest() =
member val security:SecurityRequestDto = null with get,set
member val notify:SmsBodyDto = null with get,set
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
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/xml
Content-Type: application/xml
Content-Length: length
<SendSmsRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SMSGateway.ServiceModel.Types">
<notify xmlns:d2p1="http://schemas.datacontract.org/2004/07/SMSGateway.ServiceModel.Requests">
<d2p1:carrier>String</d2p1:carrier>
<d2p1:encode>0</d2p1:encode>
<d2p1:mask>String</d2p1:mask>
<d2p1:message>String</d2p1:message>
<d2p1:number>String</d2p1:number>
<d2p1:service_id>String</d2p1:service_id>
<d2p1:test>0</d2p1:test>
<d2p1:url>String</d2p1:url>
<d2p1:xtraparams xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:xtraparams>
</notify>
<security xmlns:d2p1="http://schemas.datacontract.org/2004/07/SMSGateway.ServiceModel.Requests">
<d2p1:hash>String</d2p1:hash>
<d2p1:partner_id>String</d2p1:partner_id>
<d2p1:time>String</d2p1:time>
</security>
</SendSmsRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <ResponseSmsDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/SMSGateway.ServiceModel.Responses"> <result> <code>String</code> <id>String</id> <message>String</message> </result> </ResponseSmsDto>