| POST,OPTIONS | /v1/dashboard/kpiv2/detail |
|---|
import Foundation
import ServiceStack
public class KpiV2DetailRequest : Codable
{
public var branchId:String
public var stationId:String?
public var employeeId:String?
public var fromDate:Date
public var toDate:Date
required public init(){}
}
public class KpiV2DetailResponse : Codable
{
public var responseStatus:ResponseStatus
public var detail:SvcDetail
required public init(){}
}
public class SvcDetail : Codable
{
public var kind:String
public var window:SvcWindowRow
public var clerk:SvcClerkRow
public var branchMetrics:SvcMetrics
public var perRowAverage:SvcAverage
public var sessions:[SvcSession] = []
public var services:[SvcServiceRow] = []
public var canSeeStaff:Bool
public var canSeeFinancial:Bool
public var canSeePay:Bool
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 SvcNamedTime : Codable
{
public var id:String
public var name:String
public var signedSec:Int
public var served:Int
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 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 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 SvcSession : Codable
{
public var sessionId:String
public var stationId:String
public var stationName:String
public var employeeId:String
public var employeeName:String
public var localIn:Date
public var localOut:Date
public var isOpen:Bool
public var endReason:String
public var pausedSec:Int
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(){}
}
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/dashboard/kpiv2/detail HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
BranchId: 00000000000000000000000000000000,
StationId: 00000000000000000000000000000000,
EmployeeId: 00000000000000000000000000000000,
FromDate: 0001-01-01,
ToDate: 0001-01-01
}
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
}
},
Detail:
{
Kind: String,
Window:
{
StationId: 00000000000000000000000000000000,
Name: String,
Clerks:
[
{
Id: 00000000000000000000000000000000,
Name: String,
SignedSec: 0,
Served: 0
}
],
NeverStaffed: False,
LastStaffedUtc: 0001-01-01,
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
}
]
}
},
Clerk:
{
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
}
]
}
},
BranchMetrics:
{
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
}
]
},
PerRowAverage:
{
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
},
Sessions:
[
{
SessionId: 00000000000000000000000000000000,
StationId: 00000000000000000000000000000000,
StationName: String,
EmployeeId: 00000000000000000000000000000000,
EmployeeName: String,
LocalIn: 0001-01-01,
LocalOut: 0001-01-01,
IsOpen: False,
EndReason: String,
PausedSec: 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-01,
FromFee: 0,
ToFee: 0
}
]
}
],
CanSeeStaff: False,
CanSeeFinancial: False,
CanSeePay: False
}
}