dsc.goods.gallery.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

请求�数

�称 类型 是�必须 示例值 更多�制 �述
img_id Number �选 (唯一性) 商�相册ID
format type 必须 json json或xml 接�类型

�应�数

�称 类型 示例值 �述
img_id Number 相册ID
goods_id Number 商�ID
img_url String 相册图片
img_desc Number 相册排�
thumb_url String 相册图片缩略图
img_original String 相册图片原图
external_url String 相册外链地�

请求示例

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

�应示例

  • XML
  • JSON
<dsc>
<info>
<img_id>1</img_id>
<goods_id>2</goods_id>
<img_url>images/201407/goods_img/1_P_1404770700378.jpg</img_url>
<img_desc>0</img_desc>
<thumb_url>images/201407/thumb_img/1_thumb_P_1404770700713.jpg</thumb_url>
<img_original>images/201407/source_img/1_P_1404770700644.jpg</img_original>
</info>
</dsc>
{
"info": {
"img_id": "1",
"goods_id": "2",
"img_url": "images/201407/goods_img/1_P_1404770700378.jpg",
"img_desc": "0",
"thumb_url": "images/201407/thumb_img/1_thumb_P_1404770700713.jpg",
"img_original": "images/201407/source_img/1_P_1404770700644.jpg",
}
}

异常示例

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

错误�解释

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

0:�功获�数�

1:数�为空值

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

返回
顶部