| Requires any of the roles: | Agent, Administrator |
| GET,POST,PUT,DELETE,OPTIONS | /v1/Listings/{ID} | ||
|---|---|---|---|
| GET,POST,PUT,DELETE,OPTIONS | /v1/Listings | ||
| GET,POST,PUT,DELETE,OPTIONS | /v1/Listings/DateRange/{ParamStartDate}/{ParamEndDate}/{AgentID} | ||
| GET,POST,PUT,DELETE,OPTIONS | /v1/Listings/DateRange/{ParamStartDate}/{ParamEndDate} |
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;
public class dtos
{
public static class ListingsRequest
{
public ArrayList<Listing> Listings = new ArrayList<Listing>();
public Integer AgentID = null;
public Date ParamStartDate = null;
public Date ParamEndDate = null;
public ArrayList<Listing> getListings() { return Listings; }
public ListingsRequest setListings(ArrayList<Listing> value) { this.Listings = value; return this; }
public Integer getAgentID() { return AgentID; }
public ListingsRequest setAgentID(Integer value) { this.AgentID = value; return this; }
public Date getParamStartDate() { return ParamStartDate; }
public ListingsRequest setParamStartDate(Date value) { this.ParamStartDate = value; return this; }
public Date getParamEndDate() { return ParamEndDate; }
public ListingsRequest setParamEndDate(Date value) { this.ParamEndDate = value; return this; }
}
public static class Listing
{
public Integer ID = null;
public Date LISTINGDATE = null;
public Date LISTINGTDATE = null;
public String POLICY = null;
public String OAGENT = null;
public String INSURED = null;
public String PREMIUM = null;
public String PART = null;
public BigDecimal AMOUNT = null;
public String AGENTNM = null;
public String LISTINGCTYPE = null;
public String COMPANY = null;
public String APPROVED = null;
public String CARDCREDIT = null;
public String REGION = null;
public String FPAYOUT = null;
public String PROMOPTS = null;
public String APPCNT = null;
public String PARTPERCENT = null;
public BigDecimal GROSS = null;
public String CITY = null;
public String STATE = null;
public String AGENTNO = null;
public String TYPE = null;
public String COMMRATE = null;
public Integer AgentID = null;
public Integer OAgentID = null;
public BigDecimal FIELDPAYOUT = null;
public Integer getId() { return ID; }
public Listing setId(Integer value) { this.ID = value; return this; }
public Date getListingdate() { return LISTINGDATE; }
public Listing setListingdate(Date value) { this.LISTINGDATE = value; return this; }
public Date getListingtdate() { return LISTINGTDATE; }
public Listing setListingtdate(Date value) { this.LISTINGTDATE = value; return this; }
public String getPolicy() { return POLICY; }
public Listing setPolicy(String value) { this.POLICY = value; return this; }
public String getOagent() { return OAGENT; }
public Listing setOagent(String value) { this.OAGENT = value; return this; }
public String getInsured() { return INSURED; }
public Listing setInsured(String value) { this.INSURED = value; return this; }
public String getPremium() { return PREMIUM; }
public Listing setPremium(String value) { this.PREMIUM = value; return this; }
public String getPart() { return PART; }
public Listing setPart(String value) { this.PART = value; return this; }
public BigDecimal getAmount() { return AMOUNT; }
public Listing setAmount(BigDecimal value) { this.AMOUNT = value; return this; }
public String getAgentnm() { return AGENTNM; }
public Listing setAgentnm(String value) { this.AGENTNM = value; return this; }
public String getListingctype() { return LISTINGCTYPE; }
public Listing setListingctype(String value) { this.LISTINGCTYPE = value; return this; }
public String getCompany() { return COMPANY; }
public Listing setCompany(String value) { this.COMPANY = value; return this; }
public String getApproved() { return APPROVED; }
public Listing setApproved(String value) { this.APPROVED = value; return this; }
public String getCardcredit() { return CARDCREDIT; }
public Listing setCardcredit(String value) { this.CARDCREDIT = value; return this; }
public String getRegion() { return REGION; }
public Listing setRegion(String value) { this.REGION = value; return this; }
public String getFpayout() { return FPAYOUT; }
public Listing setFpayout(String value) { this.FPAYOUT = value; return this; }
public String getPromopts() { return PROMOPTS; }
public Listing setPromopts(String value) { this.PROMOPTS = value; return this; }
public String getAppcnt() { return APPCNT; }
public Listing setAppcnt(String value) { this.APPCNT = value; return this; }
public String getPartpercent() { return PARTPERCENT; }
public Listing setPartpercent(String value) { this.PARTPERCENT = value; return this; }
public BigDecimal getGross() { return GROSS; }
public Listing setGross(BigDecimal value) { this.GROSS = value; return this; }
public String getCity() { return CITY; }
public Listing setCity(String value) { this.CITY = value; return this; }
public String getState() { return STATE; }
public Listing setState(String value) { this.STATE = value; return this; }
public String getAgentno() { return AGENTNO; }
public Listing setAgentno(String value) { this.AGENTNO = value; return this; }
public String getType() { return TYPE; }
public Listing setType(String value) { this.TYPE = value; return this; }
public String getCommrate() { return COMMRATE; }
public Listing setCommrate(String value) { this.COMMRATE = value; return this; }
public Integer getAgentID() { return AgentID; }
public Listing setAgentID(Integer value) { this.AgentID = value; return this; }
public Integer getOAgentID() { return OAgentID; }
public Listing setOAgentID(Integer value) { this.OAgentID = value; return this; }
public BigDecimal getFieldpayout() { return FIELDPAYOUT; }
public Listing setFieldpayout(BigDecimal value) { this.FIELDPAYOUT = value; return this; }
}
public static class ListingsResponse
{
public ResponseStatus ResponseStatus = null;
public ArrayList<Listing> Listings = new ArrayList<Listing>();
public ResponseStatus getResponseStatus() { return ResponseStatus; }
public ListingsResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
public ArrayList<Listing> getListings() { return Listings; }
public ListingsResponse setListings(ArrayList<Listing> value) { this.Listings = value; return this; }
}
}
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
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Listings/{ID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"Listings":[{"ID":0,"LISTINGDATE":"0001-01-01T00:00:00.0000000","LISTINGTDATE":"0001-01-01T00:00:00.0000000","POLICY":"String","OAGENT":"String","INSURED":"String","PREMIUM":"String","PART":"String","AMOUNT":0,"AGENTNM":"String","LISTINGCTYPE":"String","COMPANY":"String","APPROVED":"String","CARDCREDIT":"String","REGION":"String","FPAYOUT":"String","PROMOPTS":"String","APPCNT":"String","PARTPERCENT":"String","GROSS":0,"CITY":"String","STATE":"String","AGENTNO":"String","TYPE":"String","COMMRATE":"String","AgentID":0,"OAgentID":0,"FIELDPAYOUT":0}],"AgentID":0,"ParamStartDate":"0001-01-01T00:00:00.0000000","ParamEndDate":"0001-01-01T00:00:00.0000000"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Listings":[{"ID":0,"LISTINGDATE":"0001-01-01T00:00:00.0000000","LISTINGTDATE":"0001-01-01T00:00:00.0000000","POLICY":"String","OAGENT":"String","INSURED":"String","PREMIUM":"String","PART":"String","AMOUNT":0,"AGENTNM":"String","LISTINGCTYPE":"String","COMPANY":"String","APPROVED":"String","CARDCREDIT":"String","REGION":"String","FPAYOUT":"String","PROMOPTS":"String","APPCNT":"String","PARTPERCENT":"String","GROSS":0,"CITY":"String","STATE":"String","AGENTNO":"String","TYPE":"String","COMMRATE":"String","AgentID":0,"OAgentID":0,"FIELDPAYOUT":0}]}