SMSGateway

<back to all web services

SendSmsRequest

The following routes are available for this service:
POST/sendsms
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class SendSmsRequest
    {
        public SecurityRequestDto security = null;
        public SmsBodyDto notify = null;
        
        public SecurityRequestDto getSecurity() { return security; }
        public SendSmsRequest setSecurity(SecurityRequestDto value) { this.security = value; return this; }
        public SmsBodyDto getNotify() { return notify; }
        public SendSmsRequest setNotify(SmsBodyDto value) { this.notify = value; return this; }
    }

    public static class SecurityRequestDto
    {
        public String partner_id = null;
        public String time = null;
        public String hash = null;
        
        public String getPartnerId() { return partner_id; }
        public SecurityRequestDto setPartnerId(String value) { this.partner_id = value; return this; }
        public String getTime() { return time; }
        public SecurityRequestDto setTime(String value) { this.time = value; return this; }
        public String getHash() { return hash; }
        public SecurityRequestDto setHash(String value) { this.hash = value; return this; }
    }

    public static class SmsBodyDto
    {
        public String service_id = null;
        public String number = null;
        public String carrier = null;
        public String message = null;
        public Integer encode = null;
        public String url = null;
        public Integer test = null;
        public String mask = null;
        public HashMap<String,String> xtraparams = null;
        
        public String getServiceId() { return service_id; }
        public SmsBodyDto setServiceId(String value) { this.service_id = value; return this; }
        public String getNumber() { return number; }
        public SmsBodyDto setNumber(String value) { this.number = value; return this; }
        public String getCarrier() { return carrier; }
        public SmsBodyDto setCarrier(String value) { this.carrier = value; return this; }
        public String getMessage() { return message; }
        public SmsBodyDto setMessage(String value) { this.message = value; return this; }
        public Integer getEncode() { return encode; }
        public SmsBodyDto setEncode(Integer value) { this.encode = value; return this; }
        public String getUrl() { return url; }
        public SmsBodyDto setUrl(String value) { this.url = value; return this; }
        public Integer getTest() { return test; }
        public SmsBodyDto setTest(Integer value) { this.test = value; return this; }
        public String getMask() { return mask; }
        public SmsBodyDto setMask(String value) { this.mask = value; return this; }
        public HashMap<String,String> getXtraparams() { return xtraparams; }
        public SmsBodyDto setXtraparams(HashMap<String,String> value) { this.xtraparams = value; return this; }
    }

    public static class ResponseSmsDto
    {
        public ResultResponseDto result = null;
        
        public ResultResponseDto getResult() { return result; }
        public ResponseSmsDto setResult(ResultResponseDto value) { this.result = value; return this; }
    }

    public static class ResultResponseDto
    {
        public String code = null;
        public String message = null;
        public String id = null;
        
        public String getCode() { return code; }
        public ResultResponseDto setCode(String value) { this.code = value; return this; }
        public String getMessage() { return message; }
        public ResultResponseDto setMessage(String value) { this.message = value; return this; }
        public String getId() { return id; }
        public ResultResponseDto setId(String value) { this.id = value; return this; }
    }

}

Java 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 /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"}}