How to programmatically embed your Amazon Associates affiliate code into a link using 13 digit ISBN codes.
After digging quite a lot into this, I found out that the 13 digit ISBN code is different to the 10 digit and you’ll probably want to perform an ASIN lookup rather than rely on the ISBN. Some 13 digit ISBNs are the same when converted to a 10 digit call, some not. Amazon don’t recommend using conversion tools or mapping as this can break things.
Here’s my starting point for a search request using ECS:
[CODE]https://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService&Operation=ItemLookup&SubscriptionId=[your_AWS_ID]&AssociateTag=[your assoc id]&ItemId=[ISBN]&IdType=EAN&SearchIndex=Books [/CODE]
An alternative way without ECS using a search results link:
https://www.amazon.com/gp/search?keywords=[13 digit isbn goes here]&index=books&linkCode=qs&tag=[your assoc id]
Remove the brackets in the code samples above and you should have a neat Amazon Associates link that can be altered with a few php or javascript variables.
Please note that this currently works in June of 2013 and may change in future. Please also check that it is within the Amazon terms and conditions to link in this way as this may also change.