POST api/LeaveAPIStrictSecurity/AddLeaveDefines

添加假期类型

Request Information

URI Parameters

None.

Body Parameters

LeaveDefineSettingInput
NameDescriptionTypeAdditional information
GID

globally unique identifier

None.

Name

string

None.

Gender

integer

None.

UnitType

string

None.

LengthCalcType

LengthCalcType

None.

FlagEmpBalance

boolean

None.

CanUseRole

CanUseRole

None.

LeaveDayType

integer

None.

LeaveBalanceType

integer

None.

GrantDate

integer

None.

BalanceRole

integer

None.

FixedBalance

decimal number

None.

RefWorkingyears

boolean

None.

ValidPeriod

integer

None.

ExtensionValidPeriod

boolean

None.

ExtensionValidPeriodLength

integer

None.

ExtensionValidPeriodDayorMonth

string

None.

LeaveWorkingAgeBalances

Collection of LeaveWorkingAgeBalanceInput

None.

LeaveTypeEmpRanges

Collection of LeaveTypeEmpRangeInput

None.

EffectiveType

integer

None.

EffectiveDate

date

None.

BalanceAction

integer

None.

BalanceRoleDetail

string

None.

GroupCode

string

None.

OneDayHours

decimal number

None.

EffectiveEndDate

date

None.

FirstSetYearOrMonth

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "GID": "9290ec41-86b8-4d36-a229-ef536d9c6765",
  "Name": "sample string 2",
  "Gender": 1,
  "UnitType": "sample string 3",
  "LengthCalcType": 1,
  "FlagEmpBalance": true,
  "CanUseRole": 1,
  "LeaveDayType": 1,
  "LeaveBalanceType": 1,
  "GrantDate": 1,
  "BalanceRole": 1,
  "FixedBalance": 1.0,
  "RefWorkingyears": true,
  "ValidPeriod": 1,
  "ExtensionValidPeriod": true,
  "ExtensionValidPeriodLength": 1,
  "ExtensionValidPeriodDayorMonth": "sample string 4",
  "LeaveWorkingAgeBalances": [
    {
      "LeaveDefine_GID": "af60f3c4-177f-4bf7-9280-f3633a8767cc",
      "LeaveName": "sample string 1",
      "StartYear": 1,
      "EndYear": 1,
      "Balance": 2.0
    },
    {
      "LeaveDefine_GID": "af60f3c4-177f-4bf7-9280-f3633a8767cc",
      "LeaveName": "sample string 1",
      "StartYear": 1,
      "EndYear": 1,
      "Balance": 2.0
    }
  ],
  "LeaveTypeEmpRanges": [
    {
      "LeaveDefine_GID": "745baa8c-6eea-4c36-9057-866b58e6f243",
      "LeaveName": "sample string 1",
      "Type": "sample string 2",
      "Key": "910ebba6-01fc-4b88-a636-06ebd4ec86ec",
      "Title": "sample string 3"
    },
    {
      "LeaveDefine_GID": "745baa8c-6eea-4c36-9057-866b58e6f243",
      "LeaveName": "sample string 1",
      "Type": "sample string 2",
      "Key": "910ebba6-01fc-4b88-a636-06ebd4ec86ec",
      "Title": "sample string 3"
    }
  ],
  "EffectiveType": 1,
  "EffectiveDate": "2025-05-04T15:13:29.2599401+08:00",
  "BalanceAction": 1,
  "BalanceRoleDetail": "sample string 5",
  "GroupCode": "sample string 6",
  "OneDayHours": 1.0,
  "EffectiveEndDate": "2025-05-04T15:13:29.2599401+08:00",
  "FirstSetYearOrMonth": 1
}

application/xml, text/xml

Sample:
<LeaveDefineSettingInput xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/JetHR.OpenAPI.Model">
  <BalanceAction>1</BalanceAction>
  <BalanceRole>1</BalanceRole>
  <BalanceRoleDetail>sample string 5</BalanceRoleDetail>
  <CanUseRole>Regular</CanUseRole>
  <EffectiveDate>2025-05-04T15:13:29.2599401+08:00</EffectiveDate>
  <EffectiveEndDate>2025-05-04T15:13:29.2599401+08:00</EffectiveEndDate>
  <EffectiveType>1</EffectiveType>
  <ExtensionValidPeriod>true</ExtensionValidPeriod>
  <ExtensionValidPeriodDayorMonth>sample string 4</ExtensionValidPeriodDayorMonth>
  <ExtensionValidPeriodLength>1</ExtensionValidPeriodLength>
  <FirstSetYearOrMonth>1</FirstSetYearOrMonth>
  <FixedBalance>1</FixedBalance>
  <FlagEmpBalance>true</FlagEmpBalance>
  <GID>9290ec41-86b8-4d36-a229-ef536d9c6765</GID>
  <Gender>1</Gender>
  <GrantDate>1</GrantDate>
  <GroupCode>sample string 6</GroupCode>
  <LeaveBalanceType>1</LeaveBalanceType>
  <LeaveDayType>1</LeaveDayType>
  <LeaveTypeEmpRanges>
    <LeaveTypeEmpRangeInput>
      <Key>910ebba6-01fc-4b88-a636-06ebd4ec86ec</Key>
      <LeaveDefine_GID>745baa8c-6eea-4c36-9057-866b58e6f243</LeaveDefine_GID>
      <LeaveName>sample string 1</LeaveName>
      <Title>sample string 3</Title>
      <Type>sample string 2</Type>
    </LeaveTypeEmpRangeInput>
    <LeaveTypeEmpRangeInput>
      <Key>910ebba6-01fc-4b88-a636-06ebd4ec86ec</Key>
      <LeaveDefine_GID>745baa8c-6eea-4c36-9057-866b58e6f243</LeaveDefine_GID>
      <LeaveName>sample string 1</LeaveName>
      <Title>sample string 3</Title>
      <Type>sample string 2</Type>
    </LeaveTypeEmpRangeInput>
  </LeaveTypeEmpRanges>
  <LeaveWorkingAgeBalances>
    <LeaveWorkingAgeBalanceInput>
      <Balance>2</Balance>
      <EndYear>1</EndYear>
      <LeaveDefine_GID>af60f3c4-177f-4bf7-9280-f3633a8767cc</LeaveDefine_GID>
      <LeaveName>sample string 1</LeaveName>
      <StartYear>1</StartYear>
    </LeaveWorkingAgeBalanceInput>
    <LeaveWorkingAgeBalanceInput>
      <Balance>2</Balance>
      <EndYear>1</EndYear>
      <LeaveDefine_GID>af60f3c4-177f-4bf7-9280-f3633a8767cc</LeaveDefine_GID>
      <LeaveName>sample string 1</LeaveName>
      <StartYear>1</StartYear>
    </LeaveWorkingAgeBalanceInput>
  </LeaveWorkingAgeBalances>
  <LengthCalcType>NaturalDay</LengthCalcType>
  <Name>sample string 2</Name>
  <OneDayHours>1</OneDayHours>
  <RefWorkingyears>true</RefWorkingyears>
  <UnitType>sample string 3</UnitType>
  <ValidPeriod>1</ValidPeriod>
</LeaveDefineSettingInput>

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

Response Information

Resource Description

添加假期类型

string

Response Formats

application/json, text/json

Sample:
"sample string 1"

application/xml, text/xml

Sample:
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">sample string 1</string>