| POST | /sendgridevents |
|---|
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
import com.google.gson.annotations.*;
import com.google.gson.reflect.*;
public class dtos
{
public static class SendGridEvents extends ArrayList<SendGridEvent>
{
}
public static class SendGridEvent
{
@DataMember(Name="sg_event_id")
@SerializedName("sg_event_id")
public String sendGridEventId = null;
@DataMember(Name="sg_message_id")
@SerializedName("sg_message_id")
public String sendGridMessageId = null;
public String email = null;
public Long timestamp = null;
@DataMember(Name="smtp-id")
@SerializedName("smtp-id")
public String smtpId = null;
public String event = null;
public String type = null;
public ArrayList<String> category = null;
public String reason = null;
public String status = null;
public String userAgent = null;
public String ip = null;
public String url = null;
@DataMember(Name="url_offset")
@SerializedName("url_offset")
public String urlOffset = null;
@DataMember(Name="sg_machine_open")
@SerializedName("sg_machine_open")
public Boolean machineOpen = null;
public String tls = null;
@DataMember(Name="unique_args")
@SerializedName("unique_args")
public HashMap<String,String> uniqueArgs = null;
@DataMember(Name="custom_args")
@SerializedName("custom_args")
public HashMap<String,String> customArgs = null;
@DataMember(Name="marketing_campaign_id")
@SerializedName("marketing_campaign_id")
public String marketingCampaignId = null;
@DataMember(Name="marketing_campaign_name")
@SerializedName("marketing_campaign_name")
public String marketingCampaignName = null;
@DataMember(Name="singlesend_id")
@SerializedName("singlesend_id")
public String singleSendID = null;
@DataMember(Name="singlesend_name")
@SerializedName("singlesend_name")
public String singleSendName = null;
@DataMember(Name="bounce_classification")
@SerializedName("bounce_classification")
public String bounceClassification = null;
public String getSendGridEventId() { return sendGridEventId; }
public SendGridEvent setSendGridEventId(String value) { this.sendGridEventId = value; return this; }
public String getSendGridMessageId() { return sendGridMessageId; }
public SendGridEvent setSendGridMessageId(String value) { this.sendGridMessageId = value; return this; }
public String getEmail() { return email; }
public SendGridEvent setEmail(String value) { this.email = value; return this; }
public Long getTimestamp() { return timestamp; }
public SendGridEvent setTimestamp(Long value) { this.timestamp = value; return this; }
public String getSmtpId() { return smtpId; }
public SendGridEvent setSmtpId(String value) { this.smtpId = value; return this; }
public String getEvent() { return event; }
public SendGridEvent setEvent(String value) { this.event = value; return this; }
public String getType() { return type; }
public SendGridEvent setType(String value) { this.type = value; return this; }
public ArrayList<String> getCategory() { return category; }
public SendGridEvent setCategory(ArrayList<String> value) { this.category = value; return this; }
public String getReason() { return reason; }
public SendGridEvent setReason(String value) { this.reason = value; return this; }
public String getStatus() { return status; }
public SendGridEvent setStatus(String value) { this.status = value; return this; }
public String getUserAgent() { return userAgent; }
public SendGridEvent setUserAgent(String value) { this.userAgent = value; return this; }
public String getIp() { return ip; }
public SendGridEvent setIp(String value) { this.ip = value; return this; }
public String getUrl() { return url; }
public SendGridEvent setUrl(String value) { this.url = value; return this; }
public String getUrlOffset() { return urlOffset; }
public SendGridEvent setUrlOffset(String value) { this.urlOffset = value; return this; }
public Boolean isMachineOpen() { return machineOpen; }
public SendGridEvent setMachineOpen(Boolean value) { this.machineOpen = value; return this; }
public String getTls() { return tls; }
public SendGridEvent setTls(String value) { this.tls = value; return this; }
public HashMap<String,String> getUniqueArgs() { return uniqueArgs; }
public SendGridEvent setUniqueArgs(HashMap<String,String> value) { this.uniqueArgs = value; return this; }
public HashMap<String,String> getCustomArgs() { return customArgs; }
public SendGridEvent setCustomArgs(HashMap<String,String> value) { this.customArgs = value; return this; }
public String getMarketingCampaignId() { return marketingCampaignId; }
public SendGridEvent setMarketingCampaignId(String value) { this.marketingCampaignId = value; return this; }
public String getMarketingCampaignName() { return marketingCampaignName; }
public SendGridEvent setMarketingCampaignName(String value) { this.marketingCampaignName = value; return this; }
public String getSingleSendID() { return singleSendID; }
public SendGridEvent setSingleSendID(String value) { this.singleSendID = value; return this; }
public String getSingleSendName() { return singleSendName; }
public SendGridEvent setSingleSendName(String value) { this.singleSendName = value; return this; }
public String getBounceClassification() { return bounceClassification; }
public SendGridEvent setBounceClassification(String value) { this.bounceClassification = value; return this; }
}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /sendgridevents HTTP/1.1
Host: cpmwebservices-t.clarkpud.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
[]
HTTP/1.1 200 OK Content-Type: text/csv Content-Length: length (string)