Note: Requests must be made to https://api.flipsnack.com/v1.
Name | Type | Description |
apiKey (required) | string | The API key provided for your user. If it is not specified, the request will return the error code "30 - Missing mandatory parameter". If the key is incorrect the request returns the error code "41 - Invalid credentials". |
signature (required) | string | The signature must be calculated by you and added to the request. See How to sign a request for more information. If the parameter is missing the request will return the error code "30 - Missing mandatory parameter". If the signature is incorrect the request will return the error code "44 - Invalid signature". |
action (required) | string | The API method that should be called. In this case the value should be collection.update. If it is not specified, the request will return the error code "30 - Missing mandatory parameter". |
collectionHash (required) | string | The hash of the collection you wish to update. If you do not specify a collection hash, then the request will return the error code "30 - Missing mandatory parameter". |
format | string | The format of the response from the server. Possible values are json, jsonp and xml. If you set format to jsonp, you must also specify the callback parameter. Default: json. |
callback | string | The name of the callback function used for the jsonp response. This parameter is required if format is set to jsonp. Otherwise it is ignored. |
title | string | The title of the collection. This title will appear on the collection's direct link and in the My Collections page. By default, if a title is not given, Flipsnack will try to extract the title from the uploaded document. |
description | string | The description of the collection. By default, during the conversion process, Flipsnack extracts the first few words from the document. You can overwrite that description with yours, using this parameter. |
collectionWidth | number | The embed width of the widget (measured in pixels). Default: 650. |
collectionHeight | number | The embed height of the widget (measured in pixels). Default: 385. |
collectionStatus | string | The type of collection. Possible values are public, editable and unlisted. Public collections are listed on your public profile and in search results. They are publicly available to other users. Editable collections are not published. They must be published manually from the Flipsnack editor or have their status updated using the collection.update method. Unlisted collections are published but not listed on your profile page and in search results. Other users may view them only if they receive a direct link or an embedded widget from you. Note: Once a collection receives the public status, it cannot be changed to unlisted, even if the current status is set to editable. But unlisted collections can be changed to public collections. Default: public. |
enableThumbView | boolean | If set to true, displays the thumbnail viewer in the Adobe Flash widget. The thumbnail viewer is displayed only when the Flash widget is in fullscreen. Default: true. |
enableToc | boolean | If set to true and if the pdf has a table of contents the widget will display it. Default: false. |
showControls | boolean | If set to true, then the navigation controls will be displayed in normal mode Default: false. |
enableDownload | boolean | If set to true, displays the download button in the flash widget menu. The menu is displayed only when the widget is in fullscreen. Default: true. |
enablePrint | boolean | If set to true, displays the print button in the widget menu. The menu is displayed when the widget is in fullscreen. Default: true. |
enableFullScreen | boolean | If set to true, allows the Flash widget to enter fullscreen mode: a "Click to read" button is displayed. Default: true. |
enableSearch | boolean | If set to true, displays the search button in the flash widget menu. The menu is displayed only when the widget is in fullscreen. If there is no text to search within the current collection item, the search button is displayed, but disabled. Default: true. |
tooltipsLanguage | string | Selects the language for the tooltips displayed in the flash widget. Possible languages are: Basque, Bosanski, Català, Czech, Dansk, Deutsch, English, Español, כשר, Française, ελληνικά, Hrvatski, Indonesian, Italiano, Magyar, Nederlands, Nederlands, Norsk, Polski, Português, Português do Brasil, Română, Pусский, Cрпски, Slovene, Suomi, Slovak, Swedish, Turkish. Default: English. |
background | string | The background color of the widget. Possible values are color and transparent. If set to transparent, the widget is displayed with no background. Background color value can be set using the color parameter, explained below. Default: color. |
color | string | The background color of the widget, specified as a hexadecimal value. If the background is set to transparent, the widget will ignore the color parameter. Default: 444444. |
backgroundScaleType | string | The scale mode of images used as background for the widget. Possible values are scaleCrop, center and tile. Background images can be set using the collection.setBackgroundImage method. Default: scaleCrop. |
autoFlip | boolean | If set to true, allows the widget to automatically turn the pages of the flipbook. The pages turn after a time specified by the autoFlipDelay parameter. Default false. |
autoFlipDelay | number | Specifies the time in seconds for pages to turn automatically. If autoFlip is false, this parameter is ignored. Default: 6. |
rightToLeftOrientation | boolean | If set to true, allows the flipbook to be viewed from right to left: the first page is starts from the end, as viewed in normal mode. This option is useful for documents written in right to left languages. Default: false. |
singlePageView | boolean | If set to true, allows the flipbook to be viewed a single page at a time. Default: false. |
logoUrl | string | The URL of the logo image. A logo image can be set only by uploading it with the collection.setLogo method. |
If the request is successful, the API call returns information about the specified collection.
This action method has the same response as collection.getCollection method.
Code | Message | Explanation |
30 | Missing mandatory parameter | The request does not contain one or more required parameters. There are at least 3 required parameters for every request: apiKey, signature and action. Other methods may also have extra mandatory parameters. Please check the API Reference for more information. |
31 | Requests per second limit exceeded | There were too many requests per second made with the same API key. |
32 | Requests per minute limit exceeded | There were too many requests per minute made with the same API key. |
40 | Bad request |
|
41 | Invalid credentials | The API key provided in the request is invalid. |
42 | Invalid action | The API method you specified in the request is incorrect. Please see the API Reference for the list of possible methods. |
43 | Forbidden | You are not allowed to access the specified collection: it has been deleted or the collection belongs to another user. |
44 | Invalid signature | The signature you provided is incorrect - it does not match the request. |
46 | Invalid collection hash | You are trying to access a collection that does not exist. |
<form method="get" action="https://api.flipsnack.com/v1/"><input type="hidden" name="action" value="collection.update"><input type="hidden" name="apiKey" value="LK12NS-0-IOBW3S89VVJH12Z"><input type="text" name="title"><input type="text" name="width"><input type="text" name="height"><button type="submit">Submit</button></form>
curl -F "action=collection.update"\-F "apiKey=LK12NS-0-IOBW3S89VVJH12Z"\-F "title=Lorem ipsum dolor"\-F "width=800"\-F "height=600"\-F "signature=2298a6456c1dd2d12b895ce4688ffe31"\https://api.flipsnack.com/v1/
<?xml version="1.0" encoding="utf-8"?><response><code>20</code><status>OK</status><data><collectionHash>d3m0h45h</collectionHash><collectionTitle>Lorem ipsum dolor</collectionTitle><collectionStatus>published</collectionStatus><coverImage>https://files.flipsnack.net/collections/items/7c5e600d4459fe4e04d23ae5ei188777/covers/page_1/medium</coverImage><directLink>https://www.flipsnack.com/user/lorem-ipsum.html</directLink><createdDate>2015-06-09 01:43:05</createdDate><publishDate>2015-06-09 01:43:07</publishDate><collectionPageCount>2</collectionPageCount><collectionItems><collectionItem><flipbookHash>7c5e600d4459fe4e04d23ae5ei188777</flipbookHash><flipbookPageCount>2</flipbookPageCount><flipbookTitle>Lorem ipsum</flipbookTitle><flipbookDescription>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</flipbookDescription><extension>pdf</extension><convertStatus>COMPLETE</convertStatus></collectionItem></collectionItems><settings><collectionWidth>800</collectionWidth><collectionHeight>600</collectionHeight><enableFullScreen>true</enableFullScreen></settings></data></response>
{"code": 20,"status": "OK","data": {"collectionHash": "d3m0h45h","collectionTitle": "Lorem ipsum dolor","collectionStatus": "published","coverImage": "https://files.flipsnack.net/collections/items/7c5e600d4459fe4e04d23ae5ei188777/covers/page_1/medium","directLink": "https://www.flipsnack.com/user/lorem-ipsum.html","createdDate": "2015-06-09 01:43:05","publishDate": "2015-06-09 01:43:07","collectionPageCount": 2,"collectionItems": [{"flipbookHash": "7c5e600d4459fe4e04d23ae5ei188777","flipbookPageCount": "2","flipbookTitle": "Lorem ipsum","flipbookDescription": "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.","extension": "pdf","convertStatus": "COMPLETE"}],"settings": {"collectionWidth": "800","collectionHeight": "600","enableFullScreen": "true"}}}
callbackFunctionName({data});// callbackFunctionName is the function name specified by the callback parameter, in the request// the {data} is the actual JSON response