Trendsic Platform Service

<back to all web services

TimecardCheckInRequest

Requires Authentication
Required role:Administrator
The following routes are available for this service:
GET,POST,PUT,DELETE,OPTIONS/v1/TimeTracker/{CheckInId}
GET,POST,PUT,DELETE,OPTIONS/v1/TimeTracker
import Foundation
import ServiceStack

public class TimecardCheckInRequest : Codable
{
    public var checkInId:Int
    public var timecardCheckIn:[TimeCard] = []

    required public init(){}
}

public class TimeCard : Codable
{
    public var agentId:Int
    public var checkInId:Int
    public var dateLogged:Date
    @TimeSpan public var timeIn:TimeInterval
    public var timeInDate:Date
    @TimeSpan public var timeOut:TimeInterval
    public var timeOutDate:Date
    public var timeLogged:Double
    public var paymentType:Int
    public var serviceCodeId:Int
    public var serviceCode:String
    public var serviceRate:Double
    public var serviceDescription:String
    public var workDescription:String
    @TimeSpan public var adjustedTimeIn:TimeInterval
    public var adjustedTimeInDate:Date
    @TimeSpan public var adjustedTimeOut:TimeInterval
    public var adjustedTimeOutDate:Date
    public var isValid:Bool
    public var adjusted:Bool
    public var projectID:Int
    public var projectName:String
    public var clientID:Int
    public var clientName:String
    public var categoryID:Int
    public var categoryName:String
    public var jobID:Int
    public var jobName:String

    required public init(){}
}

public class TimecardCheckInResponse : Codable
{
    public var responseStatus:ResponseStatus
    public var timecardCheckIn:[TimeCard] = []

    required public init(){}
}


Swift TimecardCheckInRequest DTOs

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

HTTP + XML

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

POST /v1/TimeTracker/{CheckInId} HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<TimecardCheckInRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <CheckInId>0</CheckInId>
  <TimecardCheckIn>
    <TimeCard>
      <Adjusted>false</Adjusted>
      <AdjustedTimeIn>PT0S</AdjustedTimeIn>
      <AdjustedTimeInDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </AdjustedTimeInDate>
      <AdjustedTimeOut>PT0S</AdjustedTimeOut>
      <AdjustedTimeOutDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </AdjustedTimeOutDate>
      <AgentId>0</AgentId>
      <CategoryID>0</CategoryID>
      <CategoryName>String</CategoryName>
      <CheckInId>0</CheckInId>
      <ClientID>0</ClientID>
      <ClientName>String</ClientName>
      <DateLogged>0001-01-01T00:00:00</DateLogged>
      <IsValid>false</IsValid>
      <JobID>0</JobID>
      <JobName>String</JobName>
      <PaymentType>0</PaymentType>
      <ProjectID>0</ProjectID>
      <ProjectName>String</ProjectName>
      <ServiceCode>String</ServiceCode>
      <ServiceCodeId>0</ServiceCodeId>
      <ServiceDescription>String</ServiceDescription>
      <ServiceRate>0</ServiceRate>
      <TimeIn>PT0S</TimeIn>
      <TimeInDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </TimeInDate>
      <TimeLogged>0</TimeLogged>
      <TimeOut>PT0S</TimeOut>
      <TimeOutDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </TimeOutDate>
      <WorkDescription>String</WorkDescription>
    </TimeCard>
  </TimecardCheckIn>
</TimecardCheckInRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<TimecardCheckInResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <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>
  <TimecardCheckIn>
    <TimeCard>
      <Adjusted>false</Adjusted>
      <AdjustedTimeIn>PT0S</AdjustedTimeIn>
      <AdjustedTimeInDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </AdjustedTimeInDate>
      <AdjustedTimeOut>PT0S</AdjustedTimeOut>
      <AdjustedTimeOutDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </AdjustedTimeOutDate>
      <AgentId>0</AgentId>
      <CategoryID>0</CategoryID>
      <CategoryName>String</CategoryName>
      <CheckInId>0</CheckInId>
      <ClientID>0</ClientID>
      <ClientName>String</ClientName>
      <DateLogged>0001-01-01T00:00:00</DateLogged>
      <IsValid>false</IsValid>
      <JobID>0</JobID>
      <JobName>String</JobName>
      <PaymentType>0</PaymentType>
      <ProjectID>0</ProjectID>
      <ProjectName>String</ProjectName>
      <ServiceCode>String</ServiceCode>
      <ServiceCodeId>0</ServiceCodeId>
      <ServiceDescription>String</ServiceDescription>
      <ServiceRate>0</ServiceRate>
      <TimeIn>PT0S</TimeIn>
      <TimeInDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </TimeInDate>
      <TimeLogged>0</TimeLogged>
      <TimeOut>PT0S</TimeOut>
      <TimeOutDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
        <d4p1:DateTime>0001-01-01T00:00:00Z</d4p1:DateTime>
        <d4p1:OffsetMinutes>0</d4p1:OffsetMinutes>
      </TimeOutDate>
      <WorkDescription>String</WorkDescription>
    </TimeCard>
  </TimecardCheckIn>
</TimecardCheckInResponse>