価格ルール設定
店舗別価格ルール検索
概要
基本情報
- リクエストパス:
GET /setting/price_store_rules
- スコープ:
setting:price_store_rule:index
- 店舗IDの指定:
必要なし
- 基本制限レート:
5 rps
query
| key |
説明 |
制約など |
| ids |
ルールID |
整数のみ、カンマ区切りで複数指定可能 |
| subject_type |
対象種別 |
product、category、all のいずれか |
| subject_ids |
対象ID |
整数のみ、カンマ区切りで複数指定可能(商品IDまたはカテゴリID) |
| created_at_from |
作成日から |
2024-04-12 12:08:38 形式 |
| created_at_to |
作成日まで |
同上 |
| updated_at_from |
更新日から |
同上 |
| updated_at_to |
更新日まで |
同上 |
| page |
ページ |
整数のみ、デフォルト:1 |
| limit |
1ページあたりの件数 |
整数のみ、デフォルト:50、最大: 250 |
例
GET /setting/price_store_rules?subject_type=product&subject_ids=1,2&page=1&limit=50
[
{
"id": 1,
"store": {
"id": 1,
"name": "本店"
},
"subject_type": "product",
"subject_id": 1,
"settings": [],
"image_urls": ["https://example.com/image.jpg"],
"note": "メモ",
"created_staff": { "id": 1, "name": "山田太郎" },
"updated_staff": { "id": 2, "name": "佐藤花子" },
"created_at": 1708054490,
"updated_at": 1708054490
}
]
| key |
type |
説明 |
| *.id |
int |
ルールID |
| *.store |
object |
店舗 |
| *.store.id |
int |
店舗ID |
| *.store.name |
string |
店舗名 |
| *.subject_type |
string |
対象種別(product、category、all) |
| *.subject_id |
int | null |
対象ID(all の場合は null) |
| *.settings |
array<settingSchema> |
設定 |
| *.image_urls |
array<string> |
画像URL |
| *.note |
string | null |
メモ |
| *.created_staff |
object | null |
作成スタッフ |
| *.created_staff.id |
int |
作成スタッフID |
| *.created_staff.name |
string |
作成スタッフ名 |
| *.updated_staff |
object | null |
更新スタッフ |
| *.updated_staff.id |
int |
更新スタッフID |
| *.updated_staff.name |
string |
更新スタッフ名 |
| *.created_at |
int | null |
作成日 |
| *.updated_at |
int | null |
更新日 |
店舗別価格ルール更新
概要
基本情報
- リクエストパス:
PUT /setting/price_store_rules
- スコープ:
setting:price_store_rule:update
- 店舗IDの指定:
必要なし
- 基本制限レート:
2 rps
body
| key |
type |
説明 |
| * |
array<object> |
- |
| *.action |
string |
CREATE、UPDATE、DELETE のいずれか |
| *.id |
?int |
ルールID。UPDATE、DELETE 時は必須 |
| *.subject_type |
?string |
対象種別。CREATE 時は必須。product、category、all のいずれか |
| *.subject_id |
?int | null |
対象ID。subject_type が product/category の場合は必須、all は指定不可 |
| *.image_urls |
?array<string> | null |
画像URL |
| *.note |
?string | null |
メモ |
| *.settings |
?array<settingUpdateSchema> |
設定。CREATE 時は必須 |
例
PUT /setting/price_store_rules
[
{
"action": "CREATE",
"subject_type": "product",
"subject_id": 1,
"image_urls": ["https://example.com/image.jpg"],
"note": "メモ",
"settings": [
{
"target": { "grade_ids": [1] },
"buy_price": { "mode": "FIXED", "value": 1000, "mall_ids": [] },
"sell_price": { "mode": "FIXED", "value": 2000, "mall_ids": [] }
}
]
},
{ "action": "UPDATE", "id": 10, "note": "更新", "settings": [] },
{ "action": "DELETE", "id": 11 }
]
本部価格ルール検索
概要
基本情報
- リクエストパス:
GET /setting/price_company_rules
- スコープ:
setting:price_company_rule:index
- 店舗IDの指定:
必要なし
- 基本制限レート:
5 rps
query
| key |
説明 |
制約など |
| ids |
ルールID |
整数のみ、カンマ区切りで複数指定可能 |
| subject_type |
対象種別 |
product、category、all のいずれか |
| subject_ids |
対象ID |
整数のみ、カンマ区切りで複数指定可能(商品IDまたはカテゴリID) |
| created_at_from |
作成日から |
2024-04-12 12:08:38 形式 |
| created_at_to |
作成日まで |
同上 |
| updated_at_from |
更新日から |
同上 |
| updated_at_to |
更新日まで |
同上 |
| page |
ページ |
整数のみ、デフォルト:1 |
| limit |
1ページあたりの件数 |
整数のみ、デフォルト:50、最大: 250 |
例
GET /setting/price_company_rules?subject_type=product&subject_ids=1,2&page=1&limit=50
[
{
"id": 1,
"subject_type": "product",
"subject_id": 1,
"settings": [],
"image_urls": ["https://example.com/image.jpg"],
"note": "メモ",
"created_staff": { "id": 1, "name": "山田太郎" },
"updated_staff": { "id": 2, "name": "佐藤花子" },
"created_at": 1708054490,
"updated_at": 1708054490
}
]
| key |
type |
説明 |
| *.id |
int |
ルールID |
| *.subject_type |
string |
対象種別(product、category、all) |
| *.subject_id |
int | null |
対象ID(all の場合は null) |
| *.settings |
array<settingSchema> |
設定 |
| *.image_urls |
array<string> |
画像URL |
| *.note |
string | null |
メモ |
| *.created_staff |
object | null |
作成スタッフ |
| *.created_staff.id |
int |
作成スタッフID |
| *.created_staff.name |
string |
作成スタッフ名 |
| *.updated_staff |
object | null |
更新スタッフ |
| *.updated_staff.id |
int |
更新スタッフID |
| *.updated_staff.name |
string |
更新スタッフ名 |
| *.created_at |
int | null |
作成日 |
| *.updated_at |
int | null |
更新日 |
本部価格ルール更新
概要
基本情報
- リクエストパス:
PUT /setting/price_company_rules
- スコープ:
setting:price_company_rule:update
- 店舗IDの指定:
必要なし
- 基本制限レート:
2 rps
body
| key |
type |
説明 |
| * |
array<object> |
- |
| *.action |
string |
CREATE、UPDATE、DELETE のいずれか |
| *.id |
?int |
ルールID。UPDATE、DELETE 時は必須 |
| *.subject_type |
?string |
対象種別。CREATE 時は必須。product、category、all のいずれか |
| *.subject_id |
?int | null |
対象ID。subject_type が product/category の場合は必須、all は指定不可 |
| *.image_urls |
?array<string> | null |
画像URL |
| *.note |
?string | null |
メモ |
| *.settings |
?array<settingUpdateSchema> |
設定。CREATE 時は必須 |
例
PUT /setting/price_company_rules
[
{
"action": "CREATE",
"subject_type": "category",
"subject_id": 1,
"settings": [
{
"target": { "grade_ids": [1] },
"buy_price": { "mode": "FIXED", "value": 1000, "mall_ids": [] },
"sell_price": { "mode": "FIXED", "value": 2000, "mall_ids": [] }
}
]
},
{ "action": "UPDATE", "id": 10, "settings": [] },
{ "action": "DELETE", "id": 11 }
]
本部商品価格ルール検索 [廃止予定]
概要
- 本部の商品価格ルールを検索する
- ⚠️ このエンドポイントは非推奨です。 内部的には
subject_type=product で絞り込んだ GET /setting/price_company_rules と同等です。
基本情報
- リクエストパス:
GET /setting/price_product_company_rules
- スコープ:
setting:price_product_company_rule:index
- 店舗IDの指定:
必要なし
- 基本制限レート:
5 rps
query
| key |
説明 |
制約など |
| ids |
ルールID |
整数のみ、カンマ区切りで複数指定可能 |
| product_ids |
商品ID |
整数のみ、カンマ区切りで複数指定可能 |
| created_at_from |
作成日から |
2024-04-12 12:08:38 形式 |
| created_at_to |
作成日まで |
同上 |
| updated_at_from |
更新日から |
同上 |
| updated_at_to |
更新日まで |
同上 |
| page |
ページ |
整数のみ、デフォルト:1 |
| limit |
1ページあたりの件数 |
整数のみ、デフォルト:50、最大: 250 |
例
GET /setting/price_product_company_rules?product_ids=1,2&page=1&limit=50
[
{
"id": 1,
"product_id": 1,
"settings": [],
"image_urls": ["https://example.com/image.jpg"],
"note": "メモ",
"created_at": 1708054490,
"updated_at": 1708054490
}
]
| key |
type |
説明 |
| *.id |
int |
ルールID |
| *.product_id |
int |
商品ID |
| *.settings |
array<settingSchema> |
設定 |
| *.image_urls |
array<string> |
画像URL |
| *.note |
string | null |
メモ |
| *.created_at |
int | null |
作成日 |
| *.updated_at |
int | null |
更新日 |
settingSchema
各検索(GET)レスポンスで共通の設定オブジェクト
{
"target": { "grade_ids": [1, 2] },
"buy_price": { "mode": "FIXED", "value": 1000, "mall_ids": null },
"sell_price": { "mode": "FIXED", "value": 2000, "mall_ids": null }
}
| key |
type |
説明 |
| target |
?object | null |
対象条件 |
| target.grade_ids |
?array<int> | null |
対象グレードID一覧 |
| buy_price |
?object | null |
買取価格設定 |
| buy_price.mode |
?string | null |
価格モード |
| buy_price.value |
?int | null |
価格値 |
| buy_price.mall_ids |
?array<string> | null |
対象モールID一覧 |
| sell_price |
?object | null |
販売価格設定 |
| sell_price.mode |
?string | null |
価格モード |
| sell_price.value |
?int | null |
価格値 |
| sell_price.mall_ids |
?array<string> | null |
対象モールID一覧 |
settingUpdateSchema
各更新(PUT)リクエストで共通の設定オブジェクト。
{
"target": { "grade_ids": [1, 2] },
"buy_price": { "mode": "FIXED", "value": 1000, "mall_ids": [] },
"sell_price": { "mode": "FIXED", "value": 2000, "mall_ids": [] }
}
| key |
type |
説明 |
| target |
?object | null |
対象条件 |
| target.grade_ids |
?array<int> | null |
対象グレードID一覧 |
| buy_price |
?object | null |
買取価格設定 |
| buy_price.mode |
string |
価格モード。buy_price 指定時は必須。FIXED、BUY_MALL_LOWEST_PER、SELL_MALL_LOWEST_PER のいずれか |
| buy_price.value |
int |
価格値。buy_price 指定時は必須 |
| buy_price.mall_ids |
?array<string> | null |
対象モールID一覧 |
| sell_price |
?object | null |
販売価格設定 |
| sell_price.mode |
string |
価格モード。sell_price 指定時は必須。FIXED、BUY_MALL_LOWEST_PER、SELL_MALL_LOWEST_PER のいずれか |
| sell_price.value |
int |
価格値。sell_price 指定時は必須 |
| sell_price.mall_ids |
?array<string> | null |
対象モールID一覧 |