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

Was this helpful?

  1. API
  2. Document

Get

PreviousDocumentNextPost file

Last updated 9 days ago

Was this helpful?

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

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. Accepted values: 60 (1 minute) to 31536000 (1 year). If not provided, the default is 7200 seconds (2 hours).

7200

Demo

URL Find your token on - Token

id

Optional parameters:

return_fields

Add optional parametersRun request

Example:

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

Example:

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);

Example:

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

Example:

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

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

{
  "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
}
yumpu.com