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
  • Create a new document in section
  • Parameters:
  • Demo

Was this helpful?

  1. API
  2. Section document

Post

PreviousSection documentNextDelete

Last updated 3 years ago

Was this helpful?

Create a new document in section

Parameters:

Name

Optional / Required

Data type

Description

Default

id

required

String

One of your section ids

documents

required

String or integer

One or more document ids

Demo

URL Find your token on - Token

id documents

Run request

Example:

curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=iMWWKoMS76pjqMoO_vpgFQQ3sHervO8yj" -d "documents=20327014,20327015" "https://api.yumpu.com/2.0/collection/section/document.json"

Example:

require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id' => 'iMWWKoMS76pjqMoO_vpgFQQ3sHervO8yj',
    'documents' => '20327014,20327015'
);
$sectionDocument = $yumpu->postSectionDocument($data);

Example:

var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'iMWWKoMS76pjqMoO_vpgFQQ3sHervO8yj',
  documents: '20327014,20327015'
};
yumpu.postSectionDocument(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});

Example:

Yumpu y = new Yumpu("your access token");
String[] params = {"id=iMWWKoMS76pjqMoO_vpgFQQ3sHervO8yj", "documents=20327014,20327015"};
System.out.println(y.postSectionDocument(params));

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

{
  "section": [
    {
      "id": "vpgFQQ3sHervO8yj",
      "create_date": "2016-09-06 15:58:35",
      "update_date": "2016-09-13 09:39:56",
      "name": "Sports",
      "description": "Sports",
      "sorting": "manually",
      "order": 2,
      "documents": {
        "55910932": {
          "id": 20327014,
          "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": 20327015,
          "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.556
}
yumpu.com