# Create a product and update stock/location

**URL:** <https://developer-forum.veeqo.com/t/create-a-product-and-update-stock-location/74>\
**Category:** API Queries (How To)\
**Created:** [October 17, 2017, 11:17am UTC](https://developer-forum.veeqo.com/t/create-a-product-and-update-stock-location/74 "2017-10-17T11:17:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kanterukb](https://avatars.discourse-cdn.com/v4/letter/k/FF6200/32.png) [@kanterukb](https://developer-forum.veeqo.com/u/kanterukb)\
**Post date:** [October 17, 2017, 11:17am UTC](https://developer-forum.veeqo.com/t/create-a-product-and-update-stock-location/74/1 "2017-10-17T11:17:46Z")

</div>

Hi  
Need to create new product and after that update location field in stock entry (I use approach as described here [https://developer-forum.veeqo.com/t/set-warehouse-bin-name-on-set-stock-quantity/66](https://developer-forum.veeqo.com/t/set-warehouse-bin-name-on-set-stock-quantity/66))  
All it works but there is one problem - when I create a product there is not stock\_entries array in sellables property,  
but if I wait ~5-15sec that array appears

so, is it possible to get stock\_entries array immediately after product creation?

Thanks

---

<div class="post-metadata">

**Author:** ![phil](https://yyz1.discourse-cdn.com/flex033/user_avatar/developer-forum.veeqo.com/phil/32/43_2.png) [@phil](https://developer-forum.veeqo.com/u/phil)\
**Post date:** [October 17, 2017, 12:14pm UTC](https://developer-forum.veeqo.com/t/create-a-product-and-update-stock-location/74/2 "2017-10-17T12:14:08Z")

</div>

We only create `stock_entries` for each warehouse when the products page is opened, until then there won’t be any.

You have the `sellable_id` and `warehouse_id` already, so you could just make the stock entry request and create it.

Let me know if this helps!

---

<div class="post-metadata">

**Author:** ![kanterukb](https://avatars.discourse-cdn.com/v4/letter/k/FF6200/32.png) [@kanterukb](https://developer-forum.veeqo.com/u/kanterukb)\
**Post date:** [October 19, 2017, 8:17am UTC](https://developer-forum.veeqo.com/t/create-a-product-and-update-stock-location/74/3 "2017-10-19T08:17:48Z")

</div>

After product creation I don’t have warehouse\_id  
anyway I have only one warehouse for my whole project, so warehouse\_id will be the same for all products

Thanks you Phil for your quick replies!
