Submit an Idea or a tool Contact Us
CafePress Developers Network
Home Tools

Content API - Product

Back to Content API Overview
When you apply a valid Design to Merchandise, you create a sellable Product. Products can have more than one designable region. For instance, a T-Shirt has Back center, Back Shoulder, Front canvas and Front Pocket. These APIs provide the design details and the merchandising details(price, description, etc) for a given Product.

Try our Sample Product Application. (This only works in Firefox and you will need an API Key to access it)

Here are a few things worth knowing about the Product APIs :

1. A product is keyed to its parent merchandise by the 'parent-id' attribute of Product Object XML.
2. The <product> XML node has many read-only details. Unfortunately you still need to pass them in this version.
3. The editable nodes and attributes are :
  • The <product> 'name' attribute is by default the name of the underlying merchandise but may be changed to give the product a unique name like "Engineers Rock Shirt"
  • <float name="SellPrice" value="xx.xx" /> Add or update this element to set the sell price for the product. It must be equal to or greater than the sibling "BasePrice" element.
  • <int name="StoreId" value="1900105" /> The Store identifier in which to place the product. This may be set to any Store of the authenticated user. If unspecified the product will be placed in the user's Create & Buy (Custom Products) Section, accessible at http://www.CafePress.com/cp/customize/saved_products.aspx.
  • <int name="SectionId" value="0" /< This may be updated to the desired Store Section identifier. The default Section of all stores is 0, and the value defaults to 0 if unspecified.
  • Any <canvas> may optionally include a node <design id="xxxxxxx"/> specify what design to put on a certain canvas area of the product. You may not place designs on overlapping canvases, such as "FrontCenter" and "FrontPocket". Use one or the other or neither. Additionally some Products allow only one canvas to contain a design. These constraints will be better handled in future releases, but for now you can discover them by designing Products on the CafePress web site.
Note: A lot of granular details about a product is exposed in these APIs as of now. We want to clean these up and would love to get your feedback as well.

product.getExample.cp

This is a demo API. It returns a sample product definition. The XML for the Product object is returned.
Signature
product.getExample.cp
Parameters
None
Response
<?xml version="1.0" ?> 
- <product id="0" name="Mug" parent-id="1">
<features /> 
<constraints /> 
<documentFeatureWrappers /> 
- <canvases>
- <canvas name="FrontCenter" units="inches">
	<height>3</height> 
	<width>8.3125</width> 
	<minimum-dpi>200</minimum-dpi> 
</canvas>
- <canvas name="BackCenter" units="inches">
	<height>3</height> 
	<width>8.3125</width> 
	<minimum-dpi>200</minimum-dpi> 
</canvas>
</canvases>
- <properties>
	<int name="LegacyProductTypeId" value="0" /> 
	<float name="BasePrice" value="10.99" /> 
	<string name="CategoryCaption" value="Housewares" /> 
	<string name="CategoryId" value="5" /> 
	<string name="DefaultColor" value="N/A" /> 
	<string name="DefaultOrientation" value="Normal" /> 
	<string name="DefaultPerspective" value="Front" /> 
	<string name="DefaultSize" value="N/A" /> 
	<string name="Description" value="Mug" /> 
	<string name="MerchandiseAvailability" value="All Stores | Permanent Item" /> 
	<string name="MerchandiseAvailabilityStatusId" value="3" /> 
	<string name="ShortCaption" value="Mug" /> 
	<string name="ShortDescription" value="Mug" /> 
	<string name="StockAvailability" value="In Stock, will ship in 2 business days" /> 
	<string name="StockAvailablilityStatusId" value="1" /> 
</properties>
</product>
Errors
None
Example
http://api.CafePress.com/product.getExample.cp

product.listByStore.cp

Returns all Products of the given Store. The specified Store must belong to the authenticated user.
Signature
product.listByStore?userToken=string-value&appKey=string-value&storeId=int-value
Parameters
Required:    
userToken - a valid user authentication token.
appKey - an application key.   	   
storeID - (integer) The ID for the Store.

Optional:    
None
Response
A list of Products in this Store. The "XML for the Product object" is returned for each Product. In this example 2 Products are returned. A White Shirt and a Women's Cap Sleeve T-Shirt.
  <?xml version="1.0" ?>
- <Products>
- <product id="71510433" name="White T-Shirt" parent-id="3">
	- <features>
	- <enumerable-feature name="PrintTechnology">
	  <properties />
	- <option>
	- <properties>
	  <int name="LegacyPrintTechnologyNumber" value="2" />
	  </properties>
	  Direct Printing
	  </option>
	- <option>
	- <properties>
	  <int name="LegacyPrintTechnologyNumber" value="1" />
	  </properties>
	  Heat Transfer
	  </option>
	  </enumerable-feature>
	- <enumerable-feature name="Size">
	  <properties />
	- <option>
	- <properties>
	  <boolean name="Default" value="false" />
	  <int name="LegacySizeNumber" value="1" />
	  </properties>
	  Kids Small
	  </option>
	- <option>
	- <properties>
	  <boolean name="Default" value="false" />
	  <int name="LegacySizeNumber" value="2" />
	  </properties>
	  Kids Medium
	  </option>
	- <option>
	- <properties>
	  <boolean name="Default" value="false" />
	  <int name="LegacySizeNumber" value="3" />
	  </properties>
	  Kids Large
	  </option>
	- <option>
	- <properties>
	  <boolean name="Default" value="false" />
	  <int name="LegacySizeNumber" value="4" />
	  </properties>
	  Small
	  </option>
	- <option>
	- <properties>
	  <boolean name="Default" value="false" />
	  <int name="LegacySizeNumber" value="5" />
	  </properties>
	  Medium
	  </option>
	- <option>
	- <properties>
	  <boolean name="Default" value="true" />
	  <int name="LegacySizeNumber" value="6" />
	  </properties>
	  Large
	  </option>
	- <option>
	- <properties>
	  <boolean name="Default" value="false" />
	  <int name="LegacySizeNumber" value="7" />
	  </properties>
	  X-Large
	  </option>
	- <option>
	- <properties>
	  <boolean name="Default" value="false" />
	  <int name="LegacySizeNumber" value="35" />
	  </properties>
	  2X-Large
	  </option>
	- <option>
	- <properties>
	  <boolean name="Default" value="false" />
	  <int name="LegacySizeNumber" value="9" />
	  </properties>
	  3X-Large
	  </option>
	- <option>
	- <properties>
	  <boolean name="Default" value="false" />
	  <int name="LegacySizeNumber" value="10" />
	  </properties>
	  4X-Large
	  </option>
	  </enumerable-feature>
	  </features>
	  <constraints />
	  <documentFeatureWrappers />
	- <canvases>
	- <canvas name="FrontCenter" units="inches">
	  <height>10</height>
	  <width>10</width>
	  <minimum-dpi>100</minimum-dpi>
	  <design id="14150562" />
	  </canvas>
	- <canvas name="BackCenter" units="inches">
	  <height>10</height>
	  <width>10</width>
	  <minimum-dpi>100</minimum-dpi>
	  </canvas>
	- <canvas name="FrontPocket" units="inches">
	  <height>6</height>
	  <width>6</width>
	  <minimum-dpi>100</minimum-dpi>
	  </canvas>
	- <canvas name="BackShoulder" units="inches">
	  <height>4</height>
	  <width>10</width>
	  <minimum-dpi>100</minimum-dpi>
	  </canvas>
	  </canvases>
	- <properties>
	  <float name="SellPrice" value="13.99" />
	  <int name="LegacyProductTypeId" value="2" />
	  <int name="MemberId" value="6314830" />
	  <int name="SectionId" value="0" />
	  <int name="StoreId" value="1900105" />
	  <price name="BasePrice" value="13.99" />
	  <string name="CategoryCaption" value="Apparel" />
	  <string name="CategoryId" value="2" />
	  <string name="DefaultColor" value="N/A" />
	  <string name="DefaultOrientation" value="Normal" />
	  <string name="DefaultPerspective" value="Front" />
	  <string name="DefaultSize" value="Large" />
	  <string name="Description" value="" />
	  <string name="MerchandiseAvailability" value="All Stores | Permanent Item" />
	  <string name="MerchandiseAvailabilityStatusId" value="3" />
	  <string name="ShortCaption" value="White T-Shirt" />
	  <string name="ShortDescription" value="White T" />
	  <string name="StockAvailability" value="In Stock, will ship in 2 business days" />
	  <string name="StockAvailablilityStatusId" value="1" />
	  </properties>
  </product>
+ <product id="80743943" name="Mini Button" parent-id="83">
	  <features />
	  <constraints />
	  <documentFeatureWrappers />
	- <canvases>
	- <canvas name="FrontCenter" units="inches">
	  <height>1.25</height>
	  <width>1.25</width>
	  <minimum-dpi>100</minimum-dpi>
	  </canvas>
	  </canvases>
	- <properties>
	  <float name="SellPrice" value="0.99" />
	  <int name="LegacyProductTypeId" value="141" />
	  <int name="MemberId" value="6314830" />
	  <int name="SectionId" value="0" />
	  <int name="StoreId" value="1900105" />
	  <float name="BasePrice" value="0.99" />
	  <string name="CategoryCaption" value="Stickers, Buttons & Magnets" />
	  <string name="CategoryId" value="6" />
	  <string name="DefaultColor" value="N/A" />
	  <string name="DefaultOrientation" value="Normal" />
	  <string name="DefaultPerspective" value="Front" />
	  <string name="DefaultSize" value="N/A" />
	  <string name="Description" value="" />
	  <string name="MerchandiseAvailability" value="All Stores | Permanent Item" />
	  <string name="MerchandiseAvailabilityStatusId" value="3" />
	  <string name="ShortCaption" value="Mini Button" />
	  <string name="ShortDescription" value="Mini Button" />
	  <string name="StockAvailability" value="In Stock, will ship in 2 business days" />
	  <string name="StockAvailablilityStatusId" value="1" />
	  </properties>
  </product>
  </Products>
Errors
Standard Errors as described here
Example
http://api.CafePress.com/product.listByStore.cp?appKey=11111111-1111-1111-1111-111111111111&userToken=6cfda223-428a-4791-987c-21972ca9c87f&storeid=1900105

product.find.cp

Returns the Product object's XML description for the specified ID. The specified Product must belong to the authenticated user.
Signature
product.find.cp?userToken=string-value&appKey=string-value&id=int-value
Parameters
Required:    
userToken - a valid user authentication token.
appKey - an application key.   	   
id - (integer)the Product ID.

Optional:      	   
None
Response
<?xml version="1.0" ?>
- <product id="80743942" name="Mini Button (10 pack)" parent-id="84">
  <features />
  <constraints />
  <documentFeatureWrappers />
- <canvases>
- <canvas name="FrontCenter" units="inches">
  <height>1.25</height>
  <width>1.25</width>
  <minimum-dpi>100</minimum-dpi>
  </canvas>
  </canvases>
- <properties>
  <float name="SellPrice" value="7.99" />
  <int name="LegacyProductTypeId" value="142" />
  <int name="MemberId" value="6314830" />
  <int name="SectionId" value="0" />
  <int name="StoreId" value="1900105" />
  <price name="BasePrice" value="7.99" />
  <string name="CategoryCaption" value="Stickers, Buttons & Magnets" />
  <string name="CategoryId" value="6" />
  <string name="DefaultColor" value="N/A" />
  <string name="DefaultOrientation" value="Normal" />
  <string name="DefaultPerspective" value="Front" />
  <string name="DefaultSize" value="N/A" />
  <string name="Description" value="" />
  <string name="MerchandiseAvailability" value="All Stores | Permanent Item" />
  <string name="MerchandiseAvailabilityStatusId" value="3" />
  <string name="ShortCaption" value="Mini Button (10 pk)" />
  <string name="ShortDescription" value="Mini Btn (10)" />
  <string name="StockAvailability" value="In Stock, will ship in 2 business days" />
  <string name="StockAvailablilityStatusId" value="1" />
  </properties>
  </product>
Errors
Standard Errors as described here
Example
http://api.CafePress.com/product.find.cp?appKey=11111111-1111-1111-1111-111111111111&userToken=a3c63b34-8c53-4014-b518-d8a759577a51&id=80743942

product.save.cp

Creates a new Product or updates the specified Product. The product being updated must belong to the authenticated user.
  • If no "Product ID" is specified, or the "Product ID" value (specified in the "Product object XML value") is 0 a new Product is created, or else the specified Product is updated.
  • If Store id is not provided, the Product is stored as a Custom Product ( Create & Buy Product) i.e. grouped under the Anonymous Products for this user.
  • If the Store Section id is omitted, the Product will be saved at the root level i.e. Section ID = 0.
    Signature
    product.save.cp?userToken=string-value&appKey=string-value&value=product-object-xml-value
    Parameters
    Required:    
    userToken - a valid user authentication token. 
    appKey - an application key.   
    value - XML for the Product object
    
    Optional:    
    None
    Response
    The Product object XML value for the newly created or updated Product is returned back.
    <?xml version="1.0"?>
    <product id="83702367" name=" Large Mug " parent-id="2">
      <features />
      <constraints />
      <documentFeatureWrappers />
      <canvases>
        <canvas name="FrontCenter" units="inches">
          <height>3</height>
          <width>3</width>
          <minimum-dpi>200</minimum-dpi>
          <design id="14150562" />
        </canvas>
        <canvas name="BackCenter" units="inches">
          <height>3</height>
          <width>8.3125</width>
          <minimum-dpi>200</minimum-dpi>
        </canvas>
      </canvases>
      <properties>
        <float name="SellPrice" value="11.99" />
        <int name="LegacyProductTypeId" value="1" />
        <int name="MemberId" value="6314830" />
        <int name="SectionId" value="0" />
        <int name="StoreId" value="1901805" />
        <price name="BasePrice" value="11.99" />
        <string name="CategoryCaption" value="Housewares" />
        <string name="CategoryId" value="5" />
        <string name="DefaultColor" value="N/A" />
        <string name="DefaultOrientation" value="Normal" />
        <string name="DefaultPerspective" value="Front" />
        <string name="DefaultSize" value="N/A" />
        <string name="Description" value="" />
        <string name="MerchandiseAvailability" value="All Stores | Permanent Item" />
        <string name="MerchandiseAvailabilityStatusId" value="3" />
        <string name="ShortCaption" value="Large Mug" />
        <string name="ShortDescription" value="Large Mug" />
        <string name="StockAvailability" value="In Stock, will ship in 2 business days" />
        <string name="StockAvailablilityStatusId" value="1" />
      </properties>
    </product>
    Errors
    Standard Errors as described here
    Example
    http://api.CafePress.com/product.save.cp?value=&appKey=11111111-1111-1111-1111-111111111111&userToken=4b8cd10e-2acc-4495-8c80-28f4d7197cc7

    product.listAnonymousProducts.cp

    A guest user (who hasn't signed in) is also called an Anonymous user at CafePress. This type of user accesses the CafePress website via the Create & Buy flow and Create & Buy Custom Products that are not available for sale to others. A shopkeeper can also create Custom Products. These Custom Products are grouped separately. They are not grouped under a Shop as such. This API returns all these Products for the authenticated user.
    Signature
    product.listAnonymousProducts.cp?userToken=string-value&appKey=string-value
    Parameters
    Required:     
    userToken  - a valid user authentication token. 
    appKey  - an application key. 
    
    Optional:
    None
    
    Response
    <?xml version="1.0" ?>
    - <Products>
    + <product id="71517270" name="Women's T-Shirt" parent-id="40">
    + <product id="81611407" name="Hooded Sweatshirt" parent-id="13">
    + <product id="81718471" name="Women's Cap Sleeve T-Shirt" parent-id="76">
    + <product id="82633004" name="Jr. Raglan" parent-id="49">
    + <product id="83047635" name="Jr. Raglan" parent-id="49">
      </Products>
    Errors
    Standard Errors as described here
    Example
    http://api.CafePress.com/product.listAnonymousProducts.cp?appKey=11111111-1111-1111-1111-111111111111&userToken=4b8cd10e-2acc-4495-8c80-28f4d7197cc7

    product.listByStoreSection.cp

    Returns all Products in the specified Section of the Store. The specified Store must belong to the authenticated user.
    Signature
    product.listByStoreSection?userToken=string-value&appKey=string-value&storeSectionId=int-value
    Parameters
    Required:    
    userToken - a valid user authentication token.
    appKey - an application key.   	   
    storeSectionId - (integer) The ID for the Section.
    
    Optional:    
    None
    
    Response
    List of Product Object XML
    Errors
    Standard Errors as described here
    Example
    http://api.CafePress.com/product.listByStoreSection.cp?storeSectionId=1758455&appKey=11111111-1111-1111-1111-111111111111&userToken=4b8cd10e-2acc-4495-8c80-28f4d7197cc7
  • Signup to receive updates