POST api/admin/users/{userId}/employment-details

This method will add employment details to user by user id

Request Information

URI Parameters

NameDescriptionTypeAdditional information
userId

User Id

integer

Required

Body Parameters

Instance of

CreateEmploymentDetailsBindingModel
NameDescriptionTypeAdditional information
StartDate

string

Required

EmploymentTypeId

integer

Required

Rate

decimal number

Required

SickDayCount

integer

None.

VacationDayCount

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "startDate": "sample string 1",
  "employmentTypeId": 2,
  "rate": 1.0,
  "sickDayCount": 3,
  "vacationDayCount": 4
}

text/html

Sample:
{"startDate":"sample string 1","employmentTypeId":2,"rate":1.0,"sickDayCount":3,"vacationDayCount":4}

application/xml, text/xml

Sample:
<CreateEmploymentDetailsBindingModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ptd.Model.WebModels.EmploymentBinding">
  <EmploymentTypeId>2</EmploymentTypeId>
  <Rate>1</Rate>
  <SickDayCount>3</SickDayCount>
  <StartDate>sample string 1</StartDate>
  <VacationDayCount>4</VacationDayCount>
</CreateEmploymentDetailsBindingModel>

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 'CreateEmploymentDetailsBindingModel'.

Response Information

Resource Description

Instance of

EmploymentDetails
NameDescriptionTypeAdditional information
UserId

integer

None.

StartDate

date

None.

EndDate

date

None.

SickDayCount

integer

None.

VacationDayCount

integer

None.

TerminationReason

string

None.

AddedDate

date

None.

LastUpdateDate

date

None.

Rate

decimal number

None.

EmploymentTypeId

integer

None.

EmploymentType

EmploymentType

None.

User

AspNetUser

None.

Id

integer

None.

Response Formats

application/json, text/json

Sample:
{
  "userId": 1,
  "startDate": "2025-05-20T16:18:23.1969185-05:00",
  "endDate": "2025-05-20T16:18:23.1969185-05:00",
  "sickDayCount": 3,
  "vacationDayCount": 4,
  "terminationReason": "sample string 5",
  "addedDate": "2025-05-20T16:18:23.1969185-05:00",
  "lastUpdateDate": "2025-05-20T16:18:23.1969185-05:00",
  "rate": 1.0,
  "employmentTypeId": 7,
  "employmentType": {
    "id": 1,
    "type": "sample string 2",
    "description": "sample string 3"
  },
  "user": {
    "id": 1,
    "accessFailedCount": 2,
    "email": "sample string 3",
    "emailConfirmed": true,
    "lockoutEnabled": true,
    "lockoutEndDateUtc": "2025-05-20T16:18:23.1969185-05:00",
    "passwordHash": "sample string 6",
    "phoneNumberConfirmed": true,
    "securityStamp": "sample string 8",
    "twoFactorEnabled": true,
    "userName": "sample string 10",
    "joinDate": "2025-05-20T16:18:23.1969185-05:00",
    "firstName": "sample string 12",
    "lastName": "sample string 13",
    "isSystemUser": true,
    "accountVerified": true,
    "acceptedTermsAndConditionsDate": "2025-05-20T16:18:23.1969185-05:00",
    "phoneNumber": "sample string 15",
    "roles": [],
    "claims": [],
    "logins": []
  },
  "id": 8
}

text/html

Sample:
{"userId":1,"startDate":"2025-05-20T16:18:23.1969185-05:00","endDate":"2025-05-20T16:18:23.1969185-05:00","sickDayCount":3,"vacationDayCount":4,"terminationReason":"sample string 5","addedDate":"2025-05-20T16:18:23.1969185-05:00","lastUpdateDate":"2025-05-20T16:18:23.1969185-05:00","rate":1.0,"employmentTypeId":7,"employmentType":{"id":1,"type":"sample string 2","description":"sample string 3"},"user":{"id":1,"accessFailedCount":2,"email":"sample string 3","emailConfirmed":true,"lockoutEnabled":true,"lockoutEndDateUtc":"2025-05-20T16:18:23.1969185-05:00","passwordHash":"sample string 6","phoneNumberConfirmed":true,"securityStamp":"sample string 8","twoFactorEnabled":true,"userName":"sample string 10","joinDate":"2025-05-20T16:18:23.1969185-05:00","firstName":"sample string 12","lastName":"sample string 13","isSystemUser":true,"accountVerified":true,"acceptedTermsAndConditionsDate":"2025-05-20T16:18:23.1969185-05:00","phoneNumber":"sample string 15","roles":[],"claims":[],"logins":[]},"id":8}

application/xml, text/xml

Sample:
<EmploymentDetails xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Ptd.Model.Entities">
  <Id xmlns="http://schemas.datacontract.org/2004/07/Ptd.Model.Entities.Core">8</Id>
  <AddedDate>2025-05-20T16:18:23.1969185-05:00</AddedDate>
  <EmploymentType xmlns:d2p1="http://schemas.datacontract.org/2004/07/Ptd.Model.Entities.ValueTypes">
    <Id xmlns="http://schemas.datacontract.org/2004/07/Ptd.Model.Entities.Core">1</Id>
    <d2p1:Description>sample string 3</d2p1:Description>
    <d2p1:Type>sample string 2</d2p1:Type>
  </EmploymentType>
  <EmploymentTypeId>7</EmploymentTypeId>
  <EndDate>2025-05-20T16:18:23.1969185-05:00</EndDate>
  <LastUpdateDate>2025-05-20T16:18:23.1969185-05:00</LastUpdateDate>
  <Rate>1</Rate>
  <SickDayCount>3</SickDayCount>
  <StartDate>2025-05-20T16:18:23.1969185-05:00</StartDate>
  <TerminationReason>sample string 5</TerminationReason>
  <User xmlns:d2p1="http://schemas.datacontract.org/2004/07/Ptd.Model.Entities.AuthEntities">
    <AccessFailedCount xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">2</AccessFailedCount>
    <Email xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 3</Email>
    <EmailConfirmed xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">true</EmailConfirmed>
    <Id xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">1</Id>
    <LockoutEnabled xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">true</LockoutEnabled>
    <LockoutEndDateUtc xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">2025-05-20T16:18:23.1969185-05:00</LockoutEndDateUtc>
    <PasswordHash xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 6</PasswordHash>
    <PhoneNumber xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 15</PhoneNumber>
    <PhoneNumberConfirmed xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">true</PhoneNumberConfirmed>
    <SecurityStamp xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 8</SecurityStamp>
    <TwoFactorEnabled xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">true</TwoFactorEnabled>
    <UserName xmlns="http://schemas.datacontract.org/2004/07/Microsoft.AspNet.Identity.EntityFramework">sample string 10</UserName>
    <d2p1:AcceptedTermsAndConditionsDate>2025-05-20T16:18:23.1969185-05:00</d2p1:AcceptedTermsAndConditionsDate>
    <d2p1:AccountVerified>true</d2p1:AccountVerified>
    <d2p1:FirstName>sample string 12</d2p1:FirstName>
    <d2p1:IsSystemUser>true</d2p1:IsSystemUser>
    <d2p1:JoinDate>2025-05-20T16:18:23.1969185-05:00</d2p1:JoinDate>
    <d2p1:LastName>sample string 13</d2p1:LastName>
  </User>
  <UserId>1</UserId>
  <VacationDayCount>4</VacationDayCount>
</EmploymentDetails>