客層一覧取得
GET
/customer_groups
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/waiter/customer_groups';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/waiter/customer_groups \ --header 'Authorization: Bearer <token>'客層一覧を取得します
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”OK
Media typeapplication/json
Array<object>
CustomerGroup客層グループ情報
object
id
グループID
string
name
グループ名
string
items
Array<object>
CustomerGroupItem客層情報
object
id
客層ID
string
name
客層名
string
sortNo
並び順
integer
enabled
端末上での有効/無効設定
true: 有効false: 無効
boolean
Examples
Exampleレスポンス例
[ { "id": "1", "name": "性別", "items": [ { "id": "2", "name": "男", "sortNo": 1, "enabled": true }, { "id": "1", "name": "女", "sortNo": 2, "enabled": true }, { "id": "5", "name": "その他", "sortNo": 3, "enabled": false } ] }, { "id": "2", "name": "媒体", "items": [ { "id": "3", "name": "新聞", "sortNo": 1, "enabled": true }, { "id": "7", "name": "広告", "sortNo": 2, "enabled": true }, { "id": "4", "name": "CM", "sortNo": 3, "enabled": false } ] }]