コンテンツにスキップ

カテゴリー一覧取得

GET
/categories
curl --request GET \
--url 'https://api.smaregi.dev/TARGET-CONTRACT-ID/waiter/categories?level=none&limit=20&sort=sort_no&page=1' \
--header 'Authorization: Bearer <token>'

カテゴリー一覧を取得します

level
string
default: none
Allowed values: 1 2 none

階層レベル

  • none: 指定なし
  • 1: 子カテゴリ以外
  • 2: 子カテゴリ
Example
none
limit
integer
default: 20 >= 1 <= 100

取得件数

Example
20
sort
string
default: sort_no

ソート順

  • sort_no: ソート番号
  • id: カテゴリーID
Example
sort_no
page
integer
default: 1 >= 1

ページ番号

Example
1

OK

Media typeapplication/json
Array<object>
Category

カテゴリー情報

object
id
required

カテゴリーID

string
name

カテゴリー名

string
abbr

略称

string
sortNo

ソート番号

integer
parentId

親カテゴリーID

string
nullable
createdIn

作成元サービス

string
nullable
Allowed values: waiter pos headquarters
Examples
Exampleレスポンス例
[
{
"id": "2",
"name": "デザート",
"abbr": "デザート",
"sortNo": 1,
"parentId": null,
"createdIn": "waiter"
},
{
"id": "3",
"name": "ドリンク",
"abbr": "ドリンク",
"sortNo": 2,
"parentId": null,
"createdIn": "waiter"
},
{
"id": "4",
"name": "コールドドリンク",
"abbr": "",
"sortNo": 3,
"parentId": "3",
"createdIn": "waiter"
},
{
"id": "5",
"name": "ホットドリンク",
"abbr": "",
"sortNo": 4,
"parentId": "3",
"createdIn": "waiter"
},
{
"id": "12",
"name": "季節の彩ケーキ特集",
"abbr": "季節ケーキ",
"sortNo": 5,
"parentId": "2",
"createdIn": "waiter"
}
]
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"
}