Discussions API - Venddor API

Discussions Endpoints

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.

Base URL: https://www.venddor.com.br/api/2.0

Available Endpoints

GET POST /discussions/

This endpoint allows you to retrieve all reviews and comments or create a new discussion item.

Supported Methods

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.
Tip: You can filter discussions by type using the type query parameter with values review or comment.
GET PUT DELETE /discussions/:id

This endpoint allows you to work with a specific discussion (review or comment) identified by its ID.

Path Parameters

Parameter Type Description
id* integer The unique identifier of the discussion

Supported Methods

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
GET POST /products/:p_id/discussions/

This endpoint allows you to retrieve all discussions related to a specific product or create a new discussion for a product.

Path Parameters

Parameter Type Description
p_id* integer The unique identifier of the product

Supported Methods

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
Review Example
Comment Example
{
  "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"
}
GET PUT DELETE /products/:p_id/discussions/:id

This endpoint allows you to work with a specific discussion related to a particular product.

Path Parameters

Parameter Type Description
p_id* integer The unique identifier of the product
id* integer The unique identifier of the discussion

Supported Methods

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
Important: When deleting a review, all comments associated with that review will also be deleted.

Discussion Types

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
Tip: To create a reply to an existing discussion, set the reply_to field to the ID of the parent discussion.