The Discussions API allows you to manage reviews and comments for products in the Venddor platform. This documentation outlines the available endpoints and their supported HTTP methods.
https://www.venddor.com.br/api/2.0
This endpoint allows you to retrieve all reviews and comments or create a new discussion item.
Method | Description | Usage |
---|---|---|
GET | Retrieve all discussions | Use pagination parameters to limit results. See Pagination section for details. |
POST | Create a new discussion | Requires a JSON body with discussion details. |
type
query parameter with values review
or comment
.
This endpoint allows you to work with a specific discussion (review or comment) identified by its ID.
Parameter | Type | Description |
---|---|---|
id* | integer | The unique identifier of the discussion |
Method | Description | Usage |
---|---|---|
GET | Retrieve a specific discussion | Returns detailed information about the specified discussion |
PUT | Update a discussion | Requires a JSON body with fields to update |
DELETE | Delete a discussion | Permanently removes the discussion from the system |
This endpoint allows you to retrieve all discussions related to a specific product or create a new discussion for a product.
Parameter | Type | Description |
---|---|---|
p_id* | integer | The unique identifier of the product |
Method | Description | Usage |
---|---|---|
GET | Retrieve all discussions for a product | Returns all reviews and comments for the specified product |
POST | Create a new discussion for a product | Requires a JSON body with discussion details |
{ "type": "review", "product_id": 123, "user_id": 456, "name": "Maria Santos", "rating": 4.5, "title": "Great product with minor issues", "comment": "I've been using this product for three months and I'm very satisfied. It met most of my expectations but there are a few features that could be improved.", "reply_to": null, "status": "approved" }
{ "type": "comment", "product_id": 123, "user_id": 789, "name": "Pedro Oliveira", "comment": "I have a question about this product. Does it work with international voltage?", "reply_to": null, "status": "pending" }
This endpoint allows you to work with a specific discussion related to a particular product.
Parameter | Type | Description |
---|---|---|
p_id* | integer | The unique identifier of the product |
id* | integer | The unique identifier of the discussion |
Method | Description | Usage |
---|---|---|
GET | Retrieve a specific discussion for a product | Returns detailed information about the specified discussion |
PUT | Update a discussion for a product | Requires a JSON body with fields to update |
DELETE | Delete a discussion for a product | Permanently removes the discussion from the system |
The Discussions API supports two types of discussion entries:
Type | Description |
---|---|
review |
A product review that includes a rating and typically a detailed comment |
comment |
A general comment or question about a product, or a reply to another comment/review |
reply_to
field to the ID of the parent discussion.