店舗商品価格一覧取得
GET
/stores/{store_id}/product_prices
const url = 'https://api.smaregi.dev/TARGET-CONTRACT-ID/pos/stores/example/product_prices?price_division=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/pos/stores/example/product_prices?price_division=1' \ --header 'Authorization: Bearer <token>'指定した店舗の商品価格情報一覧を取得します。
対象プラン
- スタンダード
- プレミアム
- プレミアムプラス
- フードビジネス
- リテールビジネス
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”store_id
required
string
店舗ID
※ ユーザーアクセストークンを利用する場合、ユーザーの所属する店舗IDを指定してください。
Query Parameters
Section titled “Query Parameters”fields
array
検索パラメータ(カンマ区切りで指定可)
Response項目を指定可能
※一部項目(withで指定する項目、2階層目以降の項目)については指定不可
sort
string
並び順(カンマ区切りで指定可)
指定可能なパラメータ
productId:商品IDstartDate:適用開始日
limit
integer
上限数
page
integer
ページ
price_division
string
価格区分 (1:商品単価、2:会員価格)
target_date
string format: date
対象日:指定した場合、対象日時点で有効な商品価格を取得します。 [YYYY-MM-DD]
upd_date_time-from
string format: date-time
更新日時(From):登録時・更新時の日時。[YYYY-MM-DDThh:mm:ssTZD]
※ From〜Toの期間は最大31日までの指定でご利用ください
upd_date_time-to
string format: date-time
更新日時(To):登録時・更新時の日時。[YYYY-MM-DDThh:mm:ssTZD]
※ From〜Toの期間は最大31日までの指定でご利用ください
Responses
Section titled “Responses”取得成功
Media typeapplication/json
Array<object>
object
productId
商品ID:数字15桁以内。
string
storeId
店舗ID:数字9桁以内。全店の場合「-1」を設定
string
priceDivision
価格区分
1:商品単価2:会員価格
string
startDate
適用開始日:[YYYY-MM-DD]
string format: date
endDate
適用終了日:[YYYY-MM-DD]
適用終了日が設定されていない場合はnull
string format: date
price
商品単価:数字8桁以内。
string
updDateTime
更新日時:登録時・更新時の日時。[YYYY-MM-DDThh:mm:ssTZD]
string format: date-time
Example
[ { "productId": "string", "storeId": "string", "priceDivision": "1", "startDate": "2000-01-23", "endDate": "2000-01-23", "price": "string", "updDateTime": "2000-01-23T01:23:45+09:00" }]- 指定された店舗IDが存在しない場合
Media typeapplication/json
object
type
required
string
title
required
string
detail
string
status
integer
Examples
Exampleリソースが存在しない場合
{ "type": "about:blank", "title": "NotFound", "detail": "指定されたIDのリソースが見つかりません", "status": 404}