Reviews API
Using Reviews API you can implement reviews into your library's OPAC, web page, iPhone app or anywhere else. It has output available in XML and JSON.
Please note:
Reviews user functions
userRegister: register a user for writing reviews
This function allows registering a user for posting reviews
Parameter | Type (size) | Mandatory |
action | userRegister | Yes |
account | Integer (10) | Yes |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
nickname | Variable characters (50) | Yes |
email | Email address (100) | Yes |
password | Variable characters (20) | Yes |
library_card | Variable characters (40) | No |
session_interval | Integer (6) - in seconds | No (if empty, will apply default session length of 1440 seconds) |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
response | user_id | Integer (10) | If response_code is “200” | ChiliFresh user ID |
response | session_id | Variable chars (100) | If response_code is “200” | Logged in user's session ID |
Block response ends | | | | |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>200</response_code>
<response_description>User registered</response_description>
<response_time>Wed, 26 Aug 2009 13:17:31</response_time>
<user_id>3455</user_id>
<session_id>896de1f873893451f4d69881bb1b3362</session_id>
</response>
Response code
Code | Code description |
200 | User registered |
210 | Nickname already taken |
220 | Inappropriate email format |
230 | Email already used |
240 | Empty email |
250 | Empty nickname |
260 | Empty password |
userLogin: login of a registered user
This function allows logging in a registered user for posting reviews
Parameter | Type (size) | Mandatory |
action | userLogin | Yes |
account | Integer (10) | Yes |
email | Email address (100) | Yes |
password | Variable characters (20) | Yes |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
session_interval | Integer (6) - in seconds | No (if empty, will apply default session length of 1440 seconds) |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
response | user_id | Integer (10) | If response_code is “300” | ChiliFresh user ID |
response | session_id | Variable chars (100) | If response_code is “300” | Logged in user's session ID |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>300</response_code>
<response_description>User logged in</response_description>
<response_time>Wed, 26 Aug 2009 13:20:05</response_time>
<user_id>84</user_id>
<session_id>896de1f873893451f4d69881bb1b3362</session_id>
</response>
Response code
Code | Code description |
110 | Response OK |
120 | ISBN is empty |
userLogout: log-out of a logged in user
This function allows logging out a logged in user
Parameter | Type (size) | Mandatory |
action | userLogout | Yes |
account | Integer (10) | Yes |
session_id | Variable characters (100) | Yes |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (4) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>1000</response_code>
<response_description>User logout OK</response_description>
<response_time>Wed, 26 Aug 2009 14:20:05</response_time>
</response>
Response code
Code | Code description |
1000 | User logout OK |
60 | Session invalid, expired or empty |
userGetPassword: reset password for user
This function allows resetting a password of a registered user
Parameter | Type (size) | Mandatory |
action | userGetPassword | Yes |
account | Integer (10) | Yes |
email | E-mail address (100) | If nickname empty |
nickname | Variable characters (20) | If email empty |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>700</response_code>
<response_description>Password reset and sent sucessfully</response_description>
<response_time>Wed, 26 Aug 2009 13:28:18</response_time>
</response>
Response code
Code | Code description |
700 | Password reset and sent sucessfully |
710 | Password not sent due to internal error |
720 | No such user |
730 | Supplied email not valid |
740 | Both email and nickname empty |
userChangePassword: change password for user
This function allows changing the password of a registered, logged-in user
Parameter | Type (size) | Mandatory |
action | userChangePassword | Yes |
account | Integer (10) | Yes |
current_password | Variable characters (20) | Yes |
new_password | Variable characters (20) | Yes |
new_password_repeated | Variable characters (20) | Yes |
session_id | Variable characters (20) | Yes |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>801</response_code>
<response_description>E-mail changed successfully</response_description>
<response_time>Wed, 26 Aug 2009 13:40:14</response_time>
</response>
Response code
Code | Code description |
800 | Password changed successfully |
810 | Current password does not match |
820 | New and repeated passwords do not match |
830 | Current password empty |
840 | New password empty |
850 | Repeated password empty |
60 | Session invalid, expired or empty |
userChangeNickname: change nickname for user
This function allows changing the nickname of a registered, logged-in user
Parameter | Type (size) | Mandatory |
action | userChangeNickname | Yes |
account | Integer (10) | Yes |
current_password | Variable characters (20) | Yes |
new_nickname | Variable characters (40) | Yes |
session_id | Variable characters (20) | Yes |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>802</response_code>
<response_description>Nickname changed successfully</response_description>
<response_time>Wed, 26 Aug 2009 13:40:14</response_time>
</response>
Response code
Code | Code description |
802 | Nickname changed successfully |
812 | Current password does not match |
832 | Current password empty |
842 | New nickname empty |
852 | Nickname already taken |
60 | Session invalid, expired or empty |
userChangeEmail: change e-mail for user
This function allows changing the email of a registered, logged-in user
Parameter | Type (size) | Mandatory |
action | userChangePassword | Yes |
account | Integer (10) | Yes |
current_password | Variable characters (20) | Yes |
new_email | Variable characters (100) | Yes |
session_id | Variable characters (20) | Yes |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>800</response_code>
<response_description>Password changed successfully</response_description>
<response_time>Wed, 26 Aug 2009 13:40:14</response_time>
</response>
Response code
Code | Code description |
801 | Password changed successfully |
811 | Current password does not match |
831 | Current password empty |
841 | New mail empty |
851 | Incorrect email format |
861 | Email address already used |
60 | Session invalid, expired or empty |
Reviews general functions
Ratings user functions
getSessionExpirationInterval: providing session length
This function specifies session length
Parameter | Type (size) | Mandatory |
action | getSessionExpirationInterval | Yes |
account | Integer (10) | Yes |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
session_id | varchar(32) | No - if empty, will return default session interval |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
response | interval | Integer (10) | Always | Session length |
response | unit | Varchar (20) | Always | Session interval unit |
Block response ends |
XML output example:
<response>
<response_code>123</response_code>
<response_description>Session interval length</response_description>
<response_time>Wed, 06 Nov 2013 11:28:55</response_time>
<interval>1440</interval>
<unit>seconds</unit>
</response>
Response code
Code | Code description |
123 | Session interval length |
getRatings: retrieving ratings on number of items at once
This function allows retrieving ratings information on several items at once for comma-separated ISBNs
Parameter | Type (size) | Mandatory |
action | getRatings | Yes |
account | Integer (10) | Yes |
isbn | Comma-separated 10- or 13-character ISBN or other item ID | No |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
XML Retrieval example:
https://secure.chilifresh.com/api/reviews/?isbn=0889652015,0790783517,0060598786&account=20&action=getRatings&api_key=1j132ioj12oij3
JSON Retrieval example:
https://secure.chilifresh.com/api/reviews/json/?isbn=0889652015,0790783517,0060598786&account=20&action=getRatings&api_key=1j132ioj12oij3
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block header starts | If response_code is “100” | |
header | rating_icon | URL (100) | No | User-defined rating icon URL |
header | item_count | Integer (3) | Yes | Count of comma-separated ISBNs received and recognized |
Block header ends |
Block results starts | if item_count larger than 0 | |
Block item starts | if item_count larger than 0, for every item | |
item | isbn | Variable characters (20) | Always | Contains ISBN or other ID of an item |
item | review_count | Integer (4) | Always | Number of reviews for an item with ID in isbn |
item | suggest_count | Integer (4) | if review_count larger than 0 | Number of how many users submitting reviews would suggest this item to a friend for an item with ID in isbn |
item | rating_count | Integer (4) | Number of ratings for an item with ID in isbn | |
item | average_rating | Decimal (1,2) | if review_count larger than 0 | Average rating for an item with ID in isbn |
item | permanent_url | URL (100) | Always | Permanent URL to reviews of the item with ID in isbn |
Block item ends |
Block results ends |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>100</response_code>
<response_description>Response OK</response_description>
<response_time>Wed, 26 Aug 2009 11:14:34</response_time>
<header>
<rating_icon>http://chilifresh.com/ratingicons/red_star.gif</rating_icon>
<item_count>3</item_count>
</header>
<results>
<item>
<isbn>0889652015</isbn>
<review_count>0</review_count>
<permanent_url>http://chilifresh.com/reviews/?varA=20&varB=book&varC=0889652015</permanent_url>
</item>
<item>
<isbn>0790783517</isbn>
<review_count>3</review_count>
<suggest_count>3</suggest_count>
<rating_count>4</rating_count>
<average_rating>4.67</average_rating>
<permanent_url>http://chilifresh.com/reviews/?varA=20&varB=book&varC=0790783517</permanent_url>
</item>
<item>
<isbn>0060598786</isbn>
<review_count>0</review_count>
<permanent_url>http://chilifresh.com/reviews/?varA=20&varB=book&varC=0060598786</permanent_url>
</item>
</results>
</response>
Response code
Code | Code description |
100 | Response OK |
getReviews: retrieving reviews for an item
This function allows retrieving reviews information on item by ISBNs (or other item ID)
Parameter | Type (size) | Mandatory | Description |
action | getReviews | Yes | |
account | Integer (10) | Yes | |
isbn | Variable characters (20) | Yes | 10- or 13-character ISBN or other item ID |
order | Integer (1) | No | Order reviews by (values): 1 - by newest, 2 - oldest, 3 - highest-rated, 4 - lowest-rated, 5 - most-useful, 6 - most-useful by advanced method, 7 - library's own reviews on top |
length | Integer (5) | No | Output length. If not specified - full review will be output |
page_size | Integer (5) | No | How many reviews per page should be output, default 10 |
page_number | Integer (5) | No | Which output page to show, default 1 |
location | Variable characters (40) | Yes | |
api_key | Variable characters (40) | Yes | |
XML Retrieval example:
https://secure.chilifresh.com/api/reviews/?isbn=0889652015&account=20&action=getReviews&api_key=1j132ioj12oij3
JSON Retrieval example:
https://secure.chilifresh.com/api/reviews/json/?isbn=0889652015&account=20&action=getReviews&api_key=1j132ioj12oij3
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block header starts | If rating_icon not empty and response code “110” | |
header | rating_icon | URL (100) | If rating_icon not empty | User-defined rating icon URL |
Block header ends |
Block item starts | If response code “110” | |
item | isbn | Variable characters (20) | Always | Contains ISBN or other ID of an item |
item | page_size | Integer (5) | Always | Number of reviews per page output |
item | page_number | Integer (5) | Always | Current output page number |
item | page_review_count | Integer (5) | Always | Number of reviews in current page |
item | total_review_count | Integer (5) | Always | Total number of reviews for the item |
item | suggest_count | Integer (5) | Always | Number of users posting reviews would suggest this item to a friend |
item | average_rating | Decimal (1,2) | Always | Average rating for the item |
item | permanent_url | URL (100) | Always | Permanent URL to the reviews of the item in \\isbn
field |
Block item ends |
Block results starts | if item_count larger than 0 | |
Block review starts | if item_count larger than 0 | |
review | review_id | Integer (10) | Always | ChiliFresh ID of the review |
review | author_nickname | Variable characters (50) | Always | Nickname of the user posting the nickname |
review | user_id | Integer (10) | If registered user | ChiliFresh user ID if user registered, not appearing for anonymous reviews |
review | review_city | Variable characters (40) | Always | Full English name of city of library where the review has been posted |
review | review_state | Variable characters (40) | Always | Full English name of state of library where the review has been posted |
review | review_country | Variable characters (2) | Always | Two-character code of the country of library where the review has been posted |
review | review_date | Date & time (D, d M Y H:i:s) | Always | Date and time of review posted adjusted to library's timezone, e.g., Tue, 26 Aug 2008 20:44:42 |
review | review_title | Variable characters (50) | Always | Title of review set by user |
review | review_text | Text (unlimited) | Always | Text of review |
review | review_rating | Integer (1) | Always | Rating of a review set by the user |
review | review_suggest | Integer (1) | Always | Shows if the user would suggest this item to a friend (1 - yes, 0 - no) |
review | review_useful | Integer (5) | Always | Shows the sum of user useful / not useful responses (may be negative if more “not useful”) about the review |
review | review_useful_yes | Integer (5) | Always | Shows a number of users considering review to be useful |
review | review_useful_no | Integer (5) | Always | Shows a number of users considering review not to be useful |
review | review_language | Variable characters (10) | Always | ChiliFresh internal code of languages, “eng” for English - others to follow here. |
review | similar_item_isbn | Variable characters (20) | If review for similar item | 10- or 13-character ISBN of the item, or other code IF review written for (other) similar item, not this particular ISBN/code |
Block review ends |
Block results ends |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>110</response_code>
<response_description>Response OK</response_description>
<response_time>Wed, 26 Aug 2009 11:35:08</response_time>
<header>
<rating_icon>http://chilifresh.com/ratingicons/red_star.gif</rating_icon>
</header>
<item>
<isbn>0790783517</isbn>
<page_size>10</page_size>
<page_number>1</page_number>
<page_review_count>3</page_review_count>
<total_review_count>3</total_review_count>
<suggest_count>3</suggest_count>
<average_rating>4.67</average_rating>
<permanent_url>http://chilifresh.com/reviews/?varA=20&varB=book&varC=0790783517</permanent_url>
</item>
<results>
<review>
<review_id>4917</review_id>
<author_nickname>More Potter</author_nickname>
<user_id>1446</author_uid>
<review_city>Santa Monica</review_city>
<review_state>California</review_state>
<review_country>US</review_country>
<review_date>Tue, 26 Aug 2008 20:44:42</review_date>
<review_title>More Potter</review_title>
<review_text>Great film!</review_text>
<review_rating>4</review_rating>
<review_suggest>1</review_suggest>
<review_useful>0</review_useful>
<review_useful_yes>0</review_useful_yes>
<review_useful_no>0</review_useful_no>
<review_language>eng</review_language>
</review>
</results>
</response>
Response code
Code | Code description |
110 | Response OK |
120 | ISBN is empty |
getProReviews: retrieving professional reviews for an item
This function allows retrieving professional reviews information on item by ISBNs (or other item ID)
Parameter | Type (size) | Mandatory | Description |
action | getProReviews | Yes | |
account | Integer (10) | Yes | |
location | Variable characters (40) | Yes | |
api_key | Variable characters (40) | Yes | |
isbn | Variable characters (20) | Yes | 10- or 13-character ISBN or other item ID |
page_size | Integer (5) | No | How many reviews per page should be output, default 10 |
page_number | Integer (5) | No | Which output page to show, default 1 |
XML Retrieval example:
https://secure.chilifresh.com/api/reviews/?isbn=0889652015&account=20&action=getProReviews&api_key=1j132ioj12oij3
JSON Retrieval example:
https://secure.chilifresh.com/api/reviews/json/?isbn=0889652015&account=20&action=getProReviews&api_key=1j132ioj12oij3
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block item starts | If response code “110” | |
item | isbn | Variable characters (20) | Always | Contains ISBN or other ID of an item |
item | page_size | Integer (5) | Always | Number of reviews per page output |
item | page_number | Integer (5) | Always | Current output page number |
item | page_review_count | Integer (5) | Always | Number of reviews in current page |
item | total_review_count | Integer (5) | Always | Total number of reviews for the item |
Block item ends |
Block results starts | if item_count larger than 0 | |
Block review starts | if item_count larger than 0 | |
review | review_id | Variable characters (10) | Always | ChiliFresh ID of the review |
review | author_nickname | Variable characters (50) | Always | Nickname of the user posting the nickname |
review | review_source | Variable characters (40) | Always | Full English name of review source |
review | review_url | Variable characters (40) | Always | Full URL of the review source |
review | review_country | Variable characters (2) | Always | Two-character code of the country of library where the review has been posted |
review | review_date | Date & time (D, d M Y H:i:s) | No | Date and time of review posted adjusted to library's timezone, e.g., Tue, 26 Aug 2008 20:44:42 |
review | review_title | Variable characters (50) | No | Title of review set by user |
review | review_text | Text (unlimited) | Always | Text of review, limited to 600 symbols + must add review_url as “Read full review” |
Block review ends |
Block results ends |
Block response ends |
XML output example:
<?xml version="1.0"?>
TO BE ADDED
Response code
Code | Code description |
110 | Response OK |
120 | ISBN is empty |
getUserReviews: get reviews of particular registered user
This function allows retrieving reviews for any registered user
Parameter | Type (size) | Mandatory | Description |
action | getUserReviews | Yes | |
account | Integer (10) | Yes | |
user_id | Integer (10) | Yes | ChiliFresh internal user ID |
order | Integer (1) | No | Order reviews by (values): 1 - by newest, 2 - oldest, 3 - highest-rated, 4 - lowest-rated, 5 - most-useful |
length | Integer (5) | No | Output length. If not specified - full review will be output |
page_size | Integer (5) | No | How many reviews per page should be output, default 10 |
page_number | Integer (5) | No | Which output page to show, default 1 |
location | Variable characters (40) | Yes | |
api_key | Variable characters (40) | Yes | |
XML Retrieval example:
https://secure.chilifresh.com/api/reviews/?user_id=84&account=20&action=getUserReviews&api_key=1j132ioj12oij3
JSON Retrieval example:
https://secure.chilifresh.com/api/reviews/json/?user_id=84&account=20&action=getUserReviews&api_key=1j132ioj12oij3
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block header starts | If rating_icon not empty and response code “110” | |
header | rating_icon | URL (100) | If rating_icon not empty | User-defined rating icon URL |
Block header ends |
Block user starts | If response code “130” | |
user | user_id | Integer (10) | Always | ChiliFresh internal user ID |
user | user_nickname | Variable characters (20) | Always | User's nickname |
user | user_city | Variable characters (40) | Always | User's library's city |
user | user_state | Variable characters (40) | Always | User's library's state |
user | user_country | Characters (2) | Always | User's library's country |
user | page_size | Integer (5) | Always | Number of reviews per page output |
user | page_number | Integer (5) | Always | Current output page number |
user | page_review_count | Integer (5) | Always | Number of reviews in current page |
user | total_review_count | Integer (5) | Always | Total number of reviews for the item |
user | permanent_url | URL (100) | Always | Permanent URL to the reviews of the item in isbn field |
Block user ends |
Block results starts | if item_count larger than 0 | |
Block review starts | if item_count larger than 0 | |
review | review_id | Integer (10) | Always | ChiliFresh ID of the review |
review | item_isbn | Variable characters (20) | Always | 10- or 13-character ISBN, or other ID of item |
review | review_date | Date & time (D, d M Y H:i:s) | Always | Date and time of review posted adjusted to library's timezone, e.g., Tue, 26 Aug 2008 20:44:42 |
review | review_title | Variable characters (50) | Always | Title of review set by user |
review | review_text | Text (unlimited) | Always | Text of review |
review | review_rating | Integer (1) | Always | Rating of a review set by the user |
review | review_suggest | Integer (1) | Always | Shows if the user would suggest this item to a friend (1 - yes, 0 - no) |
review | review_useful | Integer (5) | Always | Shows the sum of user useful / not useful responses (may be negative if more “not useful”) about the review |
review | review_useful_yes | Integer (5) | Always | Shows a number of users considering review to be useful |
review | review_useful_no | Integer (5) | Always | Shows a number of users considering review not to be useful |
review | review_language | Variable characters (10) | Always | ChiliFresh internal code of languages, “eng” for English - others to follow here. |
Block review ends |
Block results ends |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>130</response_code>
<response_description>Response OK</response_description>
<response_time>Wed, 26 Aug 2009 15:30:17</response_time>
<header>
<rating_icon>http://chilifresh.com/ratingicons/red_star.gif</rating_icon>
</header>
<user>
<user_id>84</user_id>
<user_nickname>The Juris</user_nickname>
<user_city>Hooksett</user_city>
<user_state>New Hampshire</user_state>
<user_country>US</user_country>
<page_size>1</page_size>
<page_number>2</page_number>
<page_review_count>1</page_review_count>
<total_review_count>2</total_review_count>
<permanent_url>http://chilifresh.com/reviews/?varA=20&varB=reviewer&varC=84</permanent_url>
</user>
<results>
<review>
<review_id>200</review_id>
<item_isbn>006073132X</item_isbn>
<review_date>Wed, 26 Sep 2007 18:28:18</review_date>
<review_title>One great book</review_title>
<review_text>This is a one great book! Suggested reading for anyone.</review_text>
<review_rating>4</review_rating>
<review_suggest>1</review_suggest>
<review_useful>3</review_useful>
<review_useful_yes>4</review_useful_yes>
<review_useful_no>1</review_useful_no>
<review_language>eng</review_language>
</review>
</results>
</response>
Response code
Code | Code description |
130 | Response OK |
140 | User ID is empty |
150 | Such user does not exist |
getUserReviewsAll: get all reviews of particular registered user
This function allows retrieving all reviews in different statuses for any registered and logged in user
Parameter | Type (size) | Mandatory | Description |
action | getUserReviews | Yes | |
account | Integer (10) | Yes | |
session_id | Variable characters (35) | Yes | Valid ChiliFresh session |
order | Integer (1) | No | Order reviews by (values): 1 - by newest (default), 2 - oldest, 3 - highest-rated, 4 - lowest-rated, 5 - most-useful |
review_status | Integer (1) | No | Retrieve reviews only in status: 1 - Awaiting moderation, 2 - Suspended, 3 - Rejected, 4 - Accepted, 5 - Unmoderated (will return all if empty) |
length | Integer (5) | No | Output length. If not specified - full review will be output |
page_size | Integer (5) | No | How many reviews per page should be output, default 10 |
page_number | Integer (5) | No | Which output page to show, default 1 |
location | Variable characters (40) | Yes | |
api_key | Variable characters (40) | Yes | |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block header starts | If rating_icon not empty and response code “110” | |
header | rating_icon | URL (100) | If rating_icon not empty | User-defined rating icon URL |
Block header ends |
Block user starts | If response code “130” | |
user | user_id | Integer (10) | Always | ChiliFresh internal user ID |
user | user_nickname | Variable characters (20) | Always | User's nickname |
user | user_city | Variable characters (40) | Always | User's library's city |
user | user_state | Variable characters (40) | Always | User's library's state |
user | user_country | Characters (2) | Always | User's library's country |
user | page_size | Integer (5) | Always | Number of reviews per page output |
user | page_number | Integer (5) | Always | Current output page number |
user | page_review_count | Integer (5) | Always | Number of reviews in current page |
user | total_review_count | Integer (5) | Always | Total number of reviews for the item |
user | permanent_url | URL (100) | Always | Permanent URL to the reviews of the item in isbn field |
Block user ends |
Block results starts | if item_count larger than 0 | |
Block review starts | if item_count larger than 0 | |
review | review_id | Integer (10) | Always | ChiliFresh ID of the review |
review | review_status | Variable characters (30) | Always | Review status - Awaiting moderation, Suspended, Rejected, Accepted or Unmoderated |
review | item_isbn | Variable characters (20) | Always | 10- or 13-character ISBN, or other ID of item |
review | review_date | Date & time (D, d M Y H:i:s) | Always | Date and time of review posted adjusted to library's timezone, e.g., Tue, 26 Aug 2008 20:44:42 |
review | review_title | Variable characters (50) | Always | Title of review set by user |
review | review_text | Text (unlimited) | Always | Text of review |
review | review_rating | Integer (1) | Always | Rating of a review set by the user |
review | review_suggest | Integer (1) | Always | Shows if the user would suggest this item to a friend (1 - yes, 0 - no) |
review | review_useful | Integer (5) | Always | Shows the sum of user useful / not useful responses (may be negative if more “not useful”) about the review |
review | review_useful_yes | Integer (5) | Always | Shows a number of users considering review to be useful |
review | review_useful_no | Integer (5) | Always | Shows a number of users considering review not to be useful |
review | review_language | Variable characters (10) | Always | ChiliFresh internal code of languages, “eng” for English - others to follow here. |
Block review ends |
Block results ends |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>130</response_code>
<response_description>Response OK</response_description>
<response_time>Wed, 26 Aug 2009 15:30:17</response_time>
<header>
<rating_icon>http://chilifresh.com/ratingicons/red_star.gif</rating_icon>
</header>
<user>
<user_id>84</user_id>
<user_nickname>The Juris</user_nickname>
<user_city>Hooksett</user_city>
<user_state>New Hampshire</user_state>
<user_country>US</user_country>
<page_size>1</page_size>
<page_number>2</page_number>
<page_review_count>1</page_review_count>
<total_review_count>2</total_review_count>
<permanent_url>http://chilifresh.com/reviews/?varA=20&varB=reviewer&varC=84</permanent_url>
</user>
<results>
<review>
<review_id>200</review_id>
<item_isbn>006073132X</item_isbn>
<review_date>Wed, 26 Sep 2007 18:28:18</review_date>
<review_title>One great book</review_title>
<review_text>This is a one great book! Suggested reading for anyone.</review_text>
<review_rating>4</review_rating>
<review_suggest>1</review_suggest>
<review_useful>3</review_useful>
<review_useful_yes>3</review_useful_yes>
<review_useful_no>0</review_useful_no>
<review_language>eng</review_language>
</review>
</results>
</response>
Response code
Code | Code description |
60 | Session invalid, expired or empty |
130 | Response OK |
150 | Such user does not exist |
addUseful: add whether review was useful or not
This feature allows submitting whether a particular review was useful or not.
Parameter | Type (size) | Mandatory | Comment |
action | addUseful | Yes | |
review_id | Review ID | Yes | |
useful | Option: true/false | Yes | |
session_id | ChiliFresh session - retrieved from userRegister, userLogin or userCreateSession calls | Yes | |
api_key | Variable characters (40) | Yes | |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>875</response_code>
<response_description>Useful accepted</response_description>
<response_time>Tue, 23 Aug 2011 21:41:43</response_time>
<captcha_code>C993</captcha_code>
<session_id>be2ed1d0b7620853956a275b26b25586</session_id>
</response>
Response code
Code | Code description |
875 | Useful accepted |
876 | Useful not accepted |
60 | Session invalid, expired or empty |
reviewReportAbuse: report inappropriate reviews
This feature allows reporting inappropriate review content, which automatically submits review for moderation. One user has a limit of submitting 5 abuse reports per day.
Parameter | Type (size) | Mandatory | Comment |
action | reviewReportAbuse | Yes | |
account | Library ID | Yes | |
review_id | ID of a review to report abuse on | Yes | |
abuse_description | Text | Yes | |
session_id | ChiliFresh session ID | Yes | Can be session from createUserSession (non-logged-in user) or from userLogin (logged-in registered user) |
api_key | Variable characters (40) | Yes | |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>1100</response_code>
<response_description>Review abuse report accepted</response_description>
<response_time>Tue, 23 Aug 2011 21:41:43</response_time>
</response>
Response code
Code | Code description |
1100 | Review abuse report accepted |
60 | Session invalid, expired or empty |
1101 | Review ID invalid or empty |
1102 | Review abuse description empty |
1103 | User has reported 5 reviews already |
getAnonymous: get library's setting on adding anonymous reviews
This function responds whether library accepts anonymous reviews and if yes - supplies “captcha_code” for the session to verify against spam-bots.
Parameter | Type (size) | Mandatory | Comment |
action | getAnonymous | Yes | |
account | Integer (10) | Yes | |
api_key | Variable characters (40) | Yes | |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
response | captcha_code | Varchar(4) | If allowed | A54T |
response | session_id | Varchar (32) | If allowed | Example: 0aiso9au8s9du989a8sud989 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>460</response_code>
<response_description>Catcha code acquired</response_description>
<response_time>Tue, 23 Aug 2011 21:41:43</response_time>
<captcha_code>C993</captcha_code>
<session_id>be2ed1d0b7620853956a275b26b25586</session_id>
</response>
Response code
Code | Code description |
460 | Catcha code acquired |
463 | Library does not accept anonymous reviews |
addReviewAnonymous: posting a review by a non-registered anonymous user
This function allows posting a review without user registration, if library allows it. getAnonymous() call must be used for checking that and acquiring “captcha_code” parameter to use with the session.
Parameter | Type (size) | Mandatory | Comment |
action | addReviewAnonymous | Yes | |
account | Integer (10) | Yes | |
nickname | Varchar (50) | Yes | |
captcha_code | Varchar (4) | Yes | Captcha code acquired with getAnonymous call |
review | Text (unlimited) | Yes | |
title | Variable chars (50) | Yes | |
rating | Integer (1), 1-5 | Yes | Values: 1-5 |
suggest | Integer (1) | Yes | Value: 1-yes, 0-no |
isbn | Variable characters (20) | Yes | 10- or 13-character ISBN for books or other item ID |
session_id | Variable characters (50) | Yes | |
location | Variable characters (40) | Yes | |
api_key | Variable characters (40) | Yes | |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>400</response_code>
<response_description>Review posted OK</response_description>
<response_time>Wed, 26 Aug 2009 13:56:59</response_time>
</response>
Response code
Code | Code description |
400 | Review posted OK |
410 | Empty review |
420 | Empty title |
430 | Empty suggest field |
440 | Empty rating |
450 | Empty isbn |
461 | Captcha code invalid or empty |
462 | Nickname empty |
60 | Session invalid, expired or empty |
addReview: posting a review by registered and logged in user
This function allows a registered, logged-in user to post a review
Parameter | Type (size) | Mandatory | Comment |
action | addReview | Yes | |
account | Integer (10) | Yes | |
review | Text (unlimited) | Yes | |
title | Variable chars (50) | Yes | |
rating | Integer (1), 1-5 | Yes | Values: 1-5 |
suggest | Integer (1) | Yes | Value: 1-yes, 0-no |
isbn | Variable characters (20) | Yes | 10- or 13-character ISBN for books or other item ID |
session_id | Variable characters (50) | Yes | |
location | Variable characters (40) | Yes | |
api_key | Variable characters (40) | Yes | |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>400</response_code>
<response_description>Review posted OK</response_description>
<response_time>Wed, 26 Aug 2009 13:56:59</response_time>
</response>
Response code
Code | Code description |
400 | Review posted OK |
410 | Empty review |
420 | Empty title |
430 | Empty suggest field |
440 | Empty rating |
450 | Empty ISBN |
451 | User already has posted review for this item |
60 | Session invalid, expired or empty |
updateReview: updating a review by registered and logged in user
This function allows a registered, logged-in user to update a review
Parameter | Type (size) | Mandatory | Comment |
action | updateReview | Yes | |
account | Integer (10) | Yes | |
review | Text (unlimited) | Yes | |
title | Variable chars (50) | Yes | |
rating | Integer (1), 1-5 | Yes | Values: 1-5 |
suggest | Integer (1) | Yes | Value: 1-yes, 0-no |
review_id | Integer (10) | Yes | |
session_id | Variable characters (50) | Yes | |
location | Variable characters (40) | Yes | |
api_key | Variable characters (40) | Yes | |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>500</response_code>
<response_description>Review updated OK</response_description>
<response_time>Wed, 26 Aug 2009 14:17:55</response_time>
</response>
Response code
Code | Code description |
500 | Review updated OK |
510 | Review was not updated |
520 | Empty review |
530 | Empty title |
540 | Empty suggest field |
550 | Empty rating |
560 | Empty review ID |
60 | Session invalid, expired or empty |
deleteReview: deleting a review by registered and logged in user
This function allows a registered, logged-in user to delete a review
Parameter | Type (size) | Mandatory | Comment |
action | deleteReview | Yes | |
account | Integer (10) | Yes | |
review_id | Integer (10) | Yes | |
session_id | Variable characters (50) | Yes | |
location | Variable characters (40) | Yes | |
api_key | Variable characters (40) | Yes | |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>600</response_code>
<response_description>Review deleted OK</response_description>
<response_time>Wed, 26 Aug 2009 14:23:10</response_time>
</response>
Response code
Code | Code description |
600 | Review deleted OK |
610 | Review not deleted |
620 | Review ID is empty |
630 | Review ID not valid |
60 | Session invalid, expired or empty |
remindReview: remind a user to write a review
This call sends user an e-mail notification with a link back to catalog to write a review for item. The purpose is to make this call when user checks item back into the library.
Parameter | Type (size) | Mandatory |
action | ramingReview | Yes |
account | Integer (10) | Yes |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
user_id | Integer (10) | Mandatory if email parameter is empty) |
email | E-mail format | Mandatory if user_id parameter is empty |
name | User's name | No |
isbn | ISBN, UPC, ISSN or other item identifier | Yes |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>642</response_code>
<response_description>Reviews reminder sent successfully</response_description>
<response_time>Wed, 26 Jun 2014 14:22:05</response_time>
</response>
Response code
Code | Code description |
641 | Reviews reminder not sent due to internal error |
642 | Reviews reminder sent successfully |
643 | Supplied e-mail empty, invalid or user information does not contain valid e-mail |
644 | Item ID not provided |
645 | Library does not allow sending reviews reminders |
Review moderation functions
getUnmoderatedReviews: retrieving all unmoderated reviews for the moderator
This function allows retrieving unmoderated reviews for a particular moderator
Parameter | Type (size) | Mandatory | Description |
action | getUnmoderatedReviews | Yes | |
account | Integer (10) | Yes | |
session_id | Variable characters (50) | Yes | |
page_size | Integer (5) | No | How many reviews per page should be output, default 10 |
page_number | Integer (5) | No | Which output page to show, default 1 |
location | Variable characters (40) | Yes | |
api_key | Variable characters (40) | Yes | |
XML Retrieval example:
https://secure.chilifresh.com/api/reviews/?account=20&action=getUnmoderatedReviews&session_id=ab24d653051b5a549de17ec6975228d3&api_key=1j132ioj12oij3
JSON Retrieval example:
https://secure.chilifresh.com/api/reviews/json/?account=20&action=getUnmoderatedReviews&session_id=ab24d653051b5a549de17ec6975228d3&api_key=1j132ioj12oij3
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block header starts | If response code “110” | |
header | page_size | Integer (5) | Always | Number of reviews per page output |
header | page_number | Integer (5) | Always | Current output page number |
header | page_review_count | Integer (5) | Always | Number of reviews in current page |
header | total_review_count | Integer (5) | Always | Total number of reviews for the item |
Block header ends |
Block results starts | if item_count larger than 0 | |
Block review starts | if item_count larger than 0 | |
review | isbn | Variable characters (20) | Always | Contains ISBN or other ID of an item |
review | review_id | Integer (10) | Always | ChiliFresh ID of the review |
review | author_nickname | Variable characters (50) | Always | Nickname of the user posting the nickname |
review | user_id | Integer (10) | If registered user | ChiliFresh user ID if user registered, doesn't appear for anonymous reviews |
review | review_city | Variable characters (40) | Always | Full English name of city of library where the review has been posted |
review | review_state | Variable characters (40) | Always | Full English name of state of library where the review has been posted |
review | review_country | Variable characters (2) | Always | Two-character code of the country of library where the review has been posted |
review | review_date | Date & time (D, d M Y H:i:s) | Always | Date and time of review posted adjusted to library's timezone, e.g., Tue, 26 Aug 2008 20:44:42 |
review | review_title | Variable characters (50) | Always | Title of review set by user |
review | review_text | Text (unlimited) | Always | Text of review |
review | review_rating | Integer (1) | Always | Rating of a review set by the user |
review | review_suggest | Integer (1) | Always | Shows if the user would suggest this item to a friend (1 - yes, 0 - no) |
review | review_useful | Integer (5) | Always | Shows the sum of user useful / not useful responses (may be negative if more “not useful”) about the review |
review | review_useful_yes | Integer (5) | Always | Shows a number of users considering review to be useful |
review | review_useful_no | Integer (5) | Always | Shows a number of users considering review not to be useful |
review | review_language | Variable characters (10) | Always | ChiliFresh internal code of languages, “eng” for English - others to follow here. |
Block review ends |
Block results ends |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_time>Fri, 18 Sep 2009 11:05:42</response_time>
<response_code>130</response_code>
<response_description>Response OK</response_description>
<header>
<page_size>10</page_size>
<page_number>1</page_number>
<page_review_count>2</page_review_count>
<total_review_count>2</total_review_count>
</header>
<results>
<review>
<review_id>1633</review_id>
<author_nickname>Cool User X</author_nickname>
<user_id>64</user_id>
<review_city>Hooksett</review_city>
<review_state>New Hampshire</review_state>
<review_country>US</review_country>
<review_date>Sat, 10 May 2008 11:41:46</review_date>
<review_title>Test</review_title>
<review_text>Test</review_text>
<review_rating>1</review_rating>
<review_suggest>1</review_suggest>
<review_useful>2</review_useful>
<review_useful_yes>2</review_useful_yes>
<review_useful_no>0</review_useful_no>
<review_language>eng</review_language>
</review>
<review>
<review_id>10724</review_id>
<author_nickname>Cool User X</author_nickname>
<user_id>64</user_id>
<review_city>Hooksett</review_city>
<review_state>New Hampshire</review_state>
<review_country>US</review_country>
<review_date>Thu, 29 Jan 2009 08:46:58</review_date>
<review_title>Testing</review_title>
<review_text>This is the first part of the review</review_text>
<review_rating>3</review_rating>
<review_suggest>0</review_suggest>
<review_useful>1</review_useful>
<review_useful_yes>1</review_useful_yes>
<review_useful_no>0</review_useful_no>
<review_language>eng</review_language>
</review>
</results>
</response>
Response code
Code | Code description |
130 | Response OK |
140 | Session empty, expired or invalid |
getAcceptedReviews: retrieving all accepted reviews for the moderator
This function allows retrieving accepted reviews for a particular moderator
Parameter | Type (size) | Mandatory | Description |
action | getAcceptedReviews | Yes | |
account | Integer (10) | Yes | |
session_id | Variable characters (50) | Yes | |
page_size | Integer (5) | No | How many reviews per page should be output, default 10 |
page_number | Integer (5) | No | Which output page to show, default 1 |
location | Variable characters (40) | Yes | |
api_key | Variable characters (40) | Yes | |
XML Retrieval example:
https://secure.chilifresh.com/api/reviews/?account=20&action=getAcceptedReviews&session_id=ab24d653051b5a549de17ec6975228d3&api_key=1j132ioj12oij3
JSON Retrieval example:
https://secure.chilifresh.com/api/reviews/json/?account=20&action=getAcceptedReviews&session_id=ab24d653051b5a549de17ec6975228d3&api_key=1j132ioj12oij3
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block header starts | If response code “110” | |
header | page_size | Integer (5) | Always | Number of reviews per page output |
header | page_number | Integer (5) | Always | Current output page number |
header | page_review_count | Integer (5) | Always | Number of reviews in current page |
header | total_review_count | Integer (5) | Always | Total number of reviews for the item |
Block header ends |
Block results starts | if item_count larger than 0 | |
Block review starts | if item_count larger than 0 | |
review | isbn | Variable characters (20) | Always | Contains ISBN or other ID of an item |
review | review_id | Integer (10) | Always | ChiliFresh ID of the review |
review | author_nickname | Variable characters (50) | Always | Nickname of the user posting the review |
review | user_id | Integer (10) | If registered user | ChiliFresh user ID if user registered, doesn't appear for anonymous reviews |
review | review_city | Variable characters (40) | Always | Full English name of city of library where the review has been posted |
review | review_state | Variable characters (40) | Always | Full English name of state of library where the review has been posted |
review | review_country | Variable characters (2) | Always | Two-character code of the country of library where the review has been posted |
review | review_date | Date & time (D, d M Y H:i:s) | Always | Date and time of review posted adjusted to library's timezone, e.g., Tue, 26 Aug 2008 20:44:42 |
review | review_title | Variable characters (50) | Always | Title of review set by user |
review | review_text | Text (unlimited) | Always | Text of review |
review | review_rating | Integer (1) | Always | Rating of a review set by the user |
review | review_suggest | Integer (1) | Always | Shows if the user would suggest this item to a friend (1 - yes, 0 - no) |
review | review_useful | Integer (5) | Always | Shows the sum of user useful / not useful responses (may be negative if more “not useful”) about the review |
review | review_useful_yes | Integer (5) | Always | Shows a number of users considering review to be useful |
review | review_useful_no | Integer (5) | Always | Shows a number of users considering review not to be useful |
review | review_language | Variable characters (10) | Always | ChiliFresh internal code of languages, “eng” for English - others to follow here. |
Block review ends |
Block results ends |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_time>Fri, 18 Sep 2009 11:05:42</response_time>
<response_code>130</response_code>
<response_description>Response OK</response_description>
<header>
<page_size>10</page_size>
<page_number>1</page_number>
<page_review_count>2</page_review_count>
<total_review_count>2</total_review_count>
</header>
<results>
<review>
<review_id>1633</review_id>
<author_nickname>Cool User X</author_nickname>
<user_id>64</user_id>
<review_city>Hooksett</review_city>
<review_state>New Hampshire</review_state>
<review_country>US</review_country>
<review_date>Sat, 10 May 2008 11:41:46</review_date>
<review_title>Test</review_title>
<review_text>Test</review_text>
<review_rating>1</review_rating>
<review_suggest>1</review_suggest>
<review_useful>2</review_useful>
<review_useful_yes>2</review_useful_yes>
<review_useful_no>0</review_useful_no>
<review_language>eng</review_language>
</review>
<review>
<review_id>10724</review_id>
<author_nickname>Cool User X</author_nickname>
<user_id>64</user_id>
<review_city>Hooksett</review_city>
<review_state>New Hampshire</review_state>
<review_country>US</review_country>
<review_date>Thu, 29 Jan 2009 08:46:58</review_date>
<review_title>Testing</review_title>
<review_text>This is the first part of the review</review_text>
<review_rating>3</review_rating>
<review_suggest>0</review_suggest>
<review_useful>1</review_useful>
<review_useful_yes>2</review_useful_yes>
<review_useful_no>1</review_useful_no>
<review_language>eng</review_language>
</review>
</results>
</response>
Response code
Code | Code description |
130 | Response OK |
140 | Session empty, expired or invalid |
getRejectedReviews: retrieving all rejected reviews for the moderator access
This function allows retrieving rejected reviews for a particular moderator
Parameter | Type (size) | Mandatory | Description |
action | getRejectedReviews | Yes | |
account | Integer (10) | Yes | |
session_id | Variable characters (50) | Yes | |
page_size | Integer (5) | No | How many reviews per page should be output, default 10 |
page_number | Integer (5) | No | Which output page to show, default 1 |
location | Variable characters (40) | Yes | |
api_key | Variable characters (40) | Yes | |
XML Retrieval example:
https://secure.chilifresh.com/api/reviews/?account=20&action=getRejectedReviews&session_id=ab24d653051b5a549de17ec6975228d3&api_key=1j132ioj12oij3
JSON Retrieval example:
https://secure.chilifresh.com/api/reviews/json/?account=20&action=getRejectedReviews&session_id=ab24d653051b5a549de17ec6975228d3&api_key=1j132ioj12oij3
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block header starts | If response code “110” | |
header | page_size | Integer (5) | Always | Number of reviews per page output |
header | page_number | Integer (5) | Always | Current output page number |
header | page_review_count | Integer (5) | Always | Number of reviews in current page |
header | total_review_count | Integer (5) | Always | Total number of reviews for the item |
Block header ends |
Block results starts | if item_count larger than 0 | |
Block review starts | if item_count larger than 0 | |
review | isbn | Variable characters (20) | Always | Contains ISBN or other ID of an item |
review | review_id | Integer (10) | Always | ChiliFresh ID of the review |
review | author_nickname | Variable characters (50) | Always | Nickname of the user posting the nickname |
review | user_id | Integer (10) | If registered user | ChiliFresh user ID if user registered, doesn't appear for anonymous reviews |
review | review_city | Variable characters (40) | Always | Full English name of city of library where the review has been posted |
review | review_state | Variable characters (40) | Always | Full English name of state of library where the review has been posted |
review | review_country | Variable characters (2) | Always | Two-character code of the country of library where the review has been posted |
review | review_date | Date & time (D, d M Y H:i:s) | Always | Date and time of review posted adjusted to library's timezone, e.g., Tue, 26 Aug 2008 20:44:42 |
review | review_title | Variable characters (50) | Always | Title of review set by user |
review | review_text | Text (unlimited) | Always | Text of review |
review | review_rating | Integer (1) | Always | Rating of a review set by the user |
review | review_suggest | Integer (1) | Always | Shows if the user would suggest this item to a friend (1 - yes, 0 - no) |
review | review_useful | Integer (5) | Always | Shows the sum of user useful / not useful responses (may be negative if more “not useful”) about the review |
review | review_useful_yes | Integer (5) | Always | Shows a number of users considering review to be useful |
review | review_useful_no | Integer (5) | Always | Shows a number of users considering review not to be useful |
review | review_language | Variable characters (10) | Always | ChiliFresh internal code of languages, “eng” for English - others to follow here. |
Block review ends |
Block results ends |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_time>Fri, 18 Sep 2009 11:05:42</response_time>
<response_code>130</response_code>
<response_description>Response OK</response_description>
<header>
<page_size>10</page_size>
<page_number>1</page_number>
<page_review_count>2</page_review_count>
<total_review_count>2</total_review_count>
</header>
<results>
<review>
<review_id>1633</review_id>
<author_nickname>Cool User X</author_nickname>
<user_id>64</user_id>
<review_city>Hooksett</review_city>
<review_state>New Hampshire</review_state>
<review_country>US</review_country>
<review_date>Sat, 10 May 2008 11:41:46</review_date>
<review_title>Test</review_title>
<review_text>Test</review_text>
<review_rating>1</review_rating>
<review_suggest>1</review_suggest>
<review_useful>2</review_useful>
<review_useful_yes>3</review_useful_yes>
<review_useful_no>1</review_useful_no>
<review_language>eng</review_language>
</review>
<review>
<review_id>10724</review_id>
<author_nickname>Cool User X</author_nickname>
<user_id>64</user_id>
<review_city>Hooksett</review_city>
<review_state>New Hampshire</review_state>
<review_country>US</review_country>
<review_date>Thu, 29 Jan 2009 08:46:58</review_date>
<review_title>Testing</review_title>
<review_text>This is the first part of the review</review_text>
<review_rating>3</review_rating>
<review_suggest>0</review_suggest>
<review_useful>1</review_useful>
<review_useful_yes>2</review_useful_yes>
<review_useful_no>1</review_useful_no>
<review_language>eng</review_language>
</review>
</results>
</response>
Response code
Code | Code description |
130 | Response OK |
140 | Session empty, expired or invalid |
getSuspendedReviews: retrieving all temporarily suspended reviews for the moderator access
This function allows retrieving suspended reviews for a particular logged-in moderator
Parameter | Type (size) | Mandatory | Description |
action | getSuspendedReviews | Yes | |
account | Integer (10) | Yes | |
session_id | Variable characters (50) | Yes | |
page_size | Integer (5) | No | How many reviews per page should be output, default 10 |
page_number | Integer (5) | No | Which output page to show, default 1 |
location | Variable characters (40) | Yes | |
api_key | Variable characters (40) | Yes | |
XML Retrieval example:
https://secure.chilifresh.com/api/reviews/?account=20&action=getSuspendedReviews&session_id=ab24d653051b5a549de17ec6975228d3&api_key=1j132ioj12oij3
JSON Retrieval example:
https://secure.chilifresh.com/api/reviews/json/?account=20&action=getSuspendedReviews&session_id=ab24d653051b5a549de17ec6975228d3&api_key=1j132ioj12oij3
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block header starts | If response code “110” | |
header | page_size | Integer (5) | Always | Number of reviews per page output |
header | page_number | Integer (5) | Always | Current output page number |
header | page_review_count | Integer (5) | Always | Number of reviews in current page |
header | total_review_count | Integer (5) | Always | Total number of reviews for the item |
Block header ends |
Block results starts | if item_count larger than 0 | |
Block review starts | if item_count larger than 0 | |
review | isbn | Variable characters (20) | Always | Contains ISBN or other ID of an item |
review | review_id | Integer (10) | Always | ChiliFresh ID of the review |
review | author_nickname | Variable characters (50) | Always | Nickname of the user posting the nickname |
review | user_id | Integer (10) | If registered user | ChiliFresh user ID if user registered, doesn't appear for anonymous reviews |
review | review_city | Variable characters (40) | Always | Full English name of city of library where the review has been posted |
review | review_state | Variable characters (40) | Always | Full English name of state of library where the review has been posted |
review | review_country | Variable characters (2) | Always | Two-character code of the country of library where the review has been posted |
review | review_date | Date & time (D, d M Y H:i:s) | Always | Date and time of review posted adjusted to library's timezone, e.g., Tue, 26 Aug 2008 20:44:42 |
review | review_title | Variable characters (50) | Always | Title of review set by user |
review | review_text | Text (unlimited) | Always | Text of review |
review | review_rating | Integer (1) | Always | Rating of a review set by the user |
review | review_suggest | Integer (1) | Always | Shows if the user would suggest this item to a friend (1 - yes, 0 - no) |
review | review_useful | Integer (5) | Always | Shows the sum of user useful / not useful responses (may be negative if more “not useful”) about the review |
review | review_useful_yes | Integer (5) | Always | Shows a number of users considering review to be useful |
review | review_useful_no | Integer (5) | Always | Shows a number of users considering review not to be useful |
review | review_language | Variable characters (10) | Always | ChiliFresh internal code of languages, “eng” for English - others to follow here. |
Block review ends |
Block results ends |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_time>Fri, 18 Sep 2009 11:05:42</response_time>
<response_code>130</response_code>
<response_description>Response OK</response_description>
<header>
<page_size>10</page_size>
<page_number>1</page_number>
<page_review_count>2</page_review_count>
<total_review_count>2</total_review_count>
</header>
<results>
<review>
<review_id>1633</review_id>
<author_nickname>Cool User X</author_nickname>
<user_id>64</user_id>
<review_city>Hooksett</review_city>
<review_state>New Hampshire</review_state>
<review_country>US</review_country>
<review_date>Sat, 10 May 2008 11:41:46</review_date>
<review_title>Test</review_title>
<review_text>Test</review_text>
<review_rating>1</review_rating>
<review_suggest>1</review_suggest>
<review_useful>2</review_useful>
<review_useful_yes>3</review_useful_yes>
<review_useful_no>1</review_useful_no>
<review_language>eng</review_language>
</review>
<review>
<review_id>10724</review_id>
<author_nickname>Cool User X</author_nickname>
<user_id>64</user_id>
<review_city>Hooksett</review_city>
<review_state>New Hampshire</review_state>
<review_country>US</review_country>
<review_date>Thu, 29 Jan 2009 08:46:58</review_date>
<review_title>Testing</review_title>
<review_text>This is the first part of the review</review_text>
<review_rating>3</review_rating>
<review_suggest>0</review_suggest>
<review_useful>1</review_useful>
<review_useful_yes>2</review_useful_yes>
<review_useful_no>1</review_useful_no>
<review_language>eng</review_language>
</review>
</results>
</response>
Response code
Code | Code description |
131 | Response OK |
141 | Session empty, expired or invalid |
acceptUnmoderatedReview: accepting a review by a moderator
This function allows a moderator to accept a review
Parameter | Type (size) | Mandatory | Comment |
action | acceptUnmoderatedReview | Yes | |
account | Integer (10) | Yes | |
review_id | Integer (10) | Yes | |
session_id | Variable characters (50) | Yes | |
location | Variable characters (40) | Yes | |
api_key | Variable characters (40) | Yes | |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_time>Fri, 18 Sep 2009 11:42:45</response_time>
<response_code>150</response_code>
<response_description>Response OK</response_description>
</response>
Response code
Code | Code description |
150 | Response OK |
160 | Review moderation not successful |
170 | Review ID empty or not acceptable format |
180 | Session empty, expired or invalid |
rejectUnmoderatedReview: reject a review by a moderator
This function allows a moderator to reject a review
Parameter | Type (size) | Mandatory | Comment |
action | rejectUnmoderatedReview | Yes | |
account | Integer (10) | Yes | |
review_id | Integer (10) | Yes | |
session_id | Variable characters (50) | Yes | |
location | Variable characters (40) | Yes | |
api_key | Variable characters (40) | Yes | |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_time>Fri, 18 Sep 2009 11:42:45</response_time>
<response_code>150</response_code>
<response_description>Response OK</response_description>
</response>
Response code
Code | Code description |
150 | Response OK |
160 | Review moderation not successful |
170 | Review ID empty or not acceptable format |
180 | Session empty, expired or invalid |
Ratings user functions
userCreateSession: creating session for unregistered user
This function creates a session to distinguish user (and not allow adding more than 1 item for the same item) within the session for adding a rating without actually having to register and log in with a ChiliFresh user account
Parameter | Type (size) | Mandatory |
action | userCreateSession | Yes |
account | Integer (10) | Yes |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
response | session_id | Variable chars (100) | If response_code is “802” | User's session ID |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>802</response_code>
<response_description>User logged in</response_description>
<response_time>Wed, 26 Aug 2009 13:20:05</response_time>
<user_id>84</user_id>
<session_id>896de1f873893451f4d69881bb1b3362</session_id>
</response>
Response code
Code | Code description |
802 | User logged in |
ratingAdd: add a rating
This function allows adding a rating to any item with ISBN/UPC or other identifier. It requires a ChiliFresh session - no matter, whether the user has logged in with ChiliFresh account or is an anonymous user
Parameter | Type (size) | Mandatory |
action | ratingAdd | Yes |
isbn | Variable characters (32) - accepts ISBN, UPC or other identifiers | Yes |
rating | Integer (1) - accepts values between 1 and 5 | Yes |
session_id | ChiliFresh session - retrieved from userRegister, userLogin or userCreateSession calls | Yes |
account | Integer (10) | Yes |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>701</response_code>
<response_description>Rating added</response_description>
<response_time>Wed, 26 Aug 2009 13:20:05</response_time>
</response>
Response code
Code | Code description |
701 | Rating added |
711 | User has already rated this item |
721 | Rating must be between 1 and 5 |
60 | Session invalid, expired or empty |
ratingUpdate: update a rating
This function allows updating a rating to any item with ISBN/UPC or other identifier. It requires an active ChiliFresh session. It allows updating rating of both registered and logged in, and anonymous users - in latter case as long as they update the rating within the same ChiliFresh session
Parameter | Type (size) | Mandatory |
action | ratingUpdate | Yes |
isbn | Variable characters (32) - accepts ISBN, UPC or other identifiers | Yes |
rating | Integer (1) - accepts values between 1 and 5 | Yes |
session_id | ChiliFresh session - retrieved from userRegister, userLogin or userCreateSession calls | Yes |
account | Integer (10) | Yes |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>701</response_code>
<response_description>Rating updated</response_description>
<response_time>Wed, 26 Aug 2009 13:20:05</response_time>
</response>
Response code
Code | Code description |
801 | Rating updated |
811 | User has not rated this item |
821 | Rating must be between 1 and 5 |
60 | Session invalid, expired or empty |
ratingDelete: delete an added rating
This function allows deleting a rating of any item with ISBN/UPC or other identifier that the user has added. It requires an active ChiliFresh session. It allows deleting rating of both registered and logged in, and anonymous users - in latter case as long as the user deletes the rating within the same ChiliFresh session as he added the rating
Parameter | Type (size) | Mandatory |
action | ratingDelete | Yes |
isbn | Variable characters (32) - accepts ISBN, UPC or other identifiers | Yes |
account | Integer (10) | Yes |
session_id | ChiliFresh session - retrieved from userRegister, userLogin or userCreateSession calls | Yes |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>901</response_code>
<response_description>Rating deleted</response_description>
<response_time>Wed, 26 Aug 2009 13:20:05</response_time>
</response>
Response code
Code | Code description |
901 | Rating deleted |
911 | User has not rated this item |
60 | Session invalid, expired or empty |
ratedItems: list items rated by the particular user
This function list items rated by particular user - retrieving user ID from the session. For registered users with ChiliFresh account, it lists all items rated in any OPAC sessions once logged in with particular user account. For non-registered users, it lists all items rated in particular OPAC/ChiliFresh session.
Parameter | Type (size) | Mandatory |
action | ratedItems | Yes |
account | Integer (10) | Yes |
user_id | Integer (10) | If need to retrieve reviews for particular user |
session_id | ChiliFresh session - retrieved from userRegister, userLogin or userCreateSession call | Only if user_id is not specified |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
Output
Format: XML, JSON
Blocks and elements:
Block | Element | Type (size) | Exists | Description |
Block response starts | Always | |
response | response_code | Integer (3) | Always | Response code from the table below |
response | response_description | Text (255) | Always | Brief description of response code |
response | rating_count | Integer (10) | Always | Number of ratings returned |
response | response_time | Date&time (D, d M Y H:i:s) | Always | Example: Wed, 26 Aug 2009 10:34:32 |
Block results starts | If any items rated | |
results | isbn | Varchar (32) | Always | ISBN, UPC or other identifier of an item that has been rated |
results | rating | Integer (1) | Always | Rating (1-5) of the item |
Block results ends | If any items rated | |
Block response ends |
XML output example:
<?xml version="1.0"?>
<response>
<response_code>901</response_code>
<response_description>Rating deleted</response_description>
<rating_count>1</rating_count>
<response_time>Wed, 26 Aug 2009 13:20:05</response_time>
<results>
<item>
<isbn>0780661656</isbn>
<rating>1</rating>
</item>
</results>
</response>
Response code
Code | Code description |
1001 | Response OK |
60 | Session invalid, expired or empty |
ratingUserCheck: checks whether user has rated this item already
Checks whether user has rated particular items.
Parameter | Type (size) | Mandatory |
action | ratingUserCheck | Yes |
account | Integer (10) | Yes |
isbn | Varchar (20) | Yes |
session_id | Session ID | Yes |
location | Variable characters (40) | Yes |
api_key | Variable characters (40) | Yes |
Output
Format: XML, JSON
Blocks and elements:
XML output example:
<?xml version="1.0"?>
<response>
<response_code>100</response_code>
<response_description>Response OK</response_description>
<rating_count>1</rating_count>
<response_time>Wed, 26 Aug 2009 13:20:05</response_time>
<rating>4</rating>
</response>
Response code
Code | Code description |
100 | Response OK |
120 | ISBN is empty |
60 | Session invalid, expired or empty |
Error code | Error description |
0 | System error |
1 | Invalid (empty) API key |
2 | Invalid API key |
3 | API key request limit reached |
4 | API key deactivated |
5 | Invalid API call |
20 | Empty account ID |
30 | Account does not exists |
40 | Account suspended |
50 | Action not specified |