get a permanent browseNodeId from amazon product API - amazon-web-services

I'm using Amazon Product API to get new products of certain category everyday.
Sometimes the BrowseNodeId changes, let's say I want to get new books about 'Python', at the moment I'm calling Amazon API like this:
get_new_products(BrowseNodeId=36848)
but sometimes BrowseNodeId changes and I get this error:
InvalidParameterValue: AWS.InvalidParameterValue: 36848 is not a
valid value for BrowseNodeId. Please change this value and retry your
request.
What can I do to keep the BrowseNodeId of Python updated? Which API should I use to get the BrowseNodeId passing the string 'Python'?
I need something like this getBrowseNodeId('Python') to get the correct and updated BrowseNodeId to avoid the error posted over.
Any advice or workflow that I can follow?
Thanks in advance.
Best regards.

Amazon does seem to change the Ids every so often. The recommended way is to take a product and go through its associated BrowseNodes.

Related

Amazon SP-API endpoint to get Billing address by order ID

I'm using Amazon Selling Partner API to import orders in my application.
I'm using orders/v0/orders to get the orders list and foreach order returned I call
/orders/v0/orders/{orderId}/address to get shipping address
/orders/v0/orders/{orderId}/orderItems to get items in order
/orders/v0/orders/{orderId}/buyerInfo to get buyerEmail and buyerName
Now, the last thing I need is to get the eventual billing address.
I search in SP-API documentation but I didn't find anything useful.
Can someone help me?
I don't think it is possible. This was asked regarding MWS and the response was "why" given that Amazon handle all billing. I suspect SP-API is similar.
https://sellercentral.amazon.com/forums/t/retrieving-buyers-billing-address/124948

Query AWS SNS Endpoints by User Data

Simple question, but I suspect it doesn't have a simple or easy answer. Still, worth asking.
We're creating an implementation for push notifications using AWS with our Web Server running on EC2, sending messages to a queue on SQS, which is dealt with using Lambda, which is sent finally to SNS to be delivered to the iOS/Android apps.
The question I have is this: is there a way to query SNS endpoints based on the custom user data that you can provide on creation? The only way I see to do this so far is to list all the endpoints in a given platform application, and then search through that list for the user data I'm looking for... however, a more direct approach would be far better.
Why I want to do this is simple: if I could attach a User Identifier to these Device Endpoints, and query based on that, I could avoid completely having to save the ARN to our DynamoDB database. It would save a lot of implementation time and complexity.
Let me know what you guys think, even if what you think is that this idea is impractical and stupid, or if searching through all of them is the best way to go about this!
Cheers!
There isn't the ability to have a "where" clause in ListTopics. I see two possibilities:
Create a new SNS topic per user that has some identifiable id in it. So, for example, the ARN would be something like "arn:aws:sns:us-east-1:123456789:know-prefix-user-id". The obvious downside is that you have the potential for a boat load of SNS topics.
Use a service designed for this type of usage like PubNub. Disclaimer - I don't work for PubNub or own stock but have successfully used it in multiple projects. You'll be able to target one or many users this way.
According the the [AWS documentation][1] if you try and create a new Platform Endpoint with the same User Data you should get a response with an exception including the ARN associated with the existing PlatformEndpoint.
It's definitely not ideal, but it would be a round about way of querying the User Data Endpoint attributes via exception.
//Query CustomUserData by exception
CreatePlatformEndpointRequest cpeReq = new CreatePlatformEndpointRequest().withPlatformApplicationArn(applicationArn).withToken("dummyToken").withCustomUserData("username");
CreatePlatformEndpointResult cpeRes = client.createPlatformEndpoint(cpeReq);
You should get an exception with the ARN if an endpoint with the same withCustomUserData exists.
Then you just use that ARN and away you go.

Retrieve Used and New Items, detecting their condition - Amazon-MWS

We allready get a list of our Products through the Amazon MWS API, with the ReportTyp _GET_FLAT_FILE_OPEN_LISTINGS_DATA_.
Probelm we have is, that we cant see if the product is NEW or USED.
And i also dont know any report with whom i could do that.
Do you know any solution, which gives me the opportunity to detect, wether an SKU is listed under NEW or under USED?
Thanks in adcanve
I found the following way to go, for this problem.
You will need the Amazon MWS Product API with the ReportTyp GetMyPriceForSKU. There you will find the section condition and subCondition.

Amazon Product Advertising API: XXX is not a valid value for BrowseNodeId

I am using the Amazon product Advertising API to fetch the product categories. For US categories it is working.
But using browse nodes from different sites I get the following error:
"569604 is not a valid value for BrowseNodeId. Please change this value and retry your request."
I got the browse-nodes from the following site:
http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?BrowseNodeIDs.html
Where is the problem?
Thanks for your help!
This is an error that happens pretty regularly with the Products API, but not because the BrowseNodeId does not exist. Rather, the API intermittently craps out and returns this error. If you run it again, it will probably return the node correctly.
The way I have gotten around this limitation is to wrap the call in retry code.
Edit.
I tried running this BrowseNodeId, and indeed, it is invalid. The BrowseNodeIds change regularly, and because this is a german browse node you may not be able to access it from the US.
However, according to this, your BrowseNode (Electronics, DE) should be available in the US:
http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/APPNDX_SearchIndexValues.html
You can test browse nodes at this url:
http://www.amazon.com/exec/obidos/tg/browse/-/$N/
where $N is the browse node.

Find the newest products using Amazon API

Is it possible to find all the new Amazon products in a specific category using the Amazon Associates Web Service or any other tool ?
I tried also the RSS which give only 10 results and it is updated only once in few months. Do you have any other ideas ?
Once you know the Browse Node for the category you're interested in, you can use the BrowseNodeLookup operation with the NewReleases ResponseGroup to get some new products in that category; looks like you get 10, even in a busy category like Music ยป Alternative.
They don't say anything in those pages about getting more, and NewReleases is only a valid ResponseGroup for BrowseNodeLookup operations and not, say, ItemSearch, so I don't think you can get more than 10 new releases per category.