PUT - Update Product Warehouse by SKU -

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; ```

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.

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

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