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_

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

Example:

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

Example:

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

Example:

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

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