日報更新
PUT
/daily_reports/{shift_result_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/timecard/daily_reports/567';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"report":"作業報告: 営業6件","dailyReportTagList":[{"dailyReportTagId":"1","time":"1.25"},{"dailyReportTagId":"5","time":"6.75"}]}'};
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/daily_reports/567 \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "report": "作業報告: 営業6件", "dailyReportTagList": [ { "dailyReportTagId": "1", "time": "1.25" }, { "dailyReportTagId": "5", "time": "6.75" } ] }'日報を更新します。
対象
- プラン
- エンタープライズ、旧有料
- オプション
- 日報
対象ユーザー権限
- 日報管理編集
- ユーザーアクセストークンを使用してログインユーザー自身の実績における日報を更新する場合、権限は不要
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”shift_result_id
required
string
シフト実績ID
Example
567Request Body
Section titled “Request Body”Media typeapplication/json
object
report
報告内容
string
dailyReportTagList
日報タグリスト
Array<object>
object
dailyReportTagId
日報タグID
string
time
労働時間(時間) ※小数第2位以下切り捨て
string
Example
{ "report": "作業報告: 営業6件", "dailyReportTagList": [ { "dailyReportTagId": "1", "time": "1.25" }, { "dailyReportTagId": "5", "time": "6.75" } ]}Responses
Section titled “Responses”更新成功
Media typeapplication/json
object
dailyReportId
日報ID
string
report
報告書
string
staffId
従業員ID
string
shiftResultId
シフト実績ID
string
dutyHour
勤務時間(小数)(時間)
string
dailyReportTagList
日報タグリスト
Array<object>
object
dailyReportTagId
日報タグID
string
name
日報タグ名
string
tagHour
日報タグ労働時間(小数)(時間)
string
color
カラー
string
Example
{ "dailyReportId": "1234", "report": "作業報告: 営業6件", "staffId": "567", "shiftResultId": "890", "dutyHour": "8.00", "dailyReportTagList": [ { "dailyReportTagId": "1", "name": "ミーティング", "tagHour": "1.25", "color": "#FF6B6B" }, { "dailyReportTagId": "5", "name": "外回り", "tagHour": "6.75", "color": "#45B7D1" } ]}- リクエストの形式が不正な場合
- 日報タグの合計時間が実績を上回っている場合
- 更新に失敗した場合
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に該当するデータが存在しません ID: 1888"}