A
A
API
Search…
Post

Create a new document hotspot

Parameters:

Name
Optional / Required
Data type
Description
Default
document_id
required
Integer
One of your document ids
page
required
String
Page number (1-X)
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, yumpu
settings[source_id]
optional
String
youtube: a valid youtube video id vimeo: a valid vimeo video id flickr: a valid flickr id
settings[source_ids]
optional
String
one or multiple media ids separated by a comma (example: GlKIWjJyWtg2XFKi,tFtOzlqZyqeaNkfw)
settings[source_url]
optional
String
soundcloud: a valid soundcloud url
settings[autoplay]
optional
String
y or n

Demo

URL Find your token on - yumpu.com Token
document_id page type settings[x] settings[y] settings[w] settings[h] settings[name] settings[tooltip]

Optional parameters:

settings[link] settings[source] settings[source_id] settings[source_ids] settings[source_url] settings[autoplay]
Add optional parametersRun request
1
Copied!
curl
PHP
JavaScript
Java
Example:
1
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]=http://www.google.com" "http://api.yumpu.com/2.0/document/hotspot.json"
Copied!
Example:
1
require_once('../yumpu.php');
2
$yumpu = new Yumpu();
3
$data = array(
4
'document_id' => '55919352',
5
'page' => '1',
6
'type' => 'link',
7
'settings' => array(
8
'x' => 100,
9
'y' => 100,
10
'w' => 20,
11
'h' => 20,
12
'name' => 'google.com',
13
'tooltip' => 'google.com',
14
'link' => 'https://www.yumpu.com'
15
)
16
);
17
$hotspot = $yumpu->postDocumentHotspot($data);
18
print_r($hotspot);
Copied!
Example:
1
var yumpu = require('yumpu');
2
yumpu.setToken('yourToken');
3
var parameters = {
4
document_id: 27109085,
5
page: 4,
6
type: 'link',
7
settings: {
8
x: 100,
9
y: 100,
10
w: 50,
11
h: 50,
12
name: 'google.com',
13
tooltip: 'google.com',
14
link: 'https://www.yumpu.com'
15
}
16
};
17
yumpu.postDocumentHotspot(parameters, function(statusCode, document){
18
console.log('Status: ' + statusCode);
19
console.log(document);
20
});
Copied!
Example:
1
Yumpu y = new Yumpu("your access token");
2
String[] params = {"document_id=27109085", "type=link", "page=4"};
3
String[] settings = {"x=100", "y=100", "w=50", "h=50", "name=google.com", "tooltip=google.com", "link=https://www.yumpu.com"};
4
System.out.println(y.postDocumentHotspot(params, settings));
Copied!
Whatever language you are using, the result will be the same.
1
{
2
"hotspot": [
3
{
4
"id": "5c905d027BHYFhLg",
5
"document_id": "27109085",
6
"page": "4",
7
"type": "link",
8
"settings": {
9
"x": "100",
10
"y": "100",
11
"w": "50",
12
"h": "50",
13
"name": "google.com",
14
"tooltip": "google.com",
15
"link": "https://www.yumpu.com"
16
},
17
"create_date": "2014-09-23 08:18:53",
18
"update_date": "0000-00-00 00:00:00"
19
}
20
],
21
"state": "success",
22
"completed_in": "0.1644"
23
}
Copied!
Last modified 2yr ago