Trendsic Platform Service

<back to all web services

ComparablesRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/Rfp/{RfpDocumentUID}/Comparables
import Foundation
import ServiceStack

public class ComparablesRequest : Codable
{
    public var rfpDocumentUID:String

    required public init(){}
}

public class ComparablesResponse : Codable
{
    public var responseStatus:ResponseStatus
    public var comparables:[ComparableLettingView] = []
    public var summary:ComparablesSummaryView

    required public init(){}
}

public class ComparableLettingView : Codable
{
    public var projectNumber:String
    public var lettingDate:Date
    public var ageYears:Double
    public var parish:String
    public var lettingUrl:String
    public var winnerTotal:Double
    public var spreadPct:Double?
    public var bidderCount:Int
    public var sharedCount:Int
    public var itemCount:Int
    public var overlapPct:Double
    public var mobilizationPct:Double?
    public var trafficControlPct:Double?

    required public init(){}
}

public class ComparablesSummaryView : Codable
{
    public var medianMobilizationPct:Double?
    public var medianTrafficControlPct:Double?
    public var medianSpreadPct:Double?
    public var appliedMobilizationPct:Double?
    public var note:String

    required public init(){}
}


Swift ComparablesRequest DTOs

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

HTTP + JSV

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/Rfp/{RfpDocumentUID}/Comparables 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
		}
	},
	Comparables: 
	[
		{
			ProjectNumber: String,
			LettingDate: 0001-01-01,
			AgeYears: 0,
			Parish: String,
			LettingUrl: String,
			WinnerTotal: 0,
			SpreadPct: 0,
			BidderCount: 0,
			SharedCount: 0,
			ItemCount: 0,
			OverlapPct: 0,
			MobilizationPct: 0,
			TrafficControlPct: 0
		}
	],
	Summary: 
	{
		MedianMobilizationPct: 0,
		MedianTrafficControlPct: 0,
		MedianSpreadPct: 0,
		AppliedMobilizationPct: 0,
		Note: String
	}
}