| POST | /api/sendmessage | ||
|---|---|---|---|
| POST | /api/sendmessage/immediate | ||
| POST | /api/send | ||
| POST | /api/sms/send | ||
| POST | /api/send/immediate | ||
| POST | /api/sms/send/immediate |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
/**
* Saves the specified SMS and sends it for background processing
*/
@Api(Description="Saves the specified SMS and sends it for background processing")
public static class SMSSend
{
public SMSModel SMSModel = null;
public Boolean CreateCommunicationReferencesImmediately = null;
public SMSModel getSmsModel() { return SMSModel; }
public SMSSend setSmsModel(SMSModel value) { this.SMSModel = value; return this; }
public Boolean isCreateCommunicationReferencesImmediately() { return CreateCommunicationReferencesImmediately; }
public SMSSend setCreateCommunicationReferencesImmediately(Boolean value) { this.CreateCommunicationReferencesImmediately = value; return this; }
}
public static class SMSModel extends BaseLicenseeEnforcedServiceModel
{
public SMSContact From = null;
public ArrayList<SMSContact> To = null;
public String MessageBody = null;
public Boolean ReplyIsAllowed = null;
public Boolean ReplyIsRequired = null;
public String Notes = null;
public UUID LinkedObjectId = null;
public UUID SuiteId = null;
public SMSContact getFrom() { return From; }
public SMSModel setFrom(SMSContact value) { this.From = value; return this; }
public ArrayList<SMSContact> getTo() { return To; }
public SMSModel setTo(ArrayList<SMSContact> value) { this.To = value; return this; }
public String getMessageBody() { return MessageBody; }
public SMSModel setMessageBody(String value) { this.MessageBody = value; return this; }
public Boolean isReplyIsAllowed() { return ReplyIsAllowed; }
public SMSModel setReplyIsAllowed(Boolean value) { this.ReplyIsAllowed = value; return this; }
public Boolean isReplyIsRequired() { return ReplyIsRequired; }
public SMSModel setReplyIsRequired(Boolean value) { this.ReplyIsRequired = value; return this; }
public String getNotes() { return Notes; }
public SMSModel setNotes(String value) { this.Notes = value; return this; }
public UUID getLinkedObjectId() { return LinkedObjectId; }
public SMSModel setLinkedObjectId(UUID value) { this.LinkedObjectId = value; return this; }
public UUID getSuiteId() { return SuiteId; }
public SMSModel setSuiteId(UUID value) { this.SuiteId = value; return this; }
}
public static class BaseLicenseeEnforcedServiceModel
{
public UUID LicenseeId = null;
public UUID getLicenseeId() { return LicenseeId; }
public BaseLicenseeEnforcedServiceModel setLicenseeId(UUID value) { this.LicenseeId = value; return this; }
}
public static class SMSContact
{
public String Name = null;
public String PhoneNumber = null;
public UUID ContactId = null;
public String getName() { return Name; }
public SMSContact setName(String value) { this.Name = value; return this; }
public String getPhoneNumber() { return PhoneNumber; }
public SMSContact setPhoneNumber(String value) { this.PhoneNumber = value; return this; }
public UUID getContactId() { return ContactId; }
public SMSContact setContactId(UUID value) { this.ContactId = value; return this; }
}
public static class CommResponse
{
public UUID CommId = null;
public String Reference = null;
public Boolean Status = null;
public String Message = null;
public UUID getCommId() { return CommId; }
public CommResponse setCommId(UUID value) { this.CommId = value; return this; }
public String getReference() { return Reference; }
public CommResponse setReference(String value) { this.Reference = value; return this; }
public Boolean isStatus() { return Status; }
public CommResponse setStatus(Boolean value) { this.Status = value; return this; }
public String getMessage() { return Message; }
public CommResponse setMessage(String value) { this.Message = 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 /api/sendmessage HTTP/1.1
Host: production-eros-gateway-api-sms-wa.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SMSSend xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Dvaravartman.Common.Model.ServiceModel">
<CreateCommunicationReferencesImmediately>false</CreateCommunicationReferencesImmediately>
<SMSModel xmlns:d2p1="http://schemas.datacontract.org/2004/07/Eros.Subtle.Dvaravartman.Common.Model">
<LicenseeId xmlns="http://schemas.datacontract.org/2004/07/Eros.Saguna.Common.Library.ServiceModels">00000000-0000-0000-0000-000000000000</LicenseeId>
<d2p1:From>
<d2p1:ContactId>00000000-0000-0000-0000-000000000000</d2p1:ContactId>
<d2p1:Name>String</d2p1:Name>
<d2p1:PhoneNumber>String</d2p1:PhoneNumber>
</d2p1:From>
<d2p1:LinkedObjectId>00000000-0000-0000-0000-000000000000</d2p1:LinkedObjectId>
<d2p1:MessageBody>String</d2p1:MessageBody>
<d2p1:Notes>String</d2p1:Notes>
<d2p1:ReplyIsAllowed>false</d2p1:ReplyIsAllowed>
<d2p1:ReplyIsRequired>false</d2p1:ReplyIsRequired>
<d2p1:SuiteId>00000000-0000-0000-0000-000000000000</d2p1:SuiteId>
<d2p1:To>
<d2p1:SMSContact>
<d2p1:ContactId>00000000-0000-0000-0000-000000000000</d2p1:ContactId>
<d2p1:Name>String</d2p1:Name>
<d2p1:PhoneNumber>String</d2p1:PhoneNumber>
</d2p1:SMSContact>
</d2p1:To>
</SMSModel>
</SMSSend>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CommResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Eros.Subtle.Dvaravartman.Common.Model"> <CommId>00000000-0000-0000-0000-000000000000</CommId> <Message>String</Message> <Reference>String</Reference> <Status>false</Status> </CommResponse>