API
  • Yumpu documentations
  • JS
    • Introduction
    • Quick setup
    • Magazine example's
    • Bookshelf example's
    • FAQs
  • API
    • Introduction
    • Getting started
      • API token
      • Document API
      • User API
      • Search API
      • Install SDK's
    • Limits
    • Flowchart of basic processes
    • Documents
      • Get
    • Document
      • Get
      • Post file
      • Post url
      • Put
      • Delete
    • Document hotspots
      • Get
    • Document hotspot
      • Get
      • Post
      • Put
      • Delete
    • Document progress
      • Get
    • Document categories
      • Get
    • Document languages
      • Get
    • Countries
      • Get
    • Collections
      • Get
    • Collection
      • Get
      • Post
      • Put
      • Delete
    • Section
      • Get
      • Post
      • Put
      • Delete
    • Section document
      • Post
      • Delete
    • Search
      • Get
    • User
      • Get
      • Post
      • Put
    • Embeds
      • Get
    • Embed
      • Get
      • Post
      • Put
      • Delete
    • Members
      • Get
    • Member
      • Get
      • Post
      • Put
      • Delete
    • Access tags
      • Get
    • Access tag
      • Get
      • Post
      • Put
      • Delete
    • Subscriptions
      • Get
    • Subscription
      • Get
      • Post
      • Put
      • Delete
Powered by GitBook
On this page
  • Update an existing collection
  • Parameters:

Was this helpful?

  1. API
  2. Collection

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

icon

optional

String

The icon used in the App

section_sorting

optional

String

Sort sections in a collection manually or automatically (by create_date_desc, create_date_asc, title_desc, title_asc)

manually

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",
      "icon": "none",
      "order": 0,
      "sections": [
        {
          "id": "omkYGduXowlyx9WF_stVFPUYW3kHX07B6",
          "name": "",
          "description": "",
          "sorting": "manually",
          "order": 0
        }
      ]
    }
  ],
  "state": "success"
}
PreviousPostNextDelete

Last updated 1 year ago

Was this helpful?