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" "http://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": "http://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": "http://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
}

results matching ""

    No results matching ""