etsy-php-sdk
etsy-php-sdk copied to clipboard
how to use PUT method
updateInventory api return error: Received HTTP status code [400] with error "Missing input parameter: [products]". My data: $data = array(); $data['products'] = array(); $data['products']['sku'] = 'NAPK-EN87454_SHINYSATIN'; $data['products']['property_values'] = array(); $data['products']['property_values']['property_id'] = 513; $data['products']['property_values']['value_ids'] = array(1108719665740); $data['products']['property_values']['values'] = array('Shiny Satin'); $data['products']['offerings'] = array(); $data['products']['offerings']['price'] = 1099; $data['products']['offerings']['quantity'] = 200; $data['products']['offerings']['is_enabled'] = true;
Can you provide a full example of your code, including the call to make the PUT.
Can you provide a full example of your code, including the call to make the PUT. $data = array(); $data['products'] = array(); $data['products']['sku'] = 'NAPK-EN87454_SHINYSATIN'; $data['products']['property_values'] = array(); $data['products']['property_values']['property_id'] = 513; $data['products']['property_values']['value_ids'] = array(1108719665740); $data['products']['property_values']['values'] = array('Shiny Satin'); $data['products']['offerings'] = array(); $data['products']['offerings']['price'] = 1099; $data['products']['offerings']['quantity'] = 200; $data['products']['offerings']['is_enabled'] = true;
$etsy = new \Etsy\Etsy($this->api_key, $this->accessToken); $listing = $etsy->getListing($listing_id,array("Shipping","Images","Translations","Inventory","Videos")); $inventory = $listing->updateInventory($data);
Apologies on the delayed response. This repo is now being maintained again. A major updated for the package has been released that will impact this issue. If this is something you still need assistance with, please open a new issue.