深度解析速卖通问答信息API(aliexpress.item_question_answer_info)返回值

速卖通(AliExpress)是一个全球性的在线B2C电商平台,为卖家和买家提供了一个交易的平台。其中,速卖通提供了多种API接口供开发者使用,以实现与平台的数据交互。aliexpress.item_question_answer_info API 通常用于获取商品的问答信息。

以下是对 aliexpress.item_question_answer_info API 返回值的一个深度解析:

返回值概述

当你调用 aliexpress.item_question_answer_info API 并成功获取响应后,通常会得到一个包含商品问答信息的JSON结构。这个JSON结构可能包含多个字段,每个字段都提供了与问答相关的不同数据。

返回值字段详解

以下是一些可能的返回值字段及其含义:

  1. request_id:请求的唯一标识符,用于追踪和调试。

  2. success:表示请求是否成功的布尔值。

  3. error_code 和 error_msg:如果请求失败,这两个字段将包含错误代码和详细的错误消息。

  4. question_list:一个包含多个问答对的列表。每个问答对可能包含以下字段:

    • question_id:问题的唯一标识符。
    • question_content:问题的内容。
    • question_time:问题的提问时间。
    • answer_list:一个包含多个回答的列表。每个回答可能包含以下字段:
      • answer_id:回答的唯一标识符。
      • answer_content:回答的内容。
      • answer_time:回答的时间。
      • answer_user_id:回答者的用户ID(如果可用)。
      • is_helpful:一个表示回答是否有用的布尔值或投票数(取决于API的实现)。
    • is_verified:一个表示问题或回答是否经过验证的布尔值(取决于API的实现)。
    • other_fields:其他可能存在的字段,具体取决于API的版本和实现。
  5. total_count:问题或问答对的总数(取决于API的实现和请求的参数)。

  6. page_info:如果API支持分页,这个字段可能包含有关当前页、总页数、每页项目数等信息。

aliexpress.item_question_answer_info

公共参数

请求地址: 

名称类型必须描述
keyString调用key(必须以GET方式拼接在URL中)
secretString调用密钥
api_nameStringAPI接口名称(包括在请求地址中)[item_search,item_get,item_search_shop等]
cacheString[yes,no]默认yes,将调用缓存的数据,速度比较快
result_typeString[json,jsonu,xml,serialize,var_export]返回数据格式,默认为json,jsonu输出的内容中文可以直接阅读
langString[cn,en,ru]翻译语言,默认cn简体中文
versionStringAPI版本

请求参数

请求参数:url=https://ja.aliexpress.com/&country=JP¤cy=USD&lang=ja_JP&page=1&num_iid=1005005958833204

参数说明:num_iid:aliexpress商品ID
country:地区(地区和域名必须对应)
currency:货币
lang:语言
page:页码
url:域名

响应参数

Version: Date:2024-05-07

名称类型必须示例值描述

item

Mix1获得商品问答信息

响应示例


			"alsoAsk": 0,
			"answers": [
				{
					"cnty": "US",
					"content": "Some popular elements of it include a solid pattern and a platform fashion element.",
					"contentLang": "",
					"gmtCreate": 1710384637000,
					"id": 110000069945717,
					"lang": "en",
					"owner": -2,
					"refId": 110000069945716,
					"serialNumber": 110000034087370,
					"targetId": 1005005958833204,
					"translateContent": "それのいくつかの人気のある要素は、固体パターンとプラットフォームのファッション要素を含みます。"
				}
			],
			"cnty": "US",
			"content": "What are some popular elements of it?",
			"contentLang": "",
			"gmtCreate": 1710384637000,
			"id": 110000069945716,
			"lang": "en",
			"owner": -1,
			"serialNumber": 110000034087370,
			"targetId": 1005005958833204,
			"totalAnswer": 1,
			"totalAsk": 6,
			"translateContent": "それのいくつかの人気のある要素は何ですか?"
		},
		{
			"alsoAsk": 0,
			"answers": [
				{
					"cnty": "US",
					"content": "Some distinctive features of it are its low heel height, adhesive sole technology, and PVC upper material.",
					"contentLang": "",
					"gmtCreate": 1710364802000,
					"id": 110000068039864,
					"lang": "en",
					"owner": -2,
					"refId": 110000068039862,
					"serialNumber": 110000033403941,
					"targetId": 1005005958833204,
					"translateContent": "それのいくつかの特徴は、その低いヒールの高さ、粘着ソール技術、およびPVCアッパー素材です。"
				}
			],
			"cnty": "US",
			"content": "What are some distinctive features of it?",
			"contentLang": "",
			"gmtCreate": 1710364802000,
			"id": 110000068039862,
			"lang": "en",
			"owner": -1,
			"serialNumber": 110000033403941,
			"targetId": 1005005958833204,
			"totalAnswer": 1,
			"totalAsk": 6,
			"translateContent": "それのいくつかの特徴は何ですか?"
		},
		{
			"alsoAsk": 0,
			"answers": [
				{
					"cnty": "US",
					"content": "It falls under the category of one word drag.",
					"contentLang": "",
					"gmtCreate": 1710364802000,
					"id": 110000068039870,
					"lang": "en",
					"owner": -2,
					"refId": 110000068039867,
					"serialNumber": 110000033403944,
					"targetId": 1005005958833204,
					"translateContent": "1ワードドラッグのカテゴリに分類されます。"
				}
			],
			"cnty": "US",
			"content": "Under which category does it fall?",
			"contentLang": "",
			"gmtCreate": 1710364802000,
			"id": 110000068039867,
			"lang": "en",
			"owner": -1,
			"serialNumber": 110000033403944,
			"targetId": 1005005958833204,
			"totalAnswer": 1,
			"totalAsk": 6,
			"translateContent": "どのカテゴリに該当しますか?"
		},
		{
			"alsoAsk": 0,
			"answers": [
				{
					"cnty": "US",
					"content": "It is a pair of bathroom slippers.",
					"contentLang": "",
					"gmtCreate": 1710364802000,
					"id": 110000068039876,
					"lang": "en",
					"owner": -2,
					"refId": 110000068039873,
					"serialNumber": 110000033403947,
					"targetId": 1005005958833204,
					"translateContent": "それはバスルームのスリッパのペアです。"
				}
			],
			"cnty": "US",
			"content": "What is the functionality of it?",
			"contentLang": "",
			"gmtCreate": 1710364802000,
			"id": 110000068039873,
			"lang": "en",
			"owner": -1,
			"serialNumber": 110000033403947,
			"targetId": 1005005958833204,
			"totalAnswer": 1,
			"totalAsk": 6,
			"translateContent": "それの機能は何ですか?"
		},
		{
			"alsoAsk": 0,
			"answers": [
				{
					"cnty": "US",
					"content": "The benefits of using it include comfort, style, and suitability for summer season.",
					"contentLang": "",
					"gmtCreate": 1710364802000,
					"id": 110000068039878,
					"lang": "en",
					"owner": -2,
					"refId": 110000068039877,
					"serialNumber": 110000033403948,
					"targetId": 1005005958833204,
					"translateContent": "それを使用する利点には、快適さ、スタイル、および夏のシーズンへの適合性が含まれます。"
				}
			],
			"cnty": "US",
			"content": "What are the benefits of using it?",
			"contentLang": "",
			"gmtCreate": 1710364802000,
			"id": 110000068039877,
			"lang": "en",
			"owner": -1,
			"serialNumber": 110000033403948,
			"targetId": 1005005958833204,
			"totalAnswer": 1,
			"totalAsk": 6,
			"translateContent": "それを使用する利点は何ですか?"
		},
		{
			"alsoAsk": 0,
			"answers": [],
			"cnty": "BR",
			"content": "gostaria do produto mais estou com medo do tamanho eu calço 41/42 qual seria o tamanho ideal pra minha numeração?",
			"contentLang": "",
			"gmtCreate": 1708735536000,
			"id": 120000012354856,
			"lang": "pt",
			"owner": 2981648609,
			"serialNumber": 120000010078783,
			"targetId": 1005005958833204,
			"totalAnswer": 0,
			"totalAsk": 6,
			"translateContent": "製品のようにもっと私は41/42を噛むサイズを恐れています私の番号付けのための理想的なサイズは何でしょうか?"
		}
	],
	"_ddf": "alex",
	"error": "",
	"reason": "",
	"error_code": "0000",
	"cache": 0,
	"api_info": "today:6 max:500 all[7=6+1+0];expires:2024-05-10",
	"execution_time": "7.541",
	"server_time": "Beijing/2024-05-07 17:18:21",
	"client_ip": "106.6.35.173",
	"call_args": [],
	"api_type": "aliexpress",
	"translate_language": "zh-CN",
	"translate_engine": "Hcw",
	"server_memory": "4.11MB",
	"request_id": "gw-2.6639f1d594f3b",
	"last_id": "2908276794"

异常示例

	"error": "item-not-found",
		"reason": "商品没找到",
		"error_code": "2000",
		"success": 0,
		"cache": 0,
		"api_info": "today:0 max:10000",
		"execution_time": 0.081,
		"server_time": "Beijing/2020-06-10 23:44:00",
		"call_args": [],
		"api_type": "aliexpress",
		"request_id": "15ee0ffc041242"}

 错误码解释

状态代码(error_code)状态信息详细描述是否收费
0000success接口调用成功并返回相关数据
2000Search success but no result接口访问成功,但是搜索没有结果
4000Server internal error服务器内部错误
4001Network error网络错误
4002Target server error目标服务器错误
4003Param error用户输入参数错误忽略
4004Account not found用户帐号不存在忽略
4005Invalid authentication credentials授权失败忽略
4006API stopped您的当前API已停用忽略
4007Account stopped您的账户已停用忽略
4008API rate limit exceeded并发已达上限忽略
4009API maintenanceAPI维护中忽略
4010API not found with these valuesAPI不存在忽略
4012Please add api first请先添加api忽略
4013Number of calls exceeded调用次数超限忽略
4014Missing url param参数缺失忽略
4015Wrong pageToken参数pageToken有误忽略
4016Insufficient balance余额不足忽略
4017timeout error请求超时
5000unknown error未知错误

 

注意事项

  • 不同的API版本和不同的调用方式可能导致返回值的字段和结构有所不同。因此,在实际使用时,应参考官方文档或API的Swagger定义来获取准确的返回值信息。
  • 在处理返回值时,应注意检查success字段以确定请求是否成功,并根据需要处理error_codeerror_msg字段中的错误信息。
  • 如果API支持分页,应注意处理分页信息,以确保能够获取到所有需要的数据。
  • 在使用API时,应遵守速卖通平台的开发规范和API使用条款,以确保合法合规地获取和使用数据。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值