勤怠削除
DELETE
/shifts/{shift_result_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/timecard/shifts/1';const options = { method: 'DELETE', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"division":"result"}'};
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/shifts/1 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "division": "result" }'勤怠を削除します
対象
- プラン
- プレミアム
- プレミアムプラス
- エンタープライズ、旧有料
対象ユーザー権限
- シフト編集
- 実績編集
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”shift_result_id
required
string
シフト実績ID
Example
1Request Body
Section titled “Request Body”Media typeapplication/json
object
division
required
シフト/実績区分
schedule: シフトresult: 実績
string
Example
{ "division": "result"}Responses
Section titled “Responses”削除成功
Media typeapplication/json
object
shiftResultId
シフト実績ID
string
division
シフト/実績区分
schedule: シフトresult: 実績
string
Example
{ "shiftResultId": "1", "division": "result"}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:9999"}勤怠が締められているため、勤怠を削除できない場合
Media typeapplication/json
object
type
エラータイプを識別するURI、もしくはabout:blank
string
title
エラーの概要
string
detail
エラーの詳細
string
Example
{ "type": "about:blank", "title": "Conflict", "detail": "勤怠が締められているため、勤怠を削除できません。"}