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]
- Woocommerce – Add a product to cart programmatically via JS or PHP [closed]
- ( Woocommerce) How to get the user belonging to an order? [closed]
- WooCommerce: Webhook disabled on its own
- How to delete woo commerce order pragmatically? [closed]
- WooCommerce Change Product Global Attribute Value via CRUD for Simple Product [closed]
- When Free shipping is available hide other shipping methods except Local pickup in WooCommerce [closed]
- Woocommerce Shop Price Position
- Can I set a custom “alt” attribute with woocommerce_get_product_thumbnail()?
- Remove all Span Tags and class From Woocommerce Price [closed]
- Importing Woocommerce products with variations
- Woocommerce login not working on the first try
- Show add to cart button on shop woocommerce
- How do I hide the purchase note in the WooCommerce ‘order completed’ email?
- Woocommerce – Override the default templates location under the theme directory
- WOO-Commerce translation | Tried it all [closed]
- Is there a way to show Single Variation prices in the product loop when filters or attributes are active?
- Function to recalculate shipping costs on subscriptions after renewal with Automatewoo
- Caption not showing with Woo commerce thumbnails
- Change the Title Tag of Search Products Page
- Woocommerce product image [closed]
- Question on WooCommerce Syntax
- woocommerce_new_product action doesn’t fire
- Change The Woocommerce Product Categories Dropdown Widget Placeholder Text
- minimum order item for certain products exempting 2 other products (in bulk)
- Is it possible to checkout with 2 different shipping options on a single order? [closed]
- Sender e-mail address, for new order email to customer, is suddenly wrong [closed]
- Undo WooCommerce CSV import
- A Woo commerce extension has deleted my old theme.How to undo? [closed]
- Woocommerce Advanced Shipping (WAS) condition is not being called when selecting “Ship to different address” [closed]
- Strip string from $_product->get_title() to get a cleaner mini-cart
- Product page attributes dropdown show price
- Smart Design for Blog + Woocommerce + LearnDash + Forum/Bodyboss
- Ajax add to cart not updating Elementor mini cart totals
- I want to store user password (during registration) in an other table in the same database in addition to the user table MD5 Hash
- How to edit the default woo-commerce Store page meta title tag “Products”
- Need help with woocommerce roles
- Change WooCommerce product and variation prices programatically without affecting performance
- Help to locate a woocommerce hook method
- woocommerce_product_quick_edit_save hook not fired
- Why does wc_get_products($arg) return no products when $arg = ‘average_rating’ => 5.0
- Query product’s image path by category WooCommerce database?
- How update price for variable product
- currentURL is not defined
- Add button linked to single product page on order detail page
- syntax error – woocommerce
- How to on/off woocommerce filter with redux framework [closed]
- Cross-sells on WooCommerce product page
- Admin Order adding an extra product on add_line_item
- Get WP All Export row ID
- WooCommerce – missing products when viewed by tag
- Can a woocommerce hook alter the UI of a website?
- cannot create product attribute (taxonomy) and add terms on the same execution
- My custom button to add an item in the WooCommerce admin page doesn’t refresh the page
- Add field to category woocommerce page
- WordPress Pagination products with AJAX
- sidebar cart page
- Getting error – preview cannot be loaded when activating WooCommerce plugin [closed]
- Woocommerce template not working on newly added products
- Woocommerce ajax search can’t work on mobile