Trendsic Platform Service

<back to all web services

ClockInOutRequest

Requires Authentication
Requires any of the roles:Worker, Agent, Administrator
The following routes are available for this service:
POST,OPTIONS/v1/TimeTracker/ClockInOut
import java.math.*;
import java.util.*;
import java.io.InputStream;
import net.servicestack.client.*;

public class dtos
{

    public static class ClockInOutRequest
    {
        public TimeCard Timecard = null;
        
        public TimeCard getTimecard() { return Timecard; }
        public ClockInOutRequest setTimecard(TimeCard value) { this.Timecard = value; return this; }
    }

    public static class TimeCard
    {
        public Integer AgentId = null;
        public Integer CheckInId = null;
        public Date DateLogged = null;
        public TimeSpan TimeIn = null;
        public Date TimeInDate = null;
        public TimeSpan TimeOut = null;
        public Date TimeOutDate = null;
        public BigDecimal TimeLogged = null;
        public Integer PaymentType = null;
        public Integer ServiceCodeId = null;
        public String ServiceCode = null;
        public BigDecimal ServiceRate = null;
        public String ServiceDescription = null;
        public String WorkDescription = null;
        public TimeSpan AdjustedTimeIn = null;
        public Date AdjustedTimeInDate = null;
        public TimeSpan AdjustedTimeOut = null;
        public Date AdjustedTimeOutDate = null;
        public Boolean IsValid = null;
        public Boolean Adjusted = null;
        public Integer ProjectID = null;
        public String ProjectName = null;
        public Integer ClientID = null;
        public String ClientName = null;
        public Integer CategoryID = null;
        public String CategoryName = null;
        public Integer JobID = null;
        public String JobName = null;
        
        public Integer getAgentId() { return AgentId; }
        public TimeCard setAgentId(Integer value) { this.AgentId = value; return this; }
        public Integer getCheckInId() { return CheckInId; }
        public TimeCard setCheckInId(Integer value) { this.CheckInId = value; return this; }
        public Date getDateLogged() { return DateLogged; }
        public TimeCard setDateLogged(Date value) { this.DateLogged = value; return this; }
        public TimeSpan getTimeIn() { return TimeIn; }
        public TimeCard setTimeIn(TimeSpan value) { this.TimeIn = value; return this; }
        public Date getTimeInDate() { return TimeInDate; }
        public TimeCard setTimeInDate(Date value) { this.TimeInDate = value; return this; }
        public TimeSpan getTimeOut() { return TimeOut; }
        public TimeCard setTimeOut(TimeSpan value) { this.TimeOut = value; return this; }
        public Date getTimeOutDate() { return TimeOutDate; }
        public TimeCard setTimeOutDate(Date value) { this.TimeOutDate = value; return this; }
        public BigDecimal getTimeLogged() { return TimeLogged; }
        public TimeCard setTimeLogged(BigDecimal value) { this.TimeLogged = value; return this; }
        public Integer getPaymentType() { return PaymentType; }
        public TimeCard setPaymentType(Integer value) { this.PaymentType = value; return this; }
        public Integer getServiceCodeId() { return ServiceCodeId; }
        public TimeCard setServiceCodeId(Integer value) { this.ServiceCodeId = value; return this; }
        public String getServiceCode() { return ServiceCode; }
        public TimeCard setServiceCode(String value) { this.ServiceCode = value; return this; }
        public BigDecimal getServiceRate() { return ServiceRate; }
        public TimeCard setServiceRate(BigDecimal value) { this.ServiceRate = value; return this; }
        public String getServiceDescription() { return ServiceDescription; }
        public TimeCard setServiceDescription(String value) { this.ServiceDescription = value; return this; }
        public String getWorkDescription() { return WorkDescription; }
        public TimeCard setWorkDescription(String value) { this.WorkDescription = value; return this; }
        public TimeSpan getAdjustedTimeIn() { return AdjustedTimeIn; }
        public TimeCard setAdjustedTimeIn(TimeSpan value) { this.AdjustedTimeIn = value; return this; }
        public Date getAdjustedTimeInDate() { return AdjustedTimeInDate; }
        public TimeCard setAdjustedTimeInDate(Date value) { this.AdjustedTimeInDate = value; return this; }
        public TimeSpan getAdjustedTimeOut() { return AdjustedTimeOut; }
        public TimeCard setAdjustedTimeOut(TimeSpan value) { this.AdjustedTimeOut = value; return this; }
        public Date getAdjustedTimeOutDate() { return AdjustedTimeOutDate; }
        public TimeCard setAdjustedTimeOutDate(Date value) { this.AdjustedTimeOutDate = value; return this; }
        public Boolean getIsValid() { return IsValid; }
        public TimeCard setIsValid(Boolean value) { this.IsValid = value; return this; }
        public Boolean isAdjusted() { return Adjusted; }
        public TimeCard setAdjusted(Boolean value) { this.Adjusted = value; return this; }
        public Integer getProjectID() { return ProjectID; }
        public TimeCard setProjectID(Integer value) { this.ProjectID = value; return this; }
        public String getProjectName() { return ProjectName; }
        public TimeCard setProjectName(String value) { this.ProjectName = value; return this; }
        public Integer getClientID() { return ClientID; }
        public TimeCard setClientID(Integer value) { this.ClientID = value; return this; }
        public String getClientName() { return ClientName; }
        public TimeCard setClientName(String value) { this.ClientName = value; return this; }
        public Integer getCategoryID() { return CategoryID; }
        public TimeCard setCategoryID(Integer value) { this.CategoryID = value; return this; }
        public String getCategoryName() { return CategoryName; }
        public TimeCard setCategoryName(String value) { this.CategoryName = value; return this; }
        public Integer getJobID() { return JobID; }
        public TimeCard setJobID(Integer value) { this.JobID = value; return this; }
        public String getJobName() { return JobName; }
        public TimeCard setJobName(String value) { this.JobName = value; return this; }
    }

    public static class ClockInOutResponse
    {
        public ResponseStatus ResponseStatus = null;
        public Boolean response = null;
        
        public ResponseStatus getResponseStatus() { return ResponseStatus; }
        public ClockInOutResponse setResponseStatus(ResponseStatus value) { this.ResponseStatus = value; return this; }
        public Boolean isResponse() { return response; }
        public ClockInOutResponse setResponse(Boolean value) { this.response = value; return this; }
    }

}

Java ClockInOutRequest 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/ClockInOut HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<ClockInOutRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/CRM.AgencyPlatform.API.Internal">
  <Timecard>
    <Adjusted>false</Adjusted>
    <AdjustedTimeIn>PT0S</AdjustedTimeIn>
    <AdjustedTimeInDate xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>0001-01-01T00:00:00Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>0</d3p1:OffsetMinutes>
    </AdjustedTimeInDate>
    <AdjustedTimeOut>PT0S</AdjustedTimeOut>
    <AdjustedTimeOutDate xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>0001-01-01T00:00:00Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>0</d3p1: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:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>0001-01-01T00:00:00Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>0</d3p1:OffsetMinutes>
    </TimeInDate>
    <TimeLogged>0</TimeLogged>
    <TimeOut>PT0S</TimeOut>
    <TimeOutDate xmlns:d3p1="http://schemas.datacontract.org/2004/07/System">
      <d3p1:DateTime>0001-01-01T00:00:00Z</d3p1:DateTime>
      <d3p1:OffsetMinutes>0</d3p1:OffsetMinutes>
    </TimeOutDate>
    <WorkDescription>String</WorkDescription>
  </Timecard>
</ClockInOutRequest>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<ClockInOutResponse 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>
  <response>false</response>
</ClockInOutResponse>