A
A
API
Search…
Post

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 - yumpu.com Token
id name

Optional parameters:

description sorting
Add optional parametersRun request
1
Copied!
curl
PHP
JavaScript
Java
Example:
1
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=iMWWKoMS76pjqMoO" -d "name=Sports" "http://api.yumpu.com/2.0/collection/section.json"
Copied!
Example:
1
require_once('../yumpu.php');
2
$yumpu = new Yumpu();
3
$data = array(
4
'id'=>'iMWWKoMS76pjqMoO',
5
'name' => 'Sports',
6
'description' => 'Sports'
7
);
8
$newSection = $yumpu->postSection($data);
9
print_r($newSection);
Copied!
Example:
1
var yumpu = require('yumpu');
2
yumpu.setToken('yourToken');
3
var parameters = {
4
id: 'iMWWKoMS76pjqMoO',
5
name: 'Sports',
6
description: 'Sports'
7
};
8
yumpu.postSection(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 = { "id=iMWWKoMS76pjqMoO", "name=Sports", "description=Sports" };
3
System.out.println(y.postSection(params));
Copied!
Whatever language you are using, the result will be the same.
1
{
2
"section": [
3
{
4
"id": "F54wo1ijuIzhbSfK",
5
"create_date": "2013-09-23 10:46:53",
6
"update_date": "0000-00-00 00:00:00",
7
"name": "Sports",
8
"description": "Sports",
9
"sorting": "manually",
10
"order": 2,
11
"documents": ""
12
}
13
],
14
"state": "success"
15
}
Copied!
Last modified 1yr ago