従業員グループ取得
GET
/staff_groups
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/timecard/staff_groups?staff_group_code=1%2C2';const options = {method: 'GET', 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 GET \ --url 'https://api.smaregi.dev/TARGET-CONTRACT-ID/timecard/staff_groups?staff_group_code=1%2C2' \ --header 'Authorization: Bearer <token>'従業員グループを取得します
対象
- プラン
- スタンダード、旧無料
- プレミアム
- プレミアムプラス
- エンタープライズ、旧有料
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”staff_group_code
string
従業員グループコード(カンマ区切りで複数指定可)
Example
1,2Responses
Section titled “Responses”取得成功
Media typeapplication/json
Array<object>
object
staffGroupCode
従業員グループコード
string
staffGroupName
従業員グループ名
string
parentStaffGroupCode
親グループコード
string
staffCount
従業員数
string
hierarchy
ルートからの階層数
string
displaySequence
表示順
string
Example
[ { "staffGroupCode": "1", "staffGroupName": "本社", "parentStaffGroupCode": "", "staffCount": "15", "hierarchy": "1", "displaySequence": "1" }, { "staffGroupCode": "2", "staffGroupName": "営業部", "parentStaffGroupCode": "1", "staffCount": "8", "hierarchy": "2", "displaySequence": "2" }, { "staffGroupCode": "3", "staffGroupName": "開発部", "parentStaffGroupCode": "1", "staffCount": "12", "hierarchy": "2", "displaySequence": "3" }]