文档中心 > API类目 > 商�货�API

dsc.product.area.info.get (获���商�地区货�信�API)�地区模�】

获���货�信�API,获�货�相关信�。

公共�数

请求地�:
环境 HTTP请求地� HTTPS请求地�
正�环境 http://www.xxx.com/api.php https://www.xxx.com/api.php
公共请求�数:
�称 类型 是�必须 �述
method String 是 API接��称
app_key String 是 API接�AppKey

请求�数

�称 类型 是�必须 示例值 更多�制 �述
product_id Number �选 (唯一性) 货�ID
product_sn Number �选 (唯一性) 货�编�
(建议�[goods_id]�数一起使用)
goods_id Number �选 (�唯一性) 商�ID
(�能�独使用)
area_id Number �选 (�唯一性) 仓库地区ID
(�能�独使用,获�仓库 dsc.warehouse.info.get 的region_id值)
format type 必须 json json或xml 接�类型

�应�数

�称 类型 示例值 �述
product_id Number 货�ID
goods_id Number 商�ID
goods_attr String 519|528 属性ID�称(ID值拼接格�:519|528)
product_sn String 货�编�
bar_code String 货��形�
product_number Number 货�库存
product_price float 货�价格
product_promote_price float 货�促销价
product_market_price float 货�市场价格
product_warn_number Number 货�警告库存
area_id Number 地区ID(对应仓库地区API:region_id,region_type 值为 1)

请求示例

  • PHP
$url="http(s)://www.xxx.com/api.php?app_key=A788F457-1A7D-4CC7-ABA0-BFE212BCCD9A&method=dsc.product.area.info.get&product_sn=154HP0001&format=xml"
$Http = new Http();
$Http->doGet($url);

�应示例

  • XML
  • JSON
<dsc>
<info>
<product_id>1</product_id>
<goods_id>154</goods_id>
<goods_attr>519|528</goods_attr>
<product_sn>154HP0001</product_sn>
<bar_code>154BAR0001</bar_code>
<product_number>999</product_number>
<product_price>167.54</product_price>
<product_promote_price>146.2</product_promote_price>
<product_market_price>300</product_market_price>
<product_warn_number>20</product_warn_number>
<area_id>411</area_id>
</info>
</dsc>
{
"info": {
"product_id": "1",
"goods_id": "154",
"goods_attr": "519|528",
"product_sn": "154HP0001",
"bar_code": "154BAR0001",
"product_number": "999",
"product_price": "167.54",
"product_promote_price": "146.2",
"product_market_price": "300",
"product_warn_number": "20",
"area_id": "411",
}
}

异常示例

  • XML
  • JSON
<dsc>
<result>success</result>
<error>0</error>
<msg>�功获�数�</msg>
</dsc>
{
"result": "success",
"error": 0,
"msg": "�功获�数�",
}

错误�解释

错误� 错误�述 解决方案
error 返回值

0:�功获�数�

1:数�为空值

2:�件为空或�数�存在

返回
顶部