スタッフ別予算登録
POST
/budget/{store_id}/{year}/{month}/staffs
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/budget/example/example/example/staffs';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"staffId":"string","salesTargetStaff":"123456789012345"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/budget/example/example/example/staffs \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "staffId": "string", "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)
Request Body
Section titled “Request Body”Media typeapplication/json
object
staffId
required
スタッフID
予算登録するスタッフID
※ ユーザーアクセストークンを利用する場合、ユーザーの所属する店舗のスタッフIDを指定してください。
string
salesTargetStaff
required
スタッフ別の予算金額
スタッフ別の予算金額。(最大15桁)
string format: int
Example
{ "staffId": "string", "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"}- 年月が2011年より前のものである場合
- 指定された店舗が休止している場合
- 指定されたスタッフが見つからない場合
- 既に存在するレコードの場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
{ "type": "about:blank", "title": "Bad Request", "detail": "2011年1月より前のデータは登録できません。", "status": 400}{ "type": "about:blank", "title": "Bad Request", "detail": "[storeId] 指定された店舗は休止中です", "status": 400}{ "type": "about:blank", "title": "Bad Request", "detail": "[staffId] 指定されたスタッフが見つかりません", "status": 400}{ "type": "about:blank", "title": "Bad Request", "detail": "storeId:1, ym:202007, staffId:100 指定されたレコードは登録済みです", "status": 400}- 暦にない年月の場合
- 指定された店舗が見つからない場合
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": "Bad Request", "detail": "[storeId] 指定された店舗が見つかりません", "status": 404}