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

URL Find your token on - yumpu.com Token

name description

Optional parameters:

default iap kiosks

Add optional parametersRun request

curl
PHP
JavaScript
Java
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" "http://api.yumpu.com/2.0/account/access_tag.json"
PHP

Example:

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

Example:

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

Example:

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

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

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