User options can be retrieved by groups, or through this endpoint that returns all user options in a single call.
Example JSON Output
{
"chart_filters":
[
{
"chart": "Mainstream Top 20",
"chartid": 24200,
"format": "POOL Audio Charts",
"show": 1
},
{
"chart": "Rock Top 20",
"chartid": 24204,
"format": "POOL Audio Charts",
"show": 1
},
{
"chart": "Country Top 20",
"chartid": 24297,
"format": "POOL Audio Charts",
"show": 1
},
{
"chart": "Urban Top 20",
"chartid": 25109,
"format": "POOL Audio Charts",
"show": 1
},
{
"chart": "Latin Top 20",
"chartid": 25114,
"format": "POOL Audio Charts",
"show": 1
},
{
"chart": "Dance/Club",
"chartid": 25119,
"format": "POOL Audio Charts",
"show": 1
}
],
"download_formats":
[
{
"extension": ".mp4",
"format": 1,
"index": 0,
"type": "SD 360p mp4"
},
{
"extension": ".mp4",
"format": 1,
"index": 1,
"type": "HD 720p mp4"
},
{
"extension": ".m4a",
"format": 2,
"index": 0,
"type": "Lossless m4a"
},
{
"extension": ".mp3",
"format": 2,
"index": 1,
"type": "320 kbps mp3"
},
{
"extension": ".wav",
"format": 2,
"index": 2,
"type": "Uncompressed wav"
}
],
"filenaming":
{
"file_name_01":
{
"0": null,
"1": "Title",
"2": "Artist",
"3": "Mix",
"4": "Duration",
"5": "BPM",
"6": "End",
"7": "Genre",
"8": "Label",
"9": "Release",
"10": "Order",
"11": "Date Sent",
"12": "Impact Date",
"13": "Content Warn",
"14": "Format",
"selected": 2
},
"file_name_01_modifier":
{
"0": null,
"1": "-",
"2": "_",
"3": "( )",
"4": "( ) - ",
"selected": 1
},
"file_name_02":
{
"0": null,
"1": "Title",
"2": "Artist",
"3": "Mix",
"4": "Duration",
"5": "BPM",
"6": "End",
"7": "Genre",
"8": "Label",
"9": "Release",
"10": "Order",
"11": "Date Sent",
"12": "Impact Date",
"13": "Content Warn",
"14": "Format",
"selected": 1
},
"file_name_02_modifier":
{
"0": null,
"1": "-",
"2": "_",
"3": "( )",
"4": "( ) - ",
"selected": 0
},
"file_name_03":
{
"0": null,
"1": "Title",
"2": "Artist",
"3": "Mix",
"4": "Duration",
"5": "BPM",
"6": "End",
"7": "Genre",
"8": "Label",
"9": "Release",
"10": "Order",
"11": "Date Sent",
"12": "Impact Date",
"13": "Content Warn",
"14": "Format",
"selected": 3
},
"file_name_03_modifier":
{
"0": null,
"1": "-",
"2": "_",
"3": "( )",
"4": "( ) - ",
"selected": 3
},
"file_name_04":
{
"0": null,
"1": "Title",
"2": "Artist",
"3": "Mix",
"4": "Duration",
"5": "BPM",
"6": "End",
"7": "Genre",
"8": "Label",
"9": "Release",
"10": "Order",
"11": "Date Sent",
"12": "Impact Date",
"13": "Content Warn",
"14": "Format",
"selected": 0
},
"file_name_04_modifier":
{
"0": null,
"1": "-",
"2": "_",
"3": "( )",
"4": "( ) - ",
"selected": 0
},
"file_name_05":
{
"0": null,
"1": "Title",
"2": "Artist",
"3": "Mix",
"4": "Duration",
"5": "BPM",
"6": "End",
"7": "Genre",
"8": "Label",
"9": "Release",
"10": "Order",
"11": "Date Sent",
"12": "Impact Date",
"13": "Content Warn",
"14": "Format",
"selected": 0
},
"file_name_05_modifier":
{
"0": null,
"1": "( )",
"selected": 0
},
"file_name_caps": 0,
"file_name_spaces": 1
},
"filters":
[
{
"filter": "Top 40",
"hide": 0,
"id": 1
},
{
"filter": "Urban",
"hide": 0,
"id": 2
},
{
"filter": "Electronic",
"hide": 0,
"id": 3
},
{
"filter": "Dance",
"hide": 0,
"id": 4
},
{
"filter": "Latin",
"hide": 0,
"id": 5
},
{
"filter": "Country",
"hide": 0,
"id": 6
},
{
"filter": "Rock",
"hide": 0,
"id": 7
},
{
"filter": "Christian",
"hide": 0,
"id": 8
},
{
"filter": "Audio",
"hide": 0,
"id": 9
},
{
"filter": "Video",
"hide": 1,
"id": 10
},
{
"filter": "HD",
"hide": 0,
"id": 11
},
{
"filter": "Content Warnings",
"hide": 0,
"id": 12
},
{
"filter": "Only Singles",
"hide": 0,
"id": 13
},
{
"filter": "Alternative",
"hide": 0,
"id": 14
},
{
"filter": "Specialty Releases",
"hide": 0,
"id": 15
},
{
"filter": "Show Explicit Content",
"hide": 0,
"id": 16
},
{
"filter": "Show Noteworthy Only",
"hide": 1,
"id": 17
}
],
"format_filters":
[
{
"format": "Alternative Video",
"id": 68,
"show": 1,
"type": 1
},
{
"format": "Club Video",
"id": 5,
"show": 1,
"type": 1
},
{
"format": "Country Video",
"id": 4,
"show": 1,
"type": 1
},
{
"format": "Dance Mix Video",
"id": 3,
"show": 1,
"type": 1
},
{
"format": "Express Video",
"id": 14,
"show": 1,
"type": 1
},
{
"format": "Hits HD",
"id": 67,
"show": 1,
"type": 1
},
{
"format": "Hot Video",
"id": 1,
"show": 1,
"type": 1
},
{
"format": "Hot Video Classics",
"id": 9,
"show": 1,
"type": 1
},
{
"format": "Latin Video",
"id": 6,
"show": 1,
"type": 1
},
{
"format": "Modern Rock Video",
"id": 7,
"show": 1,
"type": 1
},
{
"format": "Specialty Discs",
"id": 59,
"show": 1,
"type": 1
},
{
"format": "Urban Video",
"id": 8,
"show": 1,
"type": 1
},
{
"format": "Alternative Club",
"id": 23,
"show": 1,
"type": 2
},
{
"format": "Caribbean Series",
"id": 35,
"show": 1,
"type": 2
},
{
"format": "Contemporary Christian",
"id": 28,
"show": 1,
"type": 2
},
{
"format": "Country Radio",
"id": 17,
"show": 1,
"type": 2
},
{
"format": "Dance Radio",
"id": 38,
"show": 1,
"type": 2
},
{
"format": "Express Audio DFF",
"id": 63,
"show": 1,
"type": 2
},
{
"format": "Express Audio - DJ Tools",
"id": 93,
"show": 1,
"type": 2
},
{
"format": "Mainstream Club",
"id": 19,
"show": 1,
"type": 2
},
{
"format": "Mainstream Radio",
"id": 15,
"show": 1,
"type": 2
},
{
"format": "Modern Rock Radio",
"id": 18,
"show": 1,
"type": 2
},
{
"format": "POOL Single Audio",
"id": 62,
"show": 1,
"type": 2
},
{
"format": "Pop Latin",
"id": 27,
"show": 1,
"type": 2
},
{
"format": "Regional Latin",
"id": 26,
"show": 1,
"type": 2
},
{
"format": "Rhythm Club",
"id": 20,
"show": 1,
"type": 2
},
{
"format": "Rhythm Radio",
"id": 31,
"show": 1,
"type": 2
},
{
"format": "Tropical Latin",
"id": 25,
"show": 1,
"type": 2
},
{
"format": "Underground Club",
"id": 22,
"show": 1,
"type": 2
},
{
"format": "Urban Club",
"id": 24,
"show": 1,
"type": 2
},
{
"format": "Urban Radio",
"id": 16,
"show": 1,
"type": 2
}
],
"media_filters":
[
{
"filter": "Audio",
"hide": 0,
"mode": "hide_audio",
"type": "media"
},
{
"filter": "HD Video",
"hide": 0,
"mode": "hide_hd",
"type": "media"
},
{
"filter": "Specialty",
"hide": 0,
"mode": "hide_specialty",
"type": "media"
},
{
"filter": "Hide Content with a Warning",
"hide": 0,
"mode": "hide_content_warn",
"type": "misc"
},
{
"filter": "Hide Content marked as Explicit",
"hide": 0,
"mode": "hide_explicit",
"type": "misc"
},
{
"filter": "Hide all single releases",
"hide": 0,
"mode": "hide_singles",
"type": "misc"
},
{
"filter": "Show only audio singles",
"hide": 0,
"mode": "show_only_singles",
"type": "misc"
}
],
"report_programs":
[
{
"extension": "session",
"id": 1,
"program": "Serato DJ",
"select": 1
},
{
"extension": "session",
"id": 2,
"program": "Serato Scratch LIVE",
"select": 0
},
{
"extension": "nml",
"id": 3,
"program": "Traktor",
"select": 0
},
{
"extension": "txt",
"id": 4,
"program": "Virtual DJ",
"select": 0
},
{
"extension": "edb",
"id": 5,
"program": "rekordbox",
"select": 0
}
],
"user_info":
{
"caps_space": "0,0,0,0,0,0",
"company": "Promo Only",
"dj_alias": "POOL User",
"dj_program": 1,
"dj_types":
[
{
"id": 9,
"selected": 0,
"type": "Bars"
},
{
"id": 3,
"selected": 1,
"type": "Bowling Alleys"
},
{
"id": 6,
"selected": 0,
"type": "Clubs"
},
{
"id": 7,
"selected": 0,
"type": "Corporate Events"
},
{
"id": 10,
"selected": 0,
"type": "Festivals"
},
{
"id": 14,
"selected": 0,
"type": "Gentlemen's Clubs"
},
{
"id": 8,
"selected": 0,
"type": "Mitzvahs"
},
{
"id": 1,
"selected": 1,
"type": "Mobile DJ"
},
{
"id": 11,
"selected": 0,
"type": "Radio"
},
{
"id": 5,
"selected": 1,
"type": "School Dances"
},
{
"id": 2,
"selected": 1,
"type": "Skating Rinks"
},
{
"id": 13,
"selected": 0,
"type": "Social Events"
},
{
"id": 12,
"selected": 1,
"type": "Sporting Events"
},
{
"id": 4,
"selected": 0,
"type": "Weddings"
}
],
"dj_types_indexes": "3,1,5,2,12",
"download_location": "/Users/test/Music/pool",
"duplicate_files_index": 1,
"duplicate_option": 1,
"file_naming": "2,1,1,0,3,3,1,0,0,1,0,0,0",
"format_audio": 1,
"format_video": 1,
"hide_singles": 0,
"industry": "Radio/Broadcast",
"last_login": "Mon, 06 Apr 2020 16:51:12 GMT",
"last_update": "Mon, 06 Apr 2020 16:51:21 GMT",
"name_first": "POOL",
"name_last": "Test",
"no_duplicates": 0,
"notify_frequency": 2000,
"phone": "407-331-3600",
"report_opt": 1,
"session_location": "/Users/test/Music/_Serato_/History/Sessions",
"title": "POOL Test Account",
"userid": 1
}
}
PHP (using cURL):
<?php
$userid = 1;
$token = "8b26e1e4f3f5e00a888807e605565c47";
$api_url = "https://api.promoonly.com/user/options";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_url);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Authorization: Bearer ".base64_encode($userid.":".$token)));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$api_result = curl_exec($ch);
curl_close($ch);
$api_obj = json_decode($api_result);
?>
Javascript (using jQuery):
function b64EncodeUnicode(str)
{
return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,
function toSolidBytes(match, p1)
{
return String.fromCharCode('0x' + p1);
}));
}
var userid = 1;
var token = "8b26e1e4f3f5e00a888807e605565c47";
var auth_str = "Bearer " + b64EncodeUnicode(userid + ":" + token);
$.ajax({
type: "GET",
url: "https://api.promoonly.com/user/options",
headers: { "Authorization": auth_str },
dataType: "json",
success: function (data)
{
console.log(data);
}
});
Python (using requests):
#!/usr/bin/env python
import requests
import base64
import urllib
userid = 1
token = "8b26e1e4f3f5e00a888807e605565c47"
b64_key = base64.b64encode("%s:%s" % (userid, token))
headers = {"Authorization": "Bearer %s" % b64_key}
api_url = "https://api.promoonly.com/user/options"
result_return = requests.get(api_url, headers=headers)
print(result_return.text)