Woocommerce rest API is an extension of WordPress rest API, so you should first check global parameters and specifically “_fields” in the REST API Handbook of WordPress.org.
I will give you an example of the data that you want, price and quantity, but also the id and the name of the products for the response to be more human friendly.
/wp-json/wc/v3/products?per_page=100&_fields=id,name,regular_price,stock_quantity
The “_fields” attribute is used for every attribute you want to get.
The “per_page” attribute with value of “100” is used to get 100
products which is the max acceptable value of this attribute and if
you leave it empty the default is only “10”.
Sorry for the 10 months later answer, but I hope that helped you and any other that is facing the same issue.
Related Posts:
- WooCommerce: Can’t use wc_get_products for custom REST API endpoints
- Process checkout using WC REST API
- How to build a plugin that supports authenticated POST requests to the REST API from external servers?
- Extend Woocommerce rest api routes fails
- How to filter Post using Meta Data REST API
- How to stop a Gutenberg Block from firing multiple GET Requests?
- Output JSON object with woocommerce products
- Problem with cURL and rest API
- Woo API REST : product variation price is read-only?
- Category Tree In WooCommerce Product API
- How to upload Woocommerce product images via API? [closed]
- How to handle Woocommerce API credentials
- What will make Woocommerce REST API to issue 401 [closed]
- Woocommerce custom endpoints
- Woocommerce REST API – updating an order changes custom tax calculations
- Woocommerce Rest Api Categories problem [closed]
- API returns blank response after installing & uninstalling WP-rest-api plugin
- woocommerce axios react
- wc_get_products() not return the images details
- WooCommerce – Add product with image via REST API
- Tax are not showing on order while placing order with REST API
- JWT on Woocommerce cannot work with “Customer” role user
- Woocommerce REST API – add filter to set maximum query per page for product brands [closed]
- WooCommerce – Create multiple product tags via rest api endpoint
- Using the WordPress and WooCommerce REST APIs in the same Node app
- Retrieve Data from Custom Endpoint
- How to solve `Error getting remote image` in woocommerce rest api script?
- Getting in an exception for get product detail by id in woocommerce REST api
- Impossible to create a new WooCommerce customer using Rest API
- Woocommerce API security concerns
- How can I send information when a order is completed to my own POS?
- Woocommerce Rest API: woocommerce_product_invalid_image_id
- WC Booking query bookings with date ranges
- “error_message”: “Sorry, you cannot list resources.” using WooCommerce API
- Woocommerce REST API: creating variations
- Woocommerce REST API not considering discounts and coupons
- WooCommerce REST API endpoints don’t exist
- Fetch products with filter by similar categories at same time
- Send data to external websites when there is an update or create a post
- Auto generating API keys using the Application Authentication Endpoint [closed]
- GET woocommerce order request is not showing meta data [closed]
- How to add fee_lines using woocommerce rest API v3?
- Update a server-side render Block when woocommerce cart block changed
- Insert variations via woocommerce api [closed]
- Display order items names in WooCommerce admin orders list [closed]
- Remember page before login page, redirect to that page after login
- WooCommerce lost password reset flow not working with SendGrid (redirect loop)
- Get user payment details when payment successfully done in woocommerce [closed]
- How to assign specific attribute to variation for woocommerce product?
- How to change page via login as user and admin
- How to remove the sub-category from Woocommerce product URL
- Find woocommerce product ID by custom field value?
- how to use different page design for different category
- Getting WordPress database error Deadlock
- Edit WooCommerce product content based on category
- Place Order button in Checkout
- woocommerce – How Can I add author metadata for a product? [closed]
- shortcode to display woocommerce cart total
- Woocommerce – Want to move the product tabs below short description
- Where is the CSS class ui-sortable-handle for WC_Admin_Taxonomies added?
- WooCommerce: “account is already registered with your email address”
- Enter name and email on the Product page and keep the input data on the Checkout page
- Woo commerce using add_fee to add discount to cart not saving discount amount the admin backend when guest user is shopping
- How to change Attribute Type
- WooCommerce plugin won’t let me access settings
- Hide account tab to certain users
- How to Update the Order-Items While Editing an Order on the WooCommerce Admin Order Screen [closed]
- WOOCOOMERCE: Run function before payment gateway (paying)
- Can’t filter out variable products in sale from wp_get_products loop (or shortcode) [closed]
- main menu hide woo commerce single products tittle
- What Hook/Action is performed when a field in checkout form is changed in WooCommerce
- Benefits over using object method over property from $product?
- Add to cart – button should be disabled
- WooCommerce – change child category URL structure
- Hide Add to Cart button on woocommerce Product description page of a particular product
- manage_shop_order_posts_custom_column() hook is Not working In Functions.php file in my WordPress active theme
- How to send woocommerce emails in multiple languages
- Custom WooCommerce rewrite rules with comma delimiter
- Set city as required if country is Singapore
- WooCommerce Simple Auctions add username to auction finished email
- Enable Gutenberg for Woocommerce
- How to change product category permalinks programmatically?
- Make e-Mail optional on Woocommerce sign up
- Missing variable options on add to cart form
- WooCommerce , Auto cancel orders status from processing after X days
- Change WooCommerce Word “Product” to Another Word
- How does a WooCommerce site integrate with the existing real world customer members?
- How to filter result set in custom metaboxes?
- How to change lost password email text using custom plugin wordpress?
- wc_mail in foreach loop is sending only the first email
- How to hide / remove duplicated Woocommerce products from Shop page
- How to add product variations for large number of products in WooCommerce?
- Changing second user role while updating/downgrading membership level – s2member [closed]
- How to edit schema.org markup of WooCommerce?
- How to change redirect code? [duplicate]
- Add Additional 3 buttons next to “Add to cart” button in woocommerce product page
- How do I remove the recurring total from thank you for your order email?
- Display product categories + child-categories on a single product page
- WooCommerce product categories
- Woocommerce – Create a separate catalog by using woocommerce products