Every POOL Account is indexed with an integer identifier. Whenever POOL User ID is referenced, this refers to your individual ID number. You can find out what your POOL User ID is by submitting your email address in a POST variable named "email" to the endpoint: https://api.promoonly.com/account/pool_userid.
Example JSON Output:
{
"pool_userid": 1
}
- OR -
{
"pool_userid": "Invalid email address. POOL Account not found."
}
PHP (using cURL):
<?php
$post_fields = "email=test@promoonly.com";
$userid_url = "https://api.promoonly.com/account/pool_userid";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $userid_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_fields);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$userid_result = curl_exec($ch);
curl_close($ch);
$userid_obj = json_decode($userid_result);
?>
Javascript (using jQuery):
$.ajax({
type: "POST",
url: "https://api.promoonly.com/account/pool_userid",
data: { email: "test@promoonly.com" },
dataType: "json",
success: function (data)
{
console.log(data);
}
});
Python (using requests):
#!/usr/bin/env python
import requests
import urllib
user_data = { "email": "test@promoonly.com" }
userid_url = "https://api.promoonly.com/account/pool_userid"
userid_result = requests.post(userid_url, data=user_data)
print(userid_result.text)