Content APIsContent APIs are available only on request and acceptance by CafePress.com. To request an API key please fax a signed Alpha Content API Agreement along with your PID, and a brief outline of what you want to do with the APIs at 650 655 3008 (Attention: Manisha).
The Content APIs use a REST-ful interface. Send either a HTTP GET or HTTP POST to an API [http://api.cafepress.com/api_name] with the parameters applicable for that API. The domain objects consist of images, designs, merchandise and products. For example - assume that you have an image that you want to put on a t-shirt and purchase for yourself. You can either apply the raw IMAGE or manipulate it further using open standard: SVG to create a DESIGN. Once your design is complete, you can select a piece of base MERCHANDISE, such as a t-shirt or a mug and apply the design to it to create a buyable PRODUCT. * You can only call the APIs from a secured Site * You are permitted one API call per second. We may increase or decrease the number of API calls permitted at any time * You are contractually bound to follow all terms and conditions specified in the Alpha Content API Agreement and API Guidelines. The Content APIsAn API key is required to access the Content APIs.
Error ConditionsError Condition :An unexplained error occurred. Please report these issues to dn@cafepress.com along with an explanation of the scenario in which is this error occurred. These errors are mostly caused because of some bugs, exceptions etc in the API code. Your help can fast track the process of finding and fixing these bugs a lot!<?xml version=&1.0& ?>
- <error key=&ErrorUnknown&>
<arguments />
+ <parameters>
</error>
Error Condition :The current user is not authenticated to make an API call. This happens either if the API key is not valid or the User Token has expired. <?xml version=&1.0& ?>
- <error key=&ErrorAuthentication&>
<arguments />
+ <parameters>
</error>
Error Condition :The XML passed in the call is incomplete. <?xml version=&1.0& ?>
- <error key=&ErrorXmlIncomplete&>
<arguments />
+ <parameters>
</error>
Error Condition :The XML passed in the call has a syntax error. Please check that the XML is well formed. <?xml version=&1.0& ?>
- <error key=&ErrorXmlSyntax&>
+ <arguments>
+ <parameters>
</error>
Error Condition :XML has a syntax error.<?xml version=&1.0& ?> - <error key=&ErrorXmlSyntax&> - <arguments> <argument>1</argument> <argument>13</argument> </arguments> - <parameters> <parameter key=&value& value=&<?xmlversion=&1.0&?><products> <productid=&0&name=&Sticker(Rectangular)&parentid=&20&><features/> <constraints/><documentFeatureWrappers/><canvases> <canvasname=&FrontCenter&units=&inches&><height>1.70000004768372 </height><width>1.70000004768372</width><minimumdpi>200 </minimumdpi><designid=&15087023&/></canvas></canvases> <properties><floatname=&SellPrice&value=&2.99&/> <intname=&LegacyProductTypeId&value=&50&/><intname=&MemberId&value=&6314830&/> <intname=&SectionId&value=&2031434&/><intname=&StoreId&value=&1901805&/> <pricename=&BasePrice&value=&2.49&/><stringname=&CategoryCaption&value=&Stickers,ButtonsMagnets&/> <stringname=&CategoryId&value=&6&/><stringname=&DefaultColor&value=&N/A&/> <stringname=&DefaultOrientation&value=&Horizontal&/><stringname=&DefaultPerspective&value=&Front&/> <stringname=&DefaultSize&value=&N/A&/><stringname=&Description&value=&&/> <stringname=&MerchandiseAvailability&value=&AllStores|PermanentItem&/> <stringname=&MerchandiseAvailabilityStatusId&value=&3&/><stringname=&ShortCaption&value=&Sticker(Rect.)&/> <stringname=&ShortDescription&value=&StickerRec&/> <stringname=&StockAvailability&value=&InStock,willshipin2businessdays&/> <stringname=&StockAvailablilityStatusId&value=&1&/></properties> </product></products>& /> </parameters> </error> ExceptionsA list of all available APIs for a Domain Object are returned if the requested method is not supported by the Domain object. For instance when this API call is made http://api.cafepress.com/merchandise.unknown.cp the response is -<?xml version=&1.0& ?>
- <help>
<exception-message>Unable to find action 'unknown' on resource 'merchandise'
using parameters ''</exception-message>
- <documentation>
- <resources>
- <resource name=&merchandise& comments=&Supplies all actions concerning merchandise.&>
- <actions>
- <action name=&findByName& comments=&Find merchandise by its name.&>
- <parameters>
<parameter name=&name& comments=&The name of a particular merchandise.& />
</parameters>
</action>
- <action name=&list& comments=&Returns a list of full merchandise definitions
for all merchandise&>
<parameters />
</action>
- <action name=&getExample& comments=&Returns an example&>
<parameters />
</action>
- <action name=&find& comments=&Find merchandise by its Id, returning the full
merchandise definition.&>
- <parameters>
<parameter name=&id& comments=&The id of a particular merchandise.& />
</parameters>
</action>
</actions>
</resource>
</resources>
</documentation>
</help>
|