# Yumpu documentations

## Build powerful publishing tools

### Getting started with Yumpu API

&#x20;To use the [Yumpu.com API](/api/introductionapi), you need one of our paid plans. With the API, you can create effective tools to publish your pdf documents on your website, tablet or mobile application. Find out how to get started, publish your first pdf as flip book on the web or use the search api to display content.\
\
&#x20;Besides the API, [Yumpu.com](https://www.yumpu.com) offers additional [premium features](https://www.yumpu.com/info/plans).\
\
&#x20;[**Getting started Guide**](/api/getting-started/apitoken)\
&#x20;[**Introduction to Yumpu API**](/api/introductionapi)\
&#x20;[**Flowchart of Processes**](/api/flowchartofbasicprocesses)\
&#x20;[**API Limits for Basic Users**](/api/limits)\
\
&#x20;[Yumpu SDK's](/api/getting-started/installsdk)\
&#x20;[Wordpress Plugin](https://wordpress.org/plugins/yumpu-epaper-publishing/)\
\
&#x20;Media companies, hotels or engineering businesses are using Yumpu to convert their documents from huge pdf documents to web optimized e-Papers. Offering one of the most powerful document publishing APIs, Yumpu gives to the tools you need to create documents and market them to your readers on the internet, mobile or via native tablet apps. Yumpu supports web standards and offers a whole load of features: upload, convert and host documents, present the documents using the html5-view.\
&#x20;![roboter](/files/-LxAbTqNcA-nxDyu7nnb)


# Introduction

## Introduction

### Note

&#x20;This is the first version of this introduction to the frontend API. If you have any comments or suggestions about it, let us know and drop us a line <support@yumpu.com>

### Note to old browsers

&#x20;In some cases (mostly in old version of IE) the Javascript engine should be up and running, before calling our commands, so don't forget to use $(document).ready(function() { }); or anything similar, to avoid errors.

### Overview

&#x20;What can you do with the frontend API? Create yumpu frontends on your website easily! Right now we support the dynamic creation of ... - magazines - bookshelfs ... with a simply Javascript command.


# Quick setup

## Quick Setup

1. Include our script within your websites page:

   ```markup
   <script type="text/javascript" src="https://players.yumpu.com/hub.js"></script>
   ```
2. Provide a container you want the frontend to be placed in, give it an "id" and set the dimension. E.g.

   ```markup
   <div id="magazineContainer" style="width:620px; height:400px;"></div>
   ```
3. Create the Yumpu object in a script tag:

   ```javascript
   var myYumpu = new Yumpu();
   ```
4. Create a magazine with:

   ```javascript
   myYumpu.create_player("#magazineContainer", "17403069");
   ```
5. Create a bookshelf with:

   ```javascript
   var collectionID = "MjG471mbwPubqNLR";
   myYumpu.create_bookshelf("magazineContainer", collectionID, "myYumpuUsername" );
   ```

## Wait! What parameters are you using?

With **magazines**, the parameters are:

1. The "id" property of the HTML container where you want the magazine to be placed in. You can use a 's "id" with a leading "#", or you can also use "body" to use the whole page.
2. The magazines id, which you can easily get from the magazines page, e.g. <http://www.yumpu.com/en/document/view/17403069/faceon-online-magazin-yumpu> -> it's ***"17403069"***
3. (optional) Parameters: You can add quite a lot of custom parameters to change certain functionality, switch on/off elements, and so on. Pass them as an object, e.g. ***{ fallback\_order:"hornet,"html5","js", startpage:7, hideOuterShadows:"0", ... }*** You'll see more infos below.

With **bookshelfs**, the parameters are:

1. The "id" property of the HTML container where you want the magazine to be placed in. You can use a 's "id" with a leading "#", or you can also use "body" to use the whole page.
2. The collection id, which you get, not quite so easily yet - we have to admit, from the magazines edit page, where you create your collection. Click on **EDIT** at he right and choose **View JSON**. On top of the popup you'll get a link like <http://www.yumpu.com/en/collections/json/pHTQHdSYJggwsIoN> ... in that example, the collection id is ***"pHTQHdSYJggwsIoN "***
3. (optional) Parameters: You can add some additional parameters to customize your bookshelf. You'll see more infos below.


# Magazine example's

### Magazine example #1

```javascript
var myYumpu = new Yumpu();
document.addEventListener("DOMContentLoaded", function() {
	myYumpu.create_player("#myMagazineContainer", "55929647", {
		canvasBGColor: "#e65117",
		fallback_order: "hornet,html5,js"
	});
});
```

\
**Result:**&#x20;

You should see a magazine in a \<div> with a dimension of 600 x 744 px, with an orange background. The orange background is set within the additional parameters ***{ ... canvasBGColor:"#e65117", ... }.***&#x20;

Use any color you like and place it in HEX color code. If you don't set this parameter then the background will be transparent. You can also set the \<div>'s background color if you like with CSS.&#x20;

The parameter ***{ ... fallback\_order:"hornet,html5,js", ... }*** will set the prefered technology. In this example you'll get the Hornet Player - if the browser doesn't support WebGL, then it will try to fallback to the second value "html5" and if your browser can't handle HTML5 it will show you our simple Javascript+HTML4 player.

#### Automatic fallback

As mentioned in the example above, you can set the "***fallback\_order***" Parameter to force a certain technology. Every technology has it's advantages - the Hornet Player is faster and can handle the loading of images better than the HTML5 version; the HTML5 version on the other hand will run on desktop computers, as well as on mobile devices, and so on. But our automatic fallback procedure will provide users the best player technology anyway! On mobile devices a user will get our HTML5-mobile-player by default. In other words, you don't have to set this parameter, which is "hornet,html5,js" by default and you don't have to worry anyway.

### Additional parameters

| fallback\_order           | default: "hornet,html5,js"     | order of technology to use as the player                                                                                                                                                                                                                                       |
| ------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| singlepageViewOn          | default: "0"                   | set "1" to see the magazine in a single page view                                                                                                                                                                                                                              |
| startpage                 | default: "1"                   | set any page number you want to magazine to jump on start                                                                                                                                                                                                                      |
| hideOuterShadows          | default: "0"                   | set "1" to hide all shadow effects outside the magazine                                                                                                                                                                                                                        |
| hideInnerShadows          | default: "0"                   | set "1" to hide all shadow effects inside the magazine                                                                                                                                                                                                                         |
| canvasBGColor             | default: "transparent"         | e.g. set "#00FF00" to get a green background in normal view                                                                                                                                                                                                                    |
| canvasFSBGColor           | default: "standard"            | e.g. set "#FF0000" to get a red background in fullscreen view                                                                                                                                                                                                                  |
| c2rOnOff                  | default: "on"                  | set "off" to completely hide the click-to-read-button                                                                                                                                                                                                                          |
| c2rText                   | default: "Click to read" \[en] | set to any text you like to address a user to click, e.g. "Enlarge to fullscreen", etc.                                                                                                                                                                                        |
| c2rMode                   | default: "fullscreen"          | the default value "fullscreen" will activate the fullscreen mode on click by the user. You can also set to "external" to redirect a user to another site. You can specify the URL with the next parameter "c2rURL".                                                            |
| c2rURL                    | default: "on"                  | set an URL/link, e.g. to any interesting website you want the user to redirect when clicking onto the button                                                                                                                                                                   |
| embedded                  | default: false                 | When set to false, you'll see the magazin like you would se it on yumpu.com. If set to true the view changes a bit, as we deliver embedded magazines you normally see in our embed generator.                                                                                  |
| playerElementPageNumbers  | default: "on"                  | set to "off" you'll hide the page numbers in the player                                                                                                                                                                                                                        |
| playerElementLogo         | default: "on"                  | set to "off" you'll hide the logo                                                                                                                                                                                                                                              |
| playerElementOverview     | default: "on"                  | set to "off" you'll hide the overview at the bottom                                                                                                                                                                                                                            |
| playerElementFSShareLinks | default: "on"                  | set to "off" you'll hide the social sharing functions                                                                                                                                                                                                                          |
| playerElementFSDownload   | default: "on"                  | set to "off" you'll hide the button with which you can download the magazines PDF                                                                                                                                                                                              |
| playerElementFSPrint      | default: "on"                  | set to "off" you'll hide the print button in fullscreen mode                                                                                                                                                                                                                   |
| playerElementFSRecom      | default: "on"                  | set to "off" you'll hide the recommendations on the right side in fullscreen mode                                                                                                                                                                                              |
| isFSOverlay               | default: "0"                   | set to "1" you tell the frontend to be used as a magazine, which will be directly opened in fullscreen mode, hence showing the "X" (top right) to close the fullscreen mode. The frontend cannot detect this case for sure in all cases, which makes this parameter necessary. |
| lang                      | default: "en"                  | use your desired 2 digit language code (e.g. "en" = english, "it" = italian, "es" = spanish, and so on), so the frontend knows which language file it has to load, which affects especially the tooltip texts                                                                  |
| disableMobileFullscreen   | default: false                 | set to true you'll hide the fullscreen button on mobile devices                                                                                                                                                                                                                |

### Magazine example #2

&#x20;In the next example we'll create a magazine where we link the user directly to the index page (*{startpage:"3"}*). We also want to show it in the embed style (*{... embedded:true}*), show it as a single page (*{singlepageViewOn:"1"}*) and set the background green (*{canvasBGColor:"#7a9986"}*).&#x20;

```javascript
var myYumpu = new Yumpu();
document.addEventListener("DOMContentLoaded", function() {
	myYumpu.create_player("#myMagazineContainer", "55929647", {
		startpage: "3",
		embedded: true,
		singlepageViewOn: "1",
		canvasBGColor: "#7a9986",
		fallback_order: "hornet,html5,js"
	});
});
```

**Result:**


# Bookshelf example's

### Okay, got it. But how about multiple magazines on one page?&#x20;

You only have to create the Yumpu object once and then create as much magazines out of as as you want. But don't forget to provide enough \<div> containers:&#x20;

```javascript
var myYumpu = new Yumpu();
document.addEventListener("DOMContentLoaded", function() {
	myYumpu.create_player("#myMagazineContainerNo1", "55929647", {
		startpage: 2
	});
	myYumpu.create_player("#myMagazineContainerNo2", "55929647", {
		startpage: 3
	});
	myYumpu.create_player("#myMagazineContainerNo3", "55929647", {
		startpage: 4
	});
});
```

#### I'm kinda lazy, isn't there something less complex? Some kind of 1-liner?

Yes, there is! You can add a magazine, or even an embed code you previously created ith one line. Just add some parameters to the \<script>-tag where you include hub.js and you're done. But notice that you will NOT be able to add multiple magazines on one page. And don't forget to add a \<div> container also:

#### (1) Create a magazine

Simply create a magazine in a given container. Add ***id="yumpuMagazineScript", data-yumpu-player-container="myMagazineContainer"*** and ***data-yumpu-magazine-id="55929647"** (in this example "55929647" is the magazine ID)* to the tag

```html
... <body> ...

<div id = "myMagazineContainer" style = "width:600px; height:302px;" > < /div>

...

<script id = "yumpuMagazineScript" src = "https://players.yumpu.com/hub.js" data - yumpu - magazine - id = "55929647" data - yumpu - player - container = "myMagazineContainer" > </script>

...
```

#### (2) Create a magazine and set width and height

Simply create a magazine in a given container. Add ***id="yumpuMagazineScript", data-yumpu-player-container="myMagazineContainer", data-yumpu-width="600", data-yumpu-height="450"*** and ***data-yumpu-magazine-id="35285631"** (in this example "35285631" is the magazine ID and of course you can change the values of width and height as well)*&#x74;o the \<script> tag

```markup
... <body> ...

<div id="myMagazineContainer" style="width:600px; height:302px;"></div>

...

<script id="yumpuMagazineScript" src="https://players.yumpu.com/hub.js" data-yumpu-magazine-id="55929647" data-yumpu-width="600" data-yumpu-height="450" data-yumpu-player-container="myMagazineContainer"></script>

...
```

#### (3) Create a magazine with an embed hash

Simply create a magazine in a given container. Add ***id="yumpuMagazineScript", data-yumpu-player-container="myMagazineContainer"*** and ***data-yumpu-embed-id="mimE5EX021a2pQDR"** (in this example "mimE5EX021a2pQDR" is the embed hash - replace with yours)*&#x74;o the \<script> tag

```markup
... <body> ...

<div id="myMagazineContainer" style="width:600px; height:302px;"></div>

...

<script id="yumpuMagazineScript" src="https://players.yumpu.com/hub.js" data-yumpu-embed-id="mimE5EX021a2pQDR" data-yumpu-player-container="myMagazineContainer"></script>

...
```

## Bookshelf example #1

```markup
... <body> ...

<script type="text/javascript" src="https://players.yumpu.com/hub.js"></script>

<div id="myMagazineContainer" style="width:620px; height:302px; background-color:#AA6666;"></div>

<script>
    var myYumpu = new Yumpu();
    document.addEventListener("DOMContentLoaded", function(){
        myYumpu.create_bookshelf("#myMagazineContainer", "nQaYDBZhLPUjRzsy", "myYumpuUsername" );
    });
</script>

...
```

**Result:**

You should see a bookshelf in a \<div> with a dimension of 600 x 260 px. The background color can be set in the style attributes of the \<div>.&#x20;

### Bookshelf example #2

```javascript
var myYumpu = new Yumpu();
document.addEventListener("DOMContentLoaded", function() {
	myYumpu.create_bookshelf("#myBookshelfContainer", "nQaYDBZhLPUjRzsy", "myYumpuUsername", {
		fullscreenLinkingActivated: "on",
		yumpu_bookshelf_flip_btn_color: "dark",
		title_font_color: "442222"
	});
});
```

**Result:**

You should see a bookshelf in a \<div> with a light red background and a dimension of 600 x 260 px. As we have a \<div> with a light background color, we want dark arrows, which we achieve with the parameter **yumpu\_bookshelf\_flip\_btn\_color** setting to **"dark"**. With setting **fullscreenLinkingActivated** to **on**, the bookshelf tries to open the magazine a user clicked on directly in fullscreen mode. Note that some browsers might not support this feature. Setting **title\_font\_color** to **442222** (HEX color) will show the section titles in a dark gray'ish red.

### Additional parameters

| fullscreenLinkingActivated                 | default: "on"               | when clicking a cover, the magazine tries to open it directly in fullscreen mode (if browser supports this feature). Set "off" to deactivate it.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ------------------------------------------ | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| yumpu\_bookshelf\_section\_titles\_on      | default: "on"               | set "on" to show the (clickable) titles, set "off" to hide them                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| yumpu\_bookshelf\_flip\_btn\_color         | default: "light"            | set "light" to display white flip buttons, set "dark" to display them in dark gray (choose whatever fits best to the given background color)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| yumpu\_bookshelf\_flip\_throught\_sections | default: "on"               | set "on" to flip through section. At the end of a section the flip buttons will be shown. Set "off" to hide them - then you only can jump from section to section with the section titles below                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| yumpu\_bookshelf\_align                    | default: "center"           | set "center" to align to center, set "left" to change the alignment to left                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| title\_font\_color                         | default: "FFFFFF"           | set any hex color for the section titles                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|                                            |                             |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| yumpu\_logo\_on\_or\_off                   | default: "on"               | set "on" to show the yumpu.com logo, set "off" to hide it                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| usedFontFamily                             | default: "Open Sans"        | set the font family you want the section titles to be shown with                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| usedFontFamilyWebFontTitle                 | default: "Open+Sans::latin" | <p>This is a more advanced feature, to setup a custom google webfont in bookshelfs. Here's how to get this value:</p><ol><li>goto <a href="https://www.google.com/fonts">[www.google.com/fonts](http://www.google.com/fonts)</a> and add your desired font (e.g."Roboto") with <strong>add to collection</strong></li><li>click <strong>Use</strong> in bottom right corner</li><li>then, in the section <strong>3</strong> click on the tab <strong>Javascript</strong></li><li>you should see something like <em>WebFontConfig = { google: { families: \[ '<strong>Roboto::latin</strong>' ] } };</em> ... copy the marked text <em>Roboto::latin</em> and use it as this parameter</li></ol> |

### Tidy up - disposing mags/bookshelfs at runtime

You can either dispose all frontends with .dispose\_all() or you can only dispose a single container with .dispose\_ontainer("#myContainer"). E.g.:

```javascript
myYumpu.dispose_all(); // disposing all container filled with magazines/bookshelfs

myYumpu.dispose_container("#magazineContainer"); // disposing container #magazineContainer only
```

### Example for advanced users: Loading magazine directly in fullscreen mode with a single click on a button

In this example you can see how to open a magazine in a DIV tag with a simple click on a button. Everything will be loaded on demand. No iFrames will be used. And, when leaving fullscreen mode, everything get's disposed and cleaned up. The code should be self-explanatory to advanced users who have experience with Javascript:

```markup
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Example - loads Yumpu magazine directly to fullscreen by a simple click on a button</title>
        <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
        <script type="text/javascript" src="https://players.yumpu.com/hub.js"></script>
    </head>

    <body onload="init();">

        <script type="text/javascript">
            // global yumpu variable
            var myYumpu;

            function init() {
                myYumpu = new Yumpu();
            }

            function create_mag() {
                // triggers creation of mag in a DIV container
                myYumpu.create_player("#magContainer", 55715319, { fallback_order:"html5", isFSOverlay:"1" });
                goFullscreen();
            }

            function goFullscreen() {
                let obj = document.getElementById("magContainer");
                // change size to fullwidth and -height
                $('#magContainer').css('width','100%');
                $('#magContainer').css('height','100%');

                // requesting fullscreen mode
                if ( obj.requestFullScreen )
                    obj.requestFullScreen();
                else if ( obj.webkitRequestFullScreen )
                    obj.webkitRequestFullScreen();
                else if ( obj.mozRequestFullScreen )
                    obj.mozRequestFullScreen();
                else if ( obj.msRequestFullscreen )
                    obj.msRequestFullscreen();

                $(document).on('webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange', cancelFullscreen );
            }

            function cancelFullscreen() {
                var doc = window.document;

                if( !doc.fullscreenElement && !doc.mozFullScreenElement && !doc.webkitFullscreenElement && !doc.msFullscreenElement) {
                    // fullscreen mode canceled -> back to "normal"
                    $('#magContainer').css('width','200px');
                    $('#magContainer').css('height','200px');
                    // kill fullscreen listener
                    $(document).off('webkitfullscreenchange mozfullscreenchange fullscreenchange MSFullscreenChange', cancelFullscreen );

                    // destroy magazine and clear container
                    myYumpu.dispose_container("#magContainer");
                }
            }
        </script>

        <!-- entry point: create empty HTML container for a magazine -->
        <div id="magContainer" style="width:200px; height:200px; background-color:#606;"></div>

        <!-- this triggers the loading of a magazine, viewing in fullscreen mode -->
        <button onclick="create_mag();">create magazine</button>

    </body>
</html>
```


# FAQs

## FAQs

**1. It's not working locally:**

If your're using it locally, make sure to use a local server. The frontend(s) will not be displayed, when you just open a .html page in a browser. If you see ...

```markup
file://...
```

... in the browsers address bar, it won't work. Use a local server like XAMPP or start a local server in your working directory on a Mac with ...

```markup
> python -m SimpleHTTPServer 8000
```

Then open your .html like this:

```markup
http://localhost:8000/<yourPage>.html
```

**2. Should I use "onload" or "" events (wait till everything is loaded)?**

Yes! Do it like this:

```markup
var myYumpu; // make a global variable
document.addEventListener("DOMContentLoaded", function(){
   ...
   myYumpu = new Yumpu();
   myYumpu.create_...( ... );
   ...
});
```

**3. Do I have to create multiple Yumpu objects when creating multiple magazines or bookshelfs on my page?**

No! You can create multiple magazines and/or bookshelfs with one Yumpu object.

Correct:

```markup
   myYumpu = new Yumpu();
   myYumpu.create_player( ... );
   myYumpu.create_bookshelf( ... );
   myYumpu.create_player( ... );
   myYumpu.create_bookshelf( ... );
   ...
```

Wrong:

```markup
   myYumpu = new Yumpu();
   myYumpu.create_player( ... );

   myYumpu2 = new Yumpu();
   myYumpu2.create_bookshelf( ... );

   myYumpu3 = new Yumpu();
   myYumpu3.create_player( ... );

   myYumpu4 = new Yumpu();
   myYumpu4.create_bookshelf( ... );
   ...
```

**4. Why should I use the Yumpu Javascript API to create bookshelfs and magazines, rather than embedding  on my page?**

Performance, speed, loading duration, and handling! If using more than one  on your page, you can watch the performance of your page going down. It's getting slow, laggy - just no fun to use, as all the resources get loaded over and over again. With our Javascript API these problems will be avoided. Also, the needed resources only get loaded once - no mather how many bookshelfs or magazines you create. Another thing is, that the bookshelfs and magazines resize themselves automatically within the HTML elements you place them in, which, on the other hand, will be resized by your CMS (or whatever you are using).


# Introduction

## Introduction

### Overview

&#x20;What is REST API? To make it simple, REST API defines a set of functions to which the developers can perform requests and receive responses. The interaction is performed via the HTTP protocol. An advantage of such an approach is the wide usage of HTTP. That is why REST API can be used practically for any programming language. Common characteristics of Yumpu REST API resources are as follows:

* You access the resource by sending an HTTP request to the API server. The server replies with a response that contains either the data you requested, or the status indicator, or even both.
* All resources are located at <https://api.yumpu.com/2.0>.
* All resources may return different HTTP status codes (e.g., HTTP Status Code 200 for success response or HTTP Status Code 400 for the bad request).
* You request a particular resource by adding a particular path to the base URL that specifies the resource.

### Output formats

&#x20;The REST API supports the response in two formats, which are JSON or XML.

### HTTP verbs

&#x20;HTTP verbs are used to manage the state of resources. In REST API, there are four verbs used to manage resources: GET, POST, PUT and DELETE. You can get the contents of the data using HTTP GET, delete the data using HTTP DELETE, and create or update the data using POST/PUT.

### HTTP status codes

| **200 OK**                         | Standard response for successful HTTP requests.                                                                                 |
| ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **202 Accepted**                   | The request has been accepted for processing, but the processing has not been completed.                                        |
| **400 Bad Request**                | The request cannot be fulfilled due to bad syntax.                                                                              |
| **401 Unauthorized**               | Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided. |
| **403 Forbidden**                  | The request was a valid request, but the server is refusing to respond to it.                                                   |
| **404 Not Found**                  | The requested resource could not be found but may be available again in the future.                                             |
| **500 Internal Server Error**      | A generic error message, given when no more specific message is suitable.                                                       |
| **505 HTTP Version Not Supported** | The server does not support the HTTP protocol version used in the request.                                                      |

### Request URL

&#x20;All URLs in REST API have the following base URL: <https://api.yumpu.com/2.0>.

### Resources

|        |                                                    |
| ------ | -------------------------------------------------- |
| Get    | Retrieve a list of your documents.                 |
|        |                                                    |
| Get    | Retrieve an existing document.                     |
| Post   | Create a new document by URL or file.              |
| Put    | Update an existing document.                       |
| Delete | Delete an existing document.                       |
|        |                                                    |
| Get    | Retrieve the current progress of your document.    |
|        |                                                    |
| Get    | Retrieve a list of our categories.                 |
|        |                                                    |
| Get    | Retrieve a list of your collections.               |
|        |                                                    |
| Get    | Retrieve an existing collection.                   |
| Post   | Create a new collection.                           |
| Put    | Update an existing collection.                     |
| Delete | Delete an existing collection.                     |
|        |                                                    |
| Get    | Retrieve an existing section.                      |
| Post   | Create a new section.                              |
| Put    | Update an existing section.                        |
| Delete | Delete an existing section.                        |
|        |                                                    |
| Post   | Create a new section.                              |
| Delete | Delete an existing section.                        |
|        |                                                    |
| Get    | Search our index and retrieve a list of documents. |

### Authentication

&#x20;All methods require authentication. Your access token must be sent in the HTTP header as X-ACCESS-TOKEN: ACCESS\_TOKEN.

### Limits

&#x20;Limits per window by resource. Rate limit window duration is currently 15 minutes long. More details: [Limits](http://developers.yumpu.com/api/limits/)


# Getting started


# API token

## API token

&#x20;How to get your API token to use the Yumpu.com API:

1. Register an account on Yumpu.com
2. Click on the avatar on the header and go to My Account&#x20;
3. On your account page, go to the API section

<figure><img src="/files/HtA4pVZhPRSENFkqHsPw" alt=""><figcaption></figcaption></figure>

4. On the API section you will find your API Token.&#x20;

<figure><img src="/files/cHbT5XumnWwuzlQXolti" alt=""><figcaption></figcaption></figure>


# Document API

## Document API

### [Upload Document](/api/document/documentpostfile)

&#x20;To get started using Yumpu you need a user and then can start uploading documents using the API. The Document Upload API gives you the possibility to create, edit and display your documents. Using Yumpu you can then select from several Players for desktop and mobile devices.\
\
&#x20;[Upload Document via file](/api/document/documentpostfile) CALL: DOCUMENT POST FILE\
&#x20;[Upload Document via Url](/api/document/documentposturl) CALL: DOCUMENT POST URL\
&#x20;[Get Document Category List](/api/document-categories) CALL: DOCUMENT GET CATEGORIES\
&#x20;[Get Document Language List](/api/document-languages) CALL: DOCUMENT GET LANGUAGES\
&#x20;[Get current Render Status](/api/document-progress) CALL: DOCUMENT GET Render Status<br>

### [Manage Documents](/api/document/documentget)

&#x20;Pull documents you already got inside your account. They can be uploaded and managed both manually and via Data API from any web platform.\
\
&#x20;[Get a single Document](/api/document/documentget) CALL: DOCUMENT GET\
&#x20;[Update Document Data](/api/document/documentput) CALL: DOCUMENT PUT\
&#x20;[Delete a Document](/api/document/documentdelete) CALL: DOCUMENT DELETE<br>

### [List Documents](/api/documents/documentsget)

&#x20;Get an overview of documents that are stored in your account. Use this command as a basis for other requests to manage, display or modify your documents.\
\
&#x20;[Load a Document List](/api/documents/documentsget) CALL: DOCUMENTS GET<br>

### [Organize documents with collections](/api/collection/collectionget)

&#x20;Collections are used to hold Sections for your APP or WEBKiosk. Collections are like Folders and can hold Subfolders, or Sections how we call them. Sections in turn then can hold Documents.\
\
&#x20;[List Collection](/api/collection/collectionget) CALL: GET COLLECTION\
&#x20;[Create Collection](/api/collection/collectionpost) CALL:POST COLLECTION\
&#x20;[Update Collection](/api/collection/collectionput) CALL: PUT COLLECTION\
&#x20;[Delete Collection](/api/collection/collectiondelete) CALL: DELETE COLLECTION\
\
&#x20;[List Collections](/api/collections/collectionsget) Listing all Collections gives an overview of all collections that have been ceated so far. This gives you quickly a good overview of the existing Folders and allows you to create subfolders, or Sections from there.\
&#x20;[List all my Collections](/api/collections/collectionsget) CALL: GET COLLECTIONS<br>

### [Sections are Subgroups of Collections](/api/section/sectionget)

&#x20;Sections are used to organize Documents. They are like Subfolders and can hold documents. Sections always need to sit inside a collection and can be pulled in formats json and xml. You can get this in data-format, or you can directly use it for your WEBKiosk or APPKiosk.\
\
&#x20;[List Section](/api/section/sectionget) CALL: SECTION GET\
&#x20;[Create Section](/api/section/sectionpost) CALL: SECTION POST\
&#x20;[Update Section](/api/section/sectionput) CALL: SECTION PUT\
&#x20;[Delete Section](/api/section/sectiondelete) CALL: SECTION DELETE<br>

### [Add Document to a Section](/api/section-document/sectiondocumentpost)

&#x20;Using the Section document command allows to add documents to these Subfolders. This helps you organize and later pull several documents in a sorted form. You can get this data as json or xml list, or you can directly use it for your WEBKiosk or APPKiosk.

[Add Document](/api/section-document/sectiondocumentpost) CALL: SECTION DOCUMENT POST\
[Delete Document](/api/section-document/sectiondocumentdelete) CALL: SECTION DOCUMENT DELETE<br>


# User API

## Manage User details

&#x20;Using the User Commands allows to create new Users, read and add details. If your application requires to have several different groups or needs to display content structured by users, creating and managing user accounts via yumpu api allows you to do that.\
\
&#x20;[Read my User details](/api/user/userget) CALL: USER GET\
&#x20;[Create a new User:](/api/user/userpost) CALL: USER POST\
&#x20;[Update my User details](/api/user/userput) CALL: USER PUT\
&#x20;[Get Country List](/api/countries/countriesget) CALL: GET COUNTRIES<br>


# Search API

## Search API

&#x20;The Search API allows you to pull Content from Yumpu and Enhance your existing Website, Application or APP using Rich-Media Publications from Yumpu.com. From Tourguides to Technical instructions, Yumpu offers a broad range of Content allowing you to improve userexperience for your users.\
\
&#x20;[Search Documents using the Search API](/api/search/searchget) CALL: SEARCH GET<br>


# Install SDK's

## How to add the packages to your project

### Official Packages:

* [PHP SDK](https://github.com/Yumpu/Yumpu-SDK)
* [Node.js SDK](https://github.com/Yumpu/YumpuNodeJSSDK)
* [Java SDK](https://github.com/Yumpu/YumpuJavaSDK)&#x20;

{% tabs %}
{% tab title="PHP" %}

#### PHP SDK

Download:

```bash
git clone https://github.com/Yumpu/Yumpu-SDK.git
```

How to use:

```php
// include yumpu sdk
require_once('../yumpu.php');

// make an instance of the Yumpu sdk class;
$yumpu = new Yumpu();
```

{% endtab %}

{% tab title="JavaScript" %}

#### Node.js SDK

Download:

```bash
npm install yumpu
```

How to use:

```javascript
// include yumpu sdk
var yumpu = require('yumpu');

// set your token
yumpu.setToken('yourToken');
```

{% endtab %}

{% tab title="Java" %}

#### Java SDK

Download:

```bash
git clone https://github.com/Yumpu/YumpuJavaSDK.git
```

How to use:

```java
// include yumpu sdk
import at.fes.service.Yumpu;

// make an instance of the Yumpu sdk class and set your token
Yumpu y = new Yumpu("your access token");
```

{% endtab %}
{% endtabs %}

### Community Packages:

* [Node.js SDK](https://github.com/w-vision/load-yumpu-api) from [w-vision](https://github.com/w-vision)


# Limits

## Request parameters

&#x20;Limits per window by resource. Rate limit window duration is currently 15 minutes long.<br>

| Resource parent | Resoure                            | Request limit |
| --------------- | ---------------------------------- | ------------- |
| documents       | GET documents                      | 150           |
| document        | GET document                       | 150           |
| document        | POST document/file                 | 50            |
| document        | POST document/url                  | 50            |
| document        | PUT document                       | 50            |
| document        | DELETE document                    | 50            |
| document        | GET document/progress              | 150           |
| document        | GET document/categories            | 150           |
| document        | GET document/languages             | 150           |
| document        | GET document/hotspots              | 500           |
| document        | GET document/hotspot               | 500           |
| document        | POST document/hotspot              | 250           |
| document        | PUT document/hotspot               | 250           |
| document        | DELETE document/hotspot            | 250           |
| countries       | GET countries                      | 150           |
| collections     | GET collections                    | 150           |
| collection      | GET collection                     | 150           |
| collection      | POST collection                    | 50            |
| collection      | PUT collection                     | 50            |
| collection      | DELETE collection                  | 50            |
| collection      | GET collection/section             | 150           |
| collection      | POST collection/section            | 50            |
| collection      | PUT collection/section             | 50            |
| collection      | DELETE collection/section          | 50            |
| collection      | POST collection/section/document   | 50            |
| collection      | DELETE collection/section/document | 50            |
| search          | GET search                         | 150           |
| user            | GET user                           | 150           |
| user            | POST user                          | 1             |
| user            | PUT user                           | 50            |
| embeds          | GET embeds                         | 150           |
| embed           | GET embed                          | 150           |
| embed           | POST embed                         | 50            |
| embed           | PUT embed                          | 50            |
| embed           | DELETE embed                       | 50            |
| account         | GET account/members                | 5000          |
| account         | GET account/member                 | 500           |
| account         | POST account/member                | 250           |
| account         | PUT account/member                 | 250           |
| account         | DELETE account/member              | 250           |
| account         | GET account/access\_tags           | 500           |
| account         | GET account/access\_tag            | 500           |
| account         | POST account/access\_tag           | 250           |
| account         | PUT account/access\_tag            | 250           |
| account         | DELETE account/access\_tag         | 250           |
| account         | GET account/subscriptions          | 500           |
| account         | GET account/subscription           | 500           |
| account         | POST account/subscription          | 250           |
| account         | PUT account/subscription           | 250           |
| account         | DELETE account/subscription        | 250           |

## Increase your API limits

&#x20;If you are a developer and the Limits of our API are too strict for your application, please feel free to contact our [support team](http://support.yumpu.com/).\
\
Just write us what your application is about and why the existing limits are not optimal for you.


# Flowchart of basic processes

```
Yumpu allows you to use several Request-Types.
The typical Workflows to be used are the following:
```

## 1. Upload and Display Documents

&#x20;1\. Register a User manually and get the API Token from the User Profile Page 2. Set up a basic Process for pushing or pulling your files from your machine or a web-url to Yumpu.com 3. Use the response-code to extract some or all data, so that you can display your publication the way you need to\
&#x20;![PowerPoint-Bildschirmpräsentation - \[Präsentation1\]\_2013-11-12\_15-14-34](/files/-LxAbMhwQt51Hv2pIUrp)<br>

## 2. Upload, edit, display and organize Documents

&#x20;The more advanced calls allow you to upload, edit, manipulate settings, organize Documents. You can also create users, alter details, and change detailed parameters for accessing the documents. Typical workflows for this Process are displayed here:\
&#x20;![PowerPoint-Bildschirmpräsentation - \[Präsentation1\]\_2013-11-12\_15-14-15](/files/-LxAbMhyXJJ8DUMa4idb)


# Documents


# Get

## Retrieve a list of your documents

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                                                                                                                           | Default                                                                                                       |
| -------------- | ------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| offset         | optional            | Integer   | Retrieve rows at position X (min. 0)                                                                                                                                                                                  | 0                                                                                                             |
| limit          | optional            | Integer   | Retrieve X rows (min. 0 and max. 100)                                                                                                                                                                                 | 10                                                                                                            |
| sort           | optional            | String    | Sort results ascending or descendening (asc or desc)                                                                                                                                                                  | desc                                                                                                          |
| return\_fields | optional            | String    | Customize the responses by setting the return fields (id, create\_date, update\_date, url, read\_url, short\_url, image\_small, image\_medium, image\_big, language, title, description, tags, embed\_code, settings) | id, url, short\_url, image\_small, image\_medium, image\_big, language, title, description, tags, embed\_code |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

#### Optional parameters:

&#x20;offset  limit  sort  return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/documents.json?offset=0&limit=1&sort=desc"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'limit' => 1,
    'offset' => 0
);
$listDocument = $yumpu->getDocuments($data);
print_r($listDocument);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
   offset: 0,
   limit: 1
};
yumpu.getDocuments(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"limit=1"};
System.out.println(y.getDocuments(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "total": 6,
  "documents": [
    {
      "id": 55919352,
      "url": "https://www.yumpu.com/de/document/view/55919352/new-document",
      "short_url": "https://www.yumpu.com/s/ZYbPdhmifFHwWAc7",
      "image": {
        "small": "https://img.yumpu.com/55919352/1/115x163/new-document.jpg",
        "medium": "https://img.yumpu.com/55919352/1/452x640/new-document.jpg",
        "big": "https://img.yumpu.com/55919352/1/1129x1600/new-document.jpg"
      },
      "language": "de",
      "title": "New Document",
      "description": "",
      "tags": [
        "suchparameter",
        "liefert",
        "google",
        "webseiten",
        "suchbegriff",
        "mehreren",
        "angezeigt",
        "beschreibung",
        "nutzwert",
        "treffer",
        "www.lukasbals.at"
      ],
      "embed_code": "<iframe width=\"512px\" height=\"384px\" src=\"https://www.yumpu.com/de/embed/view/eolzBvCjm84bxPpn\" frameborder=\"0\" allowfullscreen=\"true\" allowtransparency=\"true\"></iframe>"
    }
  ],
  "state": "success",
  "completed_in": 0.0327
}
```


# Document


# Get

## Retrieve an existing document

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                                                                                                                                                                                                                                               | Default                                                                                                       |
| -------------- | ------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| id             | required            | Integer   | One of your document ids                                                                                                                                                                                                                                                                                                                  |                                                                                                               |
| return\_fields | optional            | String    | Customize the responses by setting the return fields (id, create\_date, update\_date, url, read\_url, short\_url, image\_small, image\_medium, image\_big, language, title, description, tags, embed\_code, settings)                                                                                                                     | id, url, short\_url, image\_small, image\_medium, image\_big, language, title, description, tags, embed\_code |
| image\_expiry  | optional            | Integer   | <p>Defines the expiration time in seconds for the image URL returned in the response. After this time, the URL will no longer be accessible. Use this parameter to control how long the image resource remains valid.<br>Accepted values: 60 (1 minute) to 31536000 (1 year). If not provided, the default is 7200 seconds (2 hours).</p> | 7200                                                                                                          |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;id&#x20;

#### Optional parameters:

&#x20;return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/document.json?id=27109085"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id' => 27109085,
    'return_fields' => 'id,create_date,update_date,url,image_small'
);
$listDocument = $yumpu->getDocument($data);
print_r($listDocument);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
   id: 27109085
};
yumpu.getDocument(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = { "id=27109085" };
System.out.println(y.getDocument(params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "document": [
    {
      "id": 55919352,
      "create_date": "2016-09-08 14:02:24",
      "update_date": "2016-09-08 14:03:03",
      "url": "https://www.yumpu.com/de/document/view/55919352/new-document",
      "image": {
        "small": "https://img.yumpu.com/55919352/1/115x163/new-document.jpg"
      }
    }
  ],
  "state": "success",
  "completed_in": 0.0562
}
```


# Post file

## Create a new document - file

### Parameters

**Note: Requests must be multipart/form-data encoded.**

| Name                         | Optional / Required | Data type | Description                                                                                                                                                                                                                                                                                                                               | Default  |
| ---------------------------- | ------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| file                         | required            | File      | File data. Max. file size is 600 MB.                                                                                                                                                                                                                                                                                                      |          |
| title                        | required            | String    | A title for your document. Min. length 5 characters, max. length 255 characters                                                                                                                                                                                                                                                           |          |
| description                  | optional            | String    | A description for your document. Min. length 5 characters, max. length 2500 characters                                                                                                                                                                                                                                                    |          |
| category                     | optional            | Integer   | 1, 2 or ... (A list of valid category ids: [Document categories](https://developers.yumpu.com/api/document-categories/documentcategoriesget))                                                                                                                                                                                             | 0 = None |
| language                     | optional            | String    | en, de or ... (A list of valid languages: [Document languages](https://developers.yumpu.com/api/document-languages/documentlanguagesget))                                                                                                                                                                                                 | en       |
| tags                         | optional            | String    | A list of words seperated by comma (house,garden,balcony). Min. length 3 characters, max. length 30 characters. Allowed characters a-z and a space.                                                                                                                                                                                       |          |
| visibility                   | optional            | String    | public, private, rprotected, pprotected, dprotected, webkiosk, appkiosk or webappkiosk (rprotected = protected by referrer, pprotected = protected by password, dprotected = protected by domain(s))                                                                                                                                      | public   |
| rendering\_type              | optional            | String    | Rendering method used for the document in our engine. It can be instant or html.                                                                                                                                                                                                                                                          | instant  |
| domains                      | optional            | String    | A list of domains seperated by a comma (Note: Visibility must be set to dprotected) Examples: yumpu.com, blog.yumpu.com, developers.yumpu.com yumpu.com                                                                                                                                                                                   |          |
| validity                     | optional            | String    | Valid from and / or valid until Examples: 2013-10-01T00:00:00-2013-10-30T23:59:59 (valid from 2013-10-01 00:00:00, valid until 2013-10-30 23:59:59) 2013-10-01T00:00:00- (valid from 2013-10-01 00:00:00-) -2013-10-30T23:59:59 (valid until -2013-10-30 23:59:59)                                                                        |          |
| blurred                      | optional            | String    | Page numbers seperated by comma. Examples: 1-2, 5-9, 11-                                                                                                                                                                                                                                                                                  |          |
| page\_teaser\_image          | optional            | File      | Image data The image must be less than 2 MB in size. Allowed mime types are image/gif, image/jpeg, image/pjpeg, image/png and image/x-png. The image will be resized to fit in the page dimensions (of your magazine). Note: If you use page\_teaser\_image, the parameters page\_teaser\_page\_range and page\_teaser\_url are required. |          |
| page\_teaser\_page\_range    | optional            | String    | Page numbers seperated by comma. Examples: 1-2, 5-9, 11-                                                                                                                                                                                                                                                                                  |          |
| page\_teaser\_url            | optional            | String    | A valid URL. Examples: <http://www.yumpu.com/en>                                                                                                                                                                                                                                                                                          |          |
| page\_teaser\_closeable      | optional            | String    | Allow users to close teaser. y or n                                                                                                                                                                                                                                                                                                       | n        |
| downloadable                 | optional            | String    | Allow users to download your source pdf file. y or n                                                                                                                                                                                                                                                                                      | n        |
| detect\_elements             | optional            | String    | Detect elements automatically? y or n                                                                                                                                                                                                                                                                                                     | y        |
| site\_recommended\_magazines | optional            | String    | Show recommended magazines on Yumpu? y or n (Preferred)                                                                                                                                                                                                                                                                                   | y        |
| recommended\_magazines       | optional            | String    | Backward-compatible alias for `site_recommended_magazines`. **Deprecated**.                                                                                                                                                                                                                                                               | y        |
| site\_show\_more\_magazines  | optional            | String    | Show more user magazines on Yumpu? y or n                                                                                                                                                                                                                                                                                                 | y        |
| site\_info\_magazines        | optional            | String    | Show information panel  on Yumpu? y or n                                                                                                                                                                                                                                                                                                  | y        |
| site\_social\_sharing        | optional            | String    | Show social sharing buttons on Yumpu. y or n (Preferred)                                                                                                                                                                                                                                                                                  | y        |
| social\_sharing              | optional            | String    | Backward-compatible alias for `site_social_sharing`. **Deprecated**.                                                                                                                                                                                                                                                                      | y        |
| site\_printing\_webkiosk     | optional            | String    | Allow print the document directly from the Webkiosk                                                                                                                                                                                                                                                                                       | n        |
| site\_pageview               | optional            | String    | Show document in single or double pageview. double or single                                                                                                                                                                                                                                                                              | double   |
| player\_social\_sharing      | optional            | String    | Show social sharing buttons in Yumpu Player. y or n                                                                                                                                                                                                                                                                                       | y        |
| player\_download\_pdf        | optional            | String    | Show button "download pdf" in Yumpu Player. y or n                                                                                                                                                                                                                                                                                        | n        |
| player\_print\_page          | optional            | String    | Show button "print page" in Yumpu Player. y or n                                                                                                                                                                                                                                                                                          | n        |
| player\_branding             | optional            | String    | Show Yumpu branding in Yumpu Player. y or n                                                                                                                                                                                                                                                                                               | y        |
| player\_sidebar              | optional            | String    | Show a list of recommended documents in Yumpu Player. y or n                                                                                                                                                                                                                                                                              | n        |
| player\_html5\_c2r           | optional            | String    | Activate HTML5 full screen on Yumpu. y or n                                                                                                                                                                                                                                                                                               | y        |
| player\_outer\_shadow        | optional            | String    | Drop shadow in Yumpu player. y or n                                                                                                                                                                                                                                                                                                       | y        |
| player\_inner\_shadow        | optional            | String    | Shadow effects on pages. y or n                                                                                                                                                                                                                                                                                                           | y        |
| player\_ga                   | optional            | String    | Activate Google Analytics tracking. A valid UA code from Google Analytics.                                                                                                                                                                                                                                                                |          |
| access\_tags                 | optional            | String    | One or multiple access\_tag ids (myid1 or myid1,myid2)                                                                                                                                                                                                                                                                                    |          |
| subscriptions                | optional            | String    | One or multiple subscription ids (myid1 or myid1,myid2)                                                                                                                                                                                                                                                                                   |          |
| iap                          | optional            | String    | Enable In-App Purchase (y or n)                                                                                                                                                                                                                                                                                                           | n        |
| itc\_product\_id             | optional            | String    | iTunes Product ID                                                                                                                                                                                                                                                                                                                         |          |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -H "Content-Type: multipart/form-data" -F "file=@filename.pdf" -F "title=My document title" "https://api.yumpu.com/2.0/document/file.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'title' => 'My document title',
    'file' =>  dirname(__FILE__).'/media/'.'yumpu.pdf',
);
$newDocument = $yumpu->postDocumentFile($data);
print_r($newDocument);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
   title: 'My document title',
   file: './example/media/yumpu.pdf'
};
yumpu.postDocumentFile(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {
                "file=src\\at\\fes\\examples\\media\\yumpu.pdf",
                "title=My document title"};
System.out.println(y.postDocumentFile(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "file": {
    "client_name": "yumpu.pdf",
    "server_name": "0aa377bfbe89a1e19803f7b597209ebe57d7a6a19db0b8.05986686.pdf",
    "size": "16.8 MB",
    "mime_type": "application/pdf",
    "sha1_checksum": "45330f1f1bae0c0344046c487105a2a0efa2c194",
    "md5_checksum": "d525a6db5cd8eb5a20200a78c5655dc8"
  },
  "document": {
    "title": "My document title"
  },
  "progress_id": "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
  "state": "success",
  "completed_in": 0.4008
}
```


# Post url

## Create a new document - url

### Parameters

| Name                         | Optional / Required | Data type | Description                                                                                                                                                                                                                                                                                                                               | Default  |
| ---------------------------- | ------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| url                          | required            | String    | URL of document to be uploaded (public accessable). Allowed content types application/pdf or application/octet-stream. Max. file size is 600 MB.                                                                                                                                                                                          |          |
| title                        | required            | String    | A title for your document. Min. length 5 characters, max. length 255 characters                                                                                                                                                                                                                                                           |          |
| description                  | optional            | String    | A description for your document. Min. length 5 characters, max. length 2500 characters                                                                                                                                                                                                                                                    |          |
| category                     | optional            | Integer   | 1, 2 or ... (A list of valid category ids: [Document categories](https://developers.yumpu.com/api/document-categories/documentcategoriesget))                                                                                                                                                                                             | 0 = None |
| language                     | optional            | String    | en, de or ... (A list of valid languages: [Document languages](https://developers.yumpu.com/api/document-languages/documentlanguagesget))                                                                                                                                                                                                 | en       |
| tags                         | optional            | String    | A list of words seperated by comma (house,garden,balcony). Min. length 3 characters, max. length 30 characters. Allowed characters a-z and a space.                                                                                                                                                                                       |          |
| visibility                   | optional            | String    | public, private, rprotected, pprotected, dprotected, webkiosk, appkiosk or webappkiosk (rprotected = protected by referrer, pprotected = protected by password, dprotected = protected by domain(s))                                                                                                                                      | public   |
| rendering\_type              | optional            | String    | Rendering method used for the document in our engine. It can be instant or html.                                                                                                                                                                                                                                                          | instant  |
| domains                      | optional            | String    | A list of domains seperated by a comma (Note: Visibility must be set to dprotected) Examples: yumpu.com, blog.yumpu.com, developers.yumpu.com yumpu.com                                                                                                                                                                                   |          |
| validity                     | optional            | String    | Valid from and / or valid until Examples: 2013-10-01T00:00:00-2013-10-30T23:59:59 (valid from 2013-10-01 00:00:00, valid until 2013-10-30 23:59:59) 2013-10-01T00:00:00- (valid from 2013-10-01 00:00:00-) -2013-10-30T23:59:59 (valid until -2013-10-30 23:59:59)                                                                        |          |
| blurred                      | optional            | String    | Page numbers seperated by comma. Examples: 1-2, 5-9, 11-                                                                                                                                                                                                                                                                                  |          |
| page\_teaser\_image          | optional            | File      | Image data The image must be less than 2 MB in size. Allowed mime types are image/gif, image/jpeg, image/pjpeg, image/png and image/x-png. The image will be resized to fit in the page dimensions (of your magazine). Note: If you use page\_teaser\_image, the parameters page\_teaser\_page\_range and page\_teaser\_url are required. |          |
| page\_teaser\_page\_range    | optional            | String    | Page numbers seperated by comma. Examples: 1-2, 5-9, 11-                                                                                                                                                                                                                                                                                  |          |
| page\_teaser\_url            | optional            | String    | A valid URL. Examples: <http://www.yumpu.com/en>                                                                                                                                                                                                                                                                                          |          |
| page\_teaser\_closeable      | optional            | String    | Allow users to close teaser. y or n                                                                                                                                                                                                                                                                                                       | n        |
| downloadable                 | optional            | String    | Allow users to download your source pdf file. y or n                                                                                                                                                                                                                                                                                      | n        |
| detect\_elements             | optional            | String    | Detect elements automatically? y or n                                                                                                                                                                                                                                                                                                     | y        |
| site\_recommended\_magazines | optional            | String    | Show recommended magazines on Yumpu? y or n (Preferred)                                                                                                                                                                                                                                                                                   | y        |
| recommended\_magazines       | optional            | String    | Backward-compatible alias for `site_recommended_magazines`. **Deprecated**.                                                                                                                                                                                                                                                               | y        |
| site\_show\_more\_magazines  | optional            | String    | Show more user magazines on Yumpu? y or n                                                                                                                                                                                                                                                                                                 | y        |
| site\_info\_magazines        | optional            | String    | Show information panel on Yumpu? y or n                                                                                                                                                                                                                                                                                                   | y        |
| site\_social\_sharing        | optional            | String    | Show social sharing buttons on Yumpu. y or n (Preferred)                                                                                                                                                                                                                                                                                  | y        |
| social\_sharing              | optional            | String    | Backward-compatible alias for `site_social_sharing`. **Deprecated**.                                                                                                                                                                                                                                                                      | y        |
| site\_printing\_webkiosk     | optional            | String    | Allow print the document directly from the Webkiosk                                                                                                                                                                                                                                                                                       | n        |
| site\_pageview               | optional            | String    | Show document in single or double pageview. double or single                                                                                                                                                                                                                                                                              | double   |
| player\_social\_sharing      | optional            | String    | Show social sharing buttons in Yumpu Player. y or n                                                                                                                                                                                                                                                                                       | y        |
| player\_download\_pdf        | optional            | String    | Show button "download pdf" in Yumpu Player. y or n                                                                                                                                                                                                                                                                                        | n        |
| player\_print\_page          | optional            | String    | Show button "print page" in Yumpu Player. y or n                                                                                                                                                                                                                                                                                          | n        |
| player\_branding             | optional            | String    | Show Yumpu branding in Yumpu Player. y or n                                                                                                                                                                                                                                                                                               | y        |
| player\_sidebar              | optional            | String    | Show a list of recommended documents in Yumpu Player. y or n                                                                                                                                                                                                                                                                              | n        |
| player\_html5\_c2r           | optional            | String    | Activate HTML5 full screen on Yumpu. y or n                                                                                                                                                                                                                                                                                               | y        |
| player\_outer\_shadow        | optional            | String    | Drop shadow in Yumpu player. y or n                                                                                                                                                                                                                                                                                                       | y        |
| player\_inner\_shadow        | optional            | String    | Shadow effects on pages. y or n                                                                                                                                                                                                                                                                                                           | y        |
| player\_ga                   | optional            | String    | Activate Google Analytics tracking. A valid UA code from Google Analytics.                                                                                                                                                                                                                                                                |          |
| access\_tags                 | optional            | String    | One or multiple access\_tag ids (myid1 or myid1,myid2)                                                                                                                                                                                                                                                                                    |          |
| subscriptions                | optional            | String    | One or multiple subscription ids (myid1 or myid1,myid2)                                                                                                                                                                                                                                                                                   |          |
| iap                          | optional            | String    | Enable In-App Purchase (y or n)                                                                                                                                                                                                                                                                                                           | n        |
| itc\_product\_id             | optional            | String    | iTunes Product ID                                                                                                                                                                                                                                                                                                                         |          |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;title  url&#x20;

Run request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "url=https://www.domain.com/filename.pdf" -d "title=My document title" "https://api.yumpu.com/2.0/document/url.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'title' => 'My document title',
    'url' => 'http://www.domain.com/filename.pdf',
);
$newDocument = $yumpu->postDocumentUrl($data);
print_r($newDocument);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
   title: 'My document title',
   url: 'http://www.domain.com/filename.pdf'
};
yumpu.postDocumentUrl(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {
                "url=http://www.domain.com/filename.pdf",
                "title=My document title"};
System.out.println(y.postDocumentUrl(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "file": {
    "url": "https://www.domain.com/filename.pdf",
    "client_name": "suchparameter-google-uebersicht.pdf",
    "size": "183.0 KB",
    "mime_type": "application/pdf"
  },
  "document": {
    "url": "https://www.domain.com/filename.pdf",
    "title": "My document title"
  },
  "progress_id": "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX",
  "state": "success",
  "completed_in": 0.3786
}
```


# Put

## Update an existing document

### Parameters:

| Name                         | Optional / Required | Data type | Description                                                                                                                                                                                                                                                        | Default  |
| ---------------------------- | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| id                           | required            | Integer   | One of your document ids                                                                                                                                                                                                                                           |          |
| title                        | required            | String    | A title for your document. Min. length 5 characters, max. length 255 characters                                                                                                                                                                                    |          |
| description                  | optional            | String    | A description for your document. Min. length 5 characters, max. length 2500 characters                                                                                                                                                                             |          |
| category                     | optional            | Integer   | 1, 2 or ... (A list of valid category ids: [Document categories](https://developers.yumpu.com/api/document-categories/documentcategoriesget))                                                                                                                      | 0 = None |
| language                     | optional            | String    | en, de or ... (A list of valid languages: [Document languages](https://developers.yumpu.com/api/document-languages/documentlanguagesget))                                                                                                                          | en       |
| tags                         | optional            | String    | A list of words seperated by comma (house,garden,balcony). Min. length 3 characters, max. length 30 characters. Allowed characters a-z and a space.                                                                                                                |          |
| visibility                   | optional            | String    | public, private, rprotected, pprotected, dprotected, webkiosk, appkiosk or webappkiosk (rprotected = protected by referrer, pprotected = protected by password, dprotected = protected by domain(s))                                                               | public   |
| validity                     | optional            | String    | Valid from and / or valid until Examples: 2013-10-01T00:00:00-2013-10-30T23:59:59 (valid from 2013-10-01 00:00:00, valid until 2013-10-30 23:59:59) 2013-10-01T00:00:00- (valid from 2013-10-01 00:00:00-) -2013-10-30T23:59:59 (valid until -2013-10-30 23:59:59) |          |
| downloadable                 | optional            | String    | Allow users to download your source pdf file. y or n                                                                                                                                                                                                               | n        |
| site\_recommended\_magazines | optional            | String    | Show recommended magazines on Yumpu? y or n (Preferred)                                                                                                                                                                                                            | y        |
| recommended\_magazines       | optional            | String    | Backward-compatible alias for `site_recommended_magazines`. **Deprecated**.                                                                                                                                                                                        | y        |
| site\_show\_more\_magazines  | optional            | String    | Show more user magazines on Yumpu? y or n                                                                                                                                                                                                                          | y        |
| site\_info\_magazines        | optional            | String    | Show information panel on Yumpu? y or n                                                                                                                                                                                                                            | y        |
| site\_social\_sharing        | optional            | String    | Show social sharing buttons on Yumpu. y or n (Preferred)                                                                                                                                                                                                           | y        |
| social\_sharing              | optional            | String    | Backward-compatible alias for `site_social_sharing`. **Deprecated**.                                                                                                                                                                                               | y        |
| site\_printing\_webkiosk     | optional            | String    | Allow print the document directly from the Webkiosk                                                                                                                                                                                                                | n        |
| site\_pageview               | optional            | String    | Show document in single or double pageview. double or single                                                                                                                                                                                                       | double   |
| player\_social\_sharing      | optional            | String    | Show social sharing buttons in Yumpu Player. y or n                                                                                                                                                                                                                | y        |
| player\_download\_pdf        | optional            | String    | Show button "download pdf" in Yumpu Player. y or n                                                                                                                                                                                                                 | n        |
| player\_print\_page          | optional            | String    | Show button "print page" in Yumpu Player. y or n                                                                                                                                                                                                                   | n        |
| player\_branding             | optional            | String    | Show Yumpu branding in Yumpu Player. y or n                                                                                                                                                                                                                        | y        |
| player\_sidebar              | optional            | String    | Show a list of recommended documents in Yumpu Player. y or n                                                                                                                                                                                                       | n        |
| player\_html5\_c2r           | optional            | String    | Activate HTML5 full screen on Yumpu. y or n                                                                                                                                                                                                                        | y        |
| player\_outer\_shadow        | optional            | String    | Drop shadow in Yumpu player. y or n                                                                                                                                                                                                                                | y        |
| player\_inner\_shadow        | optional            | String    | Shadow effects on pages. y or n                                                                                                                                                                                                                                    | y        |
| player\_ga                   | optional            | String    | Activate Google Analytics tracking. A valid UA code from Google Analytics.                                                                                                                                                                                         |          |
| access\_tags                 | optional            | String    | One or multiple access\_tag ids (myid1 or myid1,myid2)                                                                                                                                                                                                             |          |
| subscriptions                | optional            | String    | One or multiple subscription ids (myid1 or myid1,myid2)                                                                                                                                                                                                            |          |
| iap                          | optional            | String    | Enable In-App Purchase (y or n)                                                                                                                                                                                                                                    | n        |
| itc\_product\_id             | optional            | String    | iTunes Product ID                                                                                                                                                                                                                                                  |          |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X PUT -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=20582984" -d "title=My new document title" "https://api.yumpu.com/2.0/document.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id' => 20582984,  
    'title' => 'My new document title'
);
$putDocument = $yumpu->putDocument($data);
print_r($putDocument);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: '20582984',
  title: 'My new document title'
};
yumpu.putDocument(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"id=20582984", "title=My new document title"};
System.out.println(y.putDocument(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "document": [
    {
      "id": 20582984,
      "create_date": "2016-09-13 09:13:15",
      "update_date": "2016-09-13 09:17:23",
      "url": "https://www.yumpu.com/de/document/view/55932706/new-title-2",
      "short_url": "https://www.yumpu.com/s/Ok8tEcVRDCsfAod0",
      "image": {
        "small": "https://img.yumpu.com/55932706/1/115x163/new-title.jpg",
        "medium": "https://img.yumpu.com/55932706/1/452x640/new-title.jpg",
        "big": "https://img.yumpu.com/55932706/1/1129x1600/new-title.jpg"
      },
      "language": "de",
      "title": "My new document title",
      "description": "",
      "pages": 3,
      "width": 452,
      "height": 640,
      "tags": [
        "suchparameter",
        "liefert",
        "google",
        "webseiten",
        "suchbegriff",
        "mehreren",
        "angezeigt",
        "beschreibung",
        "nutzwert",
        "treffer",
        "www.lukasbals.at"
      ],
      "embed_code": "<iframe width=\"512px\" height=\"384px\" src=\"https://www.yumpu.com/de/embed/view/CsdA9tSUlmyVvbNO\" frameborder=\"0\" allowfullscreen=\"true\" allowtransparency=\"true\"></iframe>",
      "settings": {
        "date_validity_from": "",
        "date_validity_until": "",
        "site_social_sharing": true,
        "privacy_mode": "public",
        "site_download_pdf": false,
        "site_recommended_magazines": true,
        "player_download_pdf": false,
        "player_print_page": false,
        "player_branding": true,
        "player_sidebar": false,
        "player_social_sharing": true,
        "player_google_analytics_code": "",
        "player_html5_c2r": true,
        "player_outer_shadow": true,
        "player_inner_shadow": true,
        "appkiosk_itc_product_id": "",
        "appkiosk_iap_sale_item": false,
        "magazine_premium_blurred": false,
        "magazine_premium_blurred_page_range": "",
        "magazine_page_teaser": false,
        "magazine_page_teaser_page_range": "",
        "magazine_page_teaser_url": "",
        "magazine_page_teaser_image_url": "",
        "magazine_acl_running": false,
        "player_zoom_factor": 2.5,
        "hotspoteditor_custom": false
      },
      "access_tags": false,
      "subscriptions": false
    }
  ],
  "state": "success",
  "status_code": 200,
  "completed_in": 0.8976
}
```


# Delete

## Delete one document

### Parameters:

| Name | Optional / Required | Data type | Description              | Default |
| ---- | ------------------- | --------- | ------------------------ | ------- |
| id   | required            | Integer   | One of your document ids |         |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X DELETE -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=20327033" "https://api.yumpu.com/2.0/document.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$id = 20327033;
$deleteDocument = $yumpu->deleteDocument($id);
print_r($deleteDocument);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 20327033
};
yumpu.deleteDocument(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String id = "20327033";
System.out.println(y.deleteDocument(id));
```

{% endtab %}
{% endtabs %}

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

```javascript
{"state":"success"}
```


# Document hotspots


# Get

## Retrieve a list of your hotspots

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                 | Default                                              |
| -------------- | ------------------- | --------- | ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| id             | required            | Integer   | One of your document ids                                                                                    |                                                      |
| page           | optional            | Integer   | Filter the results by page nr (1 - X)                                                                       |                                                      |
| offset         | optional            | Integer   | Retrieve rows at position X (min. 0)                                                                        | 0                                                    |
| limit          | optional            | Integer   | Retrieve X rows (min. 0 and max. 100)                                                                       | 10                                                   |
| sort           | optional            | String    | Sort results by create\_date\_desc, create\_date\_asc, page\_desc, page\_asc                                | page\_asc                                            |
| return\_fields | optional            | String    | Customize the responses by setting the return fields (id, page, type, settings, create\_date, update\_date) | id, page, type, settings, create\_date, update\_date |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;document id&#x20;

#### Optional parameters:

&#x20;page  offset  limit  sort  return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/document/hotspots.json?id=27109037&limit=1"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
 'id' => 27109085,
 'limit' => 1
);
$listHotspots = $yumpu->getDocumentHotspots($data);
print_r($listHotspots);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 27109037,
  offset: 0,
  limit: 1
};
yumpu.getDocumentHotspots(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"id=27109037", "limit=1"};
System.out.println(y.getDocumentHotspots(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "total": 74,
  "hotspots": [
    {
      "id": "fc62e52bphzHaVqn",
      "document_id": 27109037,
      "page": 1,
      "type": "link",
      "settings": {
        "x": 311,
        "y": 603,
        "w": 109,
        "h": 8,
        "name": "www.yumpu.com",
        "link": "https://www.yumpu.com",
        "tooltip": "www.yumpu.com"
      },
      "create_date": "2016-09-13 09:13:19",
      "update_date": "0000-00-00 00:00:00"
    }
  ],
  "state": "success",
  "completed_in": 0.0922
}
```


# Document hotspot


# Get

## Retrieve an existing hotspot

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                               | Default                                                            |
| -------------- | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
| id             | required            | String    | One of your document hotspot ids                                                                                          |                                                                    |
| return\_fields | optional            | String    | Customize the responses by setting the return fields (id, document\_id, page, type, settings, create\_date, update\_date) | id, document\_id, page, type, settings, create\_date, update\_date |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;id&#x20;

#### Optional parameters:

&#x20;return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/document/hotspot.json?id=18414788HxIRKIoB"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
 'id' => '18414788HxIRKIoB'
);
$listHotspot = $yumpu->getDocumentHotspot($data);
print_r($listHotspot);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
   id: '18414788HxIRKIoB'
};
yumpu.getDocumentHotspot(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"id=18414788HxIRKIoB"};
System.out.println(y.getDocumentHotspot(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "hotspot": [
    {
      "id": "18414788HxIRKIoB",
      "document_id": "27109085",
      "page": "1",
      "type": "link",
      "settings": {
        "x": "0",
        "y": "0",
        "w": "400",
        "h": "100",
        "name": "www.yumpu.com",
        "tooltip": "www.yumpu.com",
        "link": "https://www.google.com"
      },
      "create_date": "2014-09-23 07:17:39",
      "update_date": "2014-09-23 07:20:21"
    }
  ],
  "state": "success",
  "completed_in": "0.1853"
}
```


# Post

## Create a new document hotspot

### Parameters:

<table data-header-hidden><thead><tr><th width="160">Name</th><th>Optional / Required</th><th width="109">Data type</th><th width="258">Description</th><th>Default</th></tr></thead><tbody><tr><td>Name</td><td>Optional / Required</td><td>Data type</td><td>Description</td><td>Default</td></tr><tr><td>document_id</td><td>required</td><td>Integer</td><td>One of your document ids</td><td></td></tr><tr><td>page</td><td>required</td><td>String</td><td>Page number (1-X)</td><td></td></tr><tr><td>type</td><td>required</td><td>String</td><td>Type can be link, video, audio or slideshow</td><td></td></tr><tr><td>settings[x]</td><td>required</td><td>Integer</td><td>x position of the document hotspot</td><td></td></tr><tr><td>settings[y]</td><td>required</td><td>Integer</td><td>y position of the document hotspot</td><td></td></tr><tr><td>settings[w]</td><td>required</td><td>Integer</td><td>width of the document hotspot</td><td></td></tr><tr><td>settings[h]</td><td>required</td><td>Integer</td><td>height of the document hotspot</td><td></td></tr><tr><td>settings[name]</td><td>required</td><td>String</td><td>a name for the document hotspot (min. length 5, max. length 50)</td><td></td></tr><tr><td>settings[tooltip]</td><td>required</td><td>String</td><td>a tooltip for the document hotspot (min. length 5, max. length 50)</td><td></td></tr><tr><td>settings[link]</td><td>optional</td><td>String</td><td>a url (valid URL)</td><td></td></tr><tr><td>settings[source]</td><td>optional</td><td>String</td><td>youtube, vimeo, flickr, soundcloud, yumpu</td><td></td></tr><tr><td>settings[source_id]</td><td>optional</td><td>String</td><td>youtube: a valid youtube video id vimeo: a valid vimeo video id flickr: a valid flickr id</td><td></td></tr><tr><td>settings[source_ids]</td><td>optional</td><td>String</td><td>One or multiple media ids separated by a comma (example: GlKIWjJyWtg2XFKi,tFtOzlqZyqeaNkfw)</td><td></td></tr><tr><td>settings[source_url]</td><td>optional</td><td>String</td><td>soundcloud: a valid soundcloud url</td><td></td></tr><tr><td>settings[autoplay]</td><td>optional</td><td>String</td><td>y or n</td><td></td></tr><tr><td>settings[show_arrows]</td><td>optional</td><td>String</td><td>y or n</td><td></td></tr><tr><td>settings[show_headline]</td><td>optional</td><td>String</td><td>y or n</td><td></td></tr><tr><td>settings[object_fit]</td><td>optional</td><td>String</td><td>"cover" or "contain"</td><td></td></tr><tr><td>settings[background_opacity]</td><td>optional</td><td>Float</td><td>0.0 to 1</td><td></td></tr><tr><td>settings[background_color]</td><td>optional</td><td>String</td><td>Hexadecimal value, 6 characters.<br>#000000 - #FFFFFF</td><td></td></tr><tr><td>settings[background_color_hover]</td><td>optional</td><td>String</td><td>Hexadecimal value, 6 characters.<br>#000000 - #FFFFFF</td><td></td></tr><tr><td>settings[background_color_hover_opacity]</td><td>optional</td><td>Float</td><td>0.0 to 1</td><td></td></tr><tr><td>settings[hideborder]</td><td>optional</td><td>String</td><td>y or n</td><td></td></tr><tr><td>settings[asarea]</td><td>optional</td><td>String</td><td>y or n</td><td></td></tr><tr><td>settings[icon_color]</td><td>optional</td><td>String</td><td>Hexadecimal value, 6 characters.<br>#000000 - #FFFFFF</td><td></td></tr><tr><td>settings[icon_opacity]</td><td>optional</td><td>Float</td><td>0.0 to 1</td><td></td></tr><tr><td>settings[icon_color_hover]</td><td>optional</td><td>String</td><td>Hexadecimal value, 6 characters.<br>#000000 - #FFFFFF</td><td></td></tr><tr><td>settings[icon_color_hover_opacity]</td><td>optional</td><td>Float</td><td>0.0 to 1</td><td></td></tr><tr><td>settings[icon_size]</td><td>optional</td><td>Integer</td><td>(min 14) - (max 64)</td><td></td></tr><tr><td>settings[icon_url]</td><td>optional</td><td>String</td><td>See below for available icons</td><td></td></tr></tbody></table>

<details>

<summary>Icons (currently only available for the Link and Audio elements)</summary>

* `fa-link`
* `fa-link-simple`
* `fa-link-horizontal`
* `fa-arrow-up-right-from-square`
* `fa-square-arrow-up-right`
* `fa-dollar-sign`
* `fa-euro-sign`
* `fa-sterling-sign`
* `fa-money-bill-wave`
* `fa-credit-card`
* `fa-cart-shopping`
* `fa-bag-shopping`
* `fa-basket-shopping`
* `fa-cart-plus`
* `fa-shop`
* `fa-store`
* `fa-globe`
* `fa-envelope`
* `fa-comments`
* `fa-info`
* `fa-user`
* `fa-book`
* `fa-map-location-dot`
* `fa-play`
* `fa-music`
* `fa-volume`
* `fa-volume-low`
* `fa-volume-high`
* `fa-headphones`
* `fa-play-pause`
* `fa-podcast`
* `fa-repeat`
* `fa-microphone`
* `fa-microphone-lines`
* `fa-speaker`

</details>

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;document\_id  page  type  settings\[x]  settings\[y]  settings\[w]  settings\[h]  settings\[name]  settings\[tooltip]&#x20;

#### Optional parameters:

&#x20;settings\[link]  settings\[source]  settings\[source\_id]  settings\[source\_ids]  settings\[source\_url]  settings\[autoplay]&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "document_id=27109085" -d "page=4" -d "type=link" -d "settings[x]=100" -d "settings[y]=100" -d "settings[w]=50" -d "settings[h]=50" -d "settings[name]=google.com" -d "settings[tooltip]=google.com" -d "settings[link]=https://www.google.com" "https://api.yumpu.com/2.0/document/hotspot.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'document_id' => '55919352',
    'page' => '1',
    'type' => 'link',
    'settings' => array(
        'x' => 100,
        'y' => 100,
        'w' => 20,
        'h' => 20,
        'name' => 'google.com',
        'tooltip' => 'google.com',
        'link' => 'https://www.yumpu.com'
    )
);
$hotspot = $yumpu->postDocumentHotspot($data);
print_r($hotspot);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
   document_id: 27109085,
   page: 4,
   type: 'link',
   settings: {
       x: 100,
       y: 100,
       w: 50,
       h: 50,
       name: 'google.com',
       tooltip: 'google.com',
       link: 'https://www.yumpu.com'
   }
};
yumpu.postDocumentHotspot(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"document_id=27109085", "type=link", "page=4"};
String[] settings = {"x=100", "y=100", "w=50", "h=50", "name=google.com", "tooltip=google.com", "link=https://www.yumpu.com"};
System.out.println(y.postDocumentHotspot(params, settings));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "hotspot": [
    {
      "id": "5c905d027BHYFhLg",
      "document_id": "27109085",
      "page": "4",
      "type": "link",
      "settings": {
        "x": "100",
        "y": "100",
        "w": "50",
        "h": "50",
        "name": "google.com",
        "tooltip": "google.com",
        "link": "https://www.yumpu.com"
      },
      "create_date": "2014-09-23 08:18:53",
      "update_date": "0000-00-00 00:00:00"
    }
  ],
  "state": "success",
  "completed_in": "0.1644"
}
```


# Put

## Update a document hotspot

### Parameters:

| Name                                         | Optional / Required | Data type | Description                                                                               | Default |
| -------------------------------------------- | ------------------- | --------- | ----------------------------------------------------------------------------------------- | ------- |
| id                                           | required            | String    | One of your document hotspot ids                                                          |         |
| type                                         | required            | String    | Type can be link, video, audio or slideshow                                               |         |
| settings\[x]                                 | required            | Integer   | x position of the document hotspot                                                        |         |
| settings\[y]                                 | required            | Integer   | y position of the document hotspot                                                        |         |
| settings\[w]                                 | required            | Integer   | width of the document hotspot                                                             |         |
| settings\[h]                                 | required            | Integer   | height of the document hotspot                                                            |         |
| settings\[name]                              | required            | String    | a name for the document hotspot (min. length 5, max. length 50)                           |         |
| settings\[tooltip]                           | required            | String    | a tooltip for the document hotspot (min. length 5, max. length 50)                        |         |
| settings\[link]                              | optional            | String    | a url (valid URL)                                                                         |         |
| settings\[source]                            | optional            | String    | youtube, vimeo, flickr, soundcloud                                                        |         |
| settings\[source\_id]                        | optional            | String    | youtube: a valid youtube video id vimeo: a valid vimeo video id flickr: a valid flickr id |         |
| settings\[source\_url]                       | optional            | String    | soundcloud: a valid soundcloud url                                                        |         |
| settings\[autoplay]                          | optional            | String    | y or n                                                                                    |         |
| settings\[show\_arrows]                      | optional            | String    | y or n                                                                                    |         |
| settings\[show\_headline]                    | optional            | String    | y or n                                                                                    |         |
| settings\[object\_fit]                       | optional            | String    | "cover" or "contain"                                                                      |         |
| settings\[background\_opacity]               | optional            | Float     | 0.0 to 1                                                                                  |         |
| settings\[background\_color]                 | optional            | String    | <p>Hexadecimal value, 6 characters.<br>#000000 - #FFFFFF</p>                              |         |
| settings\[background\_color\_hover]          | optional            | String    | <p>Hexadecimal value, 6 characters.<br>#000000 - #FFFFFF</p>                              |         |
| settings\[background\_color\_hover\_opacity] | optional            | Float     | 0.0 to 1                                                                                  |         |
| settings\[hideborder]                        | optional            | String    | y or n                                                                                    |         |
| settings\[asarea]                            | optional            | String    | y or n                                                                                    |         |
| settings\[icon\_color]                       | optional            | String    | <p>Hexadecimal value, 6 characters.<br>#000000 - #FFFFFF</p>                              |         |
| settings\[icon\_opacity]                     | optional            | Float     | 0.0 to 1                                                                                  |         |
| settings\[icon\_color\_hover]                | optional            | String    | <p>Hexadecimal value, 6 characters.<br>#000000 - #FFFFFF</p>                              |         |
| settings\[icon\_color\_hover\_opacity]       | optional            | Float     | 0.0 to 1                                                                                  |         |
| settings\[icon\_size]                        | optional            | Integer   | (min 14) - (max 64)                                                                       |         |
| settings\[icon\_url]                         | optional            | String    | See below for available icons                                                             |         |

<details>

<summary>Icons (currently only available for the Link and Audio elements)</summary>

* `fa-link`
* `fa-link-simple`
* `fa-link-horizontal`
* `fa-arrow-up-right-from-square`
* `fa-square-arrow-up-right`
* `fa-dollar-sign`
* `fa-euro-sign`
* `fa-sterling-sign`
* `fa-money-bill-wave`
* `fa-credit-card`
* `fa-cart-shopping`
* `fa-bag-shopping`
* `fa-basket-shopping`
* `fa-cart-plus`
* `fa-shop`
* `fa-store`
* `fa-globe`
* `fa-envelope`
* `fa-comments`
* `fa-info`
* `fa-user`
* `fa-book`
* `fa-map-location-dot`
* `fa-play`
* `fa-music`
* `fa-volume`
* `fa-volume-low`
* `fa-volume-high`
* `fa-headphones`
* `fa-play-pause`
* `fa-podcast`
* `fa-repeat`
* `fa-microphone`
* `fa-microphone-lines`
* `fa-speaker`

</details>

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X PUT -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=02608658TXrk4GRB" -d "type=link" -d "settings[x]=0" -d "settings[y]=0" -d "settings[w]=400" -d "settings[h]=100" -d "settings[name]=Google.com" -d "settings[tooltip]=Google.com" -d "settings[link]=https://www.google.com" "https://api.yumpu.com/2.0/document/hotspot.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id' => '02784dc6chuNtFd2',
    'type' => 'link',
    'settings' => array(
        'x' => 200,
        'y' => 200,
        'w' => 20,
        'h' => 20,
        'name' => 'google.com',
        'tooltip' => 'google.com',
        'link' => 'https://www.yumpu.com'
    )
);
$hotspot = $yumpu->putDocumentHotspot($data);
print_r($hotspot);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
   id: '02608658TXrk4GRB',
   page: 1,
   type: 'link',
   settings: {
       x: 100,
       y: 100,
       w: 50,
       h: 50,
       name: 'google.com',
       tooltip: 'google.com',
       link: 'https://www.yumpu.com'
   }
};
yumpu.putDocumentHotspot(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"document_id=27109085", "type=link", "page=1"};
String[] settings = {"x=0", "y=0", "w=400", "h=400", "name=google.com", "tooltip=google.com", "link=https://www.yumpu.com"};
System.out.println(y.putDocumentHotspot(params, settings));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "hotspot": [
    {
      "id": "02608658TXrk4GRB",
      "document_id": "27219350",
      "page": "1",
      "type": "link",
      "settings": {
        "x": "0",
        "y": "0",
        "w": "400",
        "h": "100",
        "name": "google.com",
        "tooltip": "google.com",
        "link": "https://www.yumpu.com"
      },
      "create_date": "2014-10-01 08:53:57",
      "update_date": "2014-10-01 09:09:00"
    }
  ],
  "state": "success",
  "completed_in": "0.1644"
}
```


# Delete

## Delete one document hotspot

### Parameters:

| Name | Optional / Required | Data type | Description                      | Default |
| ---- | ------------------- | --------- | -------------------------------- | ------- |
| id   | required            | String    | One of your document hotspot ids |         |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X DELETE -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=2d914999Iikh4a3I" "https://api.yumpu.com/2.0/document/hotspot.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$id = '02784dc6chuNtFd2';
$response = $yumpu->deleteDocumentHotspot($id);
print_r($response);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: '2d914999Iikh4a3I'
};
yumpu.deleteDocumentHotspot(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String id = "b762266fEuN7Bb5L";
System.out.println(y.deleteDocumentHotspot(id));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "state": "success",
  "completed_in": "0.0871"
}
```


# Document progress


# Get

## Retrieve the current progress of your document

### Parameters:

| Name | Optional / Required | Data type | Description                       | Default |
| ---- | ------------------- | --------- | --------------------------------- | ------- |
| id   | required            | String    | One of your document progress ids |         |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;progress id&#x20;

Run request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/document/progress.json?id=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$progressId = 'XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX';
$documentProgess = $yumpu->getDocumentProgress($progressId);
print_r($documentProgess);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
   id: 'XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX'
};
yumpu.getdocumentProgress(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"id=XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"};
System.out.println(y.getDocumentProgress(params));
```

{% endtab %}
{% endtabs %}

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

Example 1:

```bash
{
  "document": {
    "state": "rendering_in_progress",
    "message": "Magazine in rendering queue",
    "imagecount": "84",
    "progress": 0,
    "images": 0
  },
  "state": "success"
}
```

Example 2:

```bash
{
  "document": [
    {
      "id": 55932706,
      "url": "https://www.yumpu.com/de/document/view/55932706/new-title",
      "short_url": "https://www.yumpu.com/s/Ok8tEcVRDCsfAod0",
      "image": {
        "small": "https://img.yumpu.com/55932706/1/115x163/new-title.jpg",
        "medium": "https://img.yumpu.com/55932706/1/452x640/new-title.jpg",
        "big": "https://img.yumpu.com/55932706/1/1129x1600/new-title.jpg"
      },
      "language": "de",
      "title": "new title",
      "description": "",
      "pages": 3,
      "width": 452,
      "height": 640,
      "category_id": 2,
      "tags": [
        "suchparameter",
        "liefert",
        "google",
        "webseiten",
        "suchbegriff",
        "mehreren",
        "angezeigt",
        "beschreibung",
        "nutzwert",
        "treffer",
        "www.lukasbals.at"
      ],
      "embed_code": "<iframe width=\"512px\" height=\"384px\" src=\"https://www.yumpu.com/de/embed/view/CsdA9tSUlmyVvbNO\" frameborder=\"0\" allowfullscreen=\"true\" allowtransparency=\"true\"></iframe>"
    }
  ],
  "state": "success",
  "completed_in": 0.0715
}
```


# Document categories


# Get

## Retrieve a list of our categories

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

Run request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/document/categories.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$categories = $yumpu->getCategories();
print_r($categories);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
yumpu.getDocumentCategories(function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
System.out.println(y.getCategories());
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "total": 22,
  "categories": [
    {
      "id": 0,
      "name": "None"
    },
    {
      "id": 1,
      "name": "Auto & Vehicles"
    },
    {
      "id": 2,
      "name": "Business & Marketing"
    },
    {
      "id": 18,
      "name": "Cooking, Food & Wine"
    },
    {
      "id": 3,
      "name": "Creative"
    },
    {
      "id": 23,
      "name": "Fashion"
    },
    {
      "id": 4,
      "name": "Film & Music"
    },
    {
      "id": 5,
      "name": "Fun & Entertainment"
    },
    {
      "id": 19,
      "name": "Health & Beauty"
    },
    {
      "id": 6,
      "name": "Hobby & Home"
    },
    {
      "id": 20,
      "name": "Home & Garden"
    },
    {
      "id": 21,
      "name": "Humor & Fun"
    },
    {
      "id": 7,
      "name": "Knowledge & Resources"
    },
    {
      "id": 8,
      "name": "Nature & Animals"
    },
    {
      "id": 9,
      "name": "News & Politics"
    },
    {
      "id": 10,
      "name": "Nonprofits & Activism"
    },
    {
      "id": 11,
      "name": "Religion & Philosophy"
    },
    {
      "id": 22,
      "name": "Shopping & Lifestyle"
    },
    {
      "id": 12,
      "name": "Sports"
    },
    {
      "id": 13,
      "name": "Technology & Internet"
    },
    {
      "id": 14,
      "name": "Travel & Events"
    },
    {
      "id": 15,
      "name": "Weird & Bizarre"
    }
  ],
  "state": "success",
  "completed_in": 0.0141
}
```


# Document languages


# Get

## Retrieve a list of our languages

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

Run request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/document/languages.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$laguages = $yumpu->getLanguages();
print_r($laguages);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
yumpu.getDocumentLanguages(function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
System.out.println(y.getLanguages());
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "total": 23,
  "languages": [
    {
      "iso": "en",
      "name": "english"
    },
    {
      "iso": "de",
      "name": "german"
    },
    {
      "iso": "fr",
      "name": "french"
    },
    {
      "iso": "es",
      "name": "spanish"
    },
    {
      "iso": "pt",
      "name": "portuguese"
    },
    {
      "iso": "it",
      "name": "italian"
    },
    {
      "iso": "ro",
      "name": "romanian"
    },
    {
      "iso": "nl",
      "name": "dutch"
    },
    {
      "iso": "la",
      "name": "latin"
    },
    {
      "iso": "da",
      "name": "danish"
    },
    {
      "iso": "sv",
      "name": "swedish"
    },
    {
      "iso": "no",
      "name": "norwegian"
    },
    {
      "iso": "hu",
      "name": "hungarian"
    },
    {
      "iso": "id",
      "name": "indonesian"
    },
    {
      "iso": "tr",
      "name": "turkish"
    },
    {
      "iso": "fi",
      "name": "finnish"
    },
    {
      "iso": "lv",
      "name": "latvian"
    },
    {
      "iso": "lt",
      "name": "lithuanian"
    },
    {
      "iso": "cs",
      "name": "czech"
    },
    {
      "iso": "ru",
      "name": "russian"
    },
    {
      "iso": "bg",
      "name": "bulgarian"
    },
    {
      "iso": "ar",
      "name": "arabic"
    },
    {
      "iso": "xx",
      "name": "unknown"
    }
  ],
  "state": "success",
  "completed_in": 0.0145
}
```


# Countries


# Get

## Retrieve a list of our countries

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

Run request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/countries.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$countries = $yumpu->getCountries();
print_r($countries);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
yumpu.getCountries(function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
System.out.println(y.getCountries());
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "total": 223,
  "countries": [
    {
      "iso": "AF",
      "name": "Afghanistan"
    },
    {
      "iso": "AL",
      "name": "Albania"
    },
    {
      "iso": "DZ",
      "name": "Algeria"
    },
    {
      "iso": "AD",
      "name": "Andorra"
    },
    {
      "iso": "AO",
      "name": "Angola"
    },
    {
      "iso": "AI",
      "name": "Anguilla"
    },
    {
      "iso": "AQ",
      "name": "Antarctica"
    },
    {
      "iso": "AG",
      "name": "Antigua and Barbuda"
    },
    {
      "iso": "AR",
      "name": "Argentina"
    },
    {
      "iso": "AM",
      "name": "Armenia"
    },
    {
      "iso": "AW",
      "name": "Aruba"
    },
    {
      "iso": "AU",
      "name": "Australia"
    },
    {
      "iso": "AT",
      "name": "Austria"
    },
    {
      "iso": "AZ",
      "name": "Azerbaijan"
    },
    {
      "iso": "BS",
      "name": "Bahamas"
    },
    {
      "iso": "BH",
      "name": "Bahrain"
    },
    {
      "iso": "BD",
      "name": "Bangladesh"
    },
    {
      "iso": "BB",
      "name": "Barbados"
    },
    {
      "iso": "BY",
      "name": "Belarus"
    },
    {
      "iso": "BE",
      "name": "Belgium"
    },
    {
      "iso": "BZ",
      "name": "Belize"
    },
    {
      "iso": "BJ",
      "name": "Benin"
    },
    {
      "iso": "BM",
      "name": "Bermuda"
    },
    {
      "iso": "BT",
      "name": "Bhutan"
    },
    {
      "iso": "BO",
      "name": "Bolivia"
    },
    {
      "iso": "BA",
      "name": "Bosnia and Herzegovina"
    },
    {
      "iso": "BW",
      "name": "Botswana"
    },
    {
      "iso": "BR",
      "name": "Brazil"
    },
    {
      "iso": "IO",
      "name": "British Indian Ocean"
    },
    {
      "iso": "BN",
      "name": "Brunei"
    },
    {
      "iso": "BG",
      "name": "Bulgaria"
    },
    {
      "iso": "BF",
      "name": "Burkina Faso"
    },
    {
      "iso": "BI",
      "name": "Burundi"
    },
    {
      "iso": "KH",
      "name": "Cambodia"
    },
    {
      "iso": "CM",
      "name": "Cameroon"
    },
    {
      "iso": "CA",
      "name": "Canada"
    },
    {
      "iso": "CV",
      "name": "Cape Verde"
    },
    {
      "iso": "KY",
      "name": "Cayman Islands"
    },
    {
      "iso": "CF",
      "name": "Central African Republic"
    },
    {
      "iso": "TD",
      "name": "Chad"
    },
    {
      "iso": "CL",
      "name": "Chile"
    },
    {
      "iso": "CN",
      "name": "China"
    },
    {
      "iso": "CX",
      "name": "Christmas Island"
    },
    {
      "iso": "CC",
      "name": "Cocos (Keeling) Islands"
    },
    {
      "iso": "CO",
      "name": "Colombia"
    },
    {
      "iso": "KM",
      "name": "Comoros"
    },
    {
      "iso": "CD",
      "name": "Congo, Democratic Republic of the"
    },
    {
      "iso": "CG",
      "name": "Congo, Republic of the"
    },
    {
      "iso": "CK",
      "name": "Cook Islands"
    },
    {
      "iso": "CR",
      "name": "Costa Rica"
    },
    {
      "iso": "HR",
      "name": "Croatia"
    },
    {
      "iso": "CY",
      "name": "Cyprus"
    },
    {
      "iso": "CZ",
      "name": "Czech Republic"
    },
    {
      "iso": "DK",
      "name": "Denmark"
    },
    {
      "iso": "DJ",
      "name": "Djibouti"
    },
    {
      "iso": "DM",
      "name": "Dominica"
    },
    {
      "iso": "DO",
      "name": "Dominican Republic"
    },
    {
      "iso": "TL",
      "name": "East Timor"
    },
    {
      "iso": "EC",
      "name": "Ecuador"
    },
    {
      "iso": "EG",
      "name": "Egypt"
    },
    {
      "iso": "SV",
      "name": "El Salvador"
    },
    {
      "iso": "GQ",
      "name": "Equatorial Guinea"
    },
    {
      "iso": "ER",
      "name": "Eritrea"
    },
    {
      "iso": "EE",
      "name": "Estonia"
    },
    {
      "iso": "ET",
      "name": "Ethiopia"
    },
    {
      "iso": "FK",
      "name": "Falkland Islands (Malvinas)"
    },
    {
      "iso": "FO",
      "name": "Faroe Islands"
    },
    {
      "iso": "FJ",
      "name": "Fiji"
    },
    {
      "iso": "FI",
      "name": "Finland"
    },
    {
      "iso": "FR",
      "name": "France"
    },
    {
      "iso": "GF",
      "name": "French Guiana"
    },
    {
      "iso": "PF",
      "name": "French Polynesia"
    },
    {
      "iso": "GA",
      "name": "Gabon"
    },
    {
      "iso": "GM",
      "name": "Gambia"
    },
    {
      "iso": "GE",
      "name": "Georgia"
    },
    {
      "iso": "DE",
      "name": "Germany"
    },
    {
      "iso": "GH",
      "name": "Ghana"
    },
    {
      "iso": "GI",
      "name": "Gibraltar"
    },
    {
      "iso": "GR",
      "name": "Greece"
    },
    {
      "iso": "GL",
      "name": "Greenland"
    },
    {
      "iso": "GD",
      "name": "Grenada"
    },
    {
      "iso": "GP",
      "name": "Guadeloupe"
    },
    {
      "iso": "GT",
      "name": "Guatemala"
    },
    {
      "iso": "GN",
      "name": "Guinea"
    },
    {
      "iso": "GW",
      "name": "Guinea-Bissau"
    },
    {
      "iso": "GY",
      "name": "Guyana"
    },
    {
      "iso": "HT",
      "name": "Haiti"
    },
    {
      "iso": "HN",
      "name": "Honduras"
    },
    {
      "iso": "HK",
      "name": "Hong Kong"
    },
    {
      "iso": "HU",
      "name": "Hungary"
    },
    {
      "iso": "IS",
      "name": "Iceland"
    },
    {
      "iso": "IN",
      "name": "India"
    },
    {
      "iso": "ID",
      "name": "Indonesia"
    },
    {
      "iso": "IE",
      "name": "Ireland"
    },
    {
      "iso": "IL",
      "name": "Israel"
    },
    {
      "iso": "IT",
      "name": "Italy"
    },
    {
      "iso": "CI",
      "name": "Ivory Coast (C&ocirc;te d\\'Ivoire)"
    },
    {
      "iso": "JM",
      "name": "Jamaica"
    },
    {
      "iso": "JP",
      "name": "Japan"
    },
    {
      "iso": "JO",
      "name": "Jordan"
    },
    {
      "iso": "KZ",
      "name": "Kazakhstan"
    },
    {
      "iso": "KE",
      "name": "Kenya"
    },
    {
      "iso": "KI",
      "name": "Kiribati"
    },
    {
      "iso": "KR",
      "name": "Korea, South"
    },
    {
      "iso": "KW",
      "name": "Kuwait"
    },
    {
      "iso": "KG",
      "name": "Kyrgyzstan"
    },
    {
      "iso": "LA",
      "name": "Laos"
    },
    {
      "iso": "LV",
      "name": "Latvia"
    },
    {
      "iso": "LB",
      "name": "Lebanon"
    },
    {
      "iso": "LS",
      "name": "Lesotho"
    },
    {
      "iso": "LI",
      "name": "Liechtenstein"
    },
    {
      "iso": "LT",
      "name": "Lithuania"
    },
    {
      "iso": "LU",
      "name": "Luxembourg"
    },
    {
      "iso": "MO",
      "name": "Macau"
    },
    {
      "iso": "MK",
      "name": "Macedonia, Republic of"
    },
    {
      "iso": "MG",
      "name": "Madagascar"
    },
    {
      "iso": "MW",
      "name": "Malawi"
    },
    {
      "iso": "MY",
      "name": "Malaysia"
    },
    {
      "iso": "MV",
      "name": "Maldives"
    },
    {
      "iso": "ML",
      "name": "Mali"
    },
    {
      "iso": "MT",
      "name": "Malta"
    },
    {
      "iso": "MH",
      "name": "Marshall Islands"
    },
    {
      "iso": "MQ",
      "name": "Martinique"
    },
    {
      "iso": "MR",
      "name": "Mauritania"
    },
    {
      "iso": "MU",
      "name": "Mauritius"
    },
    {
      "iso": "YT",
      "name": "Mayotte"
    },
    {
      "iso": "MX",
      "name": "Mexico"
    },
    {
      "iso": "FM",
      "name": "Micronesia"
    },
    {
      "iso": "MD",
      "name": "Moldova"
    },
    {
      "iso": "MC",
      "name": "Monaco"
    },
    {
      "iso": "MN",
      "name": "Mongolia"
    },
    {
      "iso": "ME",
      "name": "Montenegro"
    },
    {
      "iso": "MS",
      "name": "Montserrat"
    },
    {
      "iso": "MA",
      "name": "Morocco"
    },
    {
      "iso": "MZ",
      "name": "Mozambique"
    },
    {
      "iso": "NA",
      "name": "Namibia"
    },
    {
      "iso": "NR",
      "name": "Nauru"
    },
    {
      "iso": "NP",
      "name": "Nepal"
    },
    {
      "iso": "NL",
      "name": "Netherlands"
    },
    {
      "iso": "AN",
      "name": "Netherlands Antilles"
    },
    {
      "iso": "NC",
      "name": "New Caledonia"
    },
    {
      "iso": "NZ",
      "name": "New Zealand"
    },
    {
      "iso": "NI",
      "name": "Nicaragua"
    },
    {
      "iso": "NE",
      "name": "Niger"
    },
    {
      "iso": "NG",
      "name": "Nigeria"
    },
    {
      "iso": "NU",
      "name": "Niue"
    },
    {
      "iso": "NF",
      "name": "Norfolk Island"
    },
    {
      "iso": "NO",
      "name": "Norway"
    },
    {
      "iso": "OM",
      "name": "Oman"
    },
    {
      "iso": "PK",
      "name": "Pakistan"
    },
    {
      "iso": "PS",
      "name": "Palestinian Territory"
    },
    {
      "iso": "PA",
      "name": "Panama"
    },
    {
      "iso": "PG",
      "name": "Papua New Guinea"
    },
    {
      "iso": "PY",
      "name": "Paraguay"
    },
    {
      "iso": "PE",
      "name": "Peru"
    },
    {
      "iso": "PH",
      "name": "Philippines"
    },
    {
      "iso": "PN",
      "name": "Pitcairn Island"
    },
    {
      "iso": "PL",
      "name": "Poland"
    },
    {
      "iso": "PT",
      "name": "Portugal"
    },
    {
      "iso": "QA",
      "name": "Qatar"
    },
    {
      "iso": "RE",
      "name": "R&eacute;union"
    },
    {
      "iso": "RO",
      "name": "Romania"
    },
    {
      "iso": "RU",
      "name": "Russia"
    },
    {
      "iso": "RW",
      "name": "Rwanda"
    },
    {
      "iso": "SH",
      "name": "Saint Helena"
    },
    {
      "iso": "KN",
      "name": "Saint Kitts and Nevis"
    },
    {
      "iso": "LC",
      "name": "Saint Lucia"
    },
    {
      "iso": "PM",
      "name": "Saint Pierre and Miquelon"
    },
    {
      "iso": "VC",
      "name": "Saint Vincent and the Grenadines"
    },
    {
      "iso": "WS",
      "name": "Samoa"
    },
    {
      "iso": "SM",
      "name": "San Marino"
    },
    {
      "iso": "ST",
      "name": "S&atilde;o Tome and Principe"
    },
    {
      "iso": "SA",
      "name": "Saudi Arabia"
    },
    {
      "iso": "SN",
      "name": "Senegal"
    },
    {
      "iso": "RS",
      "name": "Serbia"
    },
    {
      "iso": "CS",
      "name": "Serbia and Montenegro"
    },
    {
      "iso": "SC",
      "name": "Seychelles"
    },
    {
      "iso": "SL",
      "name": "Sierra Leon"
    },
    {
      "iso": "SG",
      "name": "Singapore"
    },
    {
      "iso": "SK",
      "name": "Slovakia"
    },
    {
      "iso": "SI",
      "name": "Slovenia"
    },
    {
      "iso": "SB",
      "name": "Solomon Islands"
    },
    {
      "iso": "SO",
      "name": "Somalia"
    },
    {
      "iso": "ZA",
      "name": "South Africa"
    },
    {
      "iso": "GS",
      "name": "South Georgia and the South Sandwich Islands"
    },
    {
      "iso": "ES",
      "name": "Spain"
    },
    {
      "iso": "LK",
      "name": "Sri Lanka"
    },
    {
      "iso": "SR",
      "name": "Suriname"
    },
    {
      "iso": "SJ",
      "name": "Svalbard and Jan Mayen"
    },
    {
      "iso": "SZ",
      "name": "Swaziland"
    },
    {
      "iso": "SE",
      "name": "Sweden"
    },
    {
      "iso": "CH",
      "name": "Switzerland"
    },
    {
      "iso": "TW",
      "name": "Taiwan"
    },
    {
      "iso": "TJ",
      "name": "Tajikistan"
    },
    {
      "iso": "TZ",
      "name": "Tanzania"
    },
    {
      "iso": "TH",
      "name": "Thailand"
    },
    {
      "iso": "TG",
      "name": "Togo"
    },
    {
      "iso": "TK",
      "name": "Tokelau"
    },
    {
      "iso": "TO",
      "name": "Tonga"
    },
    {
      "iso": "TT",
      "name": "Trinidad and Tobago"
    },
    {
      "iso": "TN",
      "name": "Tunisia"
    },
    {
      "iso": "TR",
      "name": "Turkey"
    },
    {
      "iso": "TM",
      "name": "Turkmenistan"
    },
    {
      "iso": "TC",
      "name": "Turks and Caicos Islands"
    },
    {
      "iso": "TV",
      "name": "Tuvalu"
    },
    {
      "iso": "UG",
      "name": "Uganda"
    },
    {
      "iso": "UA",
      "name": "Ukraine"
    },
    {
      "iso": "AE",
      "name": "United Arab Emirates"
    },
    {
      "iso": "GB",
      "name": "United Kingdom"
    },
    {
      "iso": "US",
      "name": "United States"
    },
    {
      "iso": "UM",
      "name": "United States Minor Outlying Islands"
    },
    {
      "iso": "UY",
      "name": "Uruguay"
    },
    {
      "iso": "UZ",
      "name": "Uzbekistan"
    },
    {
      "iso": "VU",
      "name": "Vanuatu"
    },
    {
      "iso": "VA",
      "name": "Vatican City"
    },
    {
      "iso": "VE",
      "name": "Venezuela"
    },
    {
      "iso": "VN",
      "name": "Vietnam"
    },
    {
      "iso": "VG",
      "name": "Virgin Islands, British"
    },
    {
      "iso": "WF",
      "name": "Wallis and Futuna"
    },
    {
      "iso": "EH",
      "name": "Western Sahara"
    },
    {
      "iso": "YE",
      "name": "Yemen"
    },
    {
      "iso": "ZM",
      "name": "Zambia"
    },
    {
      "iso": "ZW",
      "name": "Zimbabwe"
    }
  ],
  "state": "success",
  "completed_in": 0.0103
}
```


# Collections


# Get

## Retrieve a list of your collections

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                  | Default                                               |
| -------------- | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------- |
| offset         | optional            | Integer   | Retrieve rows at position X (min. 0)                                                                         | 0                                                     |
| limit          | optional            | Integer   | Retrieve X rows (min. 0 and max. 100)                                                                        | 10                                                    |
| return\_fields | optional            | String    | Customize the responses by setting the return fields (id, create\_date, update\_date, name, order, sections) | id, create\_date, update\_date, name, order, sections |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

#### Optional parameters:

&#x20;offset  limit  return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/collections.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'limit' => 1, 
    'offset' => 0,
    'return_fields' => 'id,create_date,update_date,name,order,sections'
);
$listColection = $yumpu->getCollections($data);
print_r($listColection);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  offset: 0,
  limit: 1,
  return_fields: 'id,create_date,update_date,name,order,sections'
};
yumpu.getCollections(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"limit=1", "offset=0", "return_fields=id,create_date,update_date,name,order,sections"};
System.out.println(y.getCollections(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "collections": [
    {
      "id": "iMWWKoMS76pjqMoO",
      "create_date": "2013-09-23 08:01:01",
      "update_date": "2013-09-23 08:01:35",
      "name": "My magazines",
      "order": 0,
      "sections": [
        {
          "id": "iMWWKoMS76pjqMoO_2mqhaSEMTVpvFwrY",
          "name": "Top 3",
          "description": "Top 3",
          "sorting": "manually",
          "order": 0
        },
        {
          "id": "iMWWKoMS76pjqMoO_vpgFQQ3sHervO8yj",
          "name": "Look at that",
          "description": "Look at that",
          "sorting": "title_desc",
          "order": 1
        }
      ]
    }
  ],
  "state": "success"
}
```


# Collection


# Get

## Retrieve an existing collection

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                  | Default                                               |
| -------------- | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------- |
| id             | required            | String    | One of your collection ids                                                                                   |                                                       |
| return\_fields | optional            | String    | Customize the responses by setting the return fields (id, create\_date, update\_date, name, order, sections) | id, create\_date, update\_date, name, order, sections |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;id&#x20;

#### Optional parameters:

&#x20;return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/collection.json?id=iMWWKoMS76pjqMoO"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id' => 'iMWWKoMS76pjqMoO',
);
$listCollection = $yumpu->getCollection($data);
print_r($listCollection);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'iMWWKoMS76pjqMoO',
  return_fields: 'id,create_date,update_date,name,order,sections'
};
yumpu.getCollection(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = { "id=iMWWKoMS76pjqMoO" };
System.out.println(y.getCollection(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "collection": [
    {
      "id": "iMWWKoMS76pjqMoO",
      "create_date": "2013-09-23 08:01:01",
      "update_date": "2013-09-23 08:01:35",
      "name": "My magazines",
      "order": 0,
      "sections": [
        {
          "id": "iMWWKoMS76pjqMoO_2mqhaSEMTVpvFwrY",
          "name": "Top 3",
          "description": "Top 3",
          "sorting": "manually",
          "order": 0
        },
        {
          "id": "iMWWKoMS76pjqMoO_vpgFQQ3sHervO8yj",
          "name": "Look at that",
          "description": "Look at that",
          "sorting": "title_desc",
          "order": 1
        }
      ]
    }
  ],
  "state": "success"
}
```


# Post

## Create a new collection

### Parameters:

| Name | Optional / Required | Data type | Description                | Default |
| ---- | ------------------- | --------- | -------------------------- | ------- |
| name | required            | String    | A name for your collection |         |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;name&#x20;

Run request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "name=Holidays" "https://api.yumpu.com/2.0/collection.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'name' => 'Holidays',
);
$newCollection = $yumpu->postCollection($data);
print_r($newCollection);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  name: 'Holidays'
};
yumpu.postCollection(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = { "name=Holidays" };
System.out.println(y.postCollection(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "collection": [
    {
      "id": "omkYGduXowlyx9WF",
      "create_date": "2013-09-23 09:05:47",
      "update_date": "0000-00-00 00:00:00",
      "name": "Holidays",
      "order": 0,
      "sections": [
        {
          "id": "omkYGduXowlyx9WF_stVFPUYW3kHX07B6",
          "name": "",
          "description": "",
          "sorting": "manually",
          "order": 0
        }
      ]
    }
  ],
  "state": "success"
}
```


# 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 |

{% tabs %}
{% tab title="curl" %}
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"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
$data = array(
    'id'=>'omkYGduXowlyx9WF',
    'name' => 'Holidays 2013'
);
$putCollection = $yumpu->putCollection($data);
print_r($putCollection);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
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);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = { "id=omkYGduXowlyx9WF", "name=Holidays 2013" };
System.out.println(y.putCollection(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "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"
}
```


# Delete

## Delete one collection

### Parameters:

| Name | Optional / Required | Data type | Description                | Default |
| ---- | ------------------- | --------- | -------------------------- | ------- |
| id   | required            | String    | One of your collection ids |         |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X DELETE -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=omkYGduXowlyx9WF" "https://api.yumpu.com/2.0/collection.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$id = 'omkYGduXowlyx9WF';
$deleteCollection = $yumpu->deleteCollection($id);
print_r($deleteCollection);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'omkYGduXowlyx9WF'
};
yumpu.deleteCollection(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String id = "omkYGduXowlyx9WF";
System.out.println(y.deleteCollection(id));
```

{% endtab %}
{% endtabs %}

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

```javascript
{"state":"success"}
```


# Section


# Get

## Retrieve an existing section

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                                         | Default                                                                      |
| -------------- | ------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| id             | required            | String    | One of your section ids                                                                                                             |                                                                              |
| return\_fields | optional            | String    | Customize the responses by setting the return fields (id, create\_date, update\_date, name, description, sorting, order, documents) | id, create\_date, update\_date, name, description, sorting, order, documents |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;id&#x20;

#### Optional parameters:

&#x20;return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/collection/section.json?id=iMWWKoMS76pjqMoO_2mqhaSEMTVpvFwrY"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id'=>'iMWWKoMS76pjqMoO_2mqhaSEMTVpvFwrY',
);
$listSection = $yumpu->getSection($data);
print_r($listSection);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = '{
  id: 'iMWWKoMS76pjqMoO_2mqhaSEMTVpvFwrY',
  return_fields: 'id,create_date,update_date,name,description,sorting,order,documents'
}';
yumpu.getSection(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = { "id=iMWWKoMS76pjqMoO_2mqhaSEMTVpvFwrY" };
System.out.println(y.getSection(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "section": [
    {
      "id": "2mqhaSEMTVpvFwrY",
      "create_date": "2016-09-06 15:58:35",
      "update_date": "2016-09-13 09:39:56",
      "name": "new section",
      "description": "new section",
      "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",
  "completed_in": 0.0766
}
```


# Post

## Create a new section

### Parameters:

| Name        | Optional / Required | Data type | Description                                                                                                             | Default  |
| ----------- | ------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------- | -------- |
| id          | required            | String    | One of your collection 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 (by create\_date\_desc, create\_date\_asc, title\_desc, title\_asc) | manually |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;id  name&#x20;

#### Optional parameters:

&#x20;description  sorting&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

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

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id'=>'iMWWKoMS76pjqMoO',
    'name' => 'Sports',
  'description' => 'Sports'
);
$newSection = $yumpu->postSection($data);
print_r($newSection);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'iMWWKoMS76pjqMoO',
  name: 'Sports',
  description: 'Sports'
};
yumpu.postSection(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = { "id=iMWWKoMS76pjqMoO", "name=Sports", "description=Sports" };
System.out.println(y.postSection(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
   "section": [
     {
       "id": "F54wo1ijuIzhbSfK",
       "create_date": "2013-09-23 10:46:53",
       "update_date": "0000-00-00 00:00:00",
       "name": "Sports",
       "description": "Sports",
       "sorting": "manually",
       "order": 2,
       "documents": ""
     }
   ],
   "state": "success"
 }
```


# 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 |

{% tabs %}
{% tab title="curl" %}
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"
```

{% endtab %}

{% tab title="PHP" %}
Example:

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

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
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);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

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

{% endtab %}
{% endtabs %}

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

```bash
{
  "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
}
```


# Delete

## Delete an existing section

### Parameters:

| Name | Optional / Required | Data type | Description             | Default |
| ---- | ------------------- | --------- | ----------------------- | ------- |
| id   | required            | String    | One of your section ids |         |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X DELETE -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=iMWWKoMS76pjqMoO_JLUaRCPAkQA9fB8f" "https://api.yumpu.com/2.0/collection/section.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$id = 'iMWWKoMS76pjqMoO_JLUaRCPAkQA9fB8f';
$deleteSection = $yumpu->deleteSection($id);
print_r($deleteSection);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'iMWWKoMS76pjqMoO_JLUaRCPAkQA9fB8f'
};
yumpu.deleteSection(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String id = "46gGMFOTEVf3SamD_ZmUlVyovE9RMt0su";
System.out.println(y.deleteSection(id));
```

{% endtab %}
{% endtabs %}

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

```javascript
{"state":"success"}
```


# Section document


# Post

## 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

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;id  documents&#x20;

Run request

```
```

{% tabs %}
{% tab title="curl" %}
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"
```

{% endtab %}

{% tab title="PHP" %}
Example:

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

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
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);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

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

{% endtab %}
{% endtabs %}

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

```bash
{
  "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
}
```


# Delete

## Delete a document in a 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 |         |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X DELETE -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"
```

{% endtab %}

{% tab title="PHP" %}
Example:

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

{% endtab %}

{% tab title="JavaScript" %}
Example:

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

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String id = "iMWWKoMS76pjqMoO_vpgFQQ3sHervO8yj";
String documents = "20327014,20327015";
System.out.println(y.deleteSectionDocument(id, documents));
```

{% endtab %}
{% endtabs %}

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

```javascript
{"state":"success"}
```


# Search


# Get

## Search our index and retrieve a list of documents

### Parameters:

| Name           | Optional / Required | Data type         | Description                                                                                                                                                          | Default                                                                                                       |
| -------------- | ------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
| q              | required            | String            | A keyword to search for                                                                                                                                              |                                                                                                               |
| in             | optinal             | String            | Search keyword in fields author, title, description or tags                                                                                                          | author, title, description, tags                                                                              |
| op             | optional            | String            | Search keyword with "and" or "or" operator                                                                                                                           | or                                                                                                            |
| offset         | optional            | Integer           | Retrieve rows at position X (min. 0)                                                                                                                                 | 0                                                                                                             |
| limit          | optional            | Integer           | Retrieve X rows (min. 0 and max. 100)                                                                                                                                | 10                                                                                                            |
| return\_fields | optional            | String            | Customize the responses by setting the return fields (id, url, short\_url, image\_small, image\_medium, image\_big, language, title, description, tags, embed\_code) | id, url, short\_url, image\_small, image\_medium, image\_big, language, title, description, tags, embed\_code |
| sort           | optional            | String            | Sort results (views\_desc, views\_asc, create\_date\_desc, create\_date\_asc, pages\_desc, pages\_asc)                                                               |                                                                                                               |
| language       | optional            | String            | Filter result (de, en, ...)                                                                                                                                          |                                                                                                               |
| pages          | optional            | String or integer | Filter result from 10 to 20 pages (10-20) or exact 30 pages (30)                                                                                                     |                                                                                                               |
| views          | optional            | String or integer | Filter result with 500 to 1000 views (500-1000) or exact 800 views (800)                                                                                             |                                                                                                               |
| create\_date   | optional            | String            | Filter result which got created from 2013-09-01 between 2013-09-30 (2013-09-01-2013-09-30) or on an exact date 2013-09-01 (2013-09-01)                               |                                                                                                               |
| category       | optional            | Integer           | Filter result (1, 2, ...)                                                                                                                                            |                                                                                                               |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;q&#x20;

#### Optional parameters:

&#x20;in  op  offset  limit  return\_fields  sort  language  pages  views  create\_date  category&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://search.yumpu.com/2.0/search.json?q=s.moser&in=author"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'q' => 's.moser',
    'in' => 'author'
);
$search = $yumpu->search($data);
print_r($search);
?>
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = '{
  q: 's.moser',
  in: 'author'
}';
yumpu.search(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"q=s.moser", "in=author"};
System.out.println(y.search(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
   "total": 813,
   "documents": [
     {
       "id": "42025",
       "url": "https://www.yumpu.com/en/document/view/42025/google-eric-schmidt-at-the-milken-institute-global-conference",
       "short_url": "https://www.yumpu.com/s/iMWmtU3n9y8d8gup",
       "image": {
         "small": "https://images001.yumpu.com/yumpu.com/5647/1335778383_6815/thumb/page000001.jpg",
         "medium": "https://images001.yumpu.com/yumpu.com/5647/1335778383_6815/small/page000001.jpg",
         "big": "https://images001.yumpu.com/yumpu.com/5647/1335778383_6815/zoom/page000001.jpg"
       },
       "language": "en",
       "title": "Google Eric Schmidt at the Milken Institute Global Conference",
       "description": "Google Eric Schmidt at the Milken Institute Global Conference",
       "tags": [
         "google",
         "eric",
         "schmidt",
         "milken",
         "institute",
         "global",
         "conference",
         "www.yumpu.com"
       ],
       "embed_code": "iframe"
     },
     {
       "id": "23231",
       "url": "https://www.yumpu.com/en/document/view/23231/vw-collision-repair-facilities-list-1121",
       "short_url": "https://www.yumpu.com/s/VGWt63UNawxMH13U",
       "image": {
         "small": "https://images001.yumpu.com/yumpu.com/4038/1335447967_952/thumb/page000001.jpg",
         "medium": "https://images001.yumpu.com/yumpu.com/4038/1335447967_952/small/page000001.jpg",
         "big": "https://images001.yumpu.com/yumpu.com/4038/1335447967_952/zoom/page000001.jpg"
       },
       "language": "en",
       "title": "VW Collision Repair Facilities List 11.21",
       "description": "VW Collision Repair Facilities List 11.21",
       "tags": [
         "collision",
         "body",
         "center",
         "auto",
         "shop",
         "avenue",
         "street",
         "repair",
         "none",
         "paint",
         "facilities",
         "list",
         "www.yumpu.com"
       ],
       "embed_code": "iframe"
     },
     {
        ...
     }
   ],
   "state": "success"
 }
```


# User


# Get

## Retrieve your user

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                                                                                                                                                          | Default                                                                                                                                                                                      |
| -------------- | ------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| return\_fields | optional            | String    | Customize the responses by setting the return fields (id, create\_date, activate\_date, last\_login\_date, username, email, gender, name, firstname, lastname, birth\_date, address, zip\_code, city, country, description, website, blog, language) | id, create\_date, activate\_date, last\_login\_date, username, email, gender, name, firstname, lastname, birth\_date, address, zip\_code, city, country, description, website, blog, languge |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

#### Optional parameters:

&#x20;return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/user.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'return_fields' => 'id,create_date,activate_date,last_login_date,username,email,gender,name,firstname,lastname,birth_date,address,zip_code,city,country,description,website,blog,languge'
);
$getUser = $yumpu->getUser($data);
print_r($getUser);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
   return_fields: 'id,create_date,activate_date,last_login_date,username,email,gender,name,firstname,lastname,birth_date,address,zip_code,city,country,description,website,blog,languge'
};
yumpu.getUser(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"return_fields=id,create_date,activate_date,last_login_date,username,email,gender,name,firstname,lastname,birth_date,address,zip_code,city,country,description,website,blog,languge"};
System.out.println(y.getUser(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "user": {
    "id": "102864144",
    "create_date": "2013-03-08 17:13:43",
    "activate_date": "2013-04-25 14:20:04",
    "username": "Api.User",
    "email": "yumpu.api@gmail.com",
    "gender": "male",
    "name": "Api User",
    "firstname": "Api",
    "lastname": "User",
    "birth_date": "1986-01-01",
    "address": "Moosackerstr. 17",
    "zip_code": "9444",
    "city": "Diepoldsau",
    "country": "CH",
    "description": "I am the API user.",
    "website": "https://www.yumpu.com",
    "blog": "https://blog.yumpu.com",
    "language": "de"
  },
  "state": "success"
}
```


# Post

## Create a new user profile

### Parameters:

| Name        | Optional / Required | Data type | Description                                                                                                     | Default |
| ----------- | ------------------- | --------- | --------------------------------------------------------------------------------------------------------------- | ------- |
| email       | required            | String    | Your email address (valid email address)                                                                        |         |
| username    | required            | String    | Your username (Allowed characters a-z, A-Z, 0-9 and a dot, min. length 5 characters, max. length 30 characters) |         |
| password    | required            | String    | Your password (min. length 6 characters)                                                                        |         |
| gender      | optional            | String    | Your gender (male or female)                                                                                    |         |
| firstname   | optional            | String    | Your firstname (min. length 2 characters, max. length 100 characters)                                           |         |
| lastname    | optional            | String    | Your lastname (min. length 2 characters, max. length 100 characters)                                            |         |
| birth\_date | optional            | Date      | Your birth\_date (YYYY-MM-DD)                                                                                   |         |
| address     | optional            | String    | Your address (max. length 255 characters)                                                                       |         |
| zip\_code   | optional            | String    | Your zip code (max. length 10 characters)                                                                       |         |
| city        | optional            | String    | Your city (max. length 50 characters)                                                                           |         |
| country     | optional            | String    | Your country (DE, GB, FR, ...)                                                                                  |         |
| description | optional            | String    | Your address (max. length 255 characters)                                                                       |         |
| website     | optional            | String    | Your website (max. length 255 characters, valid URL)                                                            |         |
| blog        | optional            | String    | Your blog (max. length 255 characters, valid URL)                                                               |         |
| avatar      | optional            | String    | A valid image URL                                                                                               |         |
| language    | optional            | String    | Your language (de, en, fr, ...)                                                                                 |         |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;email  username  password&#x20;

#### Optional parameters:

&#x20;gender  firstname  lastname  birth\_date  address  zip\_code  city  country  description  website  blog  avatar  language&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "email=yumpu.api@gmail.com" -d "username=api.user" -d "password=s3cr3tpassword1" -d "gender=male" -d "firstname=API" -d "lastname=User" -d "birth_date=1986-01-01" -d "address=Moosackerstr. 17" -d "zip_code=9444" -d "city=Diepoldsau" -d "country=CH" -d "description=I am the default API user." -d "website=https://www.yumpu.com" -d "blog=https://blog.yumpu.com" -d "language=de" "https://api.yumpu.com/2.0/user.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'email' => 'yumpu.api@gmail.com',
    'username' => 'api.user',
    'password' => 's3cr3tpassword1',
    'gender' => 'male',
    'firstname' => 'API',
    'lastname' => 'User',
    'birth_date' => '1986-01-01',
    'address' => 'Moosackerstr. 17',
    'zip_code' => '9444',
    'city' => 'Diepoldsau',
    'country' => 'CH',
    'description' => 'I am the default API user.',
    'website' => 'https://www.yumpu.com',
    'blog' => 'https://blog.yumpu.com',
    'language' => 'de'
);
$newUser = $yumpu->postUser($data);
print_r($newUser);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  email: 'yumpu.api@gmail.com',
  username: 'api.user',
  password: 's3cr3tpassword1',
  gender: 'male',
  firstname: 'API',
  lastname: 'User',
  birth_date: '1986-01-01',
  address: 'Moosackerstr. 17',
  zip_code: '9444',
  city: 'Diepoldsau',
  country: 'CH',
  description: 'I am the default API user.',
  website: 'https://www.yumpu.com',
  blog: 'https://blog.yumpu.com',
  language: 'de'
};
yumpu.postUser(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"email=yumpu.api@gmail.com", "username=api.user", "password=s3cr3tpassword1", "gender=male", "firstname=API", "lastname=User", "birth_date=1986-01-01", "address=Moosackerstr. 17", "zip_code=9444", "city=Diepoldsau", "country=CH", "description=I am the default API user.", "website=http://www.yumpu.com", "blog=http://blog.yumpu.com", "language=de"};
System.out.println(y.postUser(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "user": {
    "id": "102864144",
    "create_date": "2013-03-08 17:13:43",
    "activate_date": "2013-04-25 14:20:04",
    "username": "Api.User",
    "email": "yumpu.api@gmail.com",
    "gender": "male",
    "name": "Api User",
    "firstname": "Api",
    "lastname": "User",
    "birth_date": "1986-01-01",
    "address": "Moosackerstr. 17",
    "zip_code": "9444",
    "city": "Diepoldsau",
    "country": "CH",
    "description": "I am the API user.",
    "website": "https://www.yumpu.com",
    "blog": "https://blog.yumpu.com",
    "language": "de"
  },
  "state": "success"
}
```


# Put

## Update your user profile data

### Parameters:

| Name        | Optional / Required | Data type | Description                                                           | Default |
| ----------- | ------------------- | --------- | --------------------------------------------------------------------- | ------- |
| gender      | required            | String    | Your gender (male or female)                                          |         |
| firstname   | required            | String    | Your firstname (min. length 2 characters, max. length 100 characters) |         |
| lastname    | required            | String    | Your lastname (min. length 2 characters, max. length 100 characters)  |         |
| birth\_date | optional            | Date      | Your birth\_date (YYYY-MM-DD)                                         |         |
| address     | optional            | String    | Your address (max. length 255 characters)                             |         |
| zip\_code   | optional            | String    | Your zip code (max. length 10 characters)                             |         |
| city        | optional            | String    | Your city (max. length 50 characters)                                 |         |
| country     | optional            | String    | Your country (DE, GB, FR, ...)                                        |         |
| description | optional            | String    | Your address (max. length 255 characters)                             |         |
| website     | optional            | String    | Your website (max. length 255 characters, valid URL)                  |         |
| blog        | optional            | String    | Your blog (max. length 255 characters, valid URL)                     |         |
| avatar      | optional            | String    | A valid image URL                                                     |         |
| language    | optional            | String    | Your language (de, en, fr, ...)                                       |         |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X PUT -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "gender=male" -d "firstname=firstnameAPI" -d "lastname=User" -d "birth_date=1986-01-01" -d "address=Moosackerstr. 17" -d "zip_code=9444" -d "city=Diepoldsau" -d "country=CH" -d "description=I am the default API user." -d "website=https://www.yumpu.com" -d "blog=https://blog.yumpu.com" -d "language=de" "https://api.yumpu.com/2.0/user.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'gender' => 'male',
    'firstname' => 'firstnameAPI',
    'lastname' => 'User',
    'birth_date' => '1986-01-01',
    'address' => 'Moosackerstr. 17',
    'zip_code' => '9444',
    'city' => 'Diepoldsau',
    'country' => 'CH',
    'description' => 'I am the default API user.',
    'website' => 'https://www.yumpu.com',
    'blog' => 'https://blog.yumpu.com',
    'language' => 'de'
);
$putUser = $yumpu->putUser($data);
print_r($putUser);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  gender: 'male',
  firstname: 'firstnameAPI',
  lastname: 'User',
  birth_date: '1986-01-01',
  address: 'Moosackerstr. 17',
  zip_code: '9444',
  city: 'Diepoldsau',
  country: 'CH',
  description: 'I am the default API user.',
  website: 'https://www.yumpu.com',
  blog: 'https://blog.yumpu.com',
  language: 'de'
};
yumpu.putUser(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"gender=male", "firstname=firstnameAPI", "lastname=User", "birth_date=1986-01-01", "address=Moosackerstr. 17", "zip_code=9444", "city=Diepoldsau", "country=CH", "description=I am the default API user.", "website=http://www.yumpu.com", "blog=http://blog.yumpu.com", "language=de"};
System.out.println(y.putUser(params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "user": {
    "id": "102864144",
    "create_date": "2013-03-08 17:13:43",
    "activate_date": "2013-04-25 14:20:04",
    "username": "Api.User",
    "email": "yumpu.api@gmail.com",
    "gender": "male",
    "firstname": "firstnameAPI",
    "lastname": "User",
    "birth_date": "1986-01-01",
    "address": "Moosackerstr. 17",
    "zip_code": "9444",
    "city": "Diepoldsau",
    "country": "CH",
    "description": "I am the default API user.",
    "website": "https://www.yumpu.com",
    "blog": "https://blog.yumpu.com",
    "language": "de"
  },
  "state": "success"
}
```


# Embeds


# Get

## Retrieve a list of your embeds

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                                         | Default                                                                      |
| -------------- | ------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| offset         | optional            | Integer   | Retrieve rows at position X (min. 0)                                                                                                | 0                                                                            |
| limit          | optional            | Integer   | Retrieve X rows (min. 0 and max. 100)                                                                                               | 10                                                                           |
| sort           | optional            | String    | Sort results ascending or descendening (asc or desc)                                                                                | desc                                                                         |
| return\_fields | optional            | String    | Customize the responses by setting the return fields ('id', 'user\_id', 'document\_id', 'type', 'create\_date', 'code', 'settings') | 'id', 'user\_id', 'document\_id', 'type', 'create\_date', 'code', 'settings' |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

#### Optional parameters:

&#x20;offset  limit  sort  return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/embeds.json?offset=0&limit=5&sort=desc&return_fields=id,code"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'limit' => 2,
    'offset' => 0,
    'sort' => 'desc',
    'return_fields' => 'id,code'
);
$listEmbeds = $yumpu->getEmbeds($data);
print_r($listEmbeds);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  offset: 0,
  limit: 2,
  sort: 'desc',
  return_fields: 'id,code'
};
yumpu.getEmbeds(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"limit=2", "offset=0", "sort=desc", "return_fields=id,code"};
System.out.println(y.getEmbeds(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "total": 481,
  "embeds": [
    {
      "id": "zwU3OPgTkL7SCfDj",
      "code": "<iframe width=\"620px\" height=\"566px\" src=\"https://www.yumpu.com/en/embed/view/zwU3OPgTkL7SCfDj\" frameborder=\"0\" allowfullscreen=\"true\" allowtransparency=\"true\"></iframe>"
    },
    {
      "id": "zxaNBp4k12QCMvlP",
      "code": "<iframe width=\"64px\" height=\"64px\" src=\"https://www.yumpu.com/en/embed/view/zxaNBp4k12QCMvlP\" frameborder=\"0\" allowfullscreen=\"true\" allowtransparency=\"true\"></iframe>"
    }
  ],
  "state": "success",
  "completed_in": 0.177
}
```


# Embed


# Get

## Retrieve an existing embed

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                                         | Default                                                                      |
| -------------- | ------------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
| id             | required            | String    | One of your embed ids                                                                                                               |                                                                              |
| return\_fields | optional            | String    | Customize the responses by setting the return fields ('id', 'user\_id', 'document\_id', 'type', 'create\_date', 'code', 'settings') | 'id', 'user\_id', 'document\_id', 'type', 'create\_date', 'code', 'settings' |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;id&#x20;

#### Optional parameters:

&#x20;return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/embed.json?id=zKtHE23d6R0qT1rf"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id' => 'zKtHE23d6R0qT1rf',
);
$listEmbed = $yumpu->getEmbed($data);
print_r($listEmbed);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'zKtHE23d6R0qT1rf'
};
yumpu.getEmbed(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"id=zKtHE23d6R0qT1rf"};
System.out.println(y.getEmbed(params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "embed": {
    "id": "zKtHE23d6R0qT1rf",
    "user_id": 10000,
    "document_id": "11199",
    "type": "4",
    "create_date": "2014-12-03 10:57:49",
    "code": "iframe",
    "settings": {
      "background_color": 253139,
      "destination": "https://www.yumpu.com",
      "download_pdf_enabled": 1,
      "height": "100",
      "start_page": 1,
      "text_font_color": "0082b2",
      "text_font_family": "ABeeZee:regular:latin",
      "text_font_size": 14,
      "text_font_style": "off",
      "text_font_weight": "off",
      "width": "100"
    }
  },
  "state": "success",
  "completed_in": "0.0665"
}
```


# Post

## Create a new embed

### Parameters:

| Name         | Optional / Required | Data type | Description                                                                                | Default |
| ------------ | ------------------- | --------- | ------------------------------------------------------------------------------------------ | ------- |
| document\_id | required            | Integer   | One of your document ids or a public document id from the Yumpu Users                      |         |
| type         | required            | Integer   | 1 (player), 2 (logo), 3 (link), 4 (button), 5 (cover), 6 (bookshelf) or 7 (player\_preset) |         |

#### Request parameters by type (1 = player)

| Name                            | Optional / Required | Data type | Description                                                                                                                       | Default               |
| ------------------------------- | ------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| start\_page                     | optional            | Integer   | Start magazine from page x                                                                                                        | 1                     |
| width                           | optional            | Integer   | Width of the embed                                                                                                                | 620                   |
| height                          | optional            | Integer   | Height of the embed                                                                                                               | 580                   |
| page\_view                      | optional            | String    | single\_page or double\_page                                                                                                      | double\_page          |
| title                           | optional            | String    | Max. characters 255                                                                                                               | Magazine title        |
| title\_font\_family             | optional            | String    | The font family used. It can be a system font or a Google Font (Attention: Some Google Fonts may be loaded through external APIs) | ABeeZee:regular:latin |
| title\_font\_weight             | optional            | String    | Bold (y) or normal (n) font weight                                                                                                | n                     |
| title\_font\_style              | optional            | String    | Italic font (y or n)                                                                                                              | n                     |
| title\_font\_size               | optional            | Integer   | Font size in px (8 - 76)                                                                                                          | 14                    |
| title\_font\_color              | optional            | String    | Hexadecimal value, 6 characters                                                                                                   | ffffff                |
| headline\_enabled               | optional            | String    | Display headline (title must also be set) - y or n                                                                                | y                     |
| username\_enabled               | optional            | String    | Display username (title must also be set) - y or n                                                                                | y                     |
| background\_color               | optional            | String    | Hexadecimal value, 6 characters                                                                                                   | 253139                |
| fullscreen\_background\_color   | optional            | String    | Hexadecimal value, 6 characters                                                                                                   | 253139                |
| outline\_enabled                | optional            | String    | Display a border of the embed (y or n)                                                                                            | n                     |
| outline\_size                   | optional            | Integer   | Border width (1 - 5)                                                                                                              | 1                     |
| outline\_color                  | optional            | String    | Border color (hexadecimal value, 6 characters)                                                                                    | 333333                |
| icons\_color                    | optional            | String    | Hexadecimal value, 6 characters                                                                                                   | ffffff                |
| arrows\_color                   | optional            | String    | Hexadecimal value, 6 characters                                                                                                   | ffffff                |
| text\_font\_weight              | optional            | String    | Bold (y) or normal (n) font weight                                                                                                | n                     |
| text\_font\_style               | optional            | String    | Italic font (y or n)                                                                                                              | n                     |
| player\_autoflip\_enabled       | optional            | String    | Autoflip pages (y or n)                                                                                                           | n                     |
| player\_c2r\_enabled            | optional            | String    | Display click to read button (y or n)                                                                                             | y                     |
| player\_c2r\_text               | optional            | String    | Click to read text                                                                                                                | Click to read         |
| player\_c2r\_destination        | optional            | String    | Onclick link of click to read button (fullscreen or on yumpu)                                                                     | fullscreen            |
| player\_c2r\_type               | optional            | String    | Template style of click to read button (buttonClassic, buttonRounded, iconEye, iconPlay)                                          | buttonClassic         |
| player\_c2r\_mobile             | optional            | String    | Template style of click to read button in mobile (buttonClassic, buttonRounded, iconEye, iconPlay)                                | buttonClassic         |
| player\_elements\_page\_numbers | optional            | String    | Display page numbers (y or n)                                                                                                     | y                     |
| player\_elements\_logo          | optional            | String    | Display logo (y or n)                                                                                                             | y                     |
| player\_elements\_overview      | optional            | String    | Display overview (y or n)                                                                                                         | y                     |
| player\_elements\_search\_embed | optional            | String    | Display search button in GUI when embedded == true (y or n)                                                                       | n                     |
| player\_elements\_fs\_share     | optional            | String    | Display facebook link (y or n)                                                                                                    | y                     |
| player\_elements\_fs\_download  | optional            | String    | Display download link (y or n)                                                                                                    | y                     |
| player\_elements\_fs\_print     | optional            | String    | Display link to print the magazine (y or n)                                                                                       | y                     |
| player\_elements\_fs\_recom     | optional            | String    | Display recommended (y or n)                                                                                                      | y                     |

#### Request parameters by type (2 = logo)

| Name                    | Optional / Required | Data type | Description                                        | Default  |
| ----------------------- | ------------------- | --------- | -------------------------------------------------- | -------- |
| width                   | optional            | Integer   | Width of the embed                                 | 64       |
| background\_shape       | optional            | String    | Template of the embed (circle, rounded, square, y) | circle   |
| color                   | optional            | String    | Color (orange, white, black, grey)                 | orange   |
| destination             | optional            | String    | Onclick link (magazinePage or magazine)            | magazine |
| destination\_fullscreen | optional            | String    | Onclick link fullscreen (y or n)                   | n        |

#### Request parameters by type (3 = link)

| Name                    | Optional / Required | Data type | Description                                                                                                                       | Default               |
| ----------------------- | ------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| width                   | optional            | Integer   | Width of the embed                                                                                                                | 271                   |
| height                  | optional            | Integer   | Height of the embed                                                                                                               | 43                    |
| title                   | optional            | String    | Max. characters 255                                                                                                               | Magazine title        |
| title\_font\_family     | optional            | String    | The font family used. It can be a system font or a Google Font (Attention: Some Google Fonts may be loaded through external APIs) | ABeeZee:regular:latin |
| title\_font\_weight     | optional            | String    | Bold (y) or normal (n) font weight                                                                                                | n                     |
| title\_font\_style      | optional            | String    | Italic font (y or n)                                                                                                              | n                     |
| title\_font\_size       | optional            | Integer   | Font size in px (8 - 76)                                                                                                          | 14                    |
| title\_font\_color      | optional            | String    | Hexadecimal value, 6 characters                                                                                                   | 0082b2                |
| background\_color       | optional            | String    | Hexadecimal value, 6 characters or transparent                                                                                    | transparent           |
| outline\_enabled        | optional            | String    | Display a border of the embed (y or n)                                                                                            | n                     |
| outline\_size           | optional            | Integer   | Border width (1 - 5)                                                                                                              | 1                     |
| outline\_color          | optional            | String    | Border color (hexadecimal value, 6 characters)                                                                                    | 333333                |
| destination             | optional            | String    | Onclick link (magazinePage or magazine)                                                                                           | magazine              |
| destination\_fullscreen | optional            | String    | Onclick link fullscreen (y or n)                                                                                                  | y                     |
| download\_pdf\_enabled  | optional            | String    | Show download pdf link (y or n)                                                                                                   | n                     |
| download\_pdf\_title    | optional            | String    | Text of the download PDF link                                                                                                     | download PDF          |

#### Request parameters by type (4 = button)

| Name                    | Optional / Required | Data type | Description                                                                                                                       | Default               |
| ----------------------- | ------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| start\_page             | optional            | Integer   | Start magazine from page x                                                                                                        | 1                     |
| width                   | optional            | Integer   | Width of the embed                                                                                                                | 118                   |
| height                  | optional            | Integer   | Height of the embed                                                                                                               | 39                    |
| title                   | optional            | String    | Max. characters 255                                                                                                               | Magazine title        |
| text\_font\_family      | optional            | String    | The font family used. It can be a system font or a Google Font (Attention: Some Google Fonts may be loaded through external APIs) | ABeeZee:regular:latin |
| text\_font\_weight      | optional            | String    | Bold (y) or normal (n) font weight                                                                                                | n                     |
| text\_font\_style       | optional            | String    | Italic font (y or n)                                                                                                              | n                     |
| text\_font\_size        | optional            | Integer   | Font size in px (8 - 76)                                                                                                          | 14                    |
| text\_font\_color       | optional            | String    | Hexadecimal value, 6 characters                                                                                                   | FFFFFF                |
| background\_color       | optional            | String    | Hexadecimal value, 6 characters or transparent                                                                                    | 253139                |
| destination             | optional            | String    | Onclick link (magazinePage or magazine)                                                                                           | magazine              |
| destination\_fullscreen | optional            | String    | Onclick link fullscreen (y or n)                                                                                                  | y                     |
| download\_pdf\_enabled  | optional            | String    | Show download pdf link (y or n)                                                                                                   | n                     |
| download\_pdf\_title    | optional            | String    | Text of the download PDF link                                                                                                     | download PDF          |

#### Request parameters by type (5 = cover)

| Name                    | Optional / Required | Data type | Description                                                                                                                       | Default               |
| ----------------------- | ------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------- | --------------------- |
| start\_page             | optional            | Integer   | Start magazine from page x                                                                                                        | 1                     |
| width                   | optional            | Integer   | Width of the embed                                                                                                                | 280                   |
| height                  | optional            | Integer   | Height of the embed                                                                                                               | 399                   |
| title                   | optional            | String    | Max. characters 255                                                                                                               | Magazine title        |
| title\_font\_family     | optional            | String    | The font family used. It can be a system font or a Google Font (Attention: Some Google Fonts may be loaded through external APIs) | ABeeZee:regular:latin |
| title\_font\_weight     | optional            | String    | Bold (y) or normal (n) font weight                                                                                                | n                     |
| title\_font\_style      | optional            | String    | Italic font (y or n)                                                                                                              | n                     |
| title\_font\_size       | optional            | Integer   | Font size in px (8 - 76)                                                                                                          | 14                    |
| title\_font\_color      | optional            | String    | Hexadecimal value, 6 characters                                                                                                   | FFFFFF                |
| headline\_enabled       | optional            | String    | Display headline (title must also be set) - y or n                                                                                | y                     |
| username\_enabled       | optional            | String    | Display username (title must also be set) - y or n                                                                                | y                     |
| background\_color       | optional            | String    | Hexadecimal value, 6 characters or transparent                                                                                    | 253139                |
| destination             | optional            | String    | Onclick link (magazinePage or magazine)                                                                                           | magazine              |
| destination\_fullscreen | optional            | String    | Onclick link fullscreen (y or n)                                                                                                  | y                     |
| border\_disabled        | optional            | String    | Show just cover, no border, no username, no title (y or n)                                                                        | n                     |
| download\_pdf\_enabled  | optional            | String    | Show download pdf link (y or n)                                                                                                   | n                     |
| download\_pdf\_title    | optional            | String    | Text of the download PDF link                                                                                                     | download PDF          |
| cover\_c2r\_enabled     | optional            | String    | Click to read (y or n)                                                                                                            | n                     |

#### Request parameters by type (6 = bookshelf)

| Name                    | Optional / Required | Data type | Description                                        | Default |
| ----------------------- | ------------------- | --------- | -------------------------------------------------- | ------- |
| section\_title\_enabled | optional            | String    | Show section titles (y or n)                       | y       |
| headline\_enabled       | optional            | String    | Display headline (title must also be set) - y or n | y       |
| background\_color       | optional            | String    | Hexadecimal value, 6 characters                    | 253139  |
| destination\_fullscreen | optional            | String    | Onclick link fullscreen (y or n)                   | y       |
| force\_swf\_overlay     | optional            | String    | Force SWF overlay (y or n)                         | n       |
| cpMagT                  | optional            | String    | Show centipede magazine titles (no, top or bottom) | no      |

#### Request parameters by type (7 = player\_preset)

| Name                            | Optional / Required | Data type | Description                                                                              | Default       |
| ------------------------------- | ------------------- | --------- | ---------------------------------------------------------------------------------------- | ------------- |
| start\_page                     | optional            | Integer   | Start magazine from page x                                                               | 1             |
| width                           | optional            | Integer   | Width of the embed                                                                       | 620           |
| height                          | optional            | Integer   | Height of the embed                                                                      | 548           |
| background\_color               | optional            | String    | Hexadecimal value, 6 characters                                                          | 253139        |
| icons\_color                    | optional            | String    | Hexadecimal value, 6 characters                                                          | ffffff        |
| arrows\_color                   | optional            | String    | Hexadecimal value, 6 characters                                                          | ffffff        |
| player\_autoflip\_enabled       | optional            | String    | Autoflip pages (y or n)                                                                  | n             |
| player\_c2r\_enabled            | optional            | String    | Display click to read button (y or n)                                                    | y             |
| player\_c2r\_text               | optional            | String    | Click to read text                                                                       | Click to read |
| player\_c2r\_destination        | optional            | String    | Onclick link of click to read button (fullscreen or onyumpu)                             | fullscreen    |
| player\_c2r\_type               | optional            | String    | Template style of click to read button (buttonClassic, buttonRounded, iconEye, iconPlay) | buttonClassic |
| player\_elements\_page\_numbers | optional            | String    | Display page numbers (y or n)                                                            | y             |
| player\_elements\_logo          | optional            | String    | Display logo (y or n)                                                                    | y             |
| player\_elements\_overview      | optional            | String    | Display overview (y or n)                                                                | y             |
| player\_elements\_search\_embed | optional            | String    | Display search button in GUI when embedded == true (y or n)                              | n             |
| player\_elements\_fs\_share     | optional            | String    | Display facebook link (y or n)                                                           | y             |
| player\_elements\_fs\_download  | optional            | String    | Display dowload link (y or n)                                                            | y             |
| player\_elements\_fs\_print     | optional            | String    | Display link to print the magazine (y or n)                                              | y             |
| player\_elements\_fs\_recom     | optional            | String    | Display recommended (y or n)                                                             | y             |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;document\_id  type&#x20;

Run request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "document_id=11199" -d "type=2" -d "width=500" -d "background_shape=square" -d "color=grey" -d "destination=https://www.yumpu.com" "https://api.yumpu.com/2.0/embed.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'document_id' => 11199,
    'type' => 2,
    'width' => 500,
    'background_shape' => 'square',
    'color' => 'grey',
    'destination' => 'http://www.yumpu.com'
);
$postEmbed = $yumpu->postEmbed($data);
print_r($postEmbed);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  document_id: '11199',
  type: 2,
  width: 500,
  background_shape: 'square',
  color: 'grey',
  destination: 'http://www.yumpu.com'
};
yumpu.postEmbed(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"document_id=11199", "type=2", "width=500", background_shape=square", color=grey", "destination=http://www.yumpu.com"};
System.out.println(y.postEmbed(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "embed": {
    "id": "zKtHE23d6R0qT1rf",
    "user_id": 10000,
    "document_id": "11199",
    "type": "4",
    "create_date": "2014-12-03 10:57:49",
    "code": "iframe",
    "settings": {
      "background_color": 253139,
      "destination": "https://www.yumpu.com",
      "download_pdf_enabled": 1,
      "height": "100",
      "start_page": 1,
      "text_font_color": "0082b2",
      "text_font_family": "ABeeZee:regular:latin",
      "text_font_size": 14,
      "text_font_style": "off",
      "text_font_weight": "off",
      "width": "100"
    }
  },
  "state": "success",
  "completed_in": "0.0665"
}
```


# Put

## Update an existing embed

### Parameters:

| Name | Optional / Required | Data type | Description | Default |
| ---- | ------------------- | --------- | ----------- | ------- |

| id | required | String | One of your embed ids |   |
| -- | -------- | ------ | --------------------- | - |

| document\_id | required | Integer | One of your document ids or a public document id from the Yumpu Users |   |
| ------------ | -------- | ------- | --------------------------------------------------------------------- | - |

| type | required | Integer | 1 (player), 2 (logo), 3 (link), 4 (button), 5 (cover), 6 (bookshelf) or 7 (player\_preset) |   |
| ---- | -------- | ------- | ------------------------------------------------------------------------------------------ | - |

**Request parameters by type (1 = player)**

| Name | Optional / Required | Data type | Description | Default |
| ---- | ------------------- | --------- | ----------- | ------- |

| start\_page | optional | Integer | Start magazine from page x | 1 |
| ----------- | -------- | ------- | -------------------------- | - |

| width | optional | Integer | Width of the embed | 620 |
| ----- | -------- | ------- | ------------------ | --- |

| height | optional | Integer | Height of the embed | 580 |
| ------ | -------- | ------- | ------------------- | --- |

| page\_view | optional | String | single\_page or double\_page | double\_page |
| ---------- | -------- | ------ | ---------------------------- | ------------ |

| title | optional | String | Max. characters 255 | Magazine title |
| ----- | -------- | ------ | ------------------- | -------------- |

| title\_font\_family | optional | String | A font family from the Google Fonts API | ABeeZee:regular:latin |
| ------------------- | -------- | ------ | --------------------------------------- | --------------------- |

| title\_font\_weight | optional | String | Bold (y) or normal (n) font weight | n |
| ------------------- | -------- | ------ | ---------------------------------- | - |

| title\_font\_style | optional | String | Italic font (y or n) | n |
| ------------------ | -------- | ------ | -------------------- | - |

| title\_font\_size | optional | Integer | Font size in px (8 - 76) | 14 |
| ----------------- | -------- | ------- | ------------------------ | -- |

| title\_font\_color | optional | String | Hexadecimal value, 6 characters | FFFFFF |
| ------------------ | -------- | ------ | ------------------------------- | ------ |

| headline\_enabled | optional | String | Display headline (title must also be set) - y or n | y |
| ----------------- | -------- | ------ | -------------------------------------------------- | - |

| username\_enabled | optional | String | Display username (title must also be set) - y or n | y |
| ----------------- | -------- | ------ | -------------------------------------------------- | - |

| background\_color | optional | String | Hexadecimal value, 6 characters | 253139 |
| ----------------- | -------- | ------ | ------------------------------- | ------ |

| fullscreen\_background\_color | optional | String | Hexadecimal value, 6 characters | 253139 |
| ----------------------------- | -------- | ------ | ------------------------------- | ------ |

| outline\_enabled | optional | String | Display a border of the embed (y or n) | n |
| ---------------- | -------- | ------ | -------------------------------------- | - |

| outline\_size | optional | Integer | Border width (1 - 5) | 1 |
| ------------- | -------- | ------- | -------------------- | - |

| icons\_color  | optional | String | Hexadecimal value, 6 characters | ffffff |
| ------------- | -------- | ------ | ------------------------------- | ------ |
| arrows\_color | optional | String | Hexadecimal value, 6 characters | ffffff |

| text\_font\_weight | optional | String | Bold (y) or normal (n) font weight | n |
| ------------------ | -------- | ------ | ---------------------------------- | - |

| text\_font\_style | optional | String | Italic font (y or n) | n |
| ----------------- | -------- | ------ | -------------------- | - |

| player\_autoflip\_enabled | optional | String | Autoflip pages (y or n) | n |
| ------------------------- | -------- | ------ | ----------------------- | - |

| player\_c2r\_enabled | optional | String | Display click to read button (y or n) | y |
| -------------------- | -------- | ------ | ------------------------------------- | - |

| player\_c2r\_text | optional | String | Click to read text | Click to read |
| ----------------- | -------- | ------ | ------------------ | ------------- |

| player\_c2r\_destination | optional | String | Onclick link of click to read button (fullscreen or onyumpu) | fullscreen |
| ------------------------ | -------- | ------ | ------------------------------------------------------------ | ---------- |

| player\_c2r\_type | optional | String | Template style of click to read button (buttonClassic, buttonRounded, iconEye, iconPlay) | buttonClassic |
| ----------------- | -------- | ------ | ---------------------------------------------------------------------------------------- | ------------- |

| player\_c2r\_mobile | optional | String | Template style of click to read button in mobile (buttonClassic, buttonRounded, iconEye, iconPlay) | buttonClassic |
| ------------------- | -------- | ------ | -------------------------------------------------------------------------------------------------- | ------------- |

| player\_elements\_page\_numbers | optional | String | Display page numbers (y or n) | y |
| ------------------------------- | -------- | ------ | ----------------------------- | - |

| player\_elements\_logo | optional | String | Display logo (y or n) | y |
| ---------------------- | -------- | ------ | --------------------- | - |

| player\_elements\_overview | optional | String | Display overview (y or n) | y |
| -------------------------- | -------- | ------ | ------------------------- | - |

| player\_elements\_search\_embed | optional | String | Display search button in GUI when embedded == true (y or n) | n |
| ------------------------------- | -------- | ------ | ----------------------------------------------------------- | - |

| player\_elements\_fs\_share | optional | String | Display facebook link (y or n) | y |
| --------------------------- | -------- | ------ | ------------------------------ | - |

| player\_elements\_fs\_download | optional | String | Display dowload link (y or n) | y |
| ------------------------------ | -------- | ------ | ----------------------------- | - |

| player\_elements\_fs\_print | optional | String | Display link to print the magazine (y or n) | y |
| --------------------------- | -------- | ------ | ------------------------------------------- | - |

| player\_elements\_fs\_recom | optional | String | Display recommended (y or n) | y |
| --------------------------- | -------- | ------ | ---------------------------- | - |

**Request parameters by type (2 = logo)**

| Name | Optional / Required | Data type | Description | Default |
| ---- | ------------------- | --------- | ----------- | ------- |

| width | optional | Integer | Width of the embed | 64 |
| ----- | -------- | ------- | ------------------ | -- |

| background\_shape | optional | String | Template of the embed (circle, rounded, square, y) | circle |
| ----------------- | -------- | ------ | -------------------------------------------------- | ------ |

| color | optional | String | Color (orange, white, black, grey) | orange |
| ----- | -------- | ------ | ---------------------------------- | ------ |

| destination | optional | String | Onclick link (magazinePage or magazine) | magazine |
| ----------- | -------- | ------ | --------------------------------------- | -------- |

| destination\_fullscreen | optional | String | Onclick link fullscreen (y or n) | n |
| ----------------------- | -------- | ------ | -------------------------------- | - |

**Request parameters by type (3 = link)**

| Name | Optional / Required | Data type | Description | Default |
| ---- | ------------------- | --------- | ----------- | ------- |

| width | optional | Integer | Width of the embed | 271 |
| ----- | -------- | ------- | ------------------ | --- |

| height | optional | Integer | Height of the embed | 43 |
| ------ | -------- | ------- | ------------------- | -- |

| title | optional | String | Max. characters 255 | Magazine title |
| ----- | -------- | ------ | ------------------- | -------------- |

| title\_font\_family | optional | String | A font family from the Google Fonts API | ABeeZee:regular:latin |
| ------------------- | -------- | ------ | --------------------------------------- | --------------------- |

| title\_font\_weight | optional | String | Bold (y) or normal (n) font weight | n |
| ------------------- | -------- | ------ | ---------------------------------- | - |

| title\_font\_style | optional | String | Italic font (y or n) | n |
| ------------------ | -------- | ------ | -------------------- | - |

| title\_font\_size | optional | Integer | Font size in px (8 - 76) | 14 |
| ----------------- | -------- | ------- | ------------------------ | -- |

| title\_font\_color | optional | String | Hexadecimal value, 6 characters | 0082b2 |
| ------------------ | -------- | ------ | ------------------------------- | ------ |

| background\_color | optional | String | Hexadecimal value, 6 characters or transparent | transparent |
| ----------------- | -------- | ------ | ---------------------------------------------- | ----------- |

| outline\_enabled | optional | String | Display a border of the embed (y or n) | n |
| ---------------- | -------- | ------ | -------------------------------------- | - |

| outline\_size | optional | Integer | Border width (1 - 5) | 1 |
| ------------- | -------- | ------- | -------------------- | - |

| outline\_color | optional | String | Border color (hexadecimal value, 6 characters) | 333333 |
| -------------- | -------- | ------ | ---------------------------------------------- | ------ |

| destination | optional | String | Onclick link (magazinePage or magazine) | magazine |
| ----------- | -------- | ------ | --------------------------------------- | -------- |

| destination\_fullscreen | optional | String | Onclick link fullscreen (y or n) | y |
| ----------------------- | -------- | ------ | -------------------------------- | - |

| download\_pdf\_enabled | optional | String | Show download pdf link (y or n) | n |
| ---------------------- | -------- | ------ | ------------------------------- | - |

| download\_pdf\_title | optional | String | Text of the download PDF link | download PDF |
| -------------------- | -------- | ------ | ----------------------------- | ------------ |

**Request parameters by type (4 = button)**

| Name | Optional / Required | Data type | Description | Default |
| ---- | ------------------- | --------- | ----------- | ------- |

| start\_page | optional | Integer | Start magazine from page x | 1 |
| ----------- | -------- | ------- | -------------------------- | - |

| width | optional | Integer | Width of the embed | 118 |
| ----- | -------- | ------- | ------------------ | --- |

| height | optional | Integer | Height of the embed | 39 |
| ------ | -------- | ------- | ------------------- | -- |

| title | optional | String | Max. characters 255 | Magazine title |
| ----- | -------- | ------ | ------------------- | -------------- |

| text\_font\_family | optional | String | A font family from the Google Fonts API | ABeeZee:regular:latin |
| ------------------ | -------- | ------ | --------------------------------------- | --------------------- |

| text\_font\_weight | optional | String | Bold (y) or normal (n) font weight | n |
| ------------------ | -------- | ------ | ---------------------------------- | - |

| text\_font\_style | optional | String | Italic font (y or n) | n |
| ----------------- | -------- | ------ | -------------------- | - |

| text\_font\_size | optional | Integer | Font size in px (8 - 76) | 14 |
| ---------------- | -------- | ------- | ------------------------ | -- |

| text\_font\_color | optional | String | Hexadecimal value, 6 characters | FFFFFF |
| ----------------- | -------- | ------ | ------------------------------- | ------ |

| background\_color | optional | String | Hexadecimal value, 6 characters or transparent | 253139 |
| ----------------- | -------- | ------ | ---------------------------------------------- | ------ |

| destination | optional | String | Onclick link (magazinePage or magazine) | magazine |
| ----------- | -------- | ------ | --------------------------------------- | -------- |

| destination\_fullscreen | optional | String | Onclick link fullscreen (y or n) | y |
| ----------------------- | -------- | ------ | -------------------------------- | - |

| download\_pdf\_enabled | optional | String | Show download pdf link (y or n) | n |
| ---------------------- | -------- | ------ | ------------------------------- | - |

| download\_pdf\_title | optional | String | Text of the download PDF link | download PDF |
| -------------------- | -------- | ------ | ----------------------------- | ------------ |

**Request parameters by type (5 = cover)**

| Name | Optional / Required | Data type | Description | Default |
| ---- | ------------------- | --------- | ----------- | ------- |

| start\_page | optional | Integer | Start magazine from page x | 1 |
| ----------- | -------- | ------- | -------------------------- | - |

| width | optional | Integer | Width of the embed | 280 |
| ----- | -------- | ------- | ------------------ | --- |

| height | optional | Integer | Height of the embed | 399 |
| ------ | -------- | ------- | ------------------- | --- |

| title | optional | String | Max. characters 255 | Magazine title |
| ----- | -------- | ------ | ------------------- | -------------- |

| title\_font\_family | optional | String | A font family from the Google Fonts API | ABeeZee:regular:latin |
| ------------------- | -------- | ------ | --------------------------------------- | --------------------- |

| title\_font\_weight | optional | String | Bold (y) or normal (n) font weight | n |
| ------------------- | -------- | ------ | ---------------------------------- | - |

| title\_font\_style | optional | String | Italic font (y or n) | n |
| ------------------ | -------- | ------ | -------------------- | - |

| title\_font\_size | optional | Integer | Font size in px (8 - 76) | 14 |
| ----------------- | -------- | ------- | ------------------------ | -- |

| title\_font\_color | optional | String | Hexadecimal value, 6 characters | FFFFFF |
| ------------------ | -------- | ------ | ------------------------------- | ------ |

| headline\_enabled | optional | String | Display headline (title must also be set) - y or n | y |
| ----------------- | -------- | ------ | -------------------------------------------------- | - |

| username\_enabled | optional | String | Display username (title must also be set) - y or n | y |
| ----------------- | -------- | ------ | -------------------------------------------------- | - |

| background\_color | optional | String | Hexadecimal value, 6 characters or transparent | 253139 |
| ----------------- | -------- | ------ | ---------------------------------------------- | ------ |

| destination | optional | String | Onclick link (magazinePage or magazine) | magazine |
| ----------- | -------- | ------ | --------------------------------------- | -------- |

| destination\_fullscreen | optional | String | Onclick link fullscreen (y or n) | y |
| ----------------------- | -------- | ------ | -------------------------------- | - |

| border\_disabled | optional | String | Show just cover, no border, no username, no title (y or n) | n |
| ---------------- | -------- | ------ | ---------------------------------------------------------- | - |

| download\_pdf\_enabled | optional | String | Show download pdf link (y or n) | n |
| ---------------------- | -------- | ------ | ------------------------------- | - |

| download\_pdf\_title | optional | String | Text of the download PDF link | download PDF |
| -------------------- | -------- | ------ | ----------------------------- | ------------ |

| cover\_c2r\_enabled | optional | String | Click to read (y or n) | n |
| ------------------- | -------- | ------ | ---------------------- | - |

**Request parameters by type (6 = bookshelf)**

| Name | Optional / Required | Data type | Description | Default |
| ---- | ------------------- | --------- | ----------- | ------- |

| section\_title\_enabled | optional | String | Show section titles (y or n) | y |
| ----------------------- | -------- | ------ | ---------------------------- | - |

| headline\_enabled | optional | String | Display headline (title must also be set) - y or n | y |
| ----------------- | -------- | ------ | -------------------------------------------------- | - |

| background\_color | optional | String | Hexadecimal value, 6 characters | 253139 |
| ----------------- | -------- | ------ | ------------------------------- | ------ |

| destination\_fullscreen | optional | String | Onclick link fullscreen (y or n) | y |
| ----------------------- | -------- | ------ | -------------------------------- | - |

| force\_swf\_overlay | optional | String | Force SWF overlay (y or n) | n |
| ------------------- | -------- | ------ | -------------------------- | - |

| cpMagT | optional | String | Show centipede magazine titles (no, top or bottom) | no |
| ------ | -------- | ------ | -------------------------------------------------- | -- |

**Request parameters by type (7 = player\_preset)**

| Name | Optional / Required | Data type | Description | Default |
| ---- | ------------------- | --------- | ----------- | ------- |

| start\_page | optional | Integer | Start magazine from page x | 1 |
| ----------- | -------- | ------- | -------------------------- | - |

| width | optional | Integer | Width of the embed | 620 |
| ----- | -------- | ------- | ------------------ | --- |

| height | optional | Integer | Height of the embed | 548 |
| ------ | -------- | ------- | ------------------- | --- |

| icons\_color  | optional | String | Hexadecimal value, 6 characters | ffffff |
| ------------- | -------- | ------ | ------------------------------- | ------ |
| arrows\_color | optional | String | Hexadecimal value, 6 characters | ffffff |

| player\_autoflip\_enabled | optional | String | Autoflip pages (y or n) | n |
| ------------------------- | -------- | ------ | ----------------------- | - |

| player\_c2r\_enabled | optional | String | Display click to read button (y or n) | y |
| -------------------- | -------- | ------ | ------------------------------------- | - |

| player\_c2r\_text | optional | String | Click to read text | Click to read |
| ----------------- | -------- | ------ | ------------------ | ------------- |

| player\_c2r\_destination | optional | String | Onclick link of click to read button (fullscreen or onyumpu) | fullscreen |
| ------------------------ | -------- | ------ | ------------------------------------------------------------ | ---------- |

| player\_c2r\_type | optional | String | Template style of click to read button (buttonClassic, buttonRounded, iconEye, iconPlay) | buttonClassic |
| ----------------- | -------- | ------ | ---------------------------------------------------------------------------------------- | ------------- |

| player\_elements\_page\_numbers | optional | String | Display page numbers (y or n) | y |
| ------------------------------- | -------- | ------ | ----------------------------- | - |

| player\_elements\_logo | optional | String | Display logo (y or n) | y |
| ---------------------- | -------- | ------ | --------------------- | - |

| player\_elements\_overview | optional | String | Display overview (y or n) | y |
| -------------------------- | -------- | ------ | ------------------------- | - |

| player\_elements\_search\_embed | optional | String | Display search button in GUI when embedded == true (y or n) | n |
| ------------------------------- | -------- | ------ | ----------------------------------------------------------- | - |

| player\_elements\_fs\_share | optional | String | Display facebook link (y or n) | y |
| --------------------------- | -------- | ------ | ------------------------------ | - |

| player\_elements\_fs\_download | optional | String | Display dowload link (y or n) | y |
| ------------------------------ | -------- | ------ | ----------------------------- | - |

| player\_elements\_fs\_print | optional | String | Display link to print the magazine (y or n) | y |
| --------------------------- | -------- | ------ | ------------------------------------------- | - |

| player\_elements\_fs\_recom | optional | String | Display recommended (y or n) | y |
| --------------------------- | -------- | ------ | ---------------------------- | - |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X PUT -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=zKtHE23d6R0qT1rf" -d "document_id=11199" -d "type=1" -d "outline_color=0000000" -d "width=800" -d "outline_size=5" -d "background_color=CCCCCC" -d "outline_enabled=y" -d "title_font_color=0000000" "https://api.yumpu.com/2.0/embed.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
'id'=>'zKtHE23d6R0qT1rf',
'document_id' => 11199,
'type' => 1,
'background_color' => 'CCCCCC',
'width' => 800,
'title_font_color' => '0000000',
'outline_color' => '0000000',
'outline_size' => 5,
'outline_enabled' => 'y',
'username_enabled' => 'n'
);
$putEmbed = $yumpu->putEmbed($data);
print_r($putEmbed);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
id: 'zKtHE23d6R0qT1rf',
document_id: '11199',
type: 1,
width: 800,
outline_enabled: 'y',
outline_size: '5',
outline_color: '0000000',
title_font_color: '0000000',
background_color: 'CCCCCC',
};
yumpu.putEmbed(parameters, function(statusCode, document){
console.log('Status: ' + statusCode);
console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"id=zKtHE23d6R0qT1rf", "document_id=11199", "type=1", "width=800", "outline_enabled=y", "outline_size=5", "outline_color=0000000", "title_font_color=0000000", "background_color=CCCCCC"};
System.out.println(y.putEmbed(params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
"embed": {
"id": "zKtHE23d6R0qT1rf",
"user_id": 10000,
"document_id": "11199",
"type": "1",
"create_date": "2014-12-03 10:57:49",
"code": "iframe",
"settings": {
"background_color": "CCCCCC",
"fullscreen_background_color": "253139",
"height": "580",
"outline_color": "000000",
"outline_enabled": "1",
"outline_size": "5",
"page_view": "double_page",
"player_autoflip_enabled": "2",
"player_c2r_destination": "fullscreen",
"player_c2r_enabled": "1",
"player_c2r_text": "Click to read",
"player_c2r_type": "buttonClassic",
"player_mobile_enabled": "1",
"player_type": "2",
"start_page": "1",
"text_font_style": "off",
"text_font_weight": "off",
"title_font_color": "000000",
"title_font_family": "ABeeZee:regular:latin",
"title_font_size": "14",
"title_font_style": "off",
"title_font_weight": "off",
"username_enabled": "1",
"width": "800"
},
"update_date": "2014-12-16 11:28:37"
},
"state": "success",
"completed_in": "0.4333"
}
```


# Delete

## Delete one embed

### Parameters:

| Name | Optional / Required | Data type | Description           | Default |
| ---- | ------------------- | --------- | --------------------- | ------- |
| id   | required            | String    | One of your embed ids |         |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X DELETE -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=ygCbHF6N2XK0iNjO" "https://api.yumpu.com/2.0/embed.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$id = 'ygCbHF6N2XK0iNjO';
$deleteEmbed = $yumpu->deleteEmbed($id);
print_r($deleteEmbed);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'ygCbHF6N2XK0iNjO'
};
yumpu.deleteEmbed(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String id = "ygCbHF6N2XK0iNjO";
System.out.println(y.deleteEmbed(params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "state": "success",
  "completed_in": "0.8208"
}
```


# Members


# Get

## Retrieve a list of your members

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                                                                          | Default                                                                                           |
| -------------- | ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| q              | optional            | String    | A keyword to search for                                                                                                                                              |                                                                                                   |
| offset         | optional            | Integer   | Retrieve rows at position X (min. 0)                                                                                                                                 | 0                                                                                                 |
| limit          | optional            | Integer   | Retrieve X rows (min. 0 and max. 100)                                                                                                                                | 10                                                                                                |
| sort           | optional            | String    | Sort results by create\_date ascendending / descending (create\_date\_asc, create\_date\_desc) or username ascendending / descending (username\_asc, username\_desc) | create\_date\_desc                                                                                |
| return\_fields | optional            | String    | Customize the responses by setting the return fields ('id', 'username', 'comment', 'password', 'access\_tags', 'kiosks', 'create\_date', 'update\_date')             | 'id', 'username', 'comment', 'password', 'access\_tags', 'kiosks', 'create\_date', 'update\_date' |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

#### Optional parameters:

&#x20;q  offset  limit  sort  return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/account/members.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'limit' => 2,
    'offset' => 0
);
$listMembers = $yumpu->getMembers($data);
print_r($listMembers);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  offset: 0,
  limit: 2
};
yumpu.getMembers(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"limit=2", "offset=0"};
System.out.println(y.getMembers(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "total": "6",
  "members": [
    {
      "id": "vGbxpwFZuvvdAGnS",
      "create_date": "2014-11-03 12:59:52",
      "update_date": "0000-00-00 00:00:00",
      "username": "user1",
      "password": "password",
      "comment": "user1",
      "access_tags": [
        {
          "id": "zxeeYReHnxeg8RqZ",
          "name": "accesstag1",
          "default": true
        }
      ],
      "kiosks": [
        {
          "id": "1572",
          "type": "webkiosk"
        }
      ]
    },
    {
      "id": "uBrURwzHMBEe32Dj",
      "create_date": "2014-10-08 17:10:39",
      "update_date": "0000-00-00 00:00:00",
      "username": "user2",
      "password": "password",
      "comment": "user2",
      "access_tags": [
        {
          "id": "zxeeYReHnxeg8RqZ",
          "name": "accesstag1",
          "default": true
        }
      ],
      "kiosks": [
        {
          "id": "25",
          "type": "webkiosk"
        },
        {
          "id": "860",
          "type": "appkiosk"
        }
      ]
    },
    {
      ...
    }
  ],
  "state": "success",
  "completed_in": "0.0608"
}
```


# Member


# Get

## Retrieve an existing member

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                                                              | Default                                                                                           |
| -------------- | ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| id             | required            | String    | One of your member ids                                                                                                                                   |                                                                                                   |
| return\_fields | optional            | String    | Customize the responses by setting the return fields ('id', 'username', 'comment', 'password', 'access\_tags', 'kiosks', 'create\_date', 'update\_date') | 'id', 'username', 'comment', 'password', 'access\_tags', 'kiosks', 'create\_date', 'update\_date' |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;id&#x20;

#### Optional parameters:

&#x20;return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/account/member.json?id=vGbxpwFZuvvdAGnS"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id' => 'vGbxpwFZuvvdAGnS'
);
$listMember = $yumpu->getMember($data);
print_r($listMember);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'vGbxpwFZuvvdAGnS'
};
yumpu.getMember(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"id=vGbxpwFZuvvdAGnS"};
System.out.println(y.getMember(params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "member": {
    "id": "vGbxpwFZuvvdAGnS",
    "create_date": "2014-11-03 12:59:52",
    "update_date": "0000-00-00 00:00:00",
    "username": "user1",
    "password": "password",
    "comment": "user1",
    "access_tags": [
      {
        "id": "zxeeYReHnxeg8RqZ",
        "name": "accesstag1",
        "default": true
      }
    ],
    "kiosks": [
      {
        "id": "1572",
        "type": "webkiosk"
      }
    ]
  },
  "state": "success",
  "completed_in": "0.0809"
}
```


# Post

## Create a new member

### Parameters:

| Name         | Optional / Required | Data type | Description                                                                                                               | Default |
| ------------ | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- | ------- |
| username     | required            | String    | min. 2 characters, max. 50 characters, allowed characters a-z, 0-9, dot (.), @, hyphen (-) and underscore (\_)            |         |
| password     | required            | String    | The value must be transmitted as md5                                                                                      |         |
| comment      | optional            | String    | min. 4 characters, max. 50 characters                                                                                     |         |
| access\_tags | optional            | String    | One or multiple access\_tag ids (myid1 or myid1,myid2)                                                                    |         |
| kiosks       | optional            | String    | One or multiple kiosk ids (webkiosk\_123 or webkiosk\_123,appkiosk\_456), values must start with webkiosk\_ or appkiosk\_ |         |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;username  password&#x20;

#### Optional parameters:

&#x20;comment  access\_tags  kiosks&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "username=user8" -d "password=f5bd63761dfd505514a7c94501825441" -d "comment=user8" -d "access_tags=zxeeYReHnxeg8RqZ" "https://api.yumpu.com/2.0/account/member.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'username' => 'user8',
    'password' => 'f5bd63761dfd505514a7c94501825441',
    'comment' => 'user8',
    'access_tags' => 'zxeeYReHnxeg8RqZ'
);
$postMember = $yumpu->postMember($data);
print_r($postMember);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  username: 'user7',
  password: 'f5bd63761dfd505514a7c94501825441',
  comment: 'user8',
  access_tags: 'zxeeYReHnxeg8RqZ'
};
yumpu.postMember(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String username = "user7";
String password = "mypassword";
String[] params = {"comment=user8"};
System.out.println(y.postMember(username, password, params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "member": {
    "id": "GuTIyoCZmWlnHjXP",
    "create_date": "2015-02-03 09:28:07",
    "update_date": "0000-00-00 00:00:00",
    "username": "user7",
    "password": "f5bd63761dfd505514a7c94501825441",
    "comment": "user8",
    "access_tags": [
      {
        "id": "zxeeYReHnxeg8RqZ",
        "name": "accesstag1",
        "default": true
      }
    ],
    "kiosks": [

    ]
  },
  "state": "success",
  "completed_in": "0.1563"
}
```


# Put

## Create a new member

### Parameters:

| Name         | Optional / Required | Data type | Description                                                                                                               | Default |
| ------------ | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- | ------- |
| username     | required            | String    | min. 2 characters, max. 50 characters, allowed characters a-z, 0-9, dot (.), @, hyphen (-) and underscore (\_)            |         |
| password     | required            | String    | The value must be transmitted as md5                                                                                      |         |
| comment      | optional            | String    | min. 4 characters, max. 50 characters                                                                                     |         |
| access\_tags | optional            | String    | One or multiple access\_tag ids (myid1 or myid1,myid2)                                                                    |         |
| kiosks       | optional            | String    | One or multiple kiosk ids (webkiosk\_123 or webkiosk\_123,appkiosk\_456), values must start with webkiosk\_ or appkiosk\_ |         |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;username  password&#x20;

#### Optional parameters:

&#x20;comment  access\_tags  kiosks&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "username=user8" -d "password=f5bd63761dfd505514a7c94501825441" -d "comment=user8" -d "access_tags=zxeeYReHnxeg8RqZ" "https://api.yumpu.com/2.0/account/member.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'username' => 'user8',
    'password' => 'f5bd63761dfd505514a7c94501825441',
    'comment' => 'user8',
    'access_tags' => 'zxeeYReHnxeg8RqZ'
);
$postMember = $yumpu->postMember($data);
print_r($postMember);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  username: 'user7',
  password: 'f5bd63761dfd505514a7c94501825441',
  comment: 'user8',
  access_tags: 'zxeeYReHnxeg8RqZ'
};
yumpu.postMember(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String username = "user7";
String password = "mypassword";
String[] params = {"comment=user8"};
System.out.println(y.postMember(username, password, params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "member": {
    "id": "GuTIyoCZmWlnHjXP",
    "create_date": "2015-02-03 09:28:07",
    "update_date": "0000-00-00 00:00:00",
    "username": "user7",
    "password": "f5bd63761dfd505514a7c94501825441",
    "comment": "user8",
    "access_tags": [
      {
        "id": "zxeeYReHnxeg8RqZ",
        "name": "accesstag1",
        "default": true
      }
    ],
    "kiosks": [

    ]
  },
  "state": "success",
  "completed_in": "0.1563"
}
```


# Delete

## Delete an existing member

### Parameters:

| Name | Optional / Required | Data type | Description            | Default |
| ---- | ------------------- | --------- | ---------------------- | ------- |
| id   | required            | String    | One of your member ids |         |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X DELETE -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=J4nF1wikdzn1VOqe" "https://api.yumpu.com/2.0/account/member.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$id = 'J4nF1wikdzn1VOqe';
$deleteMember = $yumpu->deleteMember($id);
print_r($deleteMember);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'J4nF1wikdzn1VOqe'
};
yumpu.deleteMember(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String id = "J4nF1wikdzn1VOqe";
System.out.println(y.deleteMember(id));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "state": "success",
  "completed_in": "0.6208"
}
```


# Access tags


# Get

## Retrieve a list of your access tags

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                                                              | Default                                                                 |
| -------------- | ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
| q              | optional            | String    | A keyword to search for                                                                                                                                  |                                                                         |
| offset         | optional            | Integer   | Retrieve rows at position X (min. 0)                                                                                                                     | 0                                                                       |
| limit          | optional            | Integer   | Retrieve X rows (min. 0 and max. 100)                                                                                                                    | 10                                                                      |
| sort           | optional            | String    | Sort results by create\_date ascendending / descending (create\_date\_asc, create\_date\_desc) or name ascendending / descending (name\_asc, name\_desc) | create\_date\_desc                                                      |
| return\_fields | optional            | String    | Customize the responses by setting the return fields (id, name, description, default, iap, kiosks, create\_date, update\_date)                           | id, name, description, default, iap, kiosks, create\_date, update\_date |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

#### Optional parameters:

&#x20;q  offset  limit  sort  return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/account/access_tags.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'limit' => 2,
    'offset' => 0
);
$listAccessTags = $yumpu->getAccessTags($data);
print_r($listAccessTags);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  limit: 2,
  offset: 0
};
yumpu.getAccessTags(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"limit=2", "offset=0"};
System.out.println(y.getAccessTags(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "total": "6",
  "access_tags": [
    {
      "id": "HnD4YrKMeGjxH3xT",
      "create_date": "2015-01-27 08:54:41",
      "update_date": "0000-00-00 00:00:00",
      "name": "accesstag1",
      "description": "accesstag1",
      "default": false,
      "iap": true,
      "kiosks": [
        {
          "id": "72",
          "type": "appkiosk"
        }
      ]
    },
    {
      "id": "WkrKvPxsOAqziqGf",
      "create_date": "2015-01-14 10:09:09",
      "update_date": "0000-00-00 00:00:00",
      "name": "accesstag2",
      "description": "accesstag2",
      "default": false,
      "iap": false,
      "kiosks": [
        {
          "id": "72",
          "type": "appkiosk"
        },
        {
          "id": "860",
          "type": "appkiosk"
        },
        {
          "id": "960",
          "type": "appkiosk"
        }
      ]
    },
      ...
    }
  ],
  "state": "success",
  "completed_in": "0.0315"
}
```


# Access tag


# Get

## Retrieve one access tag

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                                    | Default                                                                 |
| -------------- | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------- |
| id             | required            | String    | One of your access tag ids                                                                                                     |                                                                         |
| return\_fields | optional            | String    | Customize the responses by setting the return fields (id, name, description, default, iap, kiosks, create\_date, update\_date) | id, name, description, default, iap, kiosks, create\_date, update\_date |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;id&#x20;

#### Optional parameters:

&#x20;return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/account/access_tag.json?id=HnD4YrKMeGjxH3xT"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id' => 'HnD4YrKMeGjxH3xT',
    'limit' => '2',
    'offset' => '0'
);
$listAccesstag = $yumpu->getAccessTag($data);
print_r($listAccesstag);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: HnD4YrKMeGjxH3xT,
  limit: 2,
  offset: 0
};
yumpu.getAccessTag(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = { "id=HnD4YrKMeGjxH3xT", "limit=2", "offset=0" };
System.out.println(y.getAccessTag(params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "access_tag": {
    "id": "HnD4YrKMeGjxH3xT",
    "create_date": "2015-01-27 08:54:41",
    "update_date": "0000-00-00 00:00:00",
    "name": "accesstag1",
    "description": "accesstag1",
    "default": false,
    "iap": true,
    "kiosks": [
      {
        "id": "72",
        "type": "appkiosk"
      }
    ]
  },
  "state": "success",
  "completed_in": "0.0234"
}
```


# Post

## Create a new access tag

### Parameters:

| Name        | Optional / Required | Data type | Description                                                                                                               | Default |
| ----------- | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- | ------- |
| name        | required            | String    | min. 1 characters, max. 50 characters                                                                                     |         |
| description | required            | String    | min. 1 characters, max. 255 characters                                                                                    |         |
| default     | optional            | String    | yes or no (y or n)                                                                                                        | n       |
| iap         | optional            | String    | yes or no (y or n)                                                                                                        | n       |
| kiosks      | optional            | String    | One or multiple kiosk ids (webkiosk\_123 or webkiosk\_123,appkiosk\_456), values must start with webkiosk\_ or appkiosk\_ |         |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;name  description&#x20;

#### Optional parameters:

&#x20;default  iap  kiosks&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "name=accesstag7" -d "description=accesstag7" -d "default=y" -d "iap=y" -d "kiosks=webkiosk_25" "https://api.yumpu.com/2.0/account/access_tag.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'name' => 'accesstag7',
    'description' => 'accesstag7',
    'default' => 'y',
    'iap' => 'y',
    'kiosks' => 'webkiosk_25'
);
$newaccessTag = $yumpu->postAccessTag($data);
print_r($newaccessTag);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  name: 'accesstag7',
  description: 'accesstag7',
  default: 'y',
  iap: 'y',
  kiosks: 'webkiosk_25'
};
yumpu.postAccessTag(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = { "name=accesstag7", "description=accesstag7", "default=y", "iap=y", "kiosks=webkiosk_25"};
System.out.println(y.postAccessTag(params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "access_tag": {
    "id": "pR0VV9tCh5q4ZrEx",
    "create_date": "2015-02-03 11:45:01",
    "update_date": "0000-00-00 00:00:00",
    "name": "accesstag7",
    "description": "accesstag7",
    "default": true,
    "iap": true,
    "kiosks": [
      {
        "id": "25",
        "type": "webkiosk"
      }
    ]
  },
  "state": "success",
  "completed_in": "0.0761"
}
```


# Put

## Update an existing access tag

### Parameters:

| Name        | Optional / Required | Data type | Description                                                                                                               | Default |
| ----------- | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- | ------- |
| id          | required            | String    | One of your access tag ids                                                                                                |         |
| name        | required            | String    | min. 1 characters, max. 50 characters                                                                                     |         |
| description | optional            | String    | min. 1 characters, max. 255 characters                                                                                    |         |
| default     | optional            | String    | yes or no (y or n)                                                                                                        | n       |
| iap         | optional            | String    | yes or no (y or n)                                                                                                        | n       |
| kiosks      | optional            | String    | One or multiple kiosk ids (webkiosk\_123 or webkiosk\_123,appkiosk\_456), values must start with webkiosk\_ or appkiosk\_ |         |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X PUT -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=pR0VV9tCh5q4ZrEx" -d "name=accesstag7" -d "description=accesstag7" -d "default=n" -d "iap=n" -d "kiosks=webkiosk_25,webkiosk_1572" "https://api.yumpu.com/2.0/account/access_tag.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id'=>'pR0VV9tCh5q4ZrEx',
    'name' => 'accesstag7',
    'description' => 'accesstag7',
    'default' => 'n',
    'iap' => 'n',
    'kiosks' => 'webkiosk_25,webkiosk_1572'
);
$putAccessTag = $yumpu->putAccessTag($data);
print_r($putAccessTag);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'pR0VV9tCh5q4ZrEx',
  name: 'accesstag7',
  description: 'accesstag7',
  default: 'n',
  iap: 'n',
  kiosks: 'webkiosk_25,webkiosk_1572'
};
yumpu.putAccessTag(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = { "id=pR0VV9tCh5q4ZrEx", "name=accesstag7", "description=accesstag7", "defaul=n", "iap=n", "kiosks=webkiosk_25,webkiosk_1572" };
System.out.println(y.putAccessTag(params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "access_tag": {
    "id": "pR0VV9tCh5q4ZrEx",
    "create_date": "2015-02-03 11:45:01",
    "update_date": "2015-02-03 12:10:08",
    "name": "accesstag7",
    "description": "accesstag7",
    "default": false,
    "iap": false,
    "kiosks": [
      {
        "id": "25",
        "type": "webkiosk"
      },
      {
        "id": "1572",
        "type": "webkiosk"
      }
    ]
  },
  "state": "success",
  "completed_in": "0.2296"
}
```


# Delete

## Delete one access tag

### Parameters:

| Name | Optional / Required | Data type | Description                | Default |
| ---- | ------------------- | --------- | -------------------------- | ------- |
| id   | required            | String    | One of your access tag ids |         |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X DELETE -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=pR0VV9tCh5q4ZrEx" "https://api.yumpu.com/2.0/account/access_tag.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$id = 'pR0VV9tCh5q4ZrEx';
$deleteAccessTag = $yumpu->deleteAccessTag($id);
print_r($deleteAccessTag);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'pR0VV9tCh5q4ZrEx'
};
yumpu.deleteAccessTag(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String id = "pR0VV9tCh5q4ZrEx";
System.out.println(y.deleteAccessTag(id));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "state": "success",
  "completed_in": "0.0718"
}
```


# Subscriptions


# Get

## Retrieve a list of your subscriptions

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                                                              | Default                                                                               |
| -------------- | ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| q              | optional            | String    | A keyword to search for                                                                                                                                  |                                                                                       |
| offset         | optional            | Integer   | Retrieve rows at position X (min. 0)                                                                                                                     | 0                                                                                     |
| limit          | optional            | Integer   | Retrieve X rows (min. 0 and max. 100)                                                                                                                    | 10                                                                                    |
| sort           | optional            | String    | Sort results by create\_date ascendending / descending (create\_date\_asc, create\_date\_desc) or name ascendending / descending (name\_asc, name\_desc) | create\_date\_desc                                                                    |
| return\_fields | optional            | String    | Customize the responses by setting the return fields (id, itc\_product\_id, name, description, duration, kiosks, create\_date, update\_date)             | id, itc\_product\_id, name, description, duration, kiosks, create\_date, update\_date |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

#### Optional parameters:

&#x20;q  offset  limit  sort  return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/account/subscriptions.json?limit=2&offset=0"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'limit' => 2,
    'offset' => 0
);
$listSubscriptions = $yumpu->getSubscriptions($data);
print_r($listSubscriptions);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  limit: 2,
  offset: 0
};
yumpu.getSubscriptions(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"limit=2", "offset=0"};
System.out.println(y.getSubscriptions(params));
```

{% endtab %}
{% endtabs %}

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

```bash
{
  "total": "5",
  "subscriptions": [
    {
      "id": "QOjiaWfWYWd7TBHE",
      "create_date": "2015-01-27 13:21:37",
      "update_date": "0000-00-00 00:00:00",
      "itc_product_id": "subscription1",
      "name": "subscription1",
      "description": "subscription1",
      "duration": "365",
      "kiosks": [
        {
          "id": "72",
          "type": "appkiosk"
        }
      ]
    },
    {
      "id": "Xzb3GYb5dzimC3Ww",
      "create_date": "2015-01-27 09:58:17",
      "update_date": "0000-00-00 00:00:00",
      "itc_product_id": "subscription2",
      "name": "subscription2",
      "description": "subscription2",
      "duration": "93",
      "kiosks": [
        {
          "id": "72",
          "type": "appkiosk"
        }
      ]
    },
    {
      ...
    }
  ],
  "state": "success",
  "completed_in": "0.0316"
}
```


# Subscription


# Get

## Retrieve a subscription

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                                                                  | Default                                                                               |
| -------------- | ------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- |
| id             | required            | Integer   | One of your subscription ids                                                                                                                 |                                                                                       |
| return\_fields | optional            | String    | Customize the responses by setting the return fields (id, itc\_product\_id, name, description, duration, kiosks, create\_date, update\_date) | id, itc\_product\_id, name, description, duration, kiosks, create\_date, update\_date |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;id&#x20;

#### Optional parameters:

&#x20;return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/account/subscription.json?id=QOjiaWfWYWd7TBHE"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id' => 'QOjiaWfWYWd7TBHE'
);
$listSubscription = $yumpu->getSubscription($data);
print_r($listSubscription);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'QOjiaWfWYWd7TBHE'
};
yumpu.getSubscription(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"id=QOjiaWfWYWd7TBHE"};
System.out.println(y.getSubscription(params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
   "subscription": {
     "id": "QOjiaWfWYWd7TBHE",
     "create_date": "2015-01-27 13:21:37",
     "update_date": "0000-00-00 00:00:00",
     "itc_product_id": "subscription1",
     "name": "subscription1",
     "description": "subscription1",
     "duration": "365",
     "kiosks": [
       {
         "id": "72",
         "type": "appkiosk"
       }
     ]
   },
   "state": "success",
   "completed_in": "0.0434"
 }
```


# Post

## Create a new subscription

### Parameters:

| Name             | Optional / Required | Data type | Description                                                                                                               | Default |
| ---------------- | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- | ------- |
| itc\_product\_id | required            | String    | min. 5 characters, max. 255 characters                                                                                    |         |
| name             | required            | String    | min. 5 characters, max. 50 characters                                                                                     |         |
| duration         | required            | Integer   | 7, 31, 62, 93, 186 or 365 (days)                                                                                          |         |
| description      | optional            | String    | min. 5 characters, max. 255 characters                                                                                    |         |
| kiosks           | optional            | String    | One or multiple kiosk ids (webkiosk\_123 or webkiosk\_123,appkiosk\_456), values must start with webkiosk\_ or appkiosk\_ |         |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

&#x20;itc\_product\_id  name  duration&#x20;

#### Optional parameters:

&#x20;description  kiosks&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "itc_product_id=subscription6" -d "name=subscription6" -d "description=subscription6" -d "duration=62" -d "kiosks=webkiosk_25" "https://api.yumpu.com/2.0/account/subscription.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'itc_product_id' => 'subscription6',
    'name' => 'my subscription6 name',
    'duration' => 62,
    'description' => 'my subscription6 description',
    'kiosks' => 'webkiosk_25'
);
$postSubscription = $yumpu->postSubscription($data);
print_r($postSubscription);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  itc_product_id: 'subscription6',
  name: 'subscription6',
  description: 'subscription6'.
  duration: 62,
  kiosks: 'webkiosk_25'
};
yumpu.postSubscription(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"itc_product_id=subscription6", "name=subscription6", "duration=62", "description=subscription6" "kiosks=webkiosk_25"};
System.out.println(y.postSubscription(params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "subscription": {
    "id": "B7OxpT5ji53wLuR2",
    "create_date": "2015-02-03 12:34:18",
    "update_date": "0000-00-00 00:00:00",
    "itc_product_id": "subscription6",
    "name": "subscription6",
    "description": "subscription6",
    "duration": "62",
    "kiosks": [
      {
        "id": "25",
        "type": "webkiosk"
      }
    ]
  },
  "state": "success",
  "completed_in": "0.1439"
}
```


# Put

## Update an existing subscription

### Parameters:

| Name             | Optional / Required | Data type | Description                                                                                                               | Default |
| ---------------- | ------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------- | ------- |
| id               | required            | String    | One of your subscription ids                                                                                              |         |
| itc\_product\_id | required            | String    | min. 5 characters, max. 255 characters                                                                                    |         |
| name             | required            | String    | min. 5 characters, max. 50 characters                                                                                     |         |
| duration         | required            | Integer   | 7, 31, 62, 93, 186 or 365 (days)                                                                                          |         |
| description      | optional            | String    | min. 5 characters, max. 255 characters                                                                                    |         |
| kiosks           | optional            | String    | One or multiple kiosk ids (webkiosk\_123 or webkiosk\_123,appkiosk\_456), values must start with webkiosk\_ or appkiosk\_ |         |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X PUT -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=B7OxpT5ji53wLuR2" -d "itc_product_id=subscription6" -d "name=subscription6" -d "description=subscription6" -d "duration=365" -d "kiosks=webkiosk_25,webkiosk_1572" "https://api.yumpu.com/2.0/account/subscription.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'id' => 'B7OxpT5ji53wLuR2',
    'itc_product_id' => 'subscription6',
    'name' => 'subscription6',
    'duration' => 365,
    'description' => 'subscription6',
    'kiosks' => 'webkiosk_25,webkiosk_1572'
);
$putSubscription = $yumpu->putSubscription($data);
print_r($putSubscription);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'B7OxpT5ji53wLuR2',
  itc_product_id: 'subscription6',
  name: 'subscription6',
  description: 'subscription6'.
  duration: 365,
  kiosks: 'webkiosk_25,webkiosk_1572'
};
yumpu.putSubscription(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String[] params = {"id=B7OxpT5ji53wLuR2", "itc_product_id=subscription6", "name=subscription6", "duration=365", "description=subscription6", "kiosks=webkiosk_25,webkiosk_1572"};
System.out.println(y.putSubscription(params));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "subscription": {
    "id": "B7OxpT5ji53wLuR2",
    "create_date": "2015-02-03 12:34:18",
    "update_date": "2015-02-03 12:40:54",
    "itc_product_id": "subscription6",
    "name": "subscription6",
    "description": "subscription6",
    "duration": "365",
    "kiosks": [
      {
        "id": "25",
        "type": "webkiosk"
      },
      {
        "id": "1572",
        "type": "webkiosk"
      }
    ]
  },
  "state": "success",
  "completed_in": "0.0687"
}
```


# Delete

## Delete one subscription

### Parameters:

| Name | Optional / Required | Data type | Description                  | Default |
| ---- | ------------------- | --------- | ---------------------------- | ------- |
| id   | required            | String    | One of your subscription ids |         |

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X DELETE -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "id=B7OxpT5ji53wLuR2" "https://api.yumpu.com/2.0/account/subscription.json"
```

{% endtab %}

{% tab title="PHP" %}
Example:

```php
require_once('../yumpu.php');
$yumpu = new Yumpu();
$id = 'B7OxpT5ji53wLuR2';
$deleteSubscription = $yumpu->deleteSubscription($id);
print_r($deleteSubscription);
```

{% endtab %}

{% tab title="JavaScript" %}
Example:

```javascript
var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  id: 'B7OxpT5ji53wLuR2'
};
yumpu.deleteSubscription(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});
```

{% endtab %}

{% tab title="Java" %}
Example:

```java
Yumpu y = new Yumpu("your access token");
String id = "B7OxpT5ji53wLuR2";
System.out.println(y.deleteSubscription(id));
```

{% endtab %}
{% endtabs %}

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

```javascript
{
  "state": "success",
  "completed_in": "0.0407"
}
```


# APPKiosks


# Get

## Retrieve a list of your APPKiosks

### Parameters:

| Name           | Optional / Required | Data type | Description                                                                                 | Default                              |
| -------------- | ------------------- | --------- | ------------------------------------------------------------------------------------------- | ------------------------------------ |
| return\_fields | optional            | String    | Customize the responses by setting the return fields (id, create\_date, update\_date, name) | id, create\_date, update\_date, name |

### Demo

&#x20;URL Find your token on - [yumpu.com](https://www.yumpu.com/en/account/profile/api) Token&#x20;

#### Optional parameters:

return\_fields&#x20;

Add optional parametersRun request

```
```

{% tabs %}
{% tab title="curl" %}
Example:

```
curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "https://api.yumpu.com/2.0/appkiosks.json"
```

{% endtab %}
{% endtabs %}

The result will be:

```bash
{
  "total": 1,
  "appkiosks": [
    {
      "id": 1234,
      "create_date": "2021-06-25 08:42:32",
      "update_date": "2025-08-28 10:12:29",
      "name": "My APPKiosk"
    }
  ],
  "state": "success",
  "completed_in": 0.0283
}
```


