Get

Retrieve a subscription

Parameters:

Name

Optional / Required

Data type

Description

Default

id

required

Integer

One of your subscription ids

return_fields

optional

String

Customize the responses by setting the return fields (id, itc_product_id, name, description, duration, kiosks, create_date, update_date)

id, itc_product_id, name, description, duration, kiosks, create_date, update_date

Demo

URL Find your token on - yumpu.com Token

id

Optional parameters:

return_fields

Add optional parametersRun request

curl
PHP
JavaScript
Java
curl

Example:

curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "http://api.yumpu.com/2.0/account/subscription.json?id=QOjiaWfWYWd7TBHE"
PHP

Example:

require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
'id' => 'QOjiaWfWYWd7TBHE'
);
$listSubscription = $yumpu->getSubscription($data);
print_r($listSubscription);
JavaScript

Example:

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

Example:

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

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

{
"subscription": {
"id": "QOjiaWfWYWd7TBHE",
"create_date": "2015-01-27 13:21:37",
"update_date": "0000-00-00 00:00:00",
"itc_product_id": "subscription1",
"name": "subscription1",
"description": "subscription1",
"duration": "365",
"kiosks": [
{
"id": "72",
"type": "appkiosk"
}
]
},
"state": "success",
"completed_in": "0.0434"
}