Shutterfly Click-for-Prints (C4P) API
Last updated 8/29/01


Protocol:


Parameters:
Field Description Name Need Chars
command type The active command for the post. Allows for multiple commands in a form post. Only current type is "addim" for adding images. The value is "1" if active and "0" if inactive. In future other commands may be added to support new features and subset APIs (such as delim for image deletion, etc.). addim required 8
protocol The protocol being used and the version of that protocol. Current value is "SFP,100". protocol required 8
partner ID Should be set to C4P pid required 8
partner sub ID Should be set to AFFL psid optional 8
refer ID If given a refer ID by Shutterfly, enter it here. referid optional 16
partner user ID Permanent user ID used in partner's registration system. Used to keep order history for user for customer support issues, tracking of discount use, etc. Can be left blank ("") or filled with "visitor" if the order is outside partner's registration system, or if partner doesn't have a registration system. puid optional 64
number of images Number of images in post to be included in order. imnum required 8
high res image URLs List of URLs for the high resolution jpegs of the images to be ordered. imraw-# required 128
thumbnail res image URLs List of URLs for the thumbnail resolution jpegs of the images to be ordered. These will be re-used on order pages. imthumb-# required 128
selected images Useful if partner has many images on a form page and uses javascript to select/deselect images. Allows long list to be included in post with isolation of images that should be included in order. Use "0" if not in order and "1" if image should be included in order. imsel-# optional 1
user first name User's first name. Used for personalization. firstname optional 16
user last name User's last name. Used for personalization. lastname optional 16
user email address User's active email address. email optional 64
high res image height The height, in pixels, of the raw images. Used to warn user about print quality. imrawheight-# required 16
high res image width The width, in pixels, of the raw images. Used to warn user about print quality. imrawwidth-# required 16
thumbnail image height The height, in pixels, of the thumbnail images. Used to set space in HTML pages. imthumbheight-# optional 16
thumbnail image width The width, in pixels, of the thumbnail images. Used to set space in HTML pages. imthumbwidth-# optional 16
image backprint text Text to be printed on the back of each photo. Can be surfaced  for a user message or set by default.. Max length on print is 60 characters (any more gets truncated). imbkprnta-# optional 64
return URL URL that should be used to return user to pages on partner site where user selected images. returl required 128

Samples:

Simple C4P post:

<form action="http://www.shutterfly.com/c4p/UpdateCart.jsp" method="post">
<input type="hidden" name="addim" value="1">
<input type="hidden" name="protocol" value="SFP,100">
<input type="hidden" name="pid" value="C4P">
<input type="hidden" name="puid" value="AFFL">
<input type="hidden" name="imnum" value="1">
<input type="hidden" name="imraw-1" value="http://images.partner.com/foo/12345.jpg">
<input type="hidden" name="imrawheight-1" value="1800">
<input type="hidden" name="imrawwidth-1" value="1200">
<input type="hidden" name="imthumb-1" value="http://images.partner.com/foo/12345_thumb.jpg">
<input type="hidden" name="imthumbheight-1" value="150">
<input type="hidden" name="imthumbwidth-1" value="100">
<input type="hidden" name="returl" value="http://www.partner.com/alice">
<input type="submit" value="Submit">
</form>

Complex C4P Post with multiple images:

<form action="http://www.shutterfly.com/c4p/UpdateCart.jsp" method="post">
<input type="hidden" name="addim" value="1">
<input type="hidden" name="protocol" value="SFP,100">
<input type="hidden" name="pid" value="C4P">
<input type="hidden" name="psid" value="AFFL">
<input type="hidden" name="puid" value="alice">
<input type="hidden" name="imnum" value="2">
<input type="hidden" name="imraw-1" value="http://images.partner.com/foo/12345.jpg">
<input type="hidden" name="imthumb-1" value="http://images.partner.com/foo/12345_thumb.jpg">
<input type="hidden" name="imrawheight-1" value="1800">
<input type="hidden" name="imrawwidth-1" value="1200">
<input type="hidden" name="imthumbheight-1" value="150">
<input type="hidden" name="imthumbwidth-1" value="100">
<input type="hidden" name="imbkprnta-1" value="Jane and John hiking">
<input type="hidden" name="imbkprntb-1" value="Photos by Robert Smith Photography">
<input type="hidden" name="imraw-2" value="http://images.partner.com/foo/6789.jpg">
<input type="hidden" name="imthumb-2" value="http://images.partner.com/foo/6789_thumb.jpg">
<input type="hidden" name="imrawheight-2" value="480">
<input type="hidden" name="imrawwidth-2" value="640">
<input type="hidden" name="imthumbheight-2" value="120">
<input type="hidden" name="imthumbwidth-2" value="160">
<input type="hidden" name="imbkprnta-2" value="Photos by Robert Smith Photography">
<input type="hidden" name="firstname" value="Alice">
<input type="hidden" name="lastname" value="Anderson">
<input type="hidden" name="email" value="wonderlander@isp.com">
<input type="hidden" name="discount" value="4444-3333">
<input type="hidden" name="discount" value="4444-1234">
<input type="hidden" name="returl" value="http://www.partner.com/alice">
<input type="submit" value="Submit">
</form>