# PUT - Update Product Warehouse by SKU -

**URL:** <https://forums.ordoro.com/t/put-update-product-warehouse-by-sku/872>\
**Category:** Uncategorized\
**Created:** [May 10, 2022, 2:14pm UTC](https://forums.ordoro.com/t/put-update-product-warehouse-by-sku/872 "2022-05-10T14:14:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanHall](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@DanHall](https://forums.ordoro.com/u/DanHall)\
**Post date:** [May 10, 2022, 2:14pm UTC](https://forums.ordoro.com/t/put-update-product-warehouse-by-sku/872/1 "2022-05-10T14:14:00Z")

</div>

Having difficulty getting this call to work, have tried multiple ways with no luck.

rec {“error\_message”: “The input field ‘location\_in\_warehouse’ was not expected.”, “param”: null}  
so removed that line only to get  
{“error\_message”: “Missing value”, “param”: “sku”}  
tried hard coding the SKU and Warehouse\_ID.

I’m sure its something simple that I am missing. Respectfully requesting help?

\<?php $ch = curl\_init(); $username = '\*\*username'; $password = '\*\*password'; $sku = "12345"; $warehouse\_id = "67890"; $url = 'https://api.ordoro.com/product/' .$sku. '/warehouse/' .$warehouse\_id. '/'; $data = array( 'on\_hand' =\> 1, 'low\_stock\_threshold' =\> 2, 'out\_of\_stock\_threshold' =\> 3, 'location\_in\_warehouse' =\> 'C4' ); ``` curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERPWD, $username . ':' . $password); curl_setopt($ch, CURLOPT_HTTPHEADER, array('content-type: application/json')); curl_setopt($ch, CURLOPT_PUT, TRUE); curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE); $response = curl_exec($ch); ``` curl\_close($ch); print $response; ```

---

<div class="post-metadata">

**Author:** ![sophie](https://yyz1.discourse-cdn.com/flex029/user_avatar/forums.ordoro.com/sophie/32/19_2.png) [@sophie](https://forums.ordoro.com/u/sophie)\
**Post date:** [May 10, 2022, 3:19pm UTC](https://forums.ordoro.com/t/put-update-product-warehouse-by-sku/872/2 "2022-05-10T15:19:33Z")

</div>

My first inclination is to suggest that you check the JSON that you’re sending. I see you’re setting the content-type header, so i would check the both the request and response.

---

<div class="post-metadata">

**Author:** ![DanHall](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@DanHall](https://forums.ordoro.com/u/DanHall)\
**Post date:** [May 10, 2022, 4:00pm UTC](https://forums.ordoro.com/t/put-update-product-warehouse-by-sku/872/3 "2022-05-10T16:00:54Z")

</div>

Im at a loss. Have exhausted my limited knowledge ???

---

<div class="post-metadata">

**Author:** ![DanHall](https://avatars.discourse-cdn.com/v4/letter/d/58956e/32.png) [@DanHall](https://forums.ordoro.com/u/DanHall)\
**Post date:** [May 10, 2022, 4:03pm UTC](https://forums.ordoro.com/t/put-update-product-warehouse-by-sku/872/4 "2022-05-10T16:03:05Z")

</div>

do you guys have a basic php example for a put? Maybe that would get me pointed in the right direction.

Thanks
