A
A
API
Search…
Post

Create a new document in section

Parameters:

Name
Optional / Required
Data type
Description
Default
id
required
String
One of your section ids
documents
required
String or integer
One or more document ids

Demo

URL Find your token on - yumpu.com Token
id documents
Run request
1
Copied!
curl
PHP
JavaScript
Java
Example:
1
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=iMWWKoMS76pjqMoO_vpgFQQ3sHervO8yj" -d "documents=20327014,20327015" "http://api.yumpu.com/2.0/collection/section/document.json"
Copied!
Example:
1
require_once('../yumpu.php');
2
$yumpu = new Yumpu();
3
$data = array(
4
'id' => 'iMWWKoMS76pjqMoO_vpgFQQ3sHervO8yj',
5
'documents' => '20327014,20327015'
6
);
7
$sectionDocument = $yumpu->postSectionDocument($data);
Copied!
Example:
1
var yumpu = require('yumpu');
2
yumpu.setToken('yourToken');
3
var parameters = {
4
id: 'iMWWKoMS76pjqMoO_vpgFQQ3sHervO8yj',
5
documents: '20327014,20327015'
6
};
7
yumpu.postSectionDocument(parameters, function(statusCode, document){
8
console.log('Status: ' + statusCode);
9
console.log(document);
10
});
Copied!
Example:
1
Yumpu y = new Yumpu("your access token");
2
String[] params = {"id=iMWWKoMS76pjqMoO_vpgFQQ3sHervO8yj", "documents=20327014,20327015"};
3
System.out.println(y.postSectionDocument(params));
Copied!
Whatever language you are using, the result will be the same.
1
{
2
"section": [
3
{
4
"id": "vpgFQQ3sHervO8yj",
5
"create_date": "2016-09-06 15:58:35",
6
"update_date": "2016-09-13 09:39:56",
7
"name": "Sports",
8
"description": "Sports",
9
"sorting": "manually",
10
"order": 2,
11
"documents": {
12
"55910932": {
13
"id": 20327014,
14
"user_id": 106836286,
15
"title": "new title",
16
"description": "",
17
"cover": "http://img.yumpu.com/55910932/1/115x163/new-title.jpg",
18
"create_date": "2016-09-06 12:46:48",
19
"update_date": "2016-09-06 12:48:03",
20
"cover_size": "115x163",
21
"pages": 3,
22
"language": "de",
23
"settings": {
24
"privacy_mode": "public"
25
},
26
"sha1_checksum": "4cf2c13c2692e0054d3837e3c7848ec8319111dd"
27
},
28
"55914449": {
29
"id": 20327015,
30
"user_id": 106836286,
31
"title": "Audi Modelle",
32
"description": "",
33
"cover": "http://img.yumpu.com/55914449/1/109x163/audi-modelle.jpg",
34
"create_date": "2016-09-07 10:11:48",
35
"update_date": "2016-09-07 10:13:03",
36
"cover_size": "109x163",
37
"pages": 69,
38
"language": "de",
39
"settings": {
40
"privacy_mode": "public"
41
},
42
"sha1_checksum": "45330f1f1bae0c0344046c487105a2a0efa2c194"
43
}
44
}
45
}
46
],
47
"state": "success",
48
"status_code": 200,
49
"completed_in": 0.556
50
}
Copied!
Last modified 1yr ago