POST api/v1/time-registrations/list

Used to post a list of timeregistration objects. Attempts to create as many of the posted items as possible. Returns an object with a list of succesful creates and failed creates.

Request Information

URI Parameters

None.

Body Parameters

TimeRegistrationListDto
NameDescriptionTypeAdditional information
TimeRegistrations

Collection of TimeRegistrationDto

None.

Request Formats

application/json, text/json

Sample:
{
  "timeRegistrations": [
    {
      "id": 1,
      "userId": 2,
      "caseId": 3,
      "caseName": "sample string 4",
      "projectId": 1,
      "projectName": "sample string 5",
      "typeId": 1,
      "typeName": "sample string 6",
      "date": "2025-12-08T10:18:09.1206392+01:00",
      "hours": "00:00:00.1234567",
      "startTime": "00:00:00.1234567",
      "endTime": "00:00:00.1234567",
      "comment": "sample string 8",
      "expenses": [
        {
          "expenseId": 1,
          "expenseTypeId": 2,
          "userId": 3,
          "timeRegistrationId": 4,
          "timestamp": "2025-12-08T10:18:09.1206392+01:00",
          "value": "sample string 5"
        },
        {
          "expenseId": 1,
          "expenseTypeId": 2,
          "userId": 3,
          "timeRegistrationId": 4,
          "timestamp": "2025-12-08T10:18:09.1206392+01:00",
          "value": "sample string 5"
        }
      ]
    },
    {
      "id": 1,
      "userId": 2,
      "caseId": 3,
      "caseName": "sample string 4",
      "projectId": 1,
      "projectName": "sample string 5",
      "typeId": 1,
      "typeName": "sample string 6",
      "date": "2025-12-08T10:18:09.1206392+01:00",
      "hours": "00:00:00.1234567",
      "startTime": "00:00:00.1234567",
      "endTime": "00:00:00.1234567",
      "comment": "sample string 8",
      "expenses": [
        {
          "expenseId": 1,
          "expenseTypeId": 2,
          "userId": 3,
          "timeRegistrationId": 4,
          "timestamp": "2025-12-08T10:18:09.1206392+01:00",
          "value": "sample string 5"
        },
        {
          "expenseId": 1,
          "expenseTypeId": 2,
          "userId": 3,
          "timeRegistrationId": 4,
          "timestamp": "2025-12-08T10:18:09.1206392+01:00",
          "value": "sample string 5"
        }
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<TimeRegistrationListDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Workpilot.ServiceLayer.Models">
  <TimeRegistrations>
    <TimeRegistrationDto>
      <CaseId>3</CaseId>
      <CaseName>sample string 4</CaseName>
      <Comment>sample string 8</Comment>
      <Date>2025-12-08T10:18:09.1206392+01:00</Date>
      <EndTime>PT0.1234567S</EndTime>
      <Expenses>
        <ExpenseDto>
          <ExpenseId>1</ExpenseId>
          <ExpenseTypeId>2</ExpenseTypeId>
          <TimeRegistrationId>4</TimeRegistrationId>
          <Timestamp>2025-12-08T10:18:09.1206392+01:00</Timestamp>
          <UserId>3</UserId>
          <Value>sample string 5</Value>
        </ExpenseDto>
        <ExpenseDto>
          <ExpenseId>1</ExpenseId>
          <ExpenseTypeId>2</ExpenseTypeId>
          <TimeRegistrationId>4</TimeRegistrationId>
          <Timestamp>2025-12-08T10:18:09.1206392+01:00</Timestamp>
          <UserId>3</UserId>
          <Value>sample string 5</Value>
        </ExpenseDto>
      </Expenses>
      <Hours>PT0.1234567S</Hours>
      <Id>1</Id>
      <ProjectId>1</ProjectId>
      <ProjectName>sample string 5</ProjectName>
      <StartTime>PT0.1234567S</StartTime>
      <TypeId>1</TypeId>
      <TypeName>sample string 6</TypeName>
      <UserId>2</UserId>
    </TimeRegistrationDto>
    <TimeRegistrationDto>
      <CaseId>3</CaseId>
      <CaseName>sample string 4</CaseName>
      <Comment>sample string 8</Comment>
      <Date>2025-12-08T10:18:09.1206392+01:00</Date>
      <EndTime>PT0.1234567S</EndTime>
      <Expenses>
        <ExpenseDto>
          <ExpenseId>1</ExpenseId>
          <ExpenseTypeId>2</ExpenseTypeId>
          <TimeRegistrationId>4</TimeRegistrationId>
          <Timestamp>2025-12-08T10:18:09.1206392+01:00</Timestamp>
          <UserId>3</UserId>
          <Value>sample string 5</Value>
        </ExpenseDto>
        <ExpenseDto>
          <ExpenseId>1</ExpenseId>
          <ExpenseTypeId>2</ExpenseTypeId>
          <TimeRegistrationId>4</TimeRegistrationId>
          <Timestamp>2025-12-08T10:18:09.1206392+01:00</Timestamp>
          <UserId>3</UserId>
          <Value>sample string 5</Value>
        </ExpenseDto>
      </Expenses>
      <Hours>PT0.1234567S</Hours>
      <Id>1</Id>
      <ProjectId>1</ProjectId>
      <ProjectName>sample string 5</ProjectName>
      <StartTime>PT0.1234567S</StartTime>
      <TypeId>1</TypeId>
      <TypeName>sample string 6</TypeName>
      <UserId>2</UserId>
    </TimeRegistrationDto>
  </TimeRegistrations>
</TimeRegistrationListDto>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'TimeRegistrationListDto'.

Response Information

Resource Description

TimeRegistrationListReturnDto
NameDescriptionTypeAdditional information
TimeRegistrationsCreated

Collection of TimeRegistrationCreateSuccessDto

None.

TimeRegistrationsFailed

Collection of TimeRegistrationCreateFailureDto

None.

Response Formats

application/json, text/json

Sample:
{
  "timeRegistrationsCreated": [
    {
      "createdAtUrl": "sample string 1",
      "timeRegistration": {
        "id": 1,
        "userId": 2,
        "caseId": 3,
        "caseName": "sample string 4",
        "projectId": 1,
        "projectName": "sample string 5",
        "typeId": 1,
        "typeName": "sample string 6",
        "date": "2025-12-08T10:18:09.1236379+01:00",
        "hours": "00:00:00.1234567",
        "startTime": "00:00:00.1234567",
        "endTime": "00:00:00.1234567",
        "comment": "sample string 8",
        "expenses": [
          {
            "expenseId": 1,
            "expenseTypeId": 2,
            "userId": 3,
            "timeRegistrationId": 4,
            "timestamp": "2025-12-08T10:18:09.1236379+01:00",
            "value": "sample string 5"
          },
          {
            "expenseId": 1,
            "expenseTypeId": 2,
            "userId": 3,
            "timeRegistrationId": 4,
            "timestamp": "2025-12-08T10:18:09.1236379+01:00",
            "value": "sample string 5"
          }
        ]
      }
    },
    {
      "createdAtUrl": "sample string 1",
      "timeRegistration": {
        "id": 1,
        "userId": 2,
        "caseId": 3,
        "caseName": "sample string 4",
        "projectId": 1,
        "projectName": "sample string 5",
        "typeId": 1,
        "typeName": "sample string 6",
        "date": "2025-12-08T10:18:09.1236379+01:00",
        "hours": "00:00:00.1234567",
        "startTime": "00:00:00.1234567",
        "endTime": "00:00:00.1234567",
        "comment": "sample string 8",
        "expenses": [
          {
            "expenseId": 1,
            "expenseTypeId": 2,
            "userId": 3,
            "timeRegistrationId": 4,
            "timestamp": "2025-12-08T10:18:09.1236379+01:00",
            "value": "sample string 5"
          },
          {
            "expenseId": 1,
            "expenseTypeId": 2,
            "userId": 3,
            "timeRegistrationId": 4,
            "timestamp": "2025-12-08T10:18:09.1236379+01:00",
            "value": "sample string 5"
          }
        ]
      }
    }
  ],
  "timeRegistrationsFailed": [
    {
      "errorCode": 1,
      "failureReason": "sample string 2",
      "timeRegistration": {
        "id": 1,
        "userId": 2,
        "caseId": 3,
        "caseName": "sample string 4",
        "projectId": 1,
        "projectName": "sample string 5",
        "typeId": 1,
        "typeName": "sample string 6",
        "date": "2025-12-08T10:18:09.1236379+01:00",
        "hours": "00:00:00.1234567",
        "startTime": "00:00:00.1234567",
        "endTime": "00:00:00.1234567",
        "comment": "sample string 8",
        "expenses": [
          {
            "expenseId": 1,
            "expenseTypeId": 2,
            "userId": 3,
            "timeRegistrationId": 4,
            "timestamp": "2025-12-08T10:18:09.1236379+01:00",
            "value": "sample string 5"
          },
          {
            "expenseId": 1,
            "expenseTypeId": 2,
            "userId": 3,
            "timeRegistrationId": 4,
            "timestamp": "2025-12-08T10:18:09.1236379+01:00",
            "value": "sample string 5"
          }
        ]
      }
    },
    {
      "errorCode": 1,
      "failureReason": "sample string 2",
      "timeRegistration": {
        "id": 1,
        "userId": 2,
        "caseId": 3,
        "caseName": "sample string 4",
        "projectId": 1,
        "projectName": "sample string 5",
        "typeId": 1,
        "typeName": "sample string 6",
        "date": "2025-12-08T10:18:09.1236379+01:00",
        "hours": "00:00:00.1234567",
        "startTime": "00:00:00.1234567",
        "endTime": "00:00:00.1234567",
        "comment": "sample string 8",
        "expenses": [
          {
            "expenseId": 1,
            "expenseTypeId": 2,
            "userId": 3,
            "timeRegistrationId": 4,
            "timestamp": "2025-12-08T10:18:09.1236379+01:00",
            "value": "sample string 5"
          },
          {
            "expenseId": 1,
            "expenseTypeId": 2,
            "userId": 3,
            "timeRegistrationId": 4,
            "timestamp": "2025-12-08T10:18:09.1236379+01:00",
            "value": "sample string 5"
          }
        ]
      }
    }
  ]
}

application/xml, text/xml

Sample:
<TimeRegistrationListReturnDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Workpilot.ServiceLayer.Models">
  <TimeRegistrationsCreated>
    <TimeRegistrationCreateSuccessDto>
      <TimeRegistration>
        <CaseId>3</CaseId>
        <CaseName>sample string 4</CaseName>
        <Comment>sample string 8</Comment>
        <Date>2025-12-08T10:18:09.1236379+01:00</Date>
        <EndTime>PT0.1234567S</EndTime>
        <Expenses>
          <ExpenseDto>
            <ExpenseId>1</ExpenseId>
            <ExpenseTypeId>2</ExpenseTypeId>
            <TimeRegistrationId>4</TimeRegistrationId>
            <Timestamp>2025-12-08T10:18:09.1236379+01:00</Timestamp>
            <UserId>3</UserId>
            <Value>sample string 5</Value>
          </ExpenseDto>
          <ExpenseDto>
            <ExpenseId>1</ExpenseId>
            <ExpenseTypeId>2</ExpenseTypeId>
            <TimeRegistrationId>4</TimeRegistrationId>
            <Timestamp>2025-12-08T10:18:09.1236379+01:00</Timestamp>
            <UserId>3</UserId>
            <Value>sample string 5</Value>
          </ExpenseDto>
        </Expenses>
        <Hours>PT0.1234567S</Hours>
        <Id>1</Id>
        <ProjectId>1</ProjectId>
        <ProjectName>sample string 5</ProjectName>
        <StartTime>PT0.1234567S</StartTime>
        <TypeId>1</TypeId>
        <TypeName>sample string 6</TypeName>
        <UserId>2</UserId>
      </TimeRegistration>
      <CreatedAtUrl>sample string 1</CreatedAtUrl>
    </TimeRegistrationCreateSuccessDto>
    <TimeRegistrationCreateSuccessDto>
      <TimeRegistration>
        <CaseId>3</CaseId>
        <CaseName>sample string 4</CaseName>
        <Comment>sample string 8</Comment>
        <Date>2025-12-08T10:18:09.1236379+01:00</Date>
        <EndTime>PT0.1234567S</EndTime>
        <Expenses>
          <ExpenseDto>
            <ExpenseId>1</ExpenseId>
            <ExpenseTypeId>2</ExpenseTypeId>
            <TimeRegistrationId>4</TimeRegistrationId>
            <Timestamp>2025-12-08T10:18:09.1236379+01:00</Timestamp>
            <UserId>3</UserId>
            <Value>sample string 5</Value>
          </ExpenseDto>
          <ExpenseDto>
            <ExpenseId>1</ExpenseId>
            <ExpenseTypeId>2</ExpenseTypeId>
            <TimeRegistrationId>4</TimeRegistrationId>
            <Timestamp>2025-12-08T10:18:09.1236379+01:00</Timestamp>
            <UserId>3</UserId>
            <Value>sample string 5</Value>
          </ExpenseDto>
        </Expenses>
        <Hours>PT0.1234567S</Hours>
        <Id>1</Id>
        <ProjectId>1</ProjectId>
        <ProjectName>sample string 5</ProjectName>
        <StartTime>PT0.1234567S</StartTime>
        <TypeId>1</TypeId>
        <TypeName>sample string 6</TypeName>
        <UserId>2</UserId>
      </TimeRegistration>
      <CreatedAtUrl>sample string 1</CreatedAtUrl>
    </TimeRegistrationCreateSuccessDto>
  </TimeRegistrationsCreated>
  <TimeRegistrationsFailed>
    <TimeRegistrationCreateFailureDto>
      <TimeRegistration>
        <CaseId>3</CaseId>
        <CaseName>sample string 4</CaseName>
        <Comment>sample string 8</Comment>
        <Date>2025-12-08T10:18:09.1236379+01:00</Date>
        <EndTime>PT0.1234567S</EndTime>
        <Expenses>
          <ExpenseDto>
            <ExpenseId>1</ExpenseId>
            <ExpenseTypeId>2</ExpenseTypeId>
            <TimeRegistrationId>4</TimeRegistrationId>
            <Timestamp>2025-12-08T10:18:09.1236379+01:00</Timestamp>
            <UserId>3</UserId>
            <Value>sample string 5</Value>
          </ExpenseDto>
          <ExpenseDto>
            <ExpenseId>1</ExpenseId>
            <ExpenseTypeId>2</ExpenseTypeId>
            <TimeRegistrationId>4</TimeRegistrationId>
            <Timestamp>2025-12-08T10:18:09.1236379+01:00</Timestamp>
            <UserId>3</UserId>
            <Value>sample string 5</Value>
          </ExpenseDto>
        </Expenses>
        <Hours>PT0.1234567S</Hours>
        <Id>1</Id>
        <ProjectId>1</ProjectId>
        <ProjectName>sample string 5</ProjectName>
        <StartTime>PT0.1234567S</StartTime>
        <TypeId>1</TypeId>
        <TypeName>sample string 6</TypeName>
        <UserId>2</UserId>
      </TimeRegistration>
      <ErrorCode>1</ErrorCode>
      <FailureReason>sample string 2</FailureReason>
    </TimeRegistrationCreateFailureDto>
    <TimeRegistrationCreateFailureDto>
      <TimeRegistration>
        <CaseId>3</CaseId>
        <CaseName>sample string 4</CaseName>
        <Comment>sample string 8</Comment>
        <Date>2025-12-08T10:18:09.1236379+01:00</Date>
        <EndTime>PT0.1234567S</EndTime>
        <Expenses>
          <ExpenseDto>
            <ExpenseId>1</ExpenseId>
            <ExpenseTypeId>2</ExpenseTypeId>
            <TimeRegistrationId>4</TimeRegistrationId>
            <Timestamp>2025-12-08T10:18:09.1236379+01:00</Timestamp>
            <UserId>3</UserId>
            <Value>sample string 5</Value>
          </ExpenseDto>
          <ExpenseDto>
            <ExpenseId>1</ExpenseId>
            <ExpenseTypeId>2</ExpenseTypeId>
            <TimeRegistrationId>4</TimeRegistrationId>
            <Timestamp>2025-12-08T10:18:09.1236379+01:00</Timestamp>
            <UserId>3</UserId>
            <Value>sample string 5</Value>
          </ExpenseDto>
        </Expenses>
        <Hours>PT0.1234567S</Hours>
        <Id>1</Id>
        <ProjectId>1</ProjectId>
        <ProjectName>sample string 5</ProjectName>
        <StartTime>PT0.1234567S</StartTime>
        <TypeId>1</TypeId>
        <TypeName>sample string 6</TypeName>
        <UserId>2</UserId>
      </TimeRegistration>
      <ErrorCode>1</ErrorCode>
      <FailureReason>sample string 2</FailureReason>
    </TimeRegistrationCreateFailureDto>
  </TimeRegistrationsFailed>
</TimeRegistrationListReturnDto>