| POST,OPTIONS | /v1/dashboard/kpiv2/branch |
|---|
import Foundation
import ServiceStack
public class KpiV2BranchRequest : Codable
{
public var branchId:String
public var fromDate:Date
public var toDate:Date
public var compare:String
required public init(){}
}
public class KpiV2BranchResponse : Codable
{
public var responseStatus:ResponseStatus
public var branch:SvcBranchDetail
required public init(){}
}
public class SvcBranchDetail : Codable
{
public var branch:SvcBranchRow
public var windows:[SvcWindowRow] = []
public var clerks:[SvcClerkRow] = []
public var unassigned:SvcMetrics
public var noClerk:SvcMetrics
public var perWindowAverage:SvcAverage
public var perClerkAverage:SvcAverage
public var openDays:Int
public var isLive:Bool
public var comparison:SvcComparison
public var coverage:SvcCoverage
public var services:[SvcServiceRow] = []
public var byHour:[SvcHourRow] = []
public var alerts:[SvcAlert] = []
public var totalsAgree:Bool
public var canSeeStaff:Bool
public var canSeeFinancial:Bool
public var canSeePay:Bool
required public init(){}
}
public class SvcBranchRow : Codable
{
public var branchId:String
public var name:String
public var stateCode:String
public var zoneCode:String
public var timeZone:String
public var windows:Int
public var recordingSinceUtc:Date?
public var sessionsSinceUtc:Date?
public var metrics:SvcMetrics
required public init(){}
}
public class SvcMetrics : Codable
{
public var checkins:Int
public var walkins:Int
public var appts:Int
public var served:Int
public var noShows:Int
public var apptNoShows:Int
public var cancelledAtWindow:Int
public var abandoned:Int
public var called:Int
public var calledUp:Int
public var abandonRate:Double?
public var noShowRate:Double?
public var avgServiceSec:Double?
public var medianServiceSec:Double?
public var avgWaitSec:Double?
public var maxWaitSec:Int
public var avgWalkUpSec:Double?
public var expectedServiceSec:Double?
public var signedSec:Int
public var servingSec:Int
public var pausedSec:Int
public var idleSec:Int
public var unstaffedSec:Int
public var utilization:Double?
public var idleShare:Double?
public var pausedShare:Double?
public var sessions:Int
public var openDays:Int
public var feesEarned:Double?
public var avgFee:Double?
public var feesPerStaffedHour:Double?
public var expectedFeesPerStaffedHour:Double?
public var laborCost:Double?
public var laborPartial:Bool
public var missingCostEmployeeIds:[String] = []
public var missingCost:[SvcNamedTime] = []
public var laborLocked:Bool
public var contribution:Double?
public var lostFees:Double?
public var lostNoShowFees:Double?
public var mix:[String:Int] = [:]
public var hourlyServed:[Int] = []
public var hourlyFees:[Double] = []
public var hourlyCost:[Double] = []
public var tints:[SvcTint] = []
required public init(){}
}
public class SvcNamedTime : Codable
{
public var id:String
public var name:String
public var signedSec:Int
public var served:Int
required public init(){}
}
public class SvcTint : Codable
{
public var field:String
public var tone:String
public var reason:String
public var value:Double?
public var reference:Double?
public var branchValue:Double?
required public init(){}
}
public class SvcWindowRow : Codable
{
public var stationId:String
public var name:String
public var clerks:[SvcNamedTime] = []
public var neverStaffed:Bool
public var lastStaffedUtc:Date?
public var lastStaffedBy:String
public var metrics:SvcMetrics
required public init(){}
}
public class SvcClerkRow : Codable
{
public var employeeId:String
public var name:String
public var windows:[SvcNamedTime] = []
public var loadedRate:Double?
public var rateSet:Bool
public var rateLocked:Bool
public var metrics:SvcMetrics
required public init(){}
}
public class SvcAverage : Codable
{
public var count:Int
public var served:Double
public var avgServiceSec:Double?
public var medianServiceSec:Double?
public var avgWaitSec:Double?
public var utilization:Double?
public var idleSec:Double
public var pausedSec:Double
public var noShows:Double
public var signedSec:Double
public var feesEarned:Double?
public var feesPerStaffedHour:Double?
public var laborCost:Double?
public var contribution:Double?
public var lostNoShowFees:Double?
required public init(){}
}
public class SvcComparison : Codable
{
public var mode:String
public var fromDate:Date?
public var toDate:Date?
public var cutoffMinute:Int?
public var hasData:Bool
public var metrics:SvcMetrics
required public init(){}
}
public class SvcCoverage : Codable
{
public var startLocalMinute:Int
public var bucketMinutes:Int
public var rows:[SvcCoverageRow] = []
public var inLine:[Double] = []
public var gapBands:[[Int]] = []
public var days:Int
public var notRecorded:Bool
public var futureFromIndex:Int?
required public init(){}
}
public class SvcCoverageRow : Codable
{
public var stationId:String
public var name:String
public var buckets:[SvcCoverageBucket] = []
required public init(){}
}
public class SvcCoverageBucket : Codable
{
public var servingPct:Double
public var idlePct:Double
public var pausedPct:Double
public var unstaffedPct:Double
required public init(){}
}
public class SvcServiceRow : Codable
{
public var lineId:String
public var name:String
public var completed:Int
public var avgServiceSec:Double?
public var branchAvgServiceSec:Double?
public var feesEarned:Double?
public var feeCurrent:Double?
public var feeMin:Double?
public var feeMax:Double?
public var feePerMinute:Double?
public var branchFeePerMinute:Double?
public var feeChanges:[SvcFeeChange] = []
required public init(){}
}
public class SvcFeeChange : Codable
{
public var locationId:String
public var onDate:Date
public var fromFee:Double
public var toFee:Double
required public init(){}
}
public class SvcHourRow : Codable
{
public var localHour:Int
public var served:Int
public var feesEarned:Double?
public var costToStaff:Double?
required public init(){}
}
public class SvcAlert : Codable
{
public var level:String
public var view:String
public var code:String
public var stationId:String?
public var employeeId:String?
public var branchId:String?
public var lineId:String?
public var name:String
public var otherLineId:String?
public var otherName:String
public var stationIds:[String] = []
public var values:[String:Double] = [:]
required public init(){}
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/dashboard/kpiv2/branch HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"BranchId":"00000000000000000000000000000000","FromDate":"0001-01-01T00:00:00.0000000","ToDate":"0001-01-01T00:00:00.0000000","Compare":"String"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Branch":{"Branch":{"BranchId":"00000000000000000000000000000000","Name":"String","StateCode":"String","ZoneCode":"String","TimeZone":"String","Windows":0,"RecordingSinceUtc":"0001-01-01T00:00:00.0000000","SessionsSinceUtc":"0001-01-01T00:00:00.0000000","Metrics":{"Checkins":0,"Walkins":0,"Appts":0,"Served":0,"NoShows":0,"ApptNoShows":0,"CancelledAtWindow":0,"Abandoned":0,"Called":0,"CalledUp":0,"AbandonRate":0,"NoShowRate":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"MaxWaitSec":0,"AvgWalkUpSec":0,"ExpectedServiceSec":0,"SignedSec":0,"ServingSec":0,"PausedSec":0,"IdleSec":0,"UnstaffedSec":0,"Utilization":0,"IdleShare":0,"PausedShare":0,"Sessions":0,"OpenDays":0,"FeesEarned":0,"AvgFee":0,"FeesPerStaffedHour":0,"ExpectedFeesPerStaffedHour":0,"LaborCost":0,"LaborPartial":false,"MissingCostEmployeeIds":["00000000000000000000000000000000"],"MissingCost":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"LaborLocked":false,"Contribution":0,"LostFees":0,"LostNoShowFees":0,"Mix":{"00000000000000000000000000000000":0},"HourlyServed":[0],"HourlyFees":[0],"HourlyCost":[0],"Tints":[{"Field":"String","Tone":"String","Reason":"String","Value":0,"Reference":0,"BranchValue":0}]}},"Windows":[{"StationId":"00000000000000000000000000000000","Name":"String","Clerks":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"NeverStaffed":false,"LastStaffedUtc":"0001-01-01T00:00:00.0000000","LastStaffedBy":"String","Metrics":{"Checkins":0,"Walkins":0,"Appts":0,"Served":0,"NoShows":0,"ApptNoShows":0,"CancelledAtWindow":0,"Abandoned":0,"Called":0,"CalledUp":0,"AbandonRate":0,"NoShowRate":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"MaxWaitSec":0,"AvgWalkUpSec":0,"ExpectedServiceSec":0,"SignedSec":0,"ServingSec":0,"PausedSec":0,"IdleSec":0,"UnstaffedSec":0,"Utilization":0,"IdleShare":0,"PausedShare":0,"Sessions":0,"OpenDays":0,"FeesEarned":0,"AvgFee":0,"FeesPerStaffedHour":0,"ExpectedFeesPerStaffedHour":0,"LaborCost":0,"LaborPartial":false,"MissingCostEmployeeIds":["00000000000000000000000000000000"],"MissingCost":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"LaborLocked":false,"Contribution":0,"LostFees":0,"LostNoShowFees":0,"Mix":{"00000000000000000000000000000000":0},"HourlyServed":[0],"HourlyFees":[0],"HourlyCost":[0],"Tints":[{"Field":"String","Tone":"String","Reason":"String","Value":0,"Reference":0,"BranchValue":0}]}}],"Clerks":[{"EmployeeId":"00000000000000000000000000000000","Name":"String","Windows":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"LoadedRate":0,"RateSet":false,"RateLocked":false,"Metrics":{"Checkins":0,"Walkins":0,"Appts":0,"Served":0,"NoShows":0,"ApptNoShows":0,"CancelledAtWindow":0,"Abandoned":0,"Called":0,"CalledUp":0,"AbandonRate":0,"NoShowRate":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"MaxWaitSec":0,"AvgWalkUpSec":0,"ExpectedServiceSec":0,"SignedSec":0,"ServingSec":0,"PausedSec":0,"IdleSec":0,"UnstaffedSec":0,"Utilization":0,"IdleShare":0,"PausedShare":0,"Sessions":0,"OpenDays":0,"FeesEarned":0,"AvgFee":0,"FeesPerStaffedHour":0,"ExpectedFeesPerStaffedHour":0,"LaborCost":0,"LaborPartial":false,"MissingCostEmployeeIds":["00000000000000000000000000000000"],"MissingCost":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"LaborLocked":false,"Contribution":0,"LostFees":0,"LostNoShowFees":0,"Mix":{"00000000000000000000000000000000":0},"HourlyServed":[0],"HourlyFees":[0],"HourlyCost":[0],"Tints":[{"Field":"String","Tone":"String","Reason":"String","Value":0,"Reference":0,"BranchValue":0}]}}],"Unassigned":{"Checkins":0,"Walkins":0,"Appts":0,"Served":0,"NoShows":0,"ApptNoShows":0,"CancelledAtWindow":0,"Abandoned":0,"Called":0,"CalledUp":0,"AbandonRate":0,"NoShowRate":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"MaxWaitSec":0,"AvgWalkUpSec":0,"ExpectedServiceSec":0,"SignedSec":0,"ServingSec":0,"PausedSec":0,"IdleSec":0,"UnstaffedSec":0,"Utilization":0,"IdleShare":0,"PausedShare":0,"Sessions":0,"OpenDays":0,"FeesEarned":0,"AvgFee":0,"FeesPerStaffedHour":0,"ExpectedFeesPerStaffedHour":0,"LaborCost":0,"LaborPartial":false,"MissingCostEmployeeIds":["00000000000000000000000000000000"],"MissingCost":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"LaborLocked":false,"Contribution":0,"LostFees":0,"LostNoShowFees":0,"Mix":{"00000000000000000000000000000000":0},"HourlyServed":[0],"HourlyFees":[0],"HourlyCost":[0],"Tints":[{"Field":"String","Tone":"String","Reason":"String","Value":0,"Reference":0,"BranchValue":0}]},"NoClerk":{"Checkins":0,"Walkins":0,"Appts":0,"Served":0,"NoShows":0,"ApptNoShows":0,"CancelledAtWindow":0,"Abandoned":0,"Called":0,"CalledUp":0,"AbandonRate":0,"NoShowRate":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"MaxWaitSec":0,"AvgWalkUpSec":0,"ExpectedServiceSec":0,"SignedSec":0,"ServingSec":0,"PausedSec":0,"IdleSec":0,"UnstaffedSec":0,"Utilization":0,"IdleShare":0,"PausedShare":0,"Sessions":0,"OpenDays":0,"FeesEarned":0,"AvgFee":0,"FeesPerStaffedHour":0,"ExpectedFeesPerStaffedHour":0,"LaborCost":0,"LaborPartial":false,"MissingCostEmployeeIds":["00000000000000000000000000000000"],"MissingCost":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"LaborLocked":false,"Contribution":0,"LostFees":0,"LostNoShowFees":0,"Mix":{"00000000000000000000000000000000":0},"HourlyServed":[0],"HourlyFees":[0],"HourlyCost":[0],"Tints":[{"Field":"String","Tone":"String","Reason":"String","Value":0,"Reference":0,"BranchValue":0}]},"PerWindowAverage":{"Count":0,"Served":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"Utilization":0,"IdleSec":0,"PausedSec":0,"NoShows":0,"SignedSec":0,"FeesEarned":0,"FeesPerStaffedHour":0,"LaborCost":0,"Contribution":0,"LostNoShowFees":0},"PerClerkAverage":{"Count":0,"Served":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"Utilization":0,"IdleSec":0,"PausedSec":0,"NoShows":0,"SignedSec":0,"FeesEarned":0,"FeesPerStaffedHour":0,"LaborCost":0,"Contribution":0,"LostNoShowFees":0},"OpenDays":0,"IsLive":false,"Comparison":{"Mode":"String","FromDate":"0001-01-01T00:00:00.0000000","ToDate":"0001-01-01T00:00:00.0000000","CutoffMinute":0,"HasData":false,"Metrics":{"Checkins":0,"Walkins":0,"Appts":0,"Served":0,"NoShows":0,"ApptNoShows":0,"CancelledAtWindow":0,"Abandoned":0,"Called":0,"CalledUp":0,"AbandonRate":0,"NoShowRate":0,"AvgServiceSec":0,"MedianServiceSec":0,"AvgWaitSec":0,"MaxWaitSec":0,"AvgWalkUpSec":0,"ExpectedServiceSec":0,"SignedSec":0,"ServingSec":0,"PausedSec":0,"IdleSec":0,"UnstaffedSec":0,"Utilization":0,"IdleShare":0,"PausedShare":0,"Sessions":0,"OpenDays":0,"FeesEarned":0,"AvgFee":0,"FeesPerStaffedHour":0,"ExpectedFeesPerStaffedHour":0,"LaborCost":0,"LaborPartial":false,"MissingCostEmployeeIds":["00000000000000000000000000000000"],"MissingCost":[{"Id":"00000000000000000000000000000000","Name":"String","SignedSec":0,"Served":0}],"LaborLocked":false,"Contribution":0,"LostFees":0,"LostNoShowFees":0,"Mix":{"00000000000000000000000000000000":0},"HourlyServed":[0],"HourlyFees":[0],"HourlyCost":[0],"Tints":[{"Field":"String","Tone":"String","Reason":"String","Value":0,"Reference":0,"BranchValue":0}]}},"Coverage":{"StartLocalMinute":0,"BucketMinutes":0,"Rows":[{"StationId":"00000000000000000000000000000000","Name":"String","Buckets":[{"ServingPct":0,"IdlePct":0,"PausedPct":0,"UnstaffedPct":0}]}],"InLine":[0],"GapBands":[[0]],"Days":0,"NotRecorded":false,"FutureFromIndex":0},"Services":[{"LineId":"00000000000000000000000000000000","Name":"String","Completed":0,"AvgServiceSec":0,"BranchAvgServiceSec":0,"FeesEarned":0,"FeeCurrent":0,"FeeMin":0,"FeeMax":0,"FeePerMinute":0,"BranchFeePerMinute":0,"FeeChanges":[{"LocationId":"00000000000000000000000000000000","OnDate":"0001-01-01T00:00:00.0000000","FromFee":0,"ToFee":0}]}],"ByHour":[{"LocalHour":0,"Served":0,"FeesEarned":0,"CostToStaff":0}],"Alerts":[{"Level":"String","View":"String","Code":"String","StationId":"00000000000000000000000000000000","EmployeeId":"00000000000000000000000000000000","BranchId":"00000000000000000000000000000000","LineId":"00000000000000000000000000000000","Name":"String","OtherLineId":"00000000000000000000000000000000","OtherName":"String","StationIds":["00000000000000000000000000000000"],"Values":{"String":0}}],"TotalsAgree":false,"CanSeeStaff":false,"CanSeeFinancial":false,"CanSeePay":false}}