スタッフ別予算更新
PATCH
/budget/{store_id}/{year}/{month}/staffs/{staff_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/budget/example/example/example/staffs/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"salesTargetStaff":"123456789012345"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/budget/example/example/example/staffs/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "salesTargetStaff": "123456789012345" }'スタッフ別予算情報を更新します。
対象プラン
- スタンダード
- プレミアム
- プレミアムプラス
- フードビジネス
- リテールビジネス
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”store_id
required
string
店舗ID
year
required
string
予算年(YYYY)
month
required
string
予算月(MM)
staff_id
required
string
スタッフID
※ ユーザーアクセストークンを利用する場合、ユーザーの所属する店舗のスタッフIDを指定してください。
Request Body
Section titled “Request Body”Media typeapplication/json
object
salesTargetStaff
required
スタッフ別の予算金額
スタッフ別の予算金額。(最大15桁)
string format: int
Example
{ "salesTargetStaff": "123456789012345"}Responses
Section titled “Responses”更新成功
Media typeapplication/json
object
storeId
店舗ID
string
ym
予算年月。(YYYYMM形式)
string
staffId
スタッフID
string
salesTargetStaff
スタッフ別の予算金額。(最大15桁)
string
insDateTime
登録時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string
updDateTime
登録時・更新時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string
Example
{ "storeId": "string", "ym": "string", "staffId": "string", "salesTargetStaff": "string", "insDateTime": "string", "updDateTime": "string"}- 指定された店舗が休止している場合
- 指定されたスタッフが見つからない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{ "type": "about:blank", "title": "Bad Request", "detail": "[storeId] 指定された店舗は休止中です", "status": 400}{ "type": "about:blank", "title": "Bad Request", "detail": "[staffId] 指定されたスタッフが見つかりません", "status": 400}- 暦にない年月の場合
- 指定した店舗ID・年月・スタッフの予算が存在しない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{ "type": "about:blank", "title": "NotFound", "detail": "指定された年月は無効です", "status": 404}{ "type": "about:blank", "title": "NotFound", "detail": "指定されたIDと年月とスタッフのリソースが見つかりません", "status": 404}