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
"use strict";
export class ClockInOutResponse {
    /** @param {{ResponseStatus?:ResponseStatus,response?:boolean}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {ResponseStatus} */
    ResponseStatus;
    /** @type {boolean} */
    response;
}
export class TimeCard {
    /** @param {{AgentId?:number,CheckInId?:number,DateLogged?:string,TimeIn?:string,TimeInDate?:string,TimeOut?:string,TimeOutDate?:string,TimeLogged?:number,PaymentType?:number,ServiceCodeId?:number,ServiceCode?:string,ServiceRate?:number,ServiceDescription?:string,WorkDescription?:string,AdjustedTimeIn?:string,AdjustedTimeInDate?:string,AdjustedTimeOut?:string,AdjustedTimeOutDate?:string,IsValid?:boolean,Adjusted?:boolean,ProjectID?:number,ProjectName?:string,ClientID?:number,ClientName?:string,CategoryID?:number,CategoryName?:string,JobID?:number,JobName?:string}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {number} */
    AgentId;
    /** @type {number} */
    CheckInId;
    /** @type {string} */
    DateLogged;
    /** @type {string} */
    TimeIn;
    /** @type {string} */
    TimeInDate;
    /** @type {string} */
    TimeOut;
    /** @type {string} */
    TimeOutDate;
    /** @type {number} */
    TimeLogged;
    /** @type {number} */
    PaymentType;
    /** @type {number} */
    ServiceCodeId;
    /** @type {string} */
    ServiceCode;
    /** @type {number} */
    ServiceRate;
    /** @type {string} */
    ServiceDescription;
    /** @type {string} */
    WorkDescription;
    /** @type {string} */
    AdjustedTimeIn;
    /** @type {string} */
    AdjustedTimeInDate;
    /** @type {string} */
    AdjustedTimeOut;
    /** @type {string} */
    AdjustedTimeOutDate;
    /** @type {boolean} */
    IsValid;
    /** @type {boolean} */
    Adjusted;
    /** @type {number} */
    ProjectID;
    /** @type {string} */
    ProjectName;
    /** @type {number} */
    ClientID;
    /** @type {string} */
    ClientName;
    /** @type {number} */
    CategoryID;
    /** @type {string} */
    CategoryName;
    /** @type {number} */
    JobID;
    /** @type {string} */
    JobName;
}
export class ClockInOutRequest {
    /** @param {{Timecard?:TimeCard}} [init] */
    constructor(init) { Object.assign(this, init) }
    /** @type {TimeCard} */
    Timecard;
}

JavaScript 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>