User Tools

Site Tools


connections-api

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
connections-api [2014/12/27 15:25]
jposeika [Response code]
connections-api [2014/12/27 16:19]
jposeika [Response code]
Line 216: Line 216:
 |2402|Cannot add item to bookshelf| |2402|Cannot add item to bookshelf|
 |2403|Empty item identifier| |2403|Empty item identifier|
 +|60|Session invalid, expired or empty|
 +
 +===== bookshelfRemoveItem:​ remove an item from an existing bookshelf =====
 +Remove an item from an existing bookshelf
 +
 +==== Input ====
 +  * URL for XML output: https://​secure.chilifresh.com/​api/​connections/​
 +  * URL for JSON output: https://​secure.chilifresh.com/​api/​connections/​json/​
 +  * Method: POST
 +  * Parameters:
 +
 +|**Parameter** |**Type (size)** |**Mandatory** |
 +|action|**bookshelfAddItem** |Yes|
 +|account|Integer (10)|Yes|
 +|shelf_id|Integer (10)|Yes|
 +|item_id|ISBN,​ UPC, ISSN, etc.|Yes|
 +|session_id|ChiliFresh session - retrieved from userRegister,​ userLogin or userCreateSession call|Yes|
 +|location|Variable characters (40)|If applicable|
 +|api_key|Variable characters (40)|Yes|
 +
 +==== Output ====
 +
 +
 +**XML output example:**
 +<​code>​
 +<?xml version="​1.0"?>​
 +<​response>​
 + <​response_code>​2500</​response_code>​
 + <​response_description>​Item removed successfully</​response_description>​
 + <​response_time>​Sat,​ 27 Dec 2014 15:​46:​04</​response_time>​
 +</​response>​
 +</​code>​
 +
 +==== Response code ====
 +|**Code** |**Code description** |
 +|2500|Item removed successfully|
 +|2501|Cannot remove item from bookshelf|
 |60|Session invalid, expired or empty| |60|Session invalid, expired or empty|
  
Line 265: Line 302:
 |2600|Shelves listed successfully| |2600|Shelves listed successfully|
 |61|User not logged in or not specified| |61|User not logged in or not specified|
 +
 +
 +===== bookshelfListItems:​ list all items of some particular bookshelf =====
 +List all items of some particular bookshelf
 +
 +==== Input ====
 +  * URL for XML output: https://​secure.chilifresh.com/​api/​connections/​
 +  * URL for JSON output: https://​secure.chilifresh.com/​api/​connections/​json/​
 +  * Method: POST
 +  * Parameters:
 +
 +|**Parameter** |**Type (size)** |**Mandatory** |
 +|action|**bookshelfListItems** |Yes|
 +|account|Integer (10)|Yes|
 +|shelf_id|Integer (10)|Yes|
 +|user_Id|Integer (10)|If //​session_id//​ empty|
 +|session_id|ChiliFresh session - retrieved from userRegister,​ userLogin or userCreateSession call|If //user_id// emtpy|
 +|location|Variable characters (40)|If applicable|
 +|api_key|Variable characters (40)|Yes|
 +
 +==== Output ====
 +
 +
 +**XML output example:**
 +<​code>​
 +<?xml version="​1.0"?>​
 +<​response>​
 + <​response_code>​2700</​response_code>​
 + <​response_description>​Listing of bookshelf successful</​response_description>​
 + <​response_time>​Sat,​ 27 Dec 2014 17:​05:​21</​response_time>​
 + <​user_id>​231853</​user_id>​
 + <​shelf_id>​22762</​shelf_id>​
 + <​shelf_title>​APIshelf2</​shelf_title>​
 + <​item_count>​4</​item_count>​
 + <​shelf_type>​private</​shelf_type>​
 + <​shelf_type_description>​Own,​ full access</​shelf_type_description>​
 + <​items>​
 +  <​item>​
 +   <​title>​Motivated minds</​title>​
 +   <​author>​Deborah Stipek and Kathy Seal.</​author>​
 +   <​isbn>​0805063951</​isbn>​
 +   <​item_id>​3</​item_id>​
 +   <​work_id>​3</​work_id>​
 +   <​date>​Sat,​ 27 Dec 2014 15:​41:​28</​date>​
 +  </​item>​
 + </​items>​
 +</​response>​
 +</​code>​
 +
 +==== Response code ====
 +|**Code** |**Code description** |
 +|2700|Listing of bookshelf successful|
 +|61|User not logged in or not specified|
 +
 +===== bookshelfMoveItem:​ move an item from one bookshelf to another =====
 +Move an item from one bookshelf to another
 +
 +==== Input ====
 +  * URL for XML output: https://​secure.chilifresh.com/​api/​connections/​
 +  * URL for JSON output: https://​secure.chilifresh.com/​api/​connections/​json/​
 +  * Method: POST
 +  * Parameters:
 +
 +|**Parameter** |**Type (size)** |**Mandatory** |
 +|action|**bookshelfMoveItem** |Yes|
 +|account|Integer (10)|Yes|
 +|from_shelf|Integer (10)|Yes|
 +|to_shelf|Integer (10)|Yes|
 +|item_id|Integer (10)|Yes|
 +|session_id|Yes|
 +|location|Variable characters (40)|If applicable|
 +|api_key|Variable characters (40)|Yes|
 +
 +==== Output ====
 +
 +
 +**XML output example:**
 +<​code>​
 +<?xml version="​1.0"?>​
 +<​response>​
 + <​response_code>​2800</​response_code>​
 + <​response_description>​Item moved successfully</​response_description>​
 + <​response_time>​Sat,​ 27 Dec 2014 17:​16:​55</​response_time>​
 +</​response>​
 +</​code>​
 +
 +==== Response code ====
 +|**Code** |**Code description** |
 +|2800|Item moved successfully|
 +|2801|Could not move item to other bookshelf|
 +|2802|Target shelf does not belong to session user|
 +|60|Session invalid, expired or empty|
 ====== Account-related errors ====== ====== Account-related errors ======
 |**Error code** |**Error description** | |**Error code** |**Error description** |
connections-api.txt ยท Last modified: 2014/12/27 16:29 by jposeika