| Requires any of the roles: | Agent, Administrator |
| GET,OPTIONS | /v1/PolicyReport/{PolicyNumber} |
|---|
import Foundation
import ServiceStack
public class PolicyReportRequest : Codable
{
public var policyNumber:String
required public init(){}
}
public class PolicyReportResponse : Codable
{
public var responseStatus:ResponseStatus
public var reportData:[CommissionListing] = []
required public init(){}
}
public class CommissionListing : Codable
{
public var id:Int
public var processDate:Date
public var paymentDate:Date
public var agentId:Int
public var agent:String
public var oAgentID:Int
public var oAgent:String
public var policy:String
public var policyType:String
public var insured:String
public var premium:Double
public var part:Double
public var partPercent:Double
public var amount:Double
public var company:String
public var gross:Double
public var agentNumber:String
public var commissionRate:Double
public var Description:String
required public init(){}
}
Swift PolicyReportRequest DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/PolicyReport/{PolicyNumber} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
},
ReportData:
[
{
ID: 0,
ProcessDate: 0001-01-01,
PaymentDate: 0001-01-01,
AgentId: 0,
Agent: String,
OAgentID: 0,
OAgent: String,
Policy: String,
PolicyType: String,
Insured: String,
Premium: 0,
Part: 0,
PartPercent: 0,
Amount: 0,
Company: String,
Gross: 0,
AgentNumber: String,
CommissionRate: 0,
Description: String
}
]
}