| Required role: | Admin |
| POST | /SurveyCampaign/{CampaignId}/Send |
|---|
import java.math.*;
import java.util.*;
import net.servicestack.client.*;
public class dtos
{
public static class SurveyCampaignSendRequest
{
public Integer campaignId = null;
public Integer limit = null;
public Boolean testMode = null;
public ArrayList<String> testEmails = null;
public Boolean useEngine = null;
public Integer getCampaignId() { return campaignId; }
public SurveyCampaignSendRequest setCampaignId(Integer value) { this.campaignId = value; return this; }
public Integer getLimit() { return limit; }
public SurveyCampaignSendRequest setLimit(Integer value) { this.limit = value; return this; }
public Boolean isTestMode() { return testMode; }
public SurveyCampaignSendRequest setTestMode(Boolean value) { this.testMode = value; return this; }
public ArrayList<String> getTestEmails() { return testEmails; }
public SurveyCampaignSendRequest setTestEmails(ArrayList<String> value) { this.testEmails = value; return this; }
public Boolean isUseEngine() { return useEngine; }
public SurveyCampaignSendRequest setUseEngine(Boolean value) { this.useEngine = value; return this; }
}
public static class SurveyCampaignSendResult
{
public Integer queued = null;
public Integer skipped = null;
public Integer remaining = null;
public Integer statusCode = null;
public String message = null;
public Integer getQueued() { return queued; }
public SurveyCampaignSendResult setQueued(Integer value) { this.queued = value; return this; }
public Integer getSkipped() { return skipped; }
public SurveyCampaignSendResult setSkipped(Integer value) { this.skipped = value; return this; }
public Integer getRemaining() { return remaining; }
public SurveyCampaignSendResult setRemaining(Integer value) { this.remaining = value; return this; }
public Integer getStatusCode() { return statusCode; }
public SurveyCampaignSendResult setStatusCode(Integer value) { this.statusCode = value; return this; }
public String getMessage() { return message; }
public SurveyCampaignSendResult setMessage(String value) { this.message = value; return this; }
}
}
Java SurveyCampaignSendRequest DTOs
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 /SurveyCampaign/{CampaignId}/Send HTTP/1.1
Host: stubbur-app.azurewebsites.net
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<SurveyCampaignSendRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel">
<CampaignId>0</CampaignId>
<Limit>0</Limit>
<TestEmails xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>String</d2p1:string>
</TestEmails>
<TestMode>false</TestMode>
<UseEngine>false</UseEngine>
</SurveyCampaignSendRequest>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <SurveyCampaignSendResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/TicketUserServices.ServiceModel"> <Message>String</Message> <Queued>0</Queued> <Remaining>0</Remaining> <Skipped>0</Skipped> <StatusCode>0</StatusCode> </SurveyCampaignSendResult>