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 an existing section
  • Parameters:
  • Demo

Was this helpful?

  1. API
  2. Section

Get

PreviousSectionNextPost

Last updated 3 years ago

Was this helpful?

Retrieve an existing section

Parameters:

Name

Optional / Required

Data type

Description

Default

id

required

String

One of your section ids

return_fields

optional

String

Customize the responses by setting the return fields (id, create_date, update_date, name, description, sorting, order, documents)

id, create_date, update_date, name, description, sorting, order, documents

Demo

URL Find your token on - Token

id

Optional parameters:

return_fields

Add optional parametersRun request

Example:

curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/collection/section.json?id=iMWWKoMS76pjqMoO_2mqhaSEMTVpvFwrY"

Example:

require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id'=>'iMWWKoMS76pjqMoO_2mqhaSEMTVpvFwrY',
);
$listSection = $yumpu->getSection($data);
print_r($listSection);

Example:

var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = '{
  id: 'iMWWKoMS76pjqMoO_2mqhaSEMTVpvFwrY',
  return_fields: 'id,create_date,update_date,name,description,sorting,order,documents'
}';
yumpu.getSection(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});

Example:

Yumpu y = new Yumpu("your access token");
String[] params = { "id=iMWWKoMS76pjqMoO_2mqhaSEMTVpvFwrY" };
System.out.println(y.getSection(params));

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

{
  "section": [
    {
      "id": "2mqhaSEMTVpvFwrY",
      "create_date": "2016-09-06 15:58:35",
      "update_date": "2016-09-13 09:39:56",
      "name": "new section",
      "description": "new section",
      "sorting": "manually",
      "order": 1,
      "documents": {
        "55910932": {
          "id": 55910932,
          "user_id": 106836286,
          "title": "new title",
          "description": "",
          "cover": "https://img.yumpu.com/55910932/1/115x163/new-title.jpg",
          "create_date": "2016-09-06 12:46:48",
          "update_date": "2016-09-06 12:48:03",
          "cover_size": "115x163",
          "pages": 3,
          "language": "de",
          "settings": {
            "privacy_mode": "public"
          },
          "sha1_checksum": "4cf2c13c2692e0054d3837e3c7848ec8319111dd"
        },
        "55914449": {
          "id": 55914449,
          "user_id": 106836286,
          "title": "Audi Modelle",
          "description": "",
          "cover": "https://img.yumpu.com/55914449/1/109x163/audi-modelle.jpg",
          "create_date": "2016-09-07 10:11:48",
          "update_date": "2016-09-07 10:13:03",
          "cover_size": "109x163",
          "pages": 69,
          "language": "de",
          "settings": {
            "privacy_mode": "public"
          },
          "sha1_checksum": "45330f1f1bae0c0344046c487105a2a0efa2c194"
        }
      }
    }
  ],
  "state": "success",
  "completed_in": 0.0766
}
yumpu.com