Appendix: POOL User ID

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.

POOL User ID Specifications:

Parameters: POST variables:
  1. email: Correctly formatted email address
Header variables:
  1. None
Data returned:

User ID Work Flow:

  1. URL: https://api.promoonly.com/account/pool_userid
  2. Header: none
  3. Method: POST
  4. POST Variables:
    • email: EMAIL ADDRESS
  5. Returned: JSON

    Example JSON Output:

    {
        "pool_userid": 1
    }
    - OR -
    {
        "pool_userid": "Invalid email address. POOL Account not found."
    }

Examples

  1. 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);
    ?>
  2. 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);
        }
    });
  3. 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)