API
  • Yumpu documentations
  • JS
    • Introduction
    • Quick setup
    • Magazine example's
    • Bookshelf example's
    • FAQs
  • API
    • Introduction
    • Getting started
      • API token
      • Document API
      • User API
      • Search API
      • Install SDK's
    • Limits
    • Flowchart of basic processes
    • Documents
      • Get
    • Document
      • Get
      • Post file
      • Post url
      • Put
      • Delete
    • Document hotspots
      • Get
    • Document hotspot
      • Get
      • Post
      • Put
      • Delete
    • Document progress
      • Get
    • Document categories
      • Get
    • Document languages
      • Get
    • Countries
      • Get
    • Collections
      • Get
    • Collection
      • Get
      • Post
      • Put
      • Delete
    • Section
      • Get
      • Post
      • Put
      • Delete
    • Section document
      • Post
      • Delete
    • Search
      • Get
    • User
      • Get
      • Post
      • Put
    • Embeds
      • Get
    • Embed
      • Get
      • Post
      • Put
      • Delete
    • Members
      • Get
    • Member
      • Get
      • Post
      • Put
      • Delete
    • Access tags
      • Get
    • Access tag
      • Get
      • Post
      • Put
      • Delete
    • Subscriptions
      • Get
    • Subscription
      • Get
      • Post
      • Put
      • Delete
Powered by GitBook
On this page
  • Retrieve a list of your collections
  • Parameters:
  • Demo

Was this helpful?

  1. API
  2. Collections

Get

PreviousCollectionsNextCollection

Last updated 3 years ago

Was this helpful?

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 - Token

Optional parameters:

offset limit return_fields

Add optional parametersRun request

Example:

curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/collections.json"

Example:

require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'limit' => 1, 
    'offset' => 0,
    'return_fields' => 'id,create_date,update_date,name,order,sections'
);
$listColection = $yumpu->getCollections($data);
print_r($listColection);

Example:

var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  offset: 0,
  limit: 1,
  return_fields: 'id,create_date,update_date,name,order,sections'
};
yumpu.getCollections(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});

Example:

Yumpu y = new Yumpu("your access token");
String[] params = {"limit=1", "offset=0", "return_fields=id,create_date,update_date,name,order,sections"};
System.out.println(y.getCollections(params));

Whatever language you are using, the result will be the same.

{
  "collections": [
    {
      "id": "iMWWKoMS76pjqMoO",
      "create_date": "2013-09-23 08:01:01",
      "update_date": "2013-09-23 08:01:35",
      "name": "My magazines",
      "order": 0,
      "sections": [
        {
          "id": "iMWWKoMS76pjqMoO_2mqhaSEMTVpvFwrY",
          "name": "Top 3",
          "description": "Top 3",
          "sorting": "manually",
          "order": 0
        },
        {
          "id": "iMWWKoMS76pjqMoO_vpgFQQ3sHervO8yj",
          "name": "Look at that",
          "description": "Look at that",
          "sorting": "title_desc",
          "order": 1
        }
      ]
    }
  ],
  "state": "success"
}
yumpu.com