I want to update my inventory in Sears marketplace with API.
"Inventory Management: This API call uses the PUT method to manage the inventory level of your items. To avoid errors, inventory updates should only be made to items that have successfully processed. Note: Inventory is NOT auto decremented so it is important that you update inventory as you receive and process orders."
PUT URL: https://seller.marketplace.sears.com/SellerPortal/api/inventory/fbm-lmp/v6?email={emailaddress}&password={password}
API Documentation:
http://searsmarketplace.force.com/articles/FAQ/XML-How-do-I-update-inventory?retURL=%2Fapex%2FknowledgeProduct%3Fc%3DContent%26k%3D&popup=false
I created folowing script but not working correctly:
$xml = '<?xml version="1.0" encoding="UTF-8"?>
<store-inventory
xmlns="http://seller.marketplace.sears.com/catalog/v2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://seller.marketplace.sears.com/SellerPortal/s/schema/rest/inventory/import/v2/store-inventory.xsd">
<item item-id="10">
<locations>
<location location-id="21">
<quantity>20</quantity>
<pick-up-now-eligible>false</pick-up-now-eligible>
</location>
</locations>
</item>
</store-inventory>';
$ch = curl_init();
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_URL, "https://seller.marketplace.sears.com/SellerPortal/api/inventory/fbm-lmp/v6?email={email}&password={pass}");
curl_setopt($ch, CURLOPT_PORT, 443);
curl_setopt($ch, CURLOPT_PUT, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,array($xml));
$http_result = curl_exec($ch);
if($http_result){
echo $http_result;
}else{
echo curl_error($ch);
}
curl_close($ch);
curl_error:
Unknown SSL protocol error in connection to seller.marketplace.sears.com:443
Where I'm wrong ?