Trendsic Platform Service

<back to all web services

LaborSalesSummaryRequest

Requires Authentication
The following routes are available for this service:
GET,OPTIONS/v1/laborsales/summary
import Foundation
import ServiceStack

public class LaborSalesSummaryRequest : Codable
{
    public var fromDate:String
    public var toDate:String

    required public init(){}
}

public class LaborSalesSummaryResponse : Codable
{
    public var summary:SummaryView
    public var fromDate:String
    public var toDate:String
    public var responseStatus:ResponseStatus

    required public init(){}
}

public class SummaryView : Codable
{
    public var configured:Bool
    public var connected:Bool
    public var needsReconnect:Bool
    public var currency:String
    public var days:[DayView] = []
    public var locations:[LocationView] = []
    public var totals:TotalsView
    public var priorTotals:TotalsView
    public var attributionNote:String

    required public init(){}
}

public class DayView : Codable
{
    public var dateIso:String
    public var grossSales:Double
    public var transactionCount:Int
    public var laborHours:Double
    public var costedHours:Double
    public var laborCost:Double
    public var workerCount:Int
    public var laborPct:Double?
    public var splh:Double?

    required public init(){}
}

public class LocationView : Codable
{
    public var locationId:String
    public var locationName:String
    public var grossSales:Double
    public var transactionCount:Int
    public var sharePct:Double?
    public var branchId:String
    public var branchName:String
    public var laborHours:Double?
    public var costedHours:Double?
    public var laborCost:Double?
    public var laborPct:Double?
    public var splh:Double?

    required public init(){}
}

public class TotalsView : Codable
{
    public var grossSales:Double
    public var transactionCount:Int
    public var laborHours:Double
    public var costedHours:Double
    public var laborCost:Double
    public var laborPct:Double?
    public var splh:Double?
    public var daysWithSales:Int
    public var daysWithLabor:Int

    required public init(){}
}


Swift LaborSalesSummaryRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /v1/laborsales/summary HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"Summary":{"Configured":false,"Connected":false,"NeedsReconnect":false,"Currency":"String","Days":[{"DateIso":"String","GrossSales":0,"TransactionCount":0,"LaborHours":0,"CostedHours":0,"LaborCost":0,"WorkerCount":0,"LaborPct":0,"Splh":0}],"Locations":[{"LocationId":"String","LocationName":"String","GrossSales":0,"TransactionCount":0,"SharePct":0,"BranchId":"String","BranchName":"String","LaborHours":0,"CostedHours":0,"LaborCost":0,"LaborPct":0,"Splh":0}],"Totals":{"GrossSales":0,"TransactionCount":0,"LaborHours":0,"CostedHours":0,"LaborCost":0,"LaborPct":0,"Splh":0,"DaysWithSales":0,"DaysWithLabor":0},"PriorTotals":{"GrossSales":0,"TransactionCount":0,"LaborHours":0,"CostedHours":0,"LaborCost":0,"LaborPct":0,"Splh":0,"DaysWithSales":0,"DaysWithLabor":0},"AttributionNote":"String"},"FromDate":"String","ToDate":"String","ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}