Version: 202201
Create Comment
POST/openapi/2022-01/comments
Allows users to add a comment to a specific product.
Request
- application/json
- Body
- Example
Body
product_idstring
Product's ID
usernamestringrequired
User name, for example: Joey
starint32required
Start count: 1 ~ 5
imagestring
Images in comment, separate by semicolon, for example: http://abc.com/img.jpg; http://def.com/img.jpg
likeint32required
Like count, for example: 100
created_atstringrequired
Comment created time, for example: 2019-07-10 15:00:00
contentstringrequired
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"
}
Responses
- 200
200
- application/json
- Schema
- Example
- Result
Schema
comment object
idinteger
Default value:
0Example:
23532434store_idinteger
Default value:
0Example:
633130usernamestring
Example:
Joeyemailstring
Example:
starstring
Example:
5.0likeinteger
Default value:
0Example:
10contentstring
Example:
Cheap but beautifulimgstring
Example:
["https:\/\/photokit.com\/features\/images\/image-text-after.webp"]statusinteger
Default value:
0Example:
1typeinteger
Default value:
0Example:
1product_idstring
Example:
a1a88be0-a1d4-47e4-a2f2-ba6e131cf447created_atstring
Example:
2024-04-24 14:02:39updated_atstring
Example:
2024-04-25 08:22:58countrystring
Example:
CNis_featuredinteger
Default value:
0Example:
0is_verifiedinteger
Default value:
0Example:
0client_id
anonymousinteger
Default value:
0Example:
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
}
}