版本:202201
创建评论
POST/openapi/2022-01/comments
为指定商品添加评论。
请求
- application/json
- 请求体
- 示例
请求体
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
{
"product_id": "string",
"username": "string",
"star": 0,
"image": "string",
"like": 0,
"created_at": "string",
"content": "string",
"country": "string"
}
响应
- 200
200
- application/json
- 数据结构
- 示例
- Result
数据结构
comment object
idinteger
默认值:
0示例:
23532434store_idinteger
默认值:
0示例:
633130usernamestring
示例:
Joeyemailstring
示例:
starstring
示例:
5.0likeinteger
默认值:
0示例:
10contentstring
示例:
Cheap but beautifulimgstring
示例:
["https:\/\/photokit.com\/features\/images\/image-text-after.webp"]statusinteger
默认值:
0示例:
1typeinteger
默认值:
0示例:
1product_idstring
示例:
a1a88be0-a1d4-47e4-a2f2-ba6e131cf447created_atstring
示例:
2024-04-24 14:02:39updated_atstring
示例:
2024-04-25 08:22:58countrystring
示例:
CNis_featuredinteger
默认值:
0示例:
0is_verifiedinteger
默认值:
0示例:
0client_id
anonymousinteger
默认值:
0示例:
0{
"comment": {
"id": 23532434,
"store_id": 633130,
"username": "Joey",
"email": "",
"star": "5.0",
"like": 10,
"content": "Cheap but beautiful",
"img": "[\"https:\\/\\/photokit.com\\/features\\/images\\/image-text-after.webp\"]",
"status": 1,
"type": 1,
"product_id": "a1a88be0-a1d4-47e4-a2f2-ba6e131cf447",
"created_at": "2024-04-24 14:02:39",
"updated_at": "2024-04-25 08:22:58",
"country": "CN",
"is_featured": 0,
"is_verified": 0,
"client_id": {},
"anonymous": 0
}
}
{
"comment": {
"id": 23532434,
"store_id": 633130,
"username": "Joey",
"email": "",
"star": "5.0",
"like": 10,
"content": "Cheap but beautiful",
"img": "[\"https:\\/\\/photokit.com\\/features\\/images\\/image-text-after.webp\"]",
"status": 1,
"type": 1,
"product_id": "a1a88be0-a1d4-47e4-a2f2-ba6e131cf447",
"created_at": "2024-04-24 14:02:39",
"updated_at": "2024-04-25 08:22:58",
"country": "CN",
"is_featured": 0,
"is_verified": 0,
"client_id": null,
"anonymous": 0
}
}