従業員休暇削除
DELETE
/staff/holidays/{staff_holiday_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/timecard/staff/holidays/1';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.smaregi.dev/TARGET-CONTRACT-ID/timecard/staff/holidays/1 \ --header 'Authorization: Bearer <token>'従業員休暇を削除します
対象
- プラン
- プレミアム
- プレミアムプラス
- エンタープライズ、旧有料
対象ユーザー権限
- 休暇管理編集
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”staff_holiday_id
required
string
従業員休暇ID
Example
1Responses
Section titled “Responses”削除成功
Media typeapplication/json
object
staffHolidayId
従業員休暇ID
string
Example
{ "staffHolidayId": "1"}- 削除に失敗した場合
Media typeapplication/json
object
type
エラータイプを識別するURI、もしくはabout:blank
string
title
エラーの概要
string
detail
エラーの詳細
string
Example
{ "type": "about:blank", "title": "Bad Request", "detail": "休暇を削除できませんでした。"}- 指定したIDのデータが存在しない場合
Media typeapplication/json
object
type
エラータイプを識別するURI、もしくはabout:blank
string
title
エラーの概要
string
detail
エラーの詳細
string
Example
{ "type": "about:blank", "title": "Not Found", "detail": "データが確認できませんでした。スタッフ休暇ID: 999"}勤怠が締められているため、従業員休暇を削除できない場合
Media typeapplication/json
object
type
エラータイプを識別するURI、もしくはabout:blank
string
title
エラーの概要
string
detail
エラーの詳細
string
Example
{ "type": "about:blank", "title": "Conflict", "detail": "勤怠が締められているため、従業員休暇を削除できません。"}