文档中心 > API类目 > 属性类型API

dsc.goodstype.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

请求�数

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

�应�数

�称 类型 示例值 �述
cat_id Number 属性类型ID
user_id Number 商家ID
cat_name String 属性类型�称
enabled Number 默认值 1
attr_group Text 分组

请求示例

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

�应示例

  • XML
  • JSON
<dsc>
<info>
<cat_id>1</cat_id>
<user_id>0</user_id>
<cat_name>教育音�</cat_name>
<enabled>1</enabled>
<attr_group></attr_group>
</info>
</dsc>
{
"info": {
"cat_id": "1",
"user_id": "0",
"cat_name": "教育音�",
"enabled": "1",
"attr_group": "",
}
}

异常示例

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

错误�解释

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

0:�功获�数�

1:数�为空值

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

返回
顶部