| Requires the role: | Admin | Requires the permission: | ReadData |
| POST | /sms/sendms | ||
|---|---|---|---|
| GET POST | /sms/sendsms/{FullPhoneNumber}/{Message} |
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class SendSmsRequest
{
public String fullPhoneNumber = null;
public String message = null;
public Long requestUnixUTCTimeStamp = null;
public RequestSignature signature = null;
public String getFullPhoneNumber() { return fullPhoneNumber; }
public SendSmsRequest setFullPhoneNumber(String value) { this.fullPhoneNumber = value; return this; }
public String getMessage() { return message; }
public SendSmsRequest setMessage(String value) { this.message = value; return this; }
public Long getRequestUnixUTCTimeStamp() { return requestUnixUTCTimeStamp; }
public SendSmsRequest setRequestUnixUTCTimeStamp(Long value) { this.requestUnixUTCTimeStamp = value; return this; }
public RequestSignature getSignature() { return signature; }
public SendSmsRequest setSignature(RequestSignature value) { this.signature = value; return this; }
}
public static class RequestSignature
{
public String systemId = null;
public String systemSecret = null;
public String signature = null;
public String getSystemId() { return systemId; }
public RequestSignature setSystemId(String value) { this.systemId = value; return this; }
public String getSystemSecret() { return systemSecret; }
public RequestSignature setSystemSecret(String value) { this.systemSecret = value; return this; }
public String getSignature() { return signature; }
public RequestSignature setSignature(String value) { this.signature = value; return this; }
}
public static class SendSmsResult
{
public Integer statusCode = null;
public String statusMessage = null;
public Integer getStatusCode() { return statusCode; }
public SendSmsResult setStatusCode(Integer value) { this.statusCode = value; return this; }
public String getStatusMessage() { return statusMessage; }
public SendSmsResult setStatusMessage(String value) { this.statusMessage = value; return this; }
}
}
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 /sms/sendms HTTP/1.1
Host: stubbur-app.azurewebsites.net
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/TicketUserServices.ServiceModel">
<FullPhoneNumber>String</FullPhoneNumber>
<Message>String</Message>
<RequestUnixUTCTimeStamp>0</RequestUnixUTCTimeStamp>
<Signature>
<Signature>String</Signature>
<SystemId>String</SystemId>
<SystemSecret>String</SystemSecret>
</Signature>
</SendSmsRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <SendSmsResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel"> <StatusCode>0</StatusCode> <StatusMessage>String</StatusMessage> </SendSmsResult>