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 datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ComparableLettingView:
    project_number: Optional[str] = None
    letting_date: datetime.datetime = datetime.datetime(1, 1, 1)
    age_years: Decimal = decimal.Decimal(0)
    parish: Optional[str] = None
    letting_url: Optional[str] = None
    winner_total: Decimal = decimal.Decimal(0)
    spread_pct: Optional[Decimal] = None
    bidder_count: int = 0
    shared_count: int = 0
    item_count: int = 0
    overlap_pct: Decimal = decimal.Decimal(0)
    mobilization_pct: Optional[Decimal] = None
    traffic_control_pct: Optional[Decimal] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ComparablesSummaryView:
    median_mobilization_pct: Optional[Decimal] = None
    median_traffic_control_pct: Optional[Decimal] = None
    median_spread_pct: Optional[Decimal] = None
    applied_mobilization_pct: Optional[Decimal] = None
    note: Optional[str] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ComparablesResponse:
    response_status: Optional[ResponseStatus] = None
    comparables: List[ComparableLettingView] = field(default_factory=list)
    summary: Optional[ComparablesSummaryView] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ComparablesRequest:
    rfp_document_u_i_d: Optional[str] = None

Python 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
	}
}