Saturday, 27 December 2008

Tesco.com API now searches for barcodes

Hello my fellow post-Christmas Tesco.com API coders!

It's great to see so many of you signed up already and that several of you are already having fun with the Tesco.com Grocery API.

This is an update to let you know that the API works well searching for barcodes so if you are in a mind to recreate the Tesco@Home demo application's ability to take a barcode and search Tesco.com for the product, go right ahead.

You'll need to use the ProductSearch method of the GroceryClient class as well as some some software that yields a numeric barcode number from an image of a barcode. I have updated the API reference to show how to call the API using a typical barcode number.

Just bear in mind:
  1. The number will only resolve to a product if the customer's home store stocks it (not all Tesco stores are the same size nor have the same range of products).
  2. The number you resolve from the barcode must be either 8 or 13 numeric characters in length. This depends on the product - most products are 13 characters. The numeric format that the API understands is the 'European Article Number', or EAN.
  3. The system cannot resolve a Tesco in-store printed barcode. These barcodes are what you see on individually printed labels for pre-packed meats, and products from the delicatessen or fish counters. These are internally generated barcodes with the price embedded inside so a checkout can resolve that price. Every such product is different and the API cannot understand such barcodes at present.
  4. You won't get the barcode to work with Tesco Direct or other non-food products that you can't buy from the grocery section of the Tesco.com web site.
Have fun writing software to turn barcodes into search results, and let me know what you come up with!

2 comments:

  1. Hi,

    It's great to see APIs like this springing up. I'm writing a web site at the moment which would need to access Tesco Digital's MP3 Music search. Are there any plans for anything like that in the pipeline?

    Cheers,
    Terry.

    ReplyDelete
  2. Hi Nick

    I just came across this page and now its almost 2011 and I was wondering what happend to this API? Is it no longer available? I can't seem to find much info about it?

    Thanks
    Alan

    ReplyDelete

As this blog grows in readership - and because it carries the Tesco brand - I have had to become more careful about the sort of comments that are acceptable. The good news is that I'm a champion of free speech so please be as praising or as critical as you wish! The only comments I DON'T allow through are:

1. Comments which criticise an individual other than myself, or are critical of an organisation other than Tesco. This is simply because they cannot defend themselves so is unfair and possibly libellous. Comments about some aspect of Tesco being better/worse than another equivalent organisation are allowed as long as you start by saying "in my personal opinion.." or "I think that...". ... followed by a "...because.." and some reasoned argument.

2. Comments which are totally unrelated to the context of the original article. If I have written about a mobile app and you start complaining about the price of potatoes then your comment isn't going stay for long!

3. Advertising / web links / spam.

4. Insulting / obscene messages.


Ok, rules done - now it's your go: