Trendsic Platform Service

<back to all web services

RfpPricingRequest

Requires Authentication
Requires any of the roles:Agent, Administrator
The following routes are available for this service:
GET,OPTIONS/v1/Rfp/{RfpDocumentUID}/Pricing
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 CostRange:
    min: float = 0.0
    max: float = 0.0
    mid: float = 0.0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PricedPosition:
    position_tag: Optional[str] = None
    hours: float = 0.0
    has_internal_rate: bool = False
    rate_min: Optional[float] = None
    rate_max: Optional[float] = None
    rate_avg: Optional[float] = None
    contact_count: int = 0
    cost: Optional[CostRange] = None
    market_rate_reference: Optional[float] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PricedEquipment:
    equipment_i_d: int = 0
    equipment_name: Optional[str] = None
    quantity: float = 0.0
    duration_days: Optional[float] = None
    rate_type: Optional[str] = None
    billed_rate: Optional[float] = None
    cost_rate: Optional[float] = None
    has_rate: bool = False
    is_in_catalog: bool = False
    cost: float = 0.0
    company_cost: float = 0.0
    margin: float = 0.0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PricedMaterial:
    material_i_d: int = 0
    material_name: Optional[str] = None
    quantity: float = 0.0
    unit_cost: Optional[float] = None
    has_rate: bool = False
    is_in_catalog: bool = False
    cost: float = 0.0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PricedTask:
    name: Optional[str] = None
    category: Optional[str] = None
    positions: List[PricedPosition] = field(default_factory=list)
    equipment: List[PricedEquipment] = field(default_factory=list)
    materials: List[PricedMaterial] = field(default_factory=list)
    subtotal: Optional[CostRange] = None


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class PricedProposal:
    rfp_document_i_d: int = 0
    project_name: Optional[str] = None
    currency: Optional[str] = None
    tasks: List[PricedTask] = field(default_factory=list)
    total: Optional[CostRange] = None
    positions_needing_rate: int = 0
    equipment_not_in_catalog: int = 0
    materials_not_in_catalog: int = 0
    positions_not_in_catalog: int = 0
    equipment_margin: float = 0.0


@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class RfpPricingResponse:
    response_status: Optional[ResponseStatus] = None
    rfp_document_i_d: int = 0
    pricing: Optional[PricedProposal] = None


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

Python RfpPricingRequest 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}/Pricing 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
		}
	},
	RfpDocumentID: 0,
	Pricing: 
	{
		RfpDocumentID: 0,
		ProjectName: String,
		Currency: String,
		Tasks: 
		[
			{
				Name: String,
				Category: String,
				Positions: 
				[
					{
						PositionTag: String,
						Hours: 0,
						HasInternalRate: False,
						RateMin: 0,
						RateMax: 0,
						RateAvg: 0,
						ContactCount: 0,
						Cost: 
						{
							Min: 0,
							Max: 0,
							Mid: 0
						},
						MarketRateReference: 0
					}
				],
				Equipment: 
				[
					{
						EquipmentID: 0,
						EquipmentName: String,
						Quantity: 0,
						DurationDays: 0,
						RateType: String,
						BilledRate: 0,
						CostRate: 0,
						HasRate: False,
						IsInCatalog: False,
						Cost: 0,
						CompanyCost: 0,
						Margin: 0
					}
				],
				Materials: 
				[
					{
						MaterialID: 0,
						MaterialName: String,
						Quantity: 0,
						UnitCost: 0,
						HasRate: False,
						IsInCatalog: False,
						Cost: 0
					}
				],
				Subtotal: 
				{
					Min: 0,
					Max: 0,
					Mid: 0
				}
			}
		],
		Total: 
		{
			Min: 0,
			Max: 0,
			Mid: 0
		},
		PositionsNeedingRate: 0,
		EquipmentNotInCatalog: 0,
		MaterialsNotInCatalog: 0,
		PositionsNotInCatalog: 0,
		EquipmentMargin: 0
	}
}