This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
connections:api [2016/05/23 15:29] jposeika [boardAddComment: add a comment to other user's Cork board] |
connections:api [2016/05/25 06:34] (current) jposeika [New features requiring documentation] |
||
|---|---|---|---|
| Line 3252: | Line 3252: | ||
| - | ====== New features requiring documentation ====== | ||
| ===== Profile editing functions ===== | ===== Profile editing functions ===== | ||
| ==== profileEditInformation: edit basic profile information ==== | ==== profileEditInformation: edit basic profile information ==== | ||
| - | **Input:** | + | |**Parameter** |**Type (size)** |**Mandatory** |**Description **| |
| - | * session_id | + | |action|profileEditInformation |Yes| API call| |
| - | * birth_date [YYYY-MM-DD] | + | |birth_date|Date (YYYY-MM-DD |No| Birth date| |
| - | * show_age [Y/N] | + | |show_age|Y (yes) / N (no) |No| Whether to show age on profile| |
| - | * library_card [if required] | + | |library_card|Varchar (50) |No| Library card| |
| - | * gender [optional] | + | |gender|M (male) / F (female) |No| Gender of the user| |
| - | * location_city | + | |location_city|Varchar (20) |No| City| |
| - | * location_state [accepted states - statebycode function] | + | |location_state|2-letter state code for US or 2-letter country code + "_" 2/3-letter state code for others, e.g. AU_SA South Australia, |
| - | * location_country [accepted countries] | + | |
| - | * quote | + | Australia |No| State| |
| + | |location_country|2-letter code of the country |No| Country| | ||
| + | |quote|Text (1000) |No| Personal quote| | ||
| + | |session_id|Variable characters (100)|Yes| Session ID from logged in user| | ||
| + | |||
| + | |||
| + | **XML output example:** | ||
| + | <code> | ||
| + | <?xml version="1.0"?> | ||
| + | <response> | ||
| + | <response_code>3090</response_code> | ||
| + | <response_description>Profile changes saved successfully</response_description> | ||
| + | <response_time>Tue, 24 May 2016 15:34:39</response_time> | ||
| + | </response> | ||
| + | </code> | ||
| - | Output - success or error | ||
| + | === Response code === | ||
| + | |**Code** |**Code description** | | ||
| + | |3090|Profile changes saved successfully| | ||
| + | |3091|Invalid date format, must be YYYY-MM-DD| | ||
| + | |3092|Invalid gender - should be F or M| | ||
| + | |3093|Invalid state code| | ||
| + | |3094|Invalid country code| | ||
| + | |3092|Invalid gender - should be F or M| | ||
| + | |60|Session invalid, expired or empty| | ||
| ==== profileDeletePicture: delete particular user's picture ==== | ==== profileDeletePicture: delete particular user's picture ==== | ||
| - | **Input:** | + | === Input === |
| - | * session_id | + | * URL for XML output: https://secure.chilifresh.com/api/connections/ |
| + | * URL for JSON output: https://secure.chilifresh.com/api/connections/json/ | ||
| + | * Method: POST | ||
| + | * To be used when retrieving information for any item | ||
| + | * Parameters: | ||
| - | Output: success or error | ||
| + | |**Parameter** |**Type (size)** |**Mandatory** |**Description **| | ||
| + | |action|profileDeletePicture |Yes| API call| | ||
| + | |session_id|Variable characters (100)|Yes| Session ID from logged in user| | ||
| + | |||
| + | |||
| + | **XML output example:** | ||
| + | <code> | ||
| + | <?xml version="1.0"?> | ||
| + | <response> | ||
| + | <response_code>3095</response_code> | ||
| + | <response_description>Profile picture deleted successfully</response_description> | ||
| + | <response_time>Tue, 24 May 2016 15:39:40</response_time> | ||
| + | </response> | ||
| + | </code> | ||
| + | |||
| + | |||
| + | === Response code === | ||
| + | |**Code** |**Code description** | | ||
| + | |3095|Profile picture deleted successfully| | ||
| + | |60|Session invalid, expired or empty| | ||
| ==== profileChangePicture: change particular user's picture ==== | ==== profileChangePicture: change particular user's picture ==== | ||
| **Input:** | **Input:** | ||
| Line 3293: | Line 3337: | ||
| ==== profileChangeRead: set or change user's "Current read" item ==== | ==== profileChangeRead: set or change user's "Current read" item ==== | ||
| - | **Input:** | + | === Input === |
| - | * session_id | + | * URL for XML output: https://secure.chilifresh.com/api/connections/ |
| - | * item_id [ISBN or UPC] OR | + | * URL for JSON output: https://secure.chilifresh.com/api/connections/json/ |
| - | * cf_item_id | + | * Method: POST |
| + | * To be used when retrieving information for any item | ||
| + | * Parameters: | ||
| - | Output: success [item_title, item_author, item_id, cf_item_id] or fail message | + | |
| + | |**Parameter** |**Type (size)** |**Mandatory** |**Description **| | ||
| + | |action|profileChangeRead |Yes| API call| | ||
| + | |isbn|ISBN, UPC or other identifier of item |No| Identifier of the item| | ||
| + | |cf_item_id|ChiliFresh ID of the item |No| ChiliFresh identifier of the item| | ||
| + | |session_id|Variable characters (100)|Yes| Session ID from logged in user| | ||
| + | |||
| + | |||
| + | **XML output example:** | ||
| + | <code> | ||
| + | <?xml version="1.0"?> | ||
| + | <response> | ||
| + | <response_code>3096</response_code> | ||
| + | <response_description>Read changed successfully</response_description> | ||
| + | <response_time>Tue, 24 May 2016 16:09:16</response_time> | ||
| + | <item_id>1148103</item_id> | ||
| + | <isbn>9782070529292</isbn> | ||
| + | <title>Harry Potter a l'ecole des sorciers ; Harry Potter et la chambre des secrets ; Harry Potter et le prisonnier d'Azkaban -- coffret 3 volumes</title> | ||
| + | <author></author> | ||
| + | </response> | ||
| + | </code> | ||
| + | |||
| + | |||
| + | === Response code === | ||
| + | |**Code** |**Code description** | | ||
| + | |3096|Read changed successfully| | ||
| + | |60|Session invalid, expired or empty| | ||
| ==== profileDeleteRead: delete user's "Current read" item ==== | ==== profileDeleteRead: delete user's "Current read" item ==== | ||
| - | **Input:** | + | === Input === |
| - | * session_id | + | * URL for XML output: https://secure.chilifresh.com/api/connections/ |
| + | * URL for JSON output: https://secure.chilifresh.com/api/connections/json/ | ||
| + | * Method: POST | ||
| + | * To be used when retrieving information for any item | ||
| + | * Parameters: | ||
| + | |||
| + | |||
| + | |**Parameter** |**Type (size)** |**Mandatory** |**Description **| | ||
| + | |action|profileDeleteRead |Yes| API call| | ||
| + | |session_id|Variable characters (100)|Yes| Session ID from logged in user| | ||
| + | |||
| + | |||
| + | **XML output example:** | ||
| + | <code> | ||
| + | <?xml version="1.0"?> | ||
| + | <response> | ||
| + | <response_code>3097</response_code> | ||
| + | <response_description>Current read deleted successfully</response_description> | ||
| + | <response_time>Tue, 24 May 2016 16:11:50</response_time> | ||
| + | </response> | ||
| + | </code> | ||
| - | Output: success or fail message | ||
| + | === Response code === | ||
| + | |**Code** |**Code description** | | ||
| + | |3097|Current read deleted successfully| | ||
| + | |60|Session invalid, expired or empty| | ||
| ==== profileDeleteAccount: delete user's ChiliFresh account ==== | ==== profileDeleteAccount: delete user's ChiliFresh account ==== | ||
| **Input:** | **Input:** | ||