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 section
  • Parameters:

Was this helpful?

  1. API
  2. Section

Put

Update an existing section

Parameters:

Name

Optional / Required

Data type

Description

Default

id

required

String

One of your section ids

name

required

String

A name for your new section

description

optional

String

A description for your new section

sorting

optional

String

Sort documents in section manually or automatically (manually, create_date_desc, create_date_asc, title_desc, title_asc)

manually

Example:

curl -X PUT -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=iMWWKoMS76pjqMoO_F54wo1ijuIzhbSfK" -d "name=Sports 2016" "https://api.yumpu.com/2.0/collection/section.json"

Example:

require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id'=>'iMWWKoMS76pjqMoO_F54wo1ijuIzhbSfK',
    'name' => 'Sports 2016'
);
$putSection = $yumpu->putSection($data);
print_r($putSection);

Example:

var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'iMWWKoMS76pjqMoO_F54wo1ijuIzhbSfK',
  name: 'Sports 2016'
};
yumpu.putSection(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});

Example:

Yumpu y = new Yumpu("your access token");
String[] params = { "id=iMWWKoMS76pjqMoO_F54wo1ijuIzhbSfK",
                "name=Sports 2016" };
System.out.println(y.putSection(params));

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

{
  "section": [
    {
      "id": "e6WHgwLimYExykjX",
      "create_date": "2016-09-06 15:58:35",
      "update_date": "2016-09-13 10:01:31",
      "name": "Sports 2016",
      "description": "Sports",
      "sorting": "manually",
      "order": 1,
      "documents": {
        "55910932": {
          "id": 55910932,
          "user_id": 106836286,
          "title": "new title",
          "description": "",
          "cover": "https://img.yumpu.com/55910932/1/115x163/new-title.jpg",
          "create_date": "2016-09-06 12:46:48",
          "update_date": "2016-09-06 12:48:03",
          "cover_size": "115x163",
          "pages": 3,
          "language": "de",
          "settings": {
            "privacy_mode": "public"
          },
          "sha1_checksum": "4cf2c13c2692e0054d3837e3c7848ec8319111dd"
        },
        "55914449": {
          "id": 55914449,
          "user_id": 106836286,
          "title": "Audi Modelle",
          "description": "",
          "cover": "https://img.yumpu.com/55914449/1/109x163/audi-modelle.jpg",
          "create_date": "2016-09-07 10:11:48",
          "update_date": "2016-09-07 10:13:03",
          "cover_size": "109x163",
          "pages": 69,
          "language": "de",
          "settings": {
            "privacy_mode": "public"
          },
          "sha1_checksum": "45330f1f1bae0c0344046c487105a2a0efa2c194"
        }
      }
    }
  ],
  "state": "success",
  "status_code": 200,
  "completed_in": 0.1772
}
PreviousPostNextDelete

Last updated 3 years ago

Was this helpful?