It is not at all clear to me how to update the price/stock for a listing once it has been created initally using listing->createListing().
To update the stock/price, Etsy's documentation says to call listing->updateInventory(). However, this call requires something called products together with a couple of properties (price_on_property, quantity_on_property and sku_on_property):
- listing_id
- products*
- price_on_property
- quantity_on_property
- sku_on_property
where:
products is further defined in their documentation as a combination of property_values and offerings which I have no clue about.
listing_id is returned from the call to createListing() initially.
Etsy's footnote about price_on_property, stock_on_property and sku_on_property adds to the confusion:
price_on_property is an array of the property_ids of the properties which price depends on (if any).
quantity_on_property is an array of the property_ids of the properties which quantity depends on (if any).
sku_on_property is an array of the property_ids of the properties which sku depends on (if any).
The update will fail if the supplied values for product sku and offering quantity and price are incompatible with the supplied values of the "on_property_*" fields.
When supplying a price, supply a float equivalent to amount divided by divisor as specified in the Money resource.
The products parameter should be a JSON array of products, even if you only send a single product. All field names in the JSON blob should be lowercase.
Taken from https://www.etsy.com/developers/documentation/reference/listinginventory#method_updateinventory
Given that the starting point for adding things for sale on Etsy is just to call createListing() with details of the item that I wish to sell (inc stock quantity and price), I do not understand how to call updateInventory() to update the stock and/or price of this item and so can anybody provide some clarity on this matter please (and yes, I have contacted Etsy developer support, but it might take a while for them to respond).