User Tools

Site Tools


covers:api

This is an old revision of the document!


Covers (RESTful) API

Using Covers API you can retrieve data on ChiliFresh covers. It has output available in XML and JSON.

Covers availability data

Input

* Parameters:

ParameterType (size)MandatoryDescription
isbnVariable characters (20)YesItem's ISBN, UPC or other ID
sizeVariable characters (50)NoOptions: S - small, M - medium, L - large, empty - returns all values. If incorrect size parameter, it is treated as empty.

Output

  • Format: XML, JSON
  • Blocks and elements:
Block Element Type (size)Exists Description
Block response startsAlways
responseresponse_codeInteger (1)AlwaysResponse code 1 - response OK, 0 - missing item ID
responseresponse_descriptionText (255)AlwaysBrief description of response code
responseresponse_timeDate&time (D, d M Y H:i:s -hhmm)AlwaysExample: Thu, 30 Jun 2010 07:25:58 -0500
responseitem_idISBN, UPC or other item IDIf isbn parameter presentISBN, UPC or other item ID
responsesmall_cover_exists1 or 0If size parameter is “S” or empty1 if small cover exists, 0 if not
responsesmall_cover_urlURLIf small_cover_exists is 1, this parameter includes displays cover URLIf small_cover_exists is 1, this parameter includes displays cover URL
responsemedium_cover_exists1 or 0If size parameter is “M” or empty1 if medium cover exists, 0 if not
responsemedium_cover_urlURLIf medium_cover_exists is 1, this parameter includes displays cover URLIf medium_cover_exists is 1, this parameter includes displays cover URL
responselarge_cover_exists1 or 0If size parameter is “L” or empty1 if large cover exists, 0 if not
responselarge_cover_urlURLIf large_cover_exists is 1, this parameter includes displays cover URLIf large_cover_exists is 1, this parameter includes displays cover URL
Block response ends

XML input example:

http://content.chilifresh.com/api/?isbn=9780578033440&size=L

XML output example:

<response>
	<response_code>1</response_code>
	<response_description>Response OK</response_description>
	<response_time>Thu, 30 Jun 2011 07:25:58 -0500</response_time>
	<item_id>9780578033440</item_id>
	<small_cover_exists>1</small_cover_exists>
	<small_cover_url>http://content.chilifresh.com/?isbn=9780578033440&size=S</small_cover_url>
	<medium_cover_exists>1</medium_cover_exists>
	<medium_cover_url>http://content.chilifresh.com/?isbn=9780578033440&size=M</medium_cover_url>
	<large_cover_exists>1</large_cover_exists>
	<large_cover_url>http://content.chilifresh.com/?isbn=9780578033440&size=L</large_cover_url>
</response>

JSON input example:

http://content.chilifresh.com/api/json/?isbn=9780578033440&size=L

JSON output example:

{"response":
	{
	"response_code":"1",
	"response_description":"Response OK",
	"response_time":"Thu, 30 Jun 2011 08:05:30 -0500",
	"item_id":"9780578033440","small_cover_exists":"1",
	"small_cover_url":"http:\/\/content.chilifresh.com\/?isbn=9780578033440&size=S",
	"medium_cover_exists":"1",
	"medium_cover_url":"http:\/\/content.chilifresh.com\/?isbn=9780578033440&size=M",
	"large_cover_exists":"1",
	"large_cover_url":"http:\/\/content.chilifresh.com\/?isbn=9780578033440&size=L"
	}
}
covers/api.1309439511.txt.gz · Last modified: 2012/04/22 04:55 (external edit)