Shop By REST API
Product page
Layered Navigation Suite — kowal.co
Description
Read and maintain Shop By attribute configurations and option pages through Magento REST. The two collections are exposed under /V1/kowal/layered-navigation/shopby.
For whom
For developers connecting a catalog management tool to Shop By.
Features
- List attribute configurations or option pages with GET.
- Create or update records with POST.
- Delete an attribute configuration by entity ID or an option page by page ID.
Installation
This component is included in Layered Navigation Suite. Follow the suite installation instructions.
Configuration
- Grant the Magento integration the Shop By resource
Kowal_LayeredNavigation::shopbyand authenticate using the integration’s configured method. - Send a GET request to
/rest/default/V1/kowal/layered-navigation/shopby/attributes. Replacedefaultwith the applicable store code. - Use the sibling
option-pagesendpoint to retrieve configured pages. For a POST, send record fields inside the JSON object nameddata.
Requirements / notes
The attribute endpoint lists Shop By configuration records. The entity ID used by its DELETE route identifies a configuration record.
FAQ
Can I read option pages for a single configured attribute?
Add the query parameter shopbyAttributeId to the option-pages GET request and use the Shop By attribute record’s ID.
Verify the installation
bin/magento module:status Kowal_LayeredNavigationApi
Issue an authenticated GET for attributes. Compare the returned records with Shop By Attributes in Admin. If the list is empty, check whether that screen contains a configured attribute.