Post

Create a new collection

Parameters:

Name

Optional / Required

Data type

Description

Default

name

required

String

A name for your collection

Demo

URL Find your token on - yumpu.com Token

name

Run request

curl
PHP
JavaScript
Java
curl

Example:

curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "name=Holidays" "http://api.yumpu.com/2.0/collection.json"
PHP

Example:

require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
'name' => 'Holidays',
);
$newCollection = $yumpu->postCollection($data);
print_r($newCollection);
JavaScript

Example:

var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
name: 'Holidays'
};
yumpu.postCollection(parameters, function(statusCode, document){
console.log('Status: ' + statusCode);
console.log(document);
});
Java

Example:

Yumpu y = new Yumpu("your access token");
String[] params = { "name=Holidays" };
System.out.println(y.postCollection(params));

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

{
"collection": [
{
"id": "omkYGduXowlyx9WF",
"create_date": "2013-09-23 09:05:47",
"update_date": "0000-00-00 00:00:00",
"name": "Holidays",
"order": 0,
"sections": [
{
"id": "omkYGduXowlyx9WF_stVFPUYW3kHX07B6",
"name": "",
"description": "",
"sorting": "manually",
"order": 0
}
]
}
],
"state": "success"
}