Trendsic Platform Service

<back to all web services

ListingsRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
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}
namespace CRM.AgencyPlatform.API.Internal

open System
open System.IO
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type Listing() = 
        member val ID:Int32 = new Int32() with get,set
        member val LISTINGDATE:DateTime = new DateTime() with get,set
        member val LISTINGTDATE:DateTime = new DateTime() with get,set
        member val POLICY:String = null with get,set
        member val OAGENT:String = null with get,set
        member val INSURED:String = null with get,set
        member val PREMIUM:String = null with get,set
        member val PART:String = null with get,set
        member val AMOUNT:Decimal = new Decimal() with get,set
        member val AGENTNM:String = null with get,set
        member val LISTINGCTYPE:String = null with get,set
        member val COMPANY:String = null with get,set
        member val APPROVED:String = null with get,set
        member val CARDCREDIT:String = null with get,set
        member val REGION:String = null with get,set
        member val FPAYOUT:String = null with get,set
        member val PROMOPTS:String = null with get,set
        member val APPCNT:String = null with get,set
        member val PARTPERCENT:String = null with get,set
        member val GROSS:Decimal = new Decimal() with get,set
        member val CITY:String = null with get,set
        member val STATE:String = null with get,set
        member val AGENTNO:String = null with get,set
        member val TYPE:String = null with get,set
        member val COMMRATE:String = null with get,set
        member val AgentID:Int32 = new Int32() with get,set
        member val OAgentID:Int32 = new Int32() with get,set
        member val FIELDPAYOUT:Decimal = new Decimal() with get,set

    [<AllowNullLiteral>]
    type ListingsResponse() = 
        member val ResponseStatus:ResponseStatus = null with get,set
        member val Listings:ResizeArray<Listing> = new ResizeArray<Listing>() with get,set

    [<AllowNullLiteral>]
    type ListingsRequest() = 
        member val Listings:ResizeArray<Listing> = new ResizeArray<Listing>() with get,set
        member val AgentID:Int32 = new Int32() with get,set
        member val ParamStartDate:DateTime = new DateTime() with get,set
        member val ParamEndDate:DateTime = new DateTime() with get,set

F# ListingsRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

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: text/jsonl
Content-Type: text/jsonl
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: text/jsonl
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}]}