トッピングの販売状態・残数一覧取得
GET
/topping_conditions/stores/{store_id}
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/waiter/topping_conditions/stores/1?topping_ids=11%2C12%2C13&category_id=1&updated_from=2023-10-01T00%3A00%3A00%2B09%3A00&limit=20&sort=topping_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_conditions/stores/1?topping_ids=11%2C12%2C13&category_id=1&updated_from=2023-10-01T00%3A00%3A00%2B09%3A00&limit=20&sort=topping_id&page=1' \ --header 'Authorization: Bearer <token>'店舗で取り扱うトッピングの販売状態・残数一覧を取得します。
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”store_id
required
string
店舗ID
Example
1Query Parameters
Section titled “Query Parameters”topping_ids
Array<string>
トッピングID
カンマ区切りで複数のパラメータを指定できます。
Example
?topping_ids=11,12,13category_id
string
カテゴリーID
Example
1updated_from
string format: date-time
更新日時(RFC3339の日付形式)[YYYY-MM-DDThh:mm:ssTZD]
指定日時以降に販売状態・残数が更新されたトッピングを取得します。
Example
2023-10-01T00:00:00+09:00limit
integer
取得件数
Example
20sort
string
ソート順
topping_id: トッピングIDcategory_id: カテゴリーID
Example
topping_idpage
integer
ページ番号
Example
1Responses
Section titled “Responses”OK
Media typeapplication/json
Array
ToppingConditionobject
toppingId
トッピングID
string
condition
販売状態
orderable: 販売可soldout: 売切
string
quantity
残数
integer
Examples
Exampleレスポンス例
[ { "toppingId": "1", "condition": "orderable", "quantity": 3 }, { "toppingId": "2", "condition": "orderable", "quantity": null }, { "toppingId": "3", "condition": "soldout", "quantity": 0 }, { "toppingId": "4", "condition": "soldout", "quantity": 2 }]Headers
Section titled “Headers”Link
string
<前のURI>; rel="prev", <次のURI>; rel="next"
店舗が休止中の場合
Media typeapplication/json
object
title
required
string
type
required
string
status
integer
detail
string
Examplegenerated
{ "title": "example", "type": "example", "status": 1, "detail": "example"}指定した店舗が存在しない場合
Media typeapplication/json
object
title
required
string
type
required
string
status
integer
detail
string
Examplegenerated
{ "title": "example", "type": "example", "status": 1, "detail": "example"}