Retrieve a product list from the Omnyfy product index.
You can filter products by specifying:
category-id
– to get products from a specific categoryvendor-id
– to get products from a specific vendorfeatured-only=1
– to get only featured products
The results are paginated. Use the page-size
and page
parameters to control pagination (page
is a number: 1, 2, etc).
Sample cURL Requests
Featured products:
curl --location 'https://mygatewayurl.com/V1/storeview/default/search/products?page=1&page-size=4&featured-only=1'
Products by category:
curl --location 'https://mygatewayurl.com/V1/storeview/default/search/products?category-id=4&page=1&page-size=10'
Products by vendor:
curl --location 'https://mygatewayurl.com/V1/storeview/default/search/products?vendor-id=4&page=1&page-size=10'
Products by keywords:
curl --location 'https://mygatewayurl.com/V1/storeview/default/search/products?page=1&page-size=10&keywords=my%20keywords'
Filtering Results
You can filter results by providing the appropriate filter attribute and value. There are three types of filter parameter formats:
-
iaf_{attribute_code}
– Integer Attribute Filter
Use formultiselect
,boolean
, ordropdown
type filters.
(Use values0
or1
for boolean attributes) -
raf_{attribute_code}
– Range Attribute Filter
Use forprice
or other numeric range filters. -
vaf_{attribute_code}
– Value Attribute Filter
Use for matching text or label of custom attributes.
(Use values likeYes
orNo
for boolean attributes)
Example: Filtering by price range and color
curl --location 'https://mygatewayurl.com/V1/storeview/default/search/products?category-id=4&page=1&page-size=10&iaf_color=17&raf_price_0_1=500-2899'
Filter Metadata in Response
The response includes filter metadata for each filterable attribute (as per your Omnyfy configuration). For example:
- Attribute:
color
- Options (from the
items
array):"White"
,"Red"
, etc. - Each option has a corresponding ID. For example,
"White"
may be ID17
.
To filter by color "White"
, use:
iaf_color=17
To filter by price:
raf_price=500-2899
This includes all products priced between 500 and 2899 (inclusive), in your configured currency.
Pagination
- Always use
page
andpage-size
to paginate results. - Default
page-size
is 20.
Product Indexing Rules
A product will appear in the search index if all the following conditions are true:
- The product is assigned to a vendor
- The vendor is enabled
- The product is assigned a source
- The product is in stock
- The product status is enabled
- The product visibility is set to catalog search
- The product has at least one assigned category