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
  • Create a new section
  • Parameters:
  • Demo

Was this helpful?

  1. API
  2. Section

Post

PreviousGetNextPut

Last updated 3 years ago

Was this helpful?

Create a new section

Parameters:

Name

Optional / Required

Data type

Description

Default

id

required

String

One of your collection ids

name

required

String

A name for your new section

description

optional

String

A description for your new section

sorting

optional

String

Sort documents in section manually or automatically (by create_date_desc, create_date_asc, title_desc, title_asc)

manually

Demo

URL Find your token on - Token

id name

Optional parameters:

description sorting

Add optional parametersRun request

Example:

curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=iMWWKoMS76pjqMoO" -d "name=Sports" "https://api.yumpu.com/2.0/collection/section.json"

Example:

require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id'=>'iMWWKoMS76pjqMoO',
    'name' => 'Sports',
  'description' => 'Sports'
);
$newSection = $yumpu->postSection($data);
print_r($newSection);

Example:

var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'iMWWKoMS76pjqMoO',
  name: 'Sports',
  description: 'Sports'
};
yumpu.postSection(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});

Example:

Yumpu y = new Yumpu("your access token");
String[] params = { "id=iMWWKoMS76pjqMoO", "name=Sports", "description=Sports" };
System.out.println(y.postSection(params));

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

{
   "section": [
     {
       "id": "F54wo1ijuIzhbSfK",
       "create_date": "2013-09-23 10:46:53",
       "update_date": "0000-00-00 00:00:00",
       "name": "Sports",
       "description": "Sports",
       "sorting": "manually",
       "order": 2,
       "documents": ""
     }
   ],
   "state": "success"
 }
yumpu.com