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 :
product.getExample.cpThis is a demo API. It returns a sample product definition. The XML for the Product object is returned.Signatureproduct.getExample.cp ParametersNone 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> ErrorsNoneExamplehttp://api.CafePress.com/product.getExample.cpproduct.listByStore.cpReturns all Products of the given Store. The specified Store must belong to the authenticated user.Signatureproduct.listByStore?userToken=string-value&appKey=string-value&storeId=int-value ParametersRequired: userToken - a valid user authentication token. appKey - an application key. storeID - (integer) The ID for the Store. Optional: None ResponseA 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> ErrorsStandard Errors as described hereExamplehttp://api.CafePress.com/product.listByStore.cp?appKey=11111111-1111-1111-1111-111111111111product.find.cpReturns the Product object's XML description for the specified ID. The specified Product must belong to the authenticated user.Signatureproduct.find.cp?userToken=string-value&appKey=string-value&id=int-value ParametersRequired: 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> ErrorsStandard Errors as described hereExamplehttp://api.CafePress.com/product.find.cp?appKey=11111111-1111-1111-1111-111111111111product.save.cpCreates a new Product or updates the specified Product. The product being updated must belong to the authenticated user.Signatureproduct.save.cp?userToken=string-value&appKey=string-value&value=product-object-xml-value ParametersRequired: userToken - a valid user authentication token. appKey - an application key. value - XML for the Product object Optional: None ResponseThe 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>
ErrorsStandard Errors as described hereExamplehttp://api.CafePress.com/product.save.cp?value=&appKey=11111111-1111-1111-1111-111111111111product.listAnonymousProducts.cpA 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.Signatureproduct.listAnonymousProducts.cp?userToken=string-value&appKey=string-value ParametersRequired: 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> ErrorsStandard Errors as described hereExamplehttp://api.CafePress.com/product.listAnonymousProducts.cp?appKey=11111111-1111-1111-1111-111111111111product.listByStoreSection.cpReturns all Products in the specified Section of the Store. The specified Store must belong to the authenticated user.Signatureproduct.listByStoreSection?userToken=string-value&appKey=string-value&storeSectionId=int-value ParametersRequired: userToken - a valid user authentication token. appKey - an application key. storeSectionId - (integer) The ID for the Section. Optional: None ResponseList of Product Object XMLErrorsStandard Errors as described hereExamplehttp://api.CafePress.com/product.listByStoreSection.cp?storeSectionId=1758455&appKey=11111111-1111-1111-1111-111111111111 |