| GET | /v1/workforce/planning |
|---|
import Foundation
import ServiceStack
public class PlanningRequest : Codable
{
public var asOf:Date?
required public init(){}
}
public class PlanningResponse : Codable
{
public var surface:PlanningSurface
public var canSeePay:Bool
public var responseStatus:ResponseStatus
required public init(){}
}
public class PlanningSurface : Codable
{
public var weekLabel:String
public var weekStart:Date
public var workerCount:Int
public var ot:OtExposureBoard
public var perDiem:PerDiemBoard
public var margin:MarginBoard
public var utilization:UtilizationBoard
public var suggestions:[PlanningSuggestion] = []
required public init(){}
}
public class OtExposureBoard : Codable
{
public var totalOtCost:Double?
public var totalOtHours:Double
public var overCount:Int
public var workerCount:Int
public var rows:[OtRow] = []
required public init(){}
}
public class OtRow : Codable
{
public var contactID:Int
public var workerName:String
public var classCode:String
public var crew:String
public var job:String
public var patternLabel:String
public var projHours:Double
public var otHours:Double
public var dtHours:Double
public var otCost:Double?
public var state:String
public var tone:String
required public init(){}
}
public class PerDiemBoard : Codable
{
public var totalCost:Double
public var nonTaxable:Double
public var taxable:Double
public var awayCount:Int
public var jobs:[PerDiemJobRow] = []
required public init(){}
}
public class PerDiemJobRow : Codable
{
public var job:String
public var total:Double
public var nonTax:Double
public var tax:Double
public var days:Int
public var awayCount:Int
public var dayRateFlag:Bool
required public init(){}
}
public class MarginBoard : Codable
{
public var jobCount:Int
public var totalFade:Double?
public var jobs:[MarginJobRow] = []
required public init(){}
}
public class MarginJobRow : Codable
{
public var job:String
public var basePct:Double
public var projPct:Double
public var fadePts:Double
public var severity:String
public var otCost:Double?
public var perDiem:Double
required public init(){}
}
public class UtilizationBoard : Codable
{
public var underCount:Int
public var overCount:Int
public var rows:[UtilRow] = []
required public init(){}
}
public class UtilRow : Codable
{
public var contactID:Int
public var workerName:String
public var crew:String
public var projHours:Double
public var baselineHours:Double
public var pct:Double
public var band:String
required public init(){}
}
public class PlanningSuggestion : Codable
{
public var id:String
public var kind:String
public var title:String
public var detail:String
public var saveText:String
public var effect:String
public var ruleId:String
public var legalNote:String
public var applyLabel:String
public var severity:String
required public init(){}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /v1/workforce/planning HTTP/1.1 Host: api.dev.dynamics.trendsic.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<PlanningResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
<CanSeePay>false</CanSeePay>
<ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:Message>String</d2p1:Message>
<d2p1:StackTrace>String</d2p1:StackTrace>
<d2p1:Errors>
<d2p1:ResponseError>
<d2p1:ErrorCode>String</d2p1:ErrorCode>
<d2p1:FieldName>String</d2p1:FieldName>
<d2p1:Message>String</d2p1:Message>
<d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d5p1:KeyValueOfstringstring>
<d5p1:Key>String</d5p1:Key>
<d5p1:Value>String</d5p1:Value>
</d5p1:KeyValueOfstringstring>
</d2p1:Meta>
</d2p1:ResponseError>
</d2p1:Errors>
<d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d3p1:KeyValueOfstringstring>
<d3p1:Key>String</d3p1:Key>
<d3p1:Value>String</d3p1:Value>
</d3p1:KeyValueOfstringstring>
</d2p1:Meta>
</ResponseStatus>
<Surface>
<Margin>
<JobCount>0</JobCount>
<Jobs>
<MarginJobRow>
<BasePct>0</BasePct>
<FadePts>0</FadePts>
<Job>String</Job>
<OtCost>0</OtCost>
<PerDiem>0</PerDiem>
<ProjPct>0</ProjPct>
<Severity>String</Severity>
</MarginJobRow>
</Jobs>
<TotalFade>0</TotalFade>
</Margin>
<Ot>
<OverCount>0</OverCount>
<Rows>
<OtRow>
<ClassCode>String</ClassCode>
<ContactID>0</ContactID>
<Crew>String</Crew>
<DtHours>0</DtHours>
<Job>String</Job>
<OtCost>0</OtCost>
<OtHours>0</OtHours>
<PatternLabel>String</PatternLabel>
<ProjHours>0</ProjHours>
<State>String</State>
<Tone>String</Tone>
<WorkerName>String</WorkerName>
</OtRow>
</Rows>
<TotalOtCost>0</TotalOtCost>
<TotalOtHours>0</TotalOtHours>
<WorkerCount>0</WorkerCount>
</Ot>
<PerDiem>
<AwayCount>0</AwayCount>
<Jobs>
<PerDiemJobRow>
<AwayCount>0</AwayCount>
<DayRateFlag>false</DayRateFlag>
<Days>0</Days>
<Job>String</Job>
<NonTax>0</NonTax>
<Tax>0</Tax>
<Total>0</Total>
</PerDiemJobRow>
</Jobs>
<NonTaxable>0</NonTaxable>
<Taxable>0</Taxable>
<TotalCost>0</TotalCost>
</PerDiem>
<Suggestions>
<PlanningSuggestion>
<ApplyLabel>String</ApplyLabel>
<Detail>String</Detail>
<Effect>String</Effect>
<Id>String</Id>
<Kind>String</Kind>
<LegalNote>String</LegalNote>
<RuleId>String</RuleId>
<SaveText>String</SaveText>
<Severity>String</Severity>
<Title>String</Title>
</PlanningSuggestion>
</Suggestions>
<Utilization>
<OverCount>0</OverCount>
<Rows>
<UtilRow>
<Band>String</Band>
<BaselineHours>0</BaselineHours>
<ContactID>0</ContactID>
<Crew>String</Crew>
<Pct>0</Pct>
<ProjHours>0</ProjHours>
<WorkerName>String</WorkerName>
</UtilRow>
</Rows>
<UnderCount>0</UnderCount>
</Utilization>
<WeekLabel>String</WeekLabel>
<WeekStart>0001-01-01T00:00:00</WeekStart>
<WorkerCount>0</WorkerCount>
</Surface>
</PlanningResponse>