版本:202201
批量创建评论
POST/openapi/2022-01/comments/batch
批量为商品创建评论。
请求
- application/json
- 请求体
- 示例
请求体
- Array [
- ]
comments object[]
product_idstring
Product's ID
usernamestring必填
User name, for example: Joey
starint32必填
Start count: 1 ~ 5
imagestring
Images in comment, separate by semicolon, for example: http://abc.com/img.jpg; http://def.com/img.jpg
likeint32必填
Like count, for example: 100
created_atstring必填
Comment created time, for example: 2019-07-10 15:00:00
contentstring必填
Comment content, for example: Cheap but beautiful
countrystring
Country code where this comment is created from, for example: CN
{
"comments": [
{
"product_id": "string",
"username": "string",
"star": 0,
"image": "string",
"like": 0,
"created_at": "string",
"content": "string",
"country": "string"
}
]
}
响应
- 200
200
- application/json
- 数据结构
- 示例
- Result
数据结构
- Array [
- ]
success_countinteger
默认值:
0示例:
0error_countinteger
默认值:
0示例:
1error_info object[]
product_idstring
示例:
33f1b4f6-9474-4e6c-9a3f-676a420ea8bbusernamestring
示例:
123starinteger
默认值:
0示例:
1imagestring[]
likeinteger
默认值:
0示例:
1created_atstring
示例:
2contentstring
示例:
123countrystring
示例:
23error_messagestring
示例:
评论时间格式错误;product_publishedinteger
默认值:
0示例:
1{
"success_count": 0,
"error_count": 1,
"error_info": [
{
"product_id": "33f1b4f6-9474-4e6c-9a3f-676a420ea8bb",
"username": "123",
"star": 1,
"image": [
"123"
],
"like": 1,
"created_at": "2",
"content": "123",
"country": "23",
"error_message": "评论时间格式错误;",
"product_published": 1
}
]
}
{
"success_count": 0,
"error_count": 1,
"error_info": [
{
"product_id": "33f1b4f6-9474-4e6c-9a3f-676a420ea8bb",
"username": "123",
"star": 1,
"image": [
"123"
],
"like": 1,
"created_at": "2",
"content": "123",
"country": "23",
"error_message": "评论时间格式错误;",
"product_published": 1
}
]
}