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!

Saturday 20 December 2008

Tesco API now live and documented

UPDATED: lansleytech.com is now techfortesco.com
UPDATED: API support documentation now at this link.

Well I may be dying from this terrible cold but 'the show must go on' and the Tesco.com Grocery API is now live.

Head to the support web site at http://www.techfortesco.com/tescoapiweb where you can register and get access not only to the service location but also a complete reference guide, and a coded example using a Windows Form application compatible with Visual Studio 2008 SP1 (any edition including the free 'express' version).

In Hitchhiker's Guide, Arthur Dent says "I feel like a military academy, bits of me keep passing out!". Arthur's excuse was having just been beamed on board a Vogon ship by a matter transfer beam. My cold's making me feel the exactly same way, so Party On! during this festive Yuletide weekend while I lay in bed moaning randomly and demanding that a lorry load of flu relief be sent to me immediately...

Tuesday 16 December 2008

Tesco.com API Support Web Live!

As we head towards Friday and the launch of the Community Technical Preview edition of the Tesco.com grocery API, it's time to sign up now as a developer.

Head to: https://www.lansleytech.com/tescoapiweb

Register, check through the terms and conditions (I particularly like condition 20), then login and set up an Application Key so you are ready to make a start from 19th December.

Now don't go criticising the support web's look and feel - I've rustled it up using Visual Studio 2008 and C# and I am an engineer rather than a designer. The site has been checked (actually, tortured) by our security team to make sure it is secure and survives being hacked by them. So I say let's get it up and running and I can make it beautiful later.

If you have any questions or issues specifically with any part of the API Support Site, or you have a problem with one or more of the terms, conditions that you are being asked to agree to, email me at the API support email address of tescoapisupport@lansley.com

During Friday, all registered developers will receive an email with instructions to get started, and I'll announce it here too.

Monday 15 December 2008

Tesco API registration./support site undergoing final test


Just a quick note to let you know that the Tesco API registration and support web site is in place and is just being tested by us right now.

I'll be launching the site tomorrow via this blog so you can register and prepare for Friday when the API itself goes on the air.

We've got a nice logo for the Tesco API too!

Friday 12 December 2008

SMS 'Where's My Delivery?' service suspended temporarily

The SMS-based 'Where's My Delivery?' service has been temporarily suspended as a fault has developed on our SMS server.

I am working with the SMS software and the cellular provider to fix the problem and I'll restart the service once I am happy that the issue is unlikely to re-occur. 

Until then, any messages you send to 81550 will sit on the network and will not be sent to our SMS server until the service resumes. No delivery messages will be sent, either, at this time.

Apologies for any inconvenience.

Wednesday 10 December 2008

Tesco.com API reg / support site nearly built - and the ethics of logging.

I'm not far away from launching the Tesco.com API registration and support site. I hope to have it ready by the weekend and will announce the web link from here.

It's been quite a week - talk in the web world of this being a busy few days for taking orders has certainly proved true here at Tesco.com and it's been 'all hands to the mill' to ensure everything is flowing sweetly. All seems to be well - at least the infrastructure team aren't running around installing extra bits of server equipment like we used to in the 'olden' days at this time of year.

Ah yes, maybe I should recall in some future blog entries some memories of days of yore when our small but merry band kept things humming thanks to the small matter of working 12-14 hour days...!

Anyway back to the future and Tesco.com registration: When you register you will obtain a 20-character alphanumeric text string which I am calling a developer key which you need to supply to the Login() web method of the API as part of successful authentication. The key is entirely randomly generated at registration (I'm not hiding anything encrypted in it) and is then used to look up your developer record in a database to ensure that you are 'allowed' to use the service.

Don't worry - I'm going to use a light touch when it comes to regulating this community preview edition of the API (conscious though I am that 'light touch' is what the Financial Services Watchdog did to the banks and look what's happened...) so as to get your feedback at this early stage.

I'm genuinely delighted by messages from developers who are excited about what they might do with the API, and I plan to launch a competition in the coming weeks to find the the most innovative use of the service.

I've also got an interesting ethical puzzle: I am about to provide for the API to include a logging facility. The idea is that you can call a 'log' web method anytime you want from your client application to log some event or other. You will then be able to analyse events through the developer web site by logging in with your developer-id. You will be able to see if users under-use some aspect of your application, for example. But what do you and I tell the customer that the application is logging about their behaviour? And how far do we go with logging? Every key press or mouse-click? The output from this CTP version of the API is going to have to come up with some rules about behaviour with client application logging, as well as reassure the customer.

My focus at the moment, though, is stabilising the service and launching this CTP edition in the next few days. Better get back to my C# coding...

Tuesday 2 December 2008

Tesco.com API (CTP) available over Christmas and New Year

Thanks to those of you who have sent me emails asking if you can have early access to the Tesco.com API that is running on one of our R&D servers.

After much thought, my answer is Yes, you can have early access to the API and try out some stuff with your own applications! I'll call this a Community Technical Preview (CTP) and it will be available by Friday 19th December and will be on air until at least the end of January 2009.

The "much thought" was simply because I had to find my way through the set of things that could go wrong. Events that either give you a disappointing service or (frankly worse) upset our web offering for everyone else. All the problems I have foreseen have been accounted for so I'm in a "let's do this!" mood.

In a week or so I'll announce a web site where you can register to obtain a Developer ID - a string of random characters created when you register - which you must use with the 'Login' web method call. You will have to agree to some terms and conditions such as accessing the API for your own use only, and not selling any client software you create (mainly because the API will surely evolve and change service URI whilst it is in any pre-beta mode, breaking your app).

The CTP version of the Tesco.com API will:
  1. Allow logging in, searching for products, and adding to basket.
  2. Allows three unsuccessful login attempts in a 24 hour period.
  3. Limits the number of product searches per IP address to 100 in any 24 hour period.
  4. Limit the count of products returned in each search to 20.
  5. Provides both SOAP and REST services - you choose the appropriate service for the device you are developing for.
  6. Sit on a single server that I can actively monitor for instances of what I will only describe as 'naughtiness'. Such stuff as hammering the API continuously with sub-second calls, or attempting to hack the API (or server), is included in this subjective term. If things don't work out I can block an IP address or, worst case, shut down the server.
However the API will be real: taking your supplied real customer account credentials and adding real products to your real Tesco.com grocery basket in real-time. However, you will have to go to the standard Tesco web site for functions such as select a delivery slot and checkout. The CTP edition of the API will not have that functionality.

If you wish to take advantage and rustle up an application or two over the Holiday period, you are welcome.

If you wish to download some free software development tools, here are some links:

Let me know if your favourite free develoment platform is not listed - I'll include it on the API support website when it launches in a week or so. Monitor this blog for the web address which I'll publish here as soon as it's ready.