The Venddor API allows you to filter products using a variety of parameters. This feature is similar to the advanced search functionality in the admin panel, giving you powerful control over product queries.
The basic URL structure for product filtering is:
https://www.venddor.com.br/api/products?<filter>=Y&<additional_param>=<value>&<another_param>=<value>&...&sort_by=<sorting>&sort_order=<sort_order>&q=<query>
Where:
filter
is one of the available filters (see table below). You can use multiple filters by appending &<another_filter>=Y
to the URL.additional_param
is one of the available additional parameters (see table below). You can use multiple parameters.sorting
specifies how results should be sorted.sort_order
is the sort direction: asc
(ascending) or desc
(descending).query
is the search text to look for.https://www.venddor.com.br/api/stores/1/products
https://www.venddor.com.br/api/vendors/1/products
This example retrieves all products from store #1 that:
curl --user admin@example.com:APIkey -X GET 'https://www.venddor.com.br/api/stores/1/products?pfull=Y&price_from=10&sort_by=product&sort_order=asc&q=foo'
Filter | Description |
---|---|
pname | Product name |
pshort | Short description |
pfull | Full description |
pkeywords | Meta keywords |
pcode | Product code |
cid | Category ID |
amount_from | In stock lower range |
amount_to | In stock higher range |
price_from | Price lower range |
price_to | Price higher range |
Parameter | Description | Supported values |
---|---|---|
subcats | Include subcategories of the given category (the cid filter must be used) in the search scope |
Y, N |
order_ids | IDs of the orders to search the products in | Comma-separated list of order IDs, e.g., 1,13,24 |
free_shipping | Filter by free shipping status | Y, N |
status | Filter by product status | A - Active D - Disabled H - Hidden |
Sort parameter | Description |
---|---|
status | Product status |
list_price | List price |
product | Product name |
price | Price |
code | Product code |
amount | In stock amount |
To control the number of results returned and to navigate through multiple pages of results, use these pagination parameters:
Parameter | Description |
---|---|
page | Shows products on the specified page number |
items_per_page | Controls how many products are displayed per page (default: 10) |
https://www.venddor.com.br/api/products?page=5
Response is an array with 10 products from the 5th page (10 is the default value of the items_per_page
parameter).
https://www.venddor.com.br/api/products?items_per_page=20
Response is an array with 20 products from the first page.
https://www.venddor.com.br/api/products?page=5&items_per_page=20
Response is an array with 20 products from the 5th page.