Title: API: Set/Update location stock?
Last modified: September 28, 2020

---

# API: Set/Update location stock?

 *  Resolved [ninjabob](https://wordpress.org/support/users/ninjabob/)
 * (@ninjabob)
 * [6 years ago](https://wordpress.org/support/topic/api-set-update-location-stock/)
 * I’m integrating the database-of-record with WC through the REST API. So far so
   good but that last thing on my list is setting the stock per location.
 * While ‘locations’ isn’t listed in the API docs, it does come back for any updates
   on products. So I’m trying to set it to an array of location names and stock 
   quantities, but it has no effect.
 * When I browse a product I’ve applied this API update to, the Stock Locations 
   tab says “You need to add a stock location to this product.” Is there a way to
   do this through the API?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fapi-set-update-location-stock%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Support [Riaan K.](https://wordpress.org/support/users/riaanknoetze/)
 * (@riaanknoetze)
 * [6 years ago](https://wordpress.org/support/topic/api-set-update-location-stock/#post-13467517)
 * Hi there,
 * This would be up to the REST API of the inventory management plugin you’re using
   and not the core WooCommerce REST API (which doesn’t support inventory location).

Viewing 1 replies (of 1 total)

 The topic ‘API: Set/Update location stock?’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3640790)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)

 * 1 reply
 * 2 participants
 * Last reply from: [Riaan K.](https://wordpress.org/support/users/riaanknoetze/)
 * Last activity: [6 years ago](https://wordpress.org/support/topic/api-set-update-location-stock/#post-13467517)
 * Status: resolved