Trendsic Platform Service

<back to all web services

CostCalcRequest

Requires Authentication
The following routes are available for this service:
POST/v1/workforce/calc
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal

Namespace Global

    Namespace CRM.AgencyPlatform.API.Internal

        Public Partial Class CostBreakdown
            Public Overridable Property Rrop As Decimal
            Public Overridable Property St As Decimal
            Public Overridable Property Ot As Decimal
            Public Overridable Property Dt As Decimal
            Public Overridable Property TotalHours As Decimal
            Public Overridable Property Straight As Decimal
            Public Overridable Property DiffPay As Decimal
            Public Overridable Property OtPremium As Decimal
            Public Overridable Property DtPremium As Decimal
            Public Overridable Property CashWages As Decimal
            Public Overridable Property FringeCashPay As Decimal
            Public Overridable Property FringePlanPay As Decimal
            Public Overridable Property BurdenPct As Decimal
            Public Overridable Property BurdenAmount As Decimal
            Public Overridable Property PerDiemApplies As Boolean
            Public Overridable Property PerDiemCost As Decimal
            Public Overridable Property PerDiemTaxable As Decimal
            Public Overridable Property PerDiemNonTax As Decimal
            Public Overridable Property Loaded As Decimal
            Public Overridable Property Revenue As Decimal
            Public Overridable Property Margin As Decimal
            Public Overridable Property MarginPct As Decimal
            Public Overridable Property OtMultiplier As Decimal
            Public Overridable Property DtMultiplier As Decimal
            Public Overridable Property PerDiemDaily As Decimal
            Public Overridable Property Lines As List(Of CostLine) = New List(Of CostLine)
            Public Overridable Property Notes As List(Of String) = New List(Of String)
        End Class

        Public Partial Class CostCalcRequest
            Public Overridable Property Input As CostInput
            Public Overridable Property ContactID As Integer?
            Public Overridable Property ProjectID As Integer?
            Public Overridable Property ShiftPatternID As Integer?
            Public Overridable Property Unit As String
        End Class

        Public Partial Class CostCalcResponse
            Public Overridable Property Result As CostBreakdown
            Public Overridable Property ResolvedInput As CostInput
            Public Overridable Property CanSeePay As Boolean
            Public Overridable Property ResponseStatus As ResponseStatus
        End Class

        Public Partial Class CostInput
            Public Overridable Property Base As Decimal
            Public Overridable Property BillRate As Decimal
            Public Overridable Property FringeCash As Decimal
            Public Overridable Property FringePlan As Decimal
            Public Overridable Property IsNight As Boolean
            Public Overridable Property HoursPerDay As Decimal
            Public Overridable Property OnDays As Integer
            Public Overridable Property OnDaysExact As Decimal?
            Public Overridable Property HasTravel As Boolean
            Public Overridable Property PerDiemEligible As Boolean
            Public Overridable Property PrevailingWage As Boolean
            Public Overridable Property Jurisdiction As String
            Public Overridable Property Unit As String
            Public Overridable Property PriorHours As Decimal
            Public Overridable Property BurdenClass As String
            Public Overridable Property WcRateOverride As Decimal?
        End Class

        Public Partial Class CostLine
            Public Overridable Property Label As String
            Public Overridable Property Detail As String
            Public Overridable Property Amount As Decimal
            Public Overridable Property RuleId As String
        End Class
    End Namespace
End Namespace

VB.NET CostCalcRequest DTOs

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

HTTP + CSV

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

POST /v1/workforce/calc HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"Input":{"Base":0,"BillRate":0,"FringeCash":0,"FringePlan":0,"IsNight":false,"HoursPerDay":0,"OnDays":0,"OnDaysExact":0,"HasTravel":false,"PerDiemEligible":false,"PrevailingWage":false,"Jurisdiction":"String","Unit":"String","PriorHours":0,"BurdenClass":"String","WcRateOverride":0},"ContactID":0,"ProjectID":0,"ShiftPatternID":0,"Unit":"String"}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"Result":{"Rrop":0,"St":0,"Ot":0,"Dt":0,"TotalHours":0,"Straight":0,"DiffPay":0,"OtPremium":0,"DtPremium":0,"CashWages":0,"FringeCashPay":0,"FringePlanPay":0,"BurdenPct":0,"BurdenAmount":0,"PerDiemApplies":false,"PerDiemCost":0,"PerDiemTaxable":0,"PerDiemNonTax":0,"Loaded":0,"Revenue":0,"Margin":0,"MarginPct":0,"OtMultiplier":0,"DtMultiplier":0,"PerDiemDaily":0,"Lines":[{"Label":"String","Detail":"String","Amount":0,"RuleId":"String"}],"Notes":["String"]},"ResolvedInput":{"Base":0,"BillRate":0,"FringeCash":0,"FringePlan":0,"IsNight":false,"HoursPerDay":0,"OnDays":0,"OnDaysExact":0,"HasTravel":false,"PerDiemEligible":false,"PrevailingWage":false,"Jurisdiction":"String","Unit":"String","PriorHours":0,"BurdenClass":"String","WcRateOverride":0},"CanSeePay":false,"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}