| Requires any of the roles: | Agent, Administrator |
| GET,OPTIONS | /v1/Rfp/{RfpDocumentUID}/Estimate/Revisions/{RevisionNo} |
|---|
import Foundation
import ServiceStack
public class EstimateRevisionGetRequest : Codable
{
public var rfpDocumentUID:String
public var revisionNo:Int
required public init(){}
}
public class EstimateRevisionGetResponse : Codable
{
public var responseStatus:ResponseStatus
public var revision:EstimateRevision
public var snapshot:EstimateSnapshot
required public init(){}
}
public class EstimateRevision : Codable
{
public var estimateRevisionID:Int
public var rfpDocumentID:Int
public var revisionNo:Int
public var label:String
public var reason:String
public var trigger:String
public var totalAmount:Double
public var lineCount:Int
public var createdBy:String
public var createdAt:Date?
public var snapshotJson:String
required public init(){}
}
public class EstimateSnapshot : Codable
{
public var takenAtUtc:Date
public var proposal:ProjectProposal
public var view:EstimatingView
required public init(){}
}
public class ProjectProposal : Codable
{
public var rfpDocumentID:Int
public var mode:String
public var projectID:Int?
public var changeOrderID:Int?
public var projectName:String
public var clientName:String
public var projectType:String
public var projectLocation:String
public var scope:String
public var projectDescription:String
public var contractDurationDays:Int?
public var bidDueDate:String
public var estimatedStartDate:Date?
public var estimatedEndDate:Date?
public var tasks:[ProposedTask] = []
public var pendingAddendaDiffs:[AddendaChangeSet] = []
public var wageDeterminations:[WageDeterminationResult] = []
required public init(){}
}
public class ProposedTask : Codable
{
public var seq:Int
public var name:String
public var category:String
public var quantity:Double?
public var unit:String
public var sourceItemNumber:String
public var sourceReference:String
public var notes:String
public var resourcing:TaskResourcing
public var durationDays:Double?
public var dependsOn:[Int] = []
public var estimatedStartDate:Date?
public var estimatedEndDate:Date?
public var workPackage:TaskWorkPackage
public var createdJobID:Int?
required public init(){}
}
public class TaskResourcing : Codable
{
public var positions:[ResourcedPosition] = []
public var equipment:[ResourcedEquipment] = []
public var materials:[ResourcedMaterial] = []
public var resourcedForQuantity:Double?
public var productionRatePerDay:Double?
public var fixedDays:Double?
required public init(){}
}
public class ResourcedPosition : Codable
{
public var positionTag:String
public var hours:Double?
public var crewSize:Double?
public var utilization:Double?
public var fixedDays:Double?
public var headcount:Int?
public var sourceReference:String
public var notes:String
public var isInCatalog:Bool
public var contactID:Int?
required public init(){}
}
public class ResourcedEquipment : Codable
{
public var equipmentID:Int
public var equipmentName:String
public var makeModel:String
public var quantity:Double?
public var durationDays:Double?
public var utilization:Double?
public var fixedDays:Double?
public var sourceReference:String
public var notes:String
public var isInCatalog:Bool
public var suggestedEquipmentID:Int
public var suggestedEquipmentName:String
required public init(){}
}
public class ResourcedMaterial : Codable
{
public var materialID:Int
public var materialName:String
public var makeModel:String
public var quantity:Double?
public var quantityPerUnit:Double?
public var unit:String
public var sourceReference:String
public var notes:String
public var isInCatalog:Bool
public var suggestedMaterialID:Int
public var suggestedMaterialName:String
required public init(){}
}
public class TaskWorkPackage : Codable
{
public var scope:String
public var limitsOfWork:String
public var specRefs:[WorkPackageSpecRef] = []
public var constraints:[String] = []
public var holdPoints:[String] = []
public var definitionOfDone:[String] = []
public var safetyNote:String
public var rfpRef:String
public var confidence:Int?
public var specBook:String
public var userScope:String
public var dodRemoved:[Int] = []
public var dodExtra:[String] = []
public var userEdited:Bool
public var dodChecked:[String] = []
public var redraftNote:String
required public init(){}
}
public class WorkPackageSpecRef : Codable
{
public var section:String
public var title:String
required public init(){}
}
public class AddendaChangeSet : Codable
{
public var changeSetId:String
public var sourceRfpDocumentID:Int
public var sourceFileName:String
public var documentType:String
public var extractedAtUtc:Date?
public var summary:String
public var changes:[AddendaChange] = []
required public init(){}
}
public class AddendaChange : Codable
{
public var changeId:String
public var changeType:String
public var targetSeq:Int?
public var itemNumber:String
public var itemName:String
public var field:String
public var oldValue:String
public var newValue:String
public var Description:String
public var status:String
required public init(){}
}
public class WageDeterminationResult : Codable
{
public var sourceRfpDocumentID:Int
public var sourceFileName:String
public var wdNumber:String
public var extractedAtUtc:Date?
public var classifications:[WageClassification] = []
public var source:String
public var isTrustworthy:Bool
public var executiveOrderFloor:Double?
public var publishedDate:String
public var projectParish:String
public var warnings:[String] = []
required public init(){}
}
public class WageClassification : Codable
{
public var title:String
public var baseRate:Double?
public var fringeRate:Double?
public var parishNote:String
public var sourceLine:String
public var benchmarkFringeRate:Double?
public var fringeCompareNote:String
required public init(){}
}
public class EstimatingView : Codable
{
public var rfpDocumentID:Int
public var projectName:String
public var clientName:String
public var bidDueDate:String
public var projectType:String
public var settings:EstimateSettingsView
public var jobs:[EstimateJobView] = []
public var schedule:[BidScheduleLine] = []
public var scheduleTotal:Double
public var variance:EstimateVarianceView
public var indicative:IndicativeBidView
public var ownership:BidOwnershipView
public var summary:EstimateSummaryView
public var timing:EstimateTimingView
public var needsRateCount:Int
public var needsRateKeys:[String] = []
public var reviewItems:[EstimateReviewItemView] = []
public var needsReviewCount:Int
public var canApprove:Bool
public var canSeePay:Bool
required public init(){}
}
public class EstimateSettingsView : Codable
{
public var rfpEstimateID:Int
public var startDate:Date?
public var deadlineDate:Date?
public var workdaysPerWeek:Int
public var hoursPerDay:Double
public var weatherPct:Double
public var ohpPct:Double
public var contingencyPct:Double
public var bondPct:Double
public var holidays:[Date] = []
public var appliedStartDate:Date?
required public init(){}
}
public class EstimateJobView : Codable
{
public var seq:Int
public var workPackage:WorkPackageView
public var itemNo:String
public var name:String
public var category:String
public var sourceRef:String
public var unit:String
public var quantity:Double
public var patternCode:String
public var workdays:Int
public var hoursPerDay:Double
public var isNight:Bool
public var weeklyHours:Double
public var otFraction:Double
public var days:Double
public var effectiveProdPerDay:Double?
public var crewPremiumApplied:Bool
public var crewCost:Double
public var fringeCost:Double
public var equipmentCost:Double
public var materialCost:Double
public var subcontractCost:Double
public var direct:Double
public var pricingBasis:String
public var pricingRuleId:String
public var pricingBandP25:Double?
public var pricingBandP75:Double?
public var pricingBandN:Int?
public var pricingBandLabel:String
public var benchmarkUnitPrice:Double?
public var referencePrice:Double?
public var referenceRangeMin:Double?
public var referenceRangeMax:Double?
public var referenceN:Int?
public var referenceDate:Date?
public var referenceBasis:String
public var referenceUrl:String
public var crew:[EstimateCrewLineView] = []
public var equipment:[EstimateEquipmentLineView] = []
public var materials:[EstimateMaterialLineView] = []
public var subcontracts:[EstimateSubcontractView] = []
required public init(){}
}
public class WorkPackageView : Codable
{
public var hasPackage:Bool
public var scope:String
public var limitsOfWork:String
public var specRefs:[SpecRefView] = []
public var constraints:[String] = []
public var holdPoints:[String] = []
public var dod:[DodItemView] = []
public var safetyNote:String
public var provenance:String
public var specBook:String
public var userEdited:Bool
public var redraftNote:String
required public init(){}
}
public class SpecRefView : Codable
{
public var section:String
public var title:String
public var url:String
required public init(){}
}
public class DodItemView : Codable
{
public var key:String
public var text:String
public var checked:Bool
public var source:String
required public init(){}
}
public class EstimateCrewLineView : Codable
{
public var role:String
public var hours:Double
public var stHours:Double
public var otHours:Double
public var hasOt:Bool
public var premiumApplied:Bool
public var needsRate:Bool
public var rateKey:String
public var chip:String
public var rrop:Double?
public var stCost:Double?
public var otCost:Double?
public var cost:Double?
public var fringeCost:Double?
required public init(){}
}
public class EstimateEquipmentLineView : Codable
{
public var name:String
public var quantity:Double
public var rate:Double?
public var needsRate:Bool
public var mobCost:Double
public var cost:Double
public var isAvailabilityTracked:Bool
public var isOwned:Bool
public var availabilityLabel:String
public var freedFromProject:String
public var availableFrom:Date?
public var rateKey:String
public var chip:String
public var rentalExplain:String
public var usageDays:Double
public var billedDays:Double
required public init(){}
}
public class EstimateMaterialLineView : Codable
{
public var name:String
public var quantity:Double
public var unit:String
public var rate:Double?
public var needsRate:Bool
public var cost:Double
public var rateKey:String
public var chip:String
required public init(){}
}
public class EstimateSubcontractView : Codable
{
public var estimateSubcontractID:Int
public var taskSeq:Int
public var vendor:String
public var amount:Double
public var scope:String
required public init(){}
}
public class BidScheduleLine : Codable
{
public var itemNo:String
public var Description:String
public var unit:String
public var quantity:Double
public var unitPrice:Double
public var `extension`:Double
public var pricingBasis:String
public var pricingRuleId:String
public var pricingBandP25:Double?
public var pricingBandP75:Double?
public var pricingBandN:Int?
public var pricingBandLabel:String
public var benchmarkDeltaPct:Double?
public var benchmarkFlagged:Bool
public var benchmarkBasis:String
public var provenance:String
public var provenanceNote:String
public var unpricedResources:Int
public var totalResources:Int
required public init(){}
}
public class EstimateVarianceView : Codable
{
public var lines:[EstimateVarianceLine] = []
public var itemsTotal:Int
public var itemsBenchmarked:Int
public var coverageValuePct:Double
public var oursTotal:Double
public var marketTotal:Double
public var aggregateDeltaPct:Double?
public var flooredCount:Int
public var lumpCount:Int
public var watchCount:Int
public var outlierCount:Int
public var criticalCount:Int
public var note:String
required public init(){}
}
public class EstimateVarianceLine : Codable
{
public var seq:Int
public var itemNo:String
public var name:String
public var unit:String
public var quantity:Double
public var ourUnitPrice:Double
public var ourTotal:Double
public var benchmarkUnitPrice:Double
public var marketTotal:Double
public var deltaPct:Double
public var rateMin:Double?
public var rateMax:Double?
public var sampleSize:Int?
public var outsideRange:Bool?
public var isFloor:Bool
public var isLump:Bool
public var severity:String
public var adopted:Bool
public var note:String
required public init(){}
}
public class IndicativeBidView : Codable
{
public var lines:[IndicativeLine] = []
public var bottomUpCount:Int
public var bottomUpTotal:Double
public var benchmarkCount:Int
public var benchmarkTotal:Double
public var uncoveredCount:Int
public var uncoveredFloorTotal:Double
public var indicativeTotal:Double
public var floorTotal:Double
public var note:String
public var posture:String
public var aggressiveTotal:Double
public var marketTotal:Double
public var premiumTotal:Double
public var noDistributionCount:Int
required public init(){}
}
public class IndicativeLine : Codable
{
public var seq:Int
public var itemNo:String
public var name:String
public var unit:String
public var quantity:Double
public var source:String
public var unitPrice:Double
public var lineTotal:Double
public var pricePoint:String
required public init(){}
}
public class BidOwnershipView : Codable
{
public var ownTotal:Double
public var borrowedTotal:Double
public var unknownFloorTotal:Double
public var scheduleTotal:Double
public var ownCount:Int
public var borrowedCount:Int
public var unknownCount:Int
public var ownPct:Double
public var topExposure:[BidExposureLine] = []
required public init(){}
}
public class BidExposureLine : Codable
{
public var itemNo:String
public var Description:String
public var provenance:String
public var `extension`:Double
public var cumulativePct:Double
public var note:String
required public init(){}
}
public class EstimateSummaryView : Codable
{
public var direct:Double
public var ohpPct:Double
public var ohpAmount:Double
public var bondPct:Double
public var bondAmount:Double
public var contingencyPct:Double
public var contingencyAmount:Double
public var bidTotal:Double
public var loadFactor:Double
public var marginPct:Double
required public init(){}
}
public class EstimateTimingView : Codable
{
public var totalWorkdays:Double
public var calendarDays:Int
public var finish:Date
public var feasible:Bool
public var deadline:Date?
required public init(){}
}
public class EstimateReviewItemView : Codable
{
public var taskSeq:Int
public var taskName:String
public var reason:String
public var status:String
required public init(){}
}
Swift EstimateRevisionGetRequest 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/Rfp/{RfpDocumentUID}/Estimate/Revisions/{RevisionNo} 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
}
},
Revision:
{
EstimateRevisionID: 0,
RfpDocumentID: 0,
RevisionNo: 0,
Label: String,
Reason: String,
Trigger: String,
TotalAmount: 0,
LineCount: 0,
CreatedBy: String,
CreatedAt: 0001-01-01,
SnapshotJson: String
},
Snapshot:
{
TakenAtUtc: 0001-01-01,
Proposal:
{
RfpDocumentID: 0,
Mode: String,
ProjectID: 0,
ChangeOrderID: 0,
ProjectName: String,
ClientName: String,
ProjectType: String,
ProjectLocation: String,
Scope: String,
ProjectDescription: String,
ContractDurationDays: 0,
BidDueDate: String,
EstimatedStartDate: 0001-01-01,
EstimatedEndDate: 0001-01-01,
Tasks:
[
{
Seq: 0,
Name: String,
Category: String,
Quantity: 0,
Unit: String,
SourceItemNumber: String,
SourceReference: String,
Notes: String,
Resourcing:
{
Positions:
[
{
PositionTag: String,
Hours: 0,
CrewSize: 0,
Utilization: 0,
FixedDays: 0,
Headcount: 0,
SourceReference: String,
Notes: String,
IsInCatalog: False,
ContactID: 0
}
],
Equipment:
[
{
EquipmentID: 0,
EquipmentName: String,
MakeModel: String,
Quantity: 0,
DurationDays: 0,
Utilization: 0,
FixedDays: 0,
SourceReference: String,
Notes: String,
IsInCatalog: False,
SuggestedEquipmentID: 0,
SuggestedEquipmentName: String
}
],
Materials:
[
{
MaterialID: 0,
MaterialName: String,
MakeModel: String,
Quantity: 0,
QuantityPerUnit: 0,
Unit: String,
SourceReference: String,
Notes: String,
IsInCatalog: False,
SuggestedMaterialID: 0,
SuggestedMaterialName: String
}
],
ResourcedForQuantity: 0,
ProductionRatePerDay: 0,
FixedDays: 0
},
DurationDays: 0,
DependsOn:
[
0
],
EstimatedStartDate: 0001-01-01,
EstimatedEndDate: 0001-01-01,
WorkPackage:
{
Scope: String,
LimitsOfWork: String,
SpecRefs:
[
{
Section: String,
Title: String
}
],
Constraints:
[
String
],
HoldPoints:
[
String
],
DefinitionOfDone:
[
String
],
SafetyNote: String,
RfpRef: String,
Confidence: 0,
SpecBook: String,
UserScope: String,
DodRemoved:
[
0
],
DodExtra:
[
String
],
UserEdited: False,
DodChecked:
[
String
],
RedraftNote: String
},
CreatedJobID: 0
}
],
PendingAddendaDiffs:
[
{
ChangeSetId: String,
SourceRfpDocumentID: 0,
SourceFileName: String,
DocumentType: String,
ExtractedAtUtc: 0001-01-01,
Summary: String,
Changes:
[
{
ChangeId: String,
ChangeType: String,
TargetSeq: 0,
ItemNumber: String,
ItemName: String,
Field: String,
OldValue: String,
NewValue: String,
Description: String,
Status: String
}
]
}
],
WageDeterminations:
[
{
SourceRfpDocumentID: 0,
SourceFileName: String,
WdNumber: String,
ExtractedAtUtc: 0001-01-01,
Classifications:
[
{
Title: String,
BaseRate: 0,
FringeRate: 0,
ParishNote: String,
SourceLine: String,
BenchmarkFringeRate: 0,
FringeCompareNote: String
}
],
Source: String,
IsTrustworthy: False,
ExecutiveOrderFloor: 0,
PublishedDate: String,
ProjectParish: String,
Warnings:
[
String
]
}
]
},
View:
{
RfpDocumentID: 0,
ProjectName: String,
ClientName: String,
BidDueDate: String,
ProjectType: String,
Settings:
{
RfpEstimateID: 0,
StartDate: 0001-01-01,
DeadlineDate: 0001-01-01,
WorkdaysPerWeek: 0,
HoursPerDay: 0,
WeatherPct: 0,
OhpPct: 0,
ContingencyPct: 0,
BondPct: 0,
Holidays:
[
0001-01-01
],
AppliedStartDate: 0001-01-01
},
Jobs:
[
{
Seq: 0,
WorkPackage:
{
HasPackage: False,
Scope: String,
LimitsOfWork: String,
SpecRefs:
[
{
Section: String,
Title: String,
Url: String
}
],
Constraints:
[
String
],
HoldPoints:
[
String
],
Dod:
[
{
Key: String,
Text: String,
Checked: False,
Source: String
}
],
SafetyNote: String,
Provenance: String,
SpecBook: String,
UserEdited: False,
RedraftNote: String
},
ItemNo: String,
Name: String,
Category: String,
SourceRef: String,
Unit: String,
Quantity: 0,
PatternCode: String,
Workdays: 0,
HoursPerDay: 0,
IsNight: False,
WeeklyHours: 0,
OtFraction: 0,
Days: 0,
EffectiveProdPerDay: 0,
CrewPremiumApplied: False,
CrewCost: 0,
FringeCost: 0,
EquipmentCost: 0,
MaterialCost: 0,
SubcontractCost: 0,
Direct: 0,
PricingBasis: String,
PricingRuleId: String,
PricingBandP25: 0,
PricingBandP75: 0,
PricingBandN: 0,
PricingBandLabel: String,
BenchmarkUnitPrice: 0,
ReferencePrice: 0,
ReferenceRangeMin: 0,
ReferenceRangeMax: 0,
ReferenceN: 0,
ReferenceDate: 0001-01-01,
ReferenceBasis: String,
ReferenceUrl: String,
Crew:
[
{
Role: String,
Hours: 0,
StHours: 0,
OtHours: 0,
HasOt: False,
PremiumApplied: False,
NeedsRate: False,
RateKey: String,
Chip: String,
Rrop: 0,
StCost: 0,
OtCost: 0,
Cost: 0,
FringeCost: 0
}
],
Equipment:
[
{
Name: String,
Quantity: 0,
Rate: 0,
NeedsRate: False,
MobCost: 0,
Cost: 0,
IsAvailabilityTracked: False,
IsOwned: False,
AvailabilityLabel: String,
FreedFromProject: String,
AvailableFrom: 0001-01-01,
RateKey: String,
Chip: String,
RentalExplain: String,
UsageDays: 0,
BilledDays: 0
}
],
Materials:
[
{
Name: String,
Quantity: 0,
Unit: String,
Rate: 0,
NeedsRate: False,
Cost: 0,
RateKey: String,
Chip: String
}
],
Subcontracts:
[
{
EstimateSubcontractID: 0,
TaskSeq: 0,
Vendor: String,
Amount: 0,
Scope: String
}
]
}
],
Schedule:
[
{
ItemNo: String,
Description: String,
Unit: String,
Quantity: 0,
UnitPrice: 0,
Extension: 0,
PricingBasis: String,
PricingRuleId: String,
PricingBandP25: 0,
PricingBandP75: 0,
PricingBandN: 0,
PricingBandLabel: String,
BenchmarkDeltaPct: 0,
BenchmarkFlagged: False,
BenchmarkBasis: String,
Provenance: String,
ProvenanceNote: String,
UnpricedResources: 0,
TotalResources: 0
}
],
ScheduleTotal: 0,
Variance:
{
Lines:
[
{
Seq: 0,
ItemNo: String,
Name: String,
Unit: String,
Quantity: 0,
OurUnitPrice: 0,
OurTotal: 0,
BenchmarkUnitPrice: 0,
MarketTotal: 0,
DeltaPct: 0,
RateMin: 0,
RateMax: 0,
SampleSize: 0,
OutsideRange: False,
IsFloor: False,
IsLump: False,
Severity: String,
Adopted: False,
Note: String
}
],
ItemsTotal: 0,
ItemsBenchmarked: 0,
CoverageValuePct: 0,
OursTotal: 0,
MarketTotal: 0,
AggregateDeltaPct: 0,
FlooredCount: 0,
LumpCount: 0,
WatchCount: 0,
OutlierCount: 0,
CriticalCount: 0,
Note: String
},
Indicative:
{
Lines:
[
{
Seq: 0,
ItemNo: String,
Name: String,
Unit: String,
Quantity: 0,
Source: String,
UnitPrice: 0,
LineTotal: 0,
PricePoint: String
}
],
BottomUpCount: 0,
BottomUpTotal: 0,
BenchmarkCount: 0,
BenchmarkTotal: 0,
UncoveredCount: 0,
UncoveredFloorTotal: 0,
IndicativeTotal: 0,
FloorTotal: 0,
Note: String,
Posture: String,
AggressiveTotal: 0,
MarketTotal: 0,
PremiumTotal: 0,
NoDistributionCount: 0
},
Ownership:
{
OwnTotal: 0,
BorrowedTotal: 0,
UnknownFloorTotal: 0,
ScheduleTotal: 0,
OwnCount: 0,
BorrowedCount: 0,
UnknownCount: 0,
OwnPct: 0,
TopExposure:
[
{
ItemNo: String,
Description: String,
Provenance: String,
Extension: 0,
CumulativePct: 0,
Note: String
}
]
},
Summary:
{
Direct: 0,
OhpPct: 0,
OhpAmount: 0,
BondPct: 0,
BondAmount: 0,
ContingencyPct: 0,
ContingencyAmount: 0,
BidTotal: 0,
LoadFactor: 0,
MarginPct: 0
},
Timing:
{
TotalWorkdays: 0,
CalendarDays: 0,
Finish: 0001-01-01,
Feasible: False,
Deadline: 0001-01-01
},
NeedsRateCount: 0,
NeedsRateKeys:
[
String
],
ReviewItems:
[
{
TaskSeq: 0,
TaskName: String,
Reason: String,
Status: String
}
],
NeedsReviewCount: 0,
CanApprove: False,
CanSeePay: False
}
}
}