Get

Retrieve a list of our categories

Demo

URL Find your token on - yumpu.com Token

Run request

‚Äč
curl
PHP
JavaScript
Java
curl

Example:

curl -X GET -H "X-ACCESS-TOKEN: YOUR_ACCESS_TOKEN" "http://api.yumpu.com/2.0/document/categories.json"
PHP

Example:

require_once('../yumpu.php');
$yumpu = new Yumpu();
$categories = $yumpu->getCategories();
print_r($categories);
JavaScript

Example:

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

Example:

Yumpu y = new Yumpu("your access token");
System.out.println(y.getCategories());

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

{
"total": 22,
"categories": [
{
"id": 0,
"name": "None"
},
{
"id": 1,
"name": "Auto & Vehicles"
},
{
"id": 2,
"name": "Business & Marketing"
},
{
"id": 18,
"name": "Cooking, Food & Wine"
},
{
"id": 3,
"name": "Creative"
},
{
"id": 23,
"name": "Fashion"
},
{
"id": 4,
"name": "Film & Music"
},
{
"id": 5,
"name": "Fun & Entertainment"
},
{
"id": 19,
"name": "Health & Beauty"
},
{
"id": 6,
"name": "Hobby & Home"
},
{
"id": 20,
"name": "Home & Garden"
},
{
"id": 21,
"name": "Humor & Fun"
},
{
"id": 7,
"name": "Knowledge & Resources"
},
{
"id": 8,
"name": "Nature & Animals"
},
{
"id": 9,
"name": "News & Politics"
},
{
"id": 10,
"name": "Nonprofits & Activism"
},
{
"id": 11,
"name": "Religion & Philosophy"
},
{
"id": 22,
"name": "Shopping & Lifestyle"
},
{
"id": 12,
"name": "Sports"
},
{
"id": 13,
"name": "Technology & Internet"
},
{
"id": 14,
"name": "Travel & Events"
},
{
"id": 15,
"name": "Weird & Bizarre"
}
],
"state": "success",
"completed_in": 0.0141
}