| Requires any of the roles: | Agent, Administrator |
| POST,OPTIONS | /v1/Rfp/{RfpDocumentUID}/Estimate/Jobs/{TaskSeq}/assembly |
|---|
import Foundation
import ServiceStack
public class ApplyAssemblyRequest : Codable
{
public var rfpDocumentUID:String
public var taskSeq:Int
public var templateUID:String
required public init(){}
}
public class ApplyAssemblyResponse : Codable
{
public var responseStatus:ResponseStatus
public var taskSeq:Int
public var templateUID:String?
public var templateName:String
public var quantity:Double
public var unit:String
public var resourcing:TaskResourcing
public var job:EstimateJobResult
public var headline:String
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 EstimateJobResult : Codable
{
public var seq:Int
public var dependsOn:[Int] = []
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 workPackage:WorkPackageView
public var crew:[EstimateCrewLineResult] = []
public var equipment:[EstimateEquipmentLineResult] = []
public var materials:[EstimateMaterialLineResult] = []
public var subcontracts:[EstimateSubcontractLine] = []
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 benchmarkRateMin:Double?
public var benchmarkRateMax:Double?
public var benchmarkSampleSize:Int?
public var benchmarkP25:Double?
public var benchmarkP75:Double?
public var benchmarkBasis:String
public var unitPriceOverride:Double?
public var overrideBasis:String
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
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 EstimateCrewLineResult : Codable
{
public var role:String
public var hours:Double
public var stHours:Double
public var otHours:Double
public var rrop:Double
public var stCost:Double
public var otCost:Double
public var cost:Double
public var fringeCost:Double
public var premiumApplied:Bool
public var hasOt:Bool
public var needsRate:Bool
required public init(){}
}
public class EstimateEquipmentLineResult : 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 rentalExplain:String
public var usageDays:Double
public var billedDays:Double
required public init(){}
}
public class EstimateMaterialLineResult : 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
required public init(){}
}
public class EstimateSubcontractLine : Codable
{
public var vendor:String
public var amount:Double
public var scope:String
required public init(){}
}
Swift ApplyAssemblyRequest 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.
POST /v1/Rfp/{RfpDocumentUID}/Estimate/Jobs/{TaskSeq}/assembly HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
RfpDocumentUID: 00000000000000000000000000000000,
TaskSeq: 0,
TemplateUID: 00000000000000000000000000000000
}
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
}
},
TaskSeq: 0,
TemplateUID: 00000000000000000000000000000000,
TemplateName: String,
Quantity: 0,
Unit: 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
},
Job:
{
Seq: 0,
DependsOn:
[
0
],
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,
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
},
Crew:
[
{
Role: String,
Hours: 0,
StHours: 0,
OtHours: 0,
Rrop: 0,
StCost: 0,
OtCost: 0,
Cost: 0,
FringeCost: 0,
PremiumApplied: False,
HasOt: False,
NeedsRate: False
}
],
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,
RentalExplain: String,
UsageDays: 0,
BilledDays: 0
}
],
Materials:
[
{
Name: String,
Quantity: 0,
Unit: String,
Rate: 0,
NeedsRate: False,
Cost: 0,
RateKey: String
}
],
Subcontracts:
[
{
Vendor: String,
Amount: 0,
Scope: String
}
],
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,
BenchmarkRateMin: 0,
BenchmarkRateMax: 0,
BenchmarkSampleSize: 0,
BenchmarkP25: 0,
BenchmarkP75: 0,
BenchmarkBasis: String,
UnitPriceOverride: 0,
OverrideBasis: String,
ReferencePrice: 0,
ReferenceRangeMin: 0,
ReferenceRangeMax: 0,
ReferenceN: 0,
ReferenceDate: 0001-01-01,
ReferenceBasis: String,
ReferenceUrl: String
},
Headline: String
}