A
A
API
Search…
⌃K

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:
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"
Example:
$data = array(
'id'=>'omkYGduXowlyx9WF',
'name' => 'Holidays 2013'
);
$putCollection = $yumpu->putCollection($data);
print_r($putCollection);
Example:
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
id: 'omkYGduXowlyx9WF',
name: 'Holidays 2013'
};
yumpu.putCollection(parameters, function(statusCode, document){
console.log('Status: ' + statusCode);
console.log(document);
});
Example:
Yumpu y = new Yumpu("your access token");
String[] params = { "id=omkYGduXowlyx9WF", "name=Holidays 2013" };
System.out.println(y.putCollection(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": "2013-09-23 09:11:45",
"name": "Holidays 2013",
"order": 0,
"sections": [
{
"id": "omkYGduXowlyx9WF_stVFPUYW3kHX07B6",
"name": "",
"description": "",
"sorting": "manually",
"order": 0
}
]
}
],
"state": "success"
}
Last modified 9mo ago