Closed doverradio closed 2 years ago
Hi @doverradio,
you mentioned you already tried the patchListingsItem
call as described in this issue. Could you post that as well? Currently I can only see two putListingsItem
calls, which is actually, according to the docs, used to create or fully update a listing:
Creates a new or fully-updates an existing listings item for a selling partner.
So patchListingsItem
is definitely the right operation if you only want to update price and quantity. An alternative way of updating would be by uploading a feed. A bit old fashioned, but it should work as well. You can see an example of how to update the quantity of an SKU via a feed here in our docs.
Hello,
I tried to upload a feed following the feed instructions in your docs and was successful in updating the quantity.
But what about price?
I tried to add a price to the POST_INVENTORY_AVAILABILITY_DATA
call but it did not update it on the listing.
How can I update the price? Is POST_INVENTORY_AVAILABILITY_DATA
not correct to make the price change?
Please show me an example that you use when updating your price via feed API.
You should be able to update the price by using POST_PRODUCT_PRICING_DATA
, here is a link to the schema.
Alternatively you could also use POST_FLAT_FILE_PRICEANDQUANTITYONLY_UPDATE_DATA
, which should make it even easier for you. Instead of an XML it only expects sku
, quantity
and/or price
as tab-delimited headers in the first line and then the corresponding values (also tab-delimited) in the next line(s).
Thank you so much for this.
Lastly, I want to "bulk list" to a bunch of ASINS I have in a list. Literally I want to just put a price and quantity.
What is the proper feed/way to accomplish this?
I have around 350k ASINS.
That's basically up to you, all of the ways support bulk update:
patchListingsItem
operation supports an array of patches
, but I couldn't find out the max length of it.
POST_FLAT_FILE_PRICEANDQUANTITYONLY_UPDATE_DATA
also allows you to update multiple SKUs at once (line by line), also couldn't find the maximum lines in one feed, if there is a limit at all.
POST_INVENTORY_AVAILABILITY_DATA
and POST_PRODUCT_PRICING_DATA
also allow you to bulk update by adding multiple <Message>
blocks, but I think these have a maximum of 20 per feed upload.
What about POST_FLAT_FILE_INVLOADER_DATA
?
I am getting this from FeedType enumeration of old Amazon MWS documentation.
It states "For creating or updating listings for products already in Amazon's catalog."
Previously, I really had my hopes pinned on this one being the "bulk lister" but constantly got rejected because of the column headers being rejected. Due to that I was trying to look for a workaround but these would be not updating SKUs but actually creating new SKUs.
Which feed enumeration type upload allows one to create new SKUs?
I suppose is my real question for you.
Yes, you should be able to do so with POST_FLAT_FILE_INVLOADER_DATA
. Alternatively this should also be possible with putListingsItem or with the JSON_LISTINGS_FEED
, which is actually the same data format as putListingsItem
, but uploaded as a feed.
Massive win! Got it to post 10 skus via POST_FLAT_FILE_INVLOADER_DATA
. Will have to play around with putListingsItem
or JSON_LISTINGS_FEED
.
Would be super helpful if, in future, there were examples covering how to use those calls.
Thanks so much!
@doverradio,
great! Yes, we will put this on our list to cover some examples of the most common use cases in the nearer future in the README.
All I want to do is use the Amazon SP-API Listings API's putListingsItem call to update the price and quantity of an item I have listed.
productType
According to the ListingsItemPutRequest docs, productType and attributes are required for this call.
Firstly, to obtain the correct productType value, you are supposed to search for a product definitions type using the Product Type Definitions API. So, I do that, and call searchDefinitionsProductTypes, just to discover my product has no matching product type.
Ultimately, I gave the value PRODUCT for productType field. Using PRODUCT, I made the getDefinitionsProductType call and got an object containing an array of propertyNames, shown below:
On seeing this, I decide
list_price
andfulfillment_availability
must be the price and quantity and then try using these in my code below.attributes
The attributes value is also required. However, their current docs show no clear example of what to put for these values, which are where I must put price and quantity somewhere.
I found this link about patchListingsItem and tried to implement that below but got an error.
code:
// trying to update quantity... failed.
error:
I also tried using list_price :
// list_price attempt... failed.
Error (this time seems I got warmer... maybe?):
How do you correctly specify the list_price or the quantity so this call will be successful?
Just tryin to update a single item's price and quantity.