A
A
API
Search…
Get

Retrieve a list of your collections

Parameters:

Name
Optional / Required
Data type
Description
Default
offset
optional
Integer
Retrieve rows at position X (min. 0)
0
limit
optional
Integer
Retrieve X rows (min. 0 and max. 100)
10
return_fields
optional
String
Customize the responses by setting the return fields (id, create_date, update_date, name, order, sections)
id, create_date, update_date, name, order, sections

Demo

URL Find your token on - yumpu.com Token

Optional parameters:

offset limit return_fields
Add optional parametersRun request
1
Copied!
curl
PHP
JavaScript
Java
Example:
1
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "http://api.yumpu.com/2.0/collections.json"
Copied!
Example:
1
require_once('../yumpu.php');
2
$yumpu = new Yumpu();
3
$data = array(
4
'limit' => 1,
5
'offset' => 0,
6
'return_fields' => 'id,create_date,update_date,name,order,sections'
7
);
8
$listColection = $yumpu->getCollections($data);
9
print_r($listColection);
Copied!
Example:
1
var yumpu = require('yumpu');
2
yumpu.setToken('yourToken');
3
var parameters = {
4
offset: 0,
5
limit: 1,
6
return_fields: 'id,create_date,update_date,name,order,sections'
7
};
8
yumpu.getCollections(parameters, function(statusCode, document){
9
console.log('Status: ' + statusCode);
10
console.log(document);
11
});
Copied!
Example:
1
Yumpu y = new Yumpu("your access token");
2
String[] params = {"limit=1", "offset=0", "return_fields=id,create_date,update_date,name,order,sections"};
3
System.out.println(y.getCollections(params));
Copied!
Whatever language you are using, the result will be the same.
1
{
2
"collections": [
3
{
4
"id": "iMWWKoMS76pjqMoO",
5
"create_date": "2013-09-23 08:01:01",
6
"update_date": "2013-09-23 08:01:35",
7
"name": "My magazines",
8
"order": 0,
9
"sections": [
10
{
11
"id": "iMWWKoMS76pjqMoO_2mqhaSEMTVpvFwrY",
12
"name": "Top 3",
13
"description": "Top 3",
14
"sorting": "manually",
15
"order": 0
16
},
17
{
18
"id": "iMWWKoMS76pjqMoO_vpgFQQ3sHervO8yj",
19
"name": "Look at that",
20
"description": "Look at that",
21
"sorting": "title_desc",
22
"order": 1
23
}
24
]
25
}
26
],
27
"state": "success"
28
}
Copied!
Last modified 1yr ago