従業員休暇更新
PUT
/staff/holidays/{staff_holiday_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/timecard/staff/holidays/1';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"halfDayFlag":"0","paidHolidayFlag":"1","absenceFlag":"0","treatAsAttendanceFlag":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.smaregi.dev/TARGET-CONTRACT-ID/timecard/staff/holidays/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "halfDayFlag": "0", "paidHolidayFlag": "1", "absenceFlag": "0", "treatAsAttendanceFlag": 1 }'従業員休暇を更新します
対象
- プラン
- プレミアム
- プレミアムプラス
- エンタープライズ、旧有料
対象ユーザー権限
- 休暇管理編集
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”staff_holiday_id
required
string
従業員休暇ID
Example
1Request Body
Section titled “Request Body”Media typeapplication/json
object
halfDayFlag
半休
半日の休暇を設定できるようにするかどうか
0: しない1: する
string
paidHolidayFlag
有給取得
有給を取得するかどうか
0: しない1: する
string
absenceFlag
欠勤扱い
欠勤扱いとするかどうか
0: しない1: する
string
treatAsAttendanceFlag
出勤扱い
有給自動付与時の出勤率の算定において出勤扱いとするかどうか
0: しない1: する
integer
Example
{ "halfDayFlag": "0", "paidHolidayFlag": "1", "absenceFlag": "0", "treatAsAttendanceFlag": 1}Responses
Section titled “Responses”更新成功
Media typeapplication/json
object
staffHolidayId
従業員休暇ID
string
memo
メモ
string
paidHolidayFlag
有給取得
有給を取得するかどうか
0: しない1: する
string
absenceFlag
欠勤扱い
欠勤扱いとするかどうか
0: しない1: する
string
halfDayFlag
半休
半日の休暇を設定できるようにするかどうか
0: しない1: する
string
treatAsAttendanceFlag
出勤扱い
有給自動付与時の出勤率の算定において出勤扱いとするかどうか
0: しない1: する
integer
Example
{ "staffHolidayId": "1", "memo": "体調不良による有給取得", "paidHolidayFlag": "1", "absenceFlag": "0", "halfDayFlag": "0", "treatAsAttendanceFlag": 1}- 登録に失敗した場合
- パラメータが不正な場合
Media typeapplication/json
object
type
エラータイプを識別するURI、もしくはabout:blank
string
title
エラーの概要
string
detail
エラーの詳細
string
Example
{ "type": "about:blank", "title": "Bad Request", "detail": "有給は0もしくは1で入力してください。"}- 指定したIDのデータが存在しない場合
Media typeapplication/json
object
type
エラータイプを識別するURI、もしくはabout:blank
string
title
エラーの概要
string
detail
エラーの詳細
string
Example
{ "type": "about:blank", "title": "Not Found", "detail": "データが確認できませんでした。従業員有給ID: 9999"}勤怠が締められているため、従業員休暇を更新できない場合
Media typeapplication/json
object
type
エラータイプを識別するURI、もしくはabout:blank
string
title
エラーの概要
string
detail
エラーの詳細
string
Example
{ "type": "about:blank", "title": "Conflict", "detail": "勤怠が締められているため、従業員休暇を更新できません。"}