POST Api/TimeRegistration/Duty

adds a duty

Request Information

URI Parameters

None.

Body Parameters

DutyModel
NameDescriptionTypeAdditional information
ID

integer

Required

EmployeeID

integer

Required

Date

date

Required

StartTime

date

Required

EndTime

date

Required

Request Formats

application/json, text/json

Sample:
{
  "ID": 1,
  "EmployeeID": 2,
  "Date": "2024-12-22T07:45:21.7147966+01:00",
  "StartTime": "2024-12-22T07:45:21.7147966+01:00",
  "EndTime": "2024-12-22T07:45:21.7147966+01:00"
}

application/xml, text/xml

Sample:
<DutyModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/RostarCASWebAPI.Models">
  <Date>2024-12-22T07:45:21.7147966+01:00</Date>
  <EmployeeID>2</EmployeeID>
  <EndTime>2024-12-22T07:45:21.7147966+01:00</EndTime>
  <ID>1</ID>
  <StartTime>2024-12-22T07:45:21.7147966+01:00</StartTime>
</DutyModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

TimeRegistrationSchedulingData
NameDescriptionTypeAdditional information
Locations

Collection of TimeRegistrationLocation

None.

Tasks

Collection of TimeRegistrationTask

None.

LocationDuties

Collection of TimeRegistrationLocationDuties

None.

Employees

Collection of TimeRegistrationEmployee

None.

ExtraCodes

Collection of TimeRegistrationExtraCode

None.

PlannedRealizedExtraCodes

Collection of TimeRegistrationPlannedRealizedExtraCode

None.

PlannedRealizedLocations

Collection of TimeRegistrationPlannedRealizedLocation

None.

CalculatedDataForEmployee

Collection of TimeRegistrationCalculatedData

None.

Response Formats

application/json, text/json

Sample:
{
  "Locations": null,
  "Tasks": null,
  "LocationDuties": null,
  "Employees": null,
  "ExtraCodes": null,
  "PlannedRealizedExtraCodes": [
    {
      "ExtraCodeId": 1,
      "EmployeeId": 2,
      "Registered": true,
      "Scheduling": null
    },
    {
      "ExtraCodeId": 1,
      "EmployeeId": 2,
      "Registered": true,
      "Scheduling": null
    }
  ],
  "PlannedRealizedLocations": [
    {
      "LocationId": 1,
      "PlannedRealizedDuties": [
        {
          "DutyId": 1,
          "EmployeeId": 2,
          "Registered": true,
          "Scheduling": null
        },
        {
          "DutyId": 1,
          "EmployeeId": 2,
          "Registered": true,
          "Scheduling": null
        }
      ]
    },
    {
      "LocationId": 1,
      "PlannedRealizedDuties": [
        {
          "DutyId": 1,
          "EmployeeId": 2,
          "Registered": true,
          "Scheduling": null
        },
        {
          "DutyId": 1,
          "EmployeeId": 2,
          "Registered": true,
          "Scheduling": null
        }
      ]
    }
  ],
  "CalculatedDataForEmployee": [
    {
      "EmployeeId": 1,
      "Activities": [
        {
          "ID": 1,
          "IsDuty": true,
          "Planned": 3.1,
          "Realised": 4.1,
          "PlannedAvailable": true,
          "RealizedAvailable": true
        },
        {
          "ID": 1,
          "IsDuty": true,
          "Planned": 3.1,
          "Realised": 4.1,
          "PlannedAvailable": true,
          "RealizedAvailable": true
        }
      ]
    },
    {
      "EmployeeId": 1,
      "Activities": [
        {
          "ID": 1,
          "IsDuty": true,
          "Planned": 3.1,
          "Realised": 4.1,
          "PlannedAvailable": true,
          "RealizedAvailable": true
        },
        {
          "ID": 1,
          "IsDuty": true,
          "Planned": 3.1,
          "Realised": 4.1,
          "PlannedAvailable": true,
          "RealizedAvailable": true
        }
      ]
    }
  ]
}

application/xml, text/xml

Sample:
<TimeRegistrationSchedulingData xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Paralax.Cas.Web.WebServices.Models.TimeRegistration">
  <CalculatedDataForEmployee>
    <TimeRegistrationCalculatedData>
      <Activities>
        <TimeRegistrationActivity>
          <ID>1</ID>
          <IsDuty>true</IsDuty>
          <Planned>3.1</Planned>
          <Realised>4.1</Realised>
          <PlannedAvailable>true</PlannedAvailable>
          <RealizedAvailable>true</RealizedAvailable>
        </TimeRegistrationActivity>
        <TimeRegistrationActivity>
          <ID>1</ID>
          <IsDuty>true</IsDuty>
          <Planned>3.1</Planned>
          <Realised>4.1</Realised>
          <PlannedAvailable>true</PlannedAvailable>
          <RealizedAvailable>true</RealizedAvailable>
        </TimeRegistrationActivity>
      </Activities>
      <EmployeeId>1</EmployeeId>
    </TimeRegistrationCalculatedData>
    <TimeRegistrationCalculatedData>
      <Activities>
        <TimeRegistrationActivity>
          <ID>1</ID>
          <IsDuty>true</IsDuty>
          <Planned>3.1</Planned>
          <Realised>4.1</Realised>
          <PlannedAvailable>true</PlannedAvailable>
          <RealizedAvailable>true</RealizedAvailable>
        </TimeRegistrationActivity>
        <TimeRegistrationActivity>
          <ID>1</ID>
          <IsDuty>true</IsDuty>
          <Planned>3.1</Planned>
          <Realised>4.1</Realised>
          <PlannedAvailable>true</PlannedAvailable>
          <RealizedAvailable>true</RealizedAvailable>
        </TimeRegistrationActivity>
      </Activities>
      <EmployeeId>1</EmployeeId>
    </TimeRegistrationCalculatedData>
  </CalculatedDataForEmployee>
  <Employees i:nil="true" />
  <ExtraCodes i:nil="true" />
  <LocationDuties i:nil="true" />
  <Locations i:nil="true" />
  <PlannedRealizedExtraCodes>
    <TimeRegistrationPlannedRealizedExtraCode>
      <EmployeeId>2</EmployeeId>
      <ExtraCodeId>1</ExtraCodeId>
      <Registered>true</Registered>
      <Scheduling i:nil="true" />
    </TimeRegistrationPlannedRealizedExtraCode>
    <TimeRegistrationPlannedRealizedExtraCode>
      <EmployeeId>2</EmployeeId>
      <ExtraCodeId>1</ExtraCodeId>
      <Registered>true</Registered>
      <Scheduling i:nil="true" />
    </TimeRegistrationPlannedRealizedExtraCode>
  </PlannedRealizedExtraCodes>
  <PlannedRealizedLocations>
    <TimeRegistrationPlannedRealizedLocation>
      <LocationId>1</LocationId>
      <PlannedRealizedDuties>
        <TimeRegistrationPlannedRealizedDuty>
          <DutyId>1</DutyId>
          <EmployeeId>2</EmployeeId>
          <Registered>true</Registered>
          <Scheduling i:nil="true" />
        </TimeRegistrationPlannedRealizedDuty>
        <TimeRegistrationPlannedRealizedDuty>
          <DutyId>1</DutyId>
          <EmployeeId>2</EmployeeId>
          <Registered>true</Registered>
          <Scheduling i:nil="true" />
        </TimeRegistrationPlannedRealizedDuty>
      </PlannedRealizedDuties>
    </TimeRegistrationPlannedRealizedLocation>
    <TimeRegistrationPlannedRealizedLocation>
      <LocationId>1</LocationId>
      <PlannedRealizedDuties>
        <TimeRegistrationPlannedRealizedDuty>
          <DutyId>1</DutyId>
          <EmployeeId>2</EmployeeId>
          <Registered>true</Registered>
          <Scheduling i:nil="true" />
        </TimeRegistrationPlannedRealizedDuty>
        <TimeRegistrationPlannedRealizedDuty>
          <DutyId>1</DutyId>
          <EmployeeId>2</EmployeeId>
          <Registered>true</Registered>
          <Scheduling i:nil="true" />
        </TimeRegistrationPlannedRealizedDuty>
      </PlannedRealizedDuties>
    </TimeRegistrationPlannedRealizedLocation>
  </PlannedRealizedLocations>
  <Tasks i:nil="true" />
</TimeRegistrationSchedulingData>