So you have a jpeg image (it is a jpeg, right?) that you'd like to get into a Shutterfly album. Well, you can use our upload API for that. The process is a little different than our Atom-based XML that you've used so far, as it requires binary data transfer. So for this one, we'll need a multipart/form-data POST. However, the basic concepts are the same - you still need to handle the call signature and make sure that you have user authentication.
The protocol allows for the transfer of multiple images during the same multipart/form-data post, but each image in the post must be destined for the same album. If you need to upload into different albums, please make separate calls for each album.
Shutterfly will respond with an Atom-based feed that describes the result of the upload. At the feed level, you will find elements for the number of successful and failed images. Within the feed, there will be (possibly) two types of entries - success and failure. Each successful image upload will have an entry, category term image, and this entry will give further data about the newly uploaded image including URLs for viewing and such. Each failed entry will have an entry, category term upload-result, as well. These failed image entries will contain a upload:failedFileName element that will help you identify which uploads failed.
Note that most image upload failures are due to a problem with the image - usually it is not a valid JPEG image, but it is possible that there was a transient issue during the transfer. Please refer to the errCode element at the feed level for more information.
- Shutterfly only supports JPEG images, and they must be grayscale or use RGB color space.