Create a new subscription

Parameters:

Name Optional / Required Data type Description Default
itc_product_id required String min. 5 characters, max. 255 characters
name required String min. 5 characters, max. 50 characters
duration required Integer 7, 31, 62, 93, 186 or 365 (days)
description optional String min. 5 characters, max. 255 characters
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
itc_product_id
name
duration

Optional parameters:

description
kiosks
Add optional parameters
Run request

Example:

curl -X POST -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" -d "itc_product_id=subscription6" -d "name=subscription6" -d "description=subscription6" -d "duration=62" -d "kiosks=webkiosk_25" "http://api.yumpu.com/2.0/account/subscription.json"

Example:

require_once('../yumpu.php');
$yumpu = new Yumpu();
$data = array(
    'itc_product_id' => 'subscription6',
    'name' => 'my subscription6 name',
    'duration' => 62,
    'description' => 'my subscription6 description',
    'kiosks' => 'webkiosk_25'
);
$postSubscription = $yumpu->postSubscription($data);
print_r($postSubscription);

Example:

var yumpu = require('yumpu');
yumpu.setToken('yourToken');
var parameters = {
  itc_product_id: 'subscription6',
  name: 'subscription6',
  description: 'subscription6'.
  duration: 62,
  kiosks: 'webkiosk_25'
};
yumpu.postSubscription(parameters, function(statusCode, document){
   console.log('Status: ' + statusCode);
   console.log(document);
});

Example:

Yumpu y = new Yumpu("your access token");
String[] params = {"itc_product_id=subscription6", "name=subscription6", "duration=62", "description=subscription6" "kiosks=webkiosk_25"};
System.out.println(y.postSubscription(params));

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

{
  "subscription": {
    "id": "B7OxpT5ji53wLuR2",
    "create_date": "2015-02-03 12:34:18",
    "update_date": "0000-00-00 00:00:00",
    "itc_product_id": "subscription6",
    "name": "subscription6",
    "description": "subscription6",
    "duration": "62",
    "kiosks": [
      {
        "id": "25",
        "type": "webkiosk"
      }
    ]
  },
  "state": "success",
  "completed_in": "0.1439"
}

results matching ""

    No results matching ""