Search API: templates
This set of web-to-print API calls allows to do search directly from other websites. Web-to-print templates can be searched by keywords, size and output type. Web-to-print search results come back as an RSS feed with a list of templates, same as for a list of templates returned for a catalog.
Search for public templates
This search request returns up to 100 public web-to-print templates regardless of the ownership as an RSS feed. Templates submitted by designers and templates from web-to-print stores are returned.
The request needs to be HTTP POST made to http://zetaprints.com?page=api-search only.
POST fields
- Search – a string value up to 250 characters of search terms
- Width - a numeric value, units must be specified separately
- Height - a numeric value, units must be specified separately
- Units - any of {cm, m, mm, in, ft, px}
- GeneratePrintPdf - output file type, any of {pdf, image}
- SortBy - numeric value, 0 for sort by date, newest first; 1 for sort by popularity, most popular first
- From - numeric, number of template in search result for pagination
- Qty - number of templates to return, values between 1 and 100
Search results
Search results are limited to 500 items. E.g. a search for “cards” may return many thousands of templates, but only first 500 are actually considered. Refine the search if needed.
Pagination
Count number of templates returned by the search and if the last element in the channel is <more /> then you can use From field to get the next lot of templates. Absence of <more /> or an empty feed indicate there ain’t any more templates.
Search request example
http://zetaprints.com?page=api-search
- Search=voodoo
- GeneratePrintPdf=1
- From=6
- Qty=2
Search results example
<rss version="2.0"> <channel> <lastBuildDate>Wed, 05 08 2009 11:42:06 +0000</lastBuildDate> <title>Web-to-print templates</title> <link>http://zetaprints.com</link> <generator>ZetaPrints</generator> <item> <title>Voodoo eCard 14</title> <link>http://zetaprints.com/Voodoo-eCards-e4/Voodoo-eCard-14.htm</link> <description/> <id>E1DCFD59-01AE-405D-838D-803D3C45B678</id> <lastModified>2009-07-01T18:47:27</lastModified> <thumbnail>http://zetaprints.com/thumb/da9d5da3-d8ba-459e-bfcd-bec28587fab0-0.jpg</thumbnail> <image>http://zetaprints.com/preview/da9d5da3-d8ba-459e-bfcd-bec28587fab0-0.jpg</image> <media:thumbnail url="http://zetaprints.com/thumb/da9d5da3-d8ba-459e-bfcd-bec28587fab0-0.jpg" type="image/jpeg" xmlns:media="http://search.yahoo.com/mrss/"/> <media:content url="http://zetaprints.com/preview/da9d5da3-d8ba-459e-bfcd-bec28587fab0-0.jpg" type="image/jpeg" xmlns:media="http://search.yahoo.com/mrss/"/> <enclosure url="http://zetaprints.com/thumb/da9d5da3-d8ba-459e-bfcd-bec28587fab0-0.jpg" type="image/jpeg"/> </item> <item> <title>Voodoo eCard 13</title> <link>http://zetaprints.com/Voodoo-eCards-e4/Voodoo-eCard-13.htm</link> <description/> <id>099BD612-DDA3-4BDE-A05D-2890B81802B3</id> <lastModified>2009-07-01T18:47:26</lastModified> <thumbnail>http://zetaprints.com/thumb/5399eaa2-872e-4a63-93d2-61cc273bd678-0.jpg</thumbnail> <image>http://zetaprints.com/preview/5399eaa2-872e-4a63-93d2-61cc273bd678-0.jpg</image> <media:thumbnail url="http://zetaprints.com/thumb/5399eaa2-872e-4a63-93d2-61cc273bd678-0.jpg" type="image/jpeg" xmlns:media="http://search.yahoo.com/mrss/"/> <media:content url="http://zetaprints.com/preview/5399eaa2-872e-4a63-93d2-61cc273bd678-0.jpg" type="image/jpeg" xmlns:media="http://search.yahoo.com/mrss/"/> <enclosure url="http://zetaprints.com/thumb/5399eaa2-872e-4a63-93d2-61cc273bd678-0.jpg" type="image/jpeg"/> </item> <more/> </channel> </rss>
Caching
Search results can be cached for several minutes. Changes to your catalogs may not be reflected in the search immediately. There may be an occasional inconsistency in search pagination if a different server in the cluster has a slightly different data set and your server affinity has changed. It should be a very rare event, but possible none the less.
- Template details API
- Search API: keywords
- Catalogs API
- Dynamic imaging API
- Image library API
- Automatic image resizing
- Image editing API
- User registration API
- User access API
- User management API
- About web-to-print API
- MD5 hash for authentication
- Automatic user logon
- Shape coordinates for editing
- Orders API: order details
- Orders API: save order
- Shape metadata
- Orders API: generate output files
- Orders API
- Payments API
- How to get API key
- In-preview image editing
- Orders API: status change
- Advanced text editing
- Orders API: list of orders



