Links

collection.getList

Returns a list of collections belonging to your user.
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.getList. If it is not specified, the request will return the error code "30 - Missing mandatory parameter".
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 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: If you do not specify a collection status, the API will return all collections within the specified range, regardless of their types.
query
string
A search query to help narrow down search results. This could be a keyword or a phrase to search through the title and description of the collection.
from
number
The index of the starting record for the returned list. You can limit the number of results by specifying the index for the first record (parameter from) and the last record (parameter to).
By default, if you do not specify the from and to parameters, the API call returns the first 50 records.
Default: 0.
to
number
The index of the last record for the returned list. You can limit the number of results by specifying the index for the first record (parameter from) and the last record (parameter to).
By default, if you do not specify the from and to parameters, the API call returns the first 50 records.
Default: 50.
orderBy
string
The field after which the returned list will be ordered. Possible values are date_published, date_created and name.
Default: date_published.
orderMode
string
Specifies if the list will be ordered ascending or descending. Possible values are asc and desc.
Default: desc.
folder
string
The folder path where collections are stored in your account.
  • A folder name must contain only english letters, digits and spaces. Also a folder name must start and end with a letter or a digit, not a space.
  • The folder name is case insensitive. "My Folder" will be the same with "my folder".
  • If the parameter is not specified or empty string is provided the list of all collections in your account will be retrieved (this is for backward compatibility).
  • If you want to retrieve only the collections from the root folder (that are not added to a folder yet) you should provide the slash (/) character alone.
  • The path must not include first or last slash character (/), excepting the case when you provide the slash (/) character alone as mentioned above.
  • Eg: folder1
You can specify a folder structure up to 3 levels.
  • If a deeper folder is specified, it will be ignored.
  • in a structure, folder names must be separated with a slash character (/).
  • Eg: folder1/folder2/folder3
If the folder does not exists or there are no collections in that folder you will receive 0 results.

Response parameters

Name
Type
Description
collectionsCount
string
The total number of collections that match the request. This number does not take into consideration the limits specified at the API call.
For example, your request could match 100 collections, but it returns only the ones within the limits specified by from and to parameters.
collections
object
An object containing the list of collections returned that match the requested criteria. The parameters for each collection are described in the list below.

Collection parameters

Name
Type
Description
collectionHash
string
The hash for the newly created collection. If the collection status is editable the generated hash will be temporary. Once the collection is published, a new, final hash will be generated for it.
collectionTitle
string
The title of the collection.
collectionStatus
string
The current status of the collection: public, editable or unlisted.
coverImage
string
The url of the collection's thumbnail image. This thumbnail is generated from the first page of the first collection item.
createdDate
date
The date when the collection was created (not necessarily published).
directLink
string
The public link of the collection.

Error codes

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

Examples

Request

cURL
HTML
# GET
curl -X GET \
-G \
https://api.flipsnack.com/v1/ \
-d action=collection.getList \
-d apiKey=<YOUR-API-KEY> \
-d collectionStatus=public \
-d from=0 \
-d to=2 \
-d signature=<YOUR-REQUEST-SIGNATURE>
<form method="get" action="https://api.flipsnack.com/v1/">
<input type="hidden" name="action" value="collection.getList">
<input type="hidden" name="apiKey" value="<YOUR-API-KEY>">
<input type="hidden" name="collectionStatus">
<input type="hidden" name="from">
<input type="hidden" name="to">
<input type="hidden" name="signature" value="<YOUR-REQUEST-SIGNATURE>">
<button type="submit">Submit</button>
</form>

Response

JSON
{
"code": 20,
"status": "OK",
"data": {
"collectionsCount": "15",
"collections": [
{
"collectionHash": "d3m0h45h",
"collectionTitle": "Lorem ipsum",
"collectionStatus": "public",
"publishDate": "2015-06-09 04:50:23",
"createdDate": "2015-06-09 04:50:21",
"coverImage": "https://files.flipsnack.net/collections/items/913699e80d28331517aee0afci188784/covers/page_1/thumb",
"directLink": "https://www.flipsnack.com/user/lorem-ipsum.html"
},
{
"collectionHash": "fdnlg59t",
"collectionTitle": "Official document",
"collectionStatus": "public",
"publishDate": "2015-06-09 01:42:39",
"createdDate": "2015-06-09 01:42:37",
"coverImage": "https://files.flipsnack.net/collections/items/0553278b2fd72f91d88224222i188776/covers/page_1/thumb",
"directLink": "https://www.flipsnack.com/user/official-document.html"
}
]
}
}