POST api/TrackTimeRecords/NewRecord

Creates a new Time entry.

Request Information

URI Parameters

None.

Body Parameters

NewTrackTimeRecordPost
NameDescriptionTypeAdditional information
ActivityId

(Required) Activity Id.

integer

None.

TicketId

Bind the Time entry with Ticket.

integer

None.

Duration

Duration is required if Activity type is Time

time interval

None.

FromUtc

From utc is required if Activity type is Time

date

None.

UntilUtc

Until utc is required if Activity type is Time

date

None.

DateOfImplementationUtc

Date of implementation utc is required if Activity type is General, if Activity type is time date from will be set as this date

date

None.

Description

Description.

string

None.

AssignedToUserProviderKey

(Required) User provider key which is assigned with Time entry.

string

None.

CustomerId

Bind the time entry with Customer.

integer

None.

Price

(Required) Price set for this Time entry.

decimal number

None.

Currency

(Required) Currency set for thie Time entry.

CurrencyEnum

None.

InvoiceState

(Required) Invoice state.

InvoiceStateEnum

None.

ProjectId

Bind the Time entry with Track time project.

integer

None.

Count

Count is required if Activity type is General.

decimal number

None.

InvoicedDate

date

None.

InvoiceNumber

string

None.

Approved

boolean

None.

SplitByDays

boolean

None.

CategoryItemIds

The category item ids for the track time record

Collection of integer

None.

Request Formats

application/json, text/json

Sample:
{
  "ActivityId": 2,
  "TicketId": null,
  "Duration": null,
  "FromUtc": null,
  "UntilUtc": null,
  "DateOfImplementationUtc": "2024-04-27T02:02:18.0638409Z",
  "Description": "Travel",
  "AssignedToUserProviderKey": null,
  "CustomerId": null,
  "Price": 50.0,
  "Currency": 1,
  "InvoiceState": 1,
  "ProjectId": null,
  "Count": 1.0,
  "InvoicedDate": null,
  "InvoiceNumber": null,
  "Approved": false,
  "SplitByDays": true,
  "CategoryItemIds": null
}

application/xml, text/xml

Sample:
<NewTrackTimeRecordPost xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Posts">
  <ActivityId>2</ActivityId>
  <Approved>false</Approved>
  <AssignedToUserProviderKey i:nil="true" />
  <CategoryItemIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <Count>1</Count>
  <Currency>CZK</Currency>
  <CustomerId i:nil="true" />
  <DateOfImplementationUtc>2024-04-27T02:02:18.0638409Z</DateOfImplementationUtc>
  <Description>Travel</Description>
  <Duration i:nil="true" />
  <FromUtc i:nil="true" />
  <InvoiceNumber i:nil="true" />
  <InvoiceState>DoNotInvoice</InvoiceState>
  <InvoicedDate i:nil="true" />
  <Price>50</Price>
  <ProjectId i:nil="true" />
  <SplitByDays>true</SplitByDays>
  <TicketId i:nil="true" />
  <UntilUtc i:nil="true" />
</NewTrackTimeRecordPost>

Response Information

Resource Description

Returns id

NewTrackTimerRecordResult
NameDescriptionTypeAdditional information
TrackTimeRecords

Track time records with last updated date. If the record was splitted by days you will get row for each new entity.

Collection of NewTrackTimerRecordResultRow

None.

Response Formats

application/json, text/json

Sample:
{
  "TrackTimeRecords": [
    {
      "Id": 1,
      "LastUpdatedUtc": "2024-04-28T02:37:25.6215854+02:00"
    },
    {
      "Id": 1,
      "LastUpdatedUtc": "2024-04-28T02:37:25.6215854+02:00"
    }
  ]
}

application/xml, text/xml

Sample:
<NewTrackTimerRecordResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RequestorApiDataStructures.Results">
  <TrackTimeRecords>
    <NewTrackTimerRecordResult.NewTrackTimerRecordResultRow>
      <Id>1</Id>
      <LastUpdatedUtc>2024-04-28T02:37:25.6215854+02:00</LastUpdatedUtc>
    </NewTrackTimerRecordResult.NewTrackTimerRecordResultRow>
    <NewTrackTimerRecordResult.NewTrackTimerRecordResultRow>
      <Id>1</Id>
      <LastUpdatedUtc>2024-04-28T02:37:25.6215854+02:00</LastUpdatedUtc>
    </NewTrackTimerRecordResult.NewTrackTimerRecordResultRow>
  </TrackTimeRecords>
</NewTrackTimerRecordResult>