Hi @devworlds
Thanks for reaching out!
I understand that you’re trying to retrieve your product data using the WooCommerce API with specific filters.
Based on the URL you provided, it seems like you are using the WooCommerce API version 3. However, I would recommend using the latest version of the WooCommerce REST API, which is version 2. You can update the URL to use the latest API version like this:
https://mydomain.com/wp-json/wc/v2/products
Regarding the filter parameters, the WooCommerce API doesn’t support filtering products by custom attributes like brand, model, storage, and color directly in the URL. Instead, you can use the search parameter to search for specific keywords. Here’s an example:
https://mydomain.com/wp-json/wc/v2/products?consumer_key=xxxx&consumer_secret=xxxx&search=apple%2012%20pro%20256%20silver&per_page=2
This will search for products that contain the keywords “apple”, “12 pro”, “256”, and “silver”. However, this method might not always return the exact results you’re looking for, as it searches for these keywords in various product fields.
To achieve more accurate filtering, you can fetch all the products and then filter the results programmatically using your preferred programming language. For example, you can fetch all the products using the API and then loop through the products to find the ones that match your criteria (brand, model, storage, and color).
For more information, please check the support documentation for Woo REST API here: https://woocommerce.github.io/woocommerce-rest-api-docs/
Hope this helps!