A
A
API
Search…
A
A
API
Yumpu documentations
JS
Introduction
Quick setup
Magazine example's
Bookshelf example's
FAQs
API
Introduction
Getting started
Limits
Flowchart of basic processes
Documents
Document
Document hotspots
Document hotspot
Document progress
Document categories
Document languages
Countries
Collections
Collection
Get
Post
Put
Delete
Section
Section document
Search
User
Embeds
Embed
Members
Member
Access tags
Access tag
Subscriptions
Subscription
Powered By
GitBook
Put
Update an existing collection
Parameters:
Name
Optional / Required
Data type
Description
Default
id
required
String
An id of your collections
​
name
required
String
A name for your collection
​
curl
PHP
JavaScript
Java
Example:
1
curl -X PUT -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=omkYGduXowlyx9WF" -d "name=Holidays 2013" "https://api.yumpu.com/2.0/collection.json"
Copied!
Example:
1
$data
=
array
(
2
'id'
=>
'omkYGduXowlyx9WF'
,
3
'name'
=>
'Holidays 2013'
4
);
5
$putCollection
=
$yumpu
->
putCollection
(
$data
);
6
print_r
(
$putCollection
);
Copied!
Example:
1
var
yumpu
=
require
(
'yumpu'
);
2
yumpu
.
setToken
(
'yourToken'
);
3
var
parameters
=
{
4
id
:
'omkYGduXowlyx9WF'
,
5
name
:
'Holidays 2013'
6
};
7
yumpu
.
putCollection
(
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=omkYGduXowlyx9WF"
,
"name=Holidays 2013"
};
3
System
.
out
.
println
(
y
.
putCollection
(
params
));
Copied!
Whatever language you are using, the result will be the same.
1
{
2
"collection"
:
[
3
{
4
"id"
:
"omkYGduXowlyx9WF"
,
5
"create_date"
:
"2013-09-23 09:05:47"
,
6
"update_date"
:
"2013-09-23 09:11:45"
,
7
"name"
:
"Holidays 2013"
,
8
"order"
:
0
,
9
"sections"
:
[
10
{
11
"id"
:
"omkYGduXowlyx9WF_stVFPUYW3kHX07B6"
,
12
"name"
:
""
,
13
"description"
:
""
,
14
"sorting"
:
"manually"
,
15
"order"
:
0
16
}
17
]
18
}
19
]
,
20
"state"
:
"success"
21
}
Copied!
Previous
Post
Next
Delete
Last modified
4mo ago
Copy link
Contents
Update an existing collection
Parameters: