A
A
API
Search…
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
f
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
outline_color
optional
String
Border color (hexadecimal value, 6 characters)
333333
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_powered_by
optional
String
Display "powered by" claim (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
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
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
background_color
optional
String
Hexadecimal value, 6 characters
253139
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_powered_by
optional
String
Display "powered by" claim (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

URL Find your token on - yumpu.com Token
document_id type
Run request
1
Copied!
curl
PHP
JavaScript
Java
Example:
1
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=http://www.yumpu.com" "http://api.yumpu.com/2.0/embed.json"
Copied!
Example:
1
require_once('../yumpu.php');
2
$yumpu = new Yumpu();
3
$data = array(
4
'document_id' => 11199,
5
'type' => 2,
6
'width' => 500,
7
'background_shape' => 'square',
8
'color' => 'grey',
9
'destination' => 'http://www.yumpu.com'
10
);
11
$postEmbed = $yumpu->postEmbed($data);
12
print_r($postEmbed);
Copied!
Example:
1
var yumpu = require('yumpu');
2
yumpu.setToken('yourToken');
3
var parameters = {
4
document_id: '11199',
5
type: 2,
6
width: 500,
7
background_shape: 'square',
8
color: 'grey',
9
destination: 'http://www.yumpu.com'
10
};
11
yumpu.postEmbed(parameters, function(statusCode, document){
12
console.log('Status: ' + statusCode);
13
console.log(document);
14
});
Copied!
Example:
1
Yumpu y = new Yumpu("your access token");
2
String[] params = {"document_id=11199", "type=2", "width=500", background_shape=square", color=grey", "destination=http://www.yumpu.com"};
3
System.out.println(y.postEmbed(params));
Copied!
Whatever language you are using, the result will be the same.
1
{
2
"embed": {
3
"id": "zKtHE23d6R0qT1rf",
4
"user_id": 10000,
5
"document_id": "11199",
6
"type": "4",
7
"create_date": "2014-12-03 10:57:49",
8
"code": "iframe",
9
"settings": {
10
"background_color": 253139,
11
"destination": "http://www.yumpu.com",
12
"download_pdf_enabled": 1,
13
"height": "100",
14
"start_page": 1,
15
"text_font_color": "0082b2",
16
"text_font_family": "ABeeZee:regular:latin",
17
"text_font_size": 14,
18
"text_font_style": "off",
19
"text_font_weight": "off",
20
"width": "100"
21
}
22
},
23
"state": "success",
24
"completed_in": "0.0665"
25
}
Copied!
Last modified 1yr ago