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]