collection.update

Updates the settings of an existing collection.

Note: Requests must be made to https://api.flipsnack.com/v1.

Request parameters

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".

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 player (measured in pixels). Default: 650.

collectionHeight

number

The embed height of the player (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 player 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 player. The thumbnail viewer is displayed only when the player is in fullscreen. Default: true.

enableToc

boolean

If set to true and if the pdf has a table of contents the player 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 player menu. The menu is displayed only when the player is in fullscreen. Default: true.

enablePrint

boolean

If set to true, displays the print button in the player menu. The menu is displayed when the player is in fullscreen. Default: true.

enableFullScreen

boolean

If set to true, allows the player 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 player menu. The menu is displayed only when the player 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 player. 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 player. Possible values are color and transparent. If set to transparent, the player 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 player, specified as a hexadecimal value. If the background is set to transparent, the player will ignore the color parameter. Default: 444444.

autoFlip

boolean

If set to true, allows the player 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.

Response parameters

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.

Error codes

For complete list of error codes and messages go to API status codes section.

Examples

Request

# GET
curl -X GET \
     -G \
     https://api.flipsnack.com/v1/ \
     -d action=collection.update \
     -d apiKey=<YOUR-API-KEY> \
     -d collectionHash=d3m0h45h \
     -d height=600 \
     -d title=Lorem%20ipsum%20dolor \
     -d signature=<YOUR-REQUEST-SIGNATURE> \
     -d width=800

Response

{
    "code": 20,
    "status": "OK",
    "data": {
        "collectionHash": "d3m0h45h",
        "collectionTitle": "Lorem ipsum dolor",
        "collectionStatus": "published",
        "coverImage": "https://d1dhn91mufybwl.cloudfront.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"
        }
    }
}

Last updated