トッピンググループ一覧取得
GET
/topping_groups
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/waiter/topping_groups?limit=20&sort=id&page=1';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/topping_groups?limit=20&sort=id&page=1' \ --header 'Authorization: Bearer <token>'トッピンググループ一覧を取得します
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”limit
integer
取得件数
Example
20sort
string
ソート順
id: トッピンググループIDname: トッピンググループ名
Example
idpage
integer
ページ番号
Example
1Responses
Section titled “Responses”OK
Media typeapplication/json
Array<object>
ToppingGroupトッピンググループ
object
id
required
トッピンググループID
string
name
トッピンググループ名
string
createdIn
作成元サービス
string
rule
選択条件
null:条件なし
object
condition
条件
all: 全体category: カテゴリ毎
string
max
上限
integer
min
下限
integer
Examples
Exampleレスポンス例
[ { "id": "7", "name": "ハンバーグトッピング", "createdIn": "waiter", "rule": { "condition": "all", "max": 2, "min": 0 } }, { "id": "8", "name": "シチュートッピング", "createdIn": "waiter", "rule": null }]Headers
Section titled “Headers”Link
string
<前のURI>; rel="prev", <次のURI>; rel="next"
Bad Request
- リクエストパラメーターが不正
- 不正な値が指定された場合
Media typeapplication/json
object
title
required
string
type
required
string
status
integer
detail
string
Examplegenerated
{ "title": "example", "type": "example", "status": 1, "detail": "example"}