- 授权
- 商品
- 地址
- 价格
- 库存
- 订单
- 售后
- 物流
- 发票
- 类目
- 员工
6.1 获取商品价格
GET
/api/v2/product/getprice
Product
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Query 参数
product_ids
string
商品标志集合
示例值:
["P0000002551", "P0000002554", "P0000002883", "P0000002893", "P0000002898"]
Header 参数
channel
string
可选
默认值:
benlai
shopId
string
商城id
默认值:
123
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://open-agent-branch.benlai.com/api/v2/product/getprice?product_ids=["P0000002551", "P0000002554", "P0000002883", "P0000002893", "P0000002898"]' \
--header 'channel: benlai' \
--header 'shopId: 123'
返回响应
🟢200成功
text/plain
Body
price_list
array[object (Benlai.Open.Models.Product.ProductPriceDto) {6}]
价格列表
product_id
string
商品编号
price
number <double>
协议含税价
tax
integer <int32>
协议税率
tax_code
string
税务编码
market_Price
number <double>
市场价
basic_price
number <double>
建议零售价
示例
{
"code": 0,
"msg": "success",
"value": {
"price_list": [
{
"product_id": "P0000001739",
"price": 41.8,
"tax": 0,
"market_Price": 47.8,
"basic_price": 47.8
},
{
"product_id": "P0000001626",
"price": 14.8,
"tax": 3,
"market_Price": 15.8,
"basic_price": 15.8
},
{
"product_id": "P0000016208",
"price": 60,
"tax": 17,
"market_Price": 80,
"basic_price": 80
}
]
}
}