ONEcount API Documentation

Last modified by Admin User on 2024/04/29 14:06

Introduction

ONEcount REST API is designed to allow you to directly manipulate the underlying data within the ONEcount application. This API can be used to lookup, create and update different ONEcount data components which are listed below.

REST takes advantage of the HTTP request methods to layer itself into the existing HTTP architecture. These operations consist of the following:

GET - Used for lookup of resources

  1. PUT - Used to update a resource

  2. POST - Used to create a new resource

Specifically, the ONEcount API provides to the following components:

  1. User data
    1. List users
    2. Lookup users
    3. Create users
    4. Update users
  2. Questions
    1. Lookup questions
    2. List questions
    3. Create questions
  3. Product data
    1. Lookup products
    2. Create products
    3. Update products
  4. Term Data
    1. Lookup terms
    2. Create terms
    3. Update terms
  5. Resource Data
    1. Lookup resources
    2. Create resources
    3. Update resources
  6. Transaction data
    1. Lookup transactions
    2. Create transactions
  7. Source Codes
    1. Lookup source code
    2. Create source codes
    3. Update source codes
  8. Attach a resource to a product
  9. Leads
    1. Create a lead
  10. Engagements
    1. Get all Engagements
    2. Get specific engagement by engagement id
    3. Create Engagements
    4. Update Engagements
    5. Add options to metric for an engagement
    6. Add users data to Engagement
  11. Segments
    1. Get all Segments
    2. Get specific segment by segment id
    3. Add users to segment
    4. Get all segment ids for a user

Accessing API

REST API URL: https://api.onecount.net/v2/

Appkey: THIS WILL BE PROVIDED TO YOU

Your HTTP requests to a REST API resource should contain the following information:

  • An HTTP method GET, POST, PUT.

  • An Appkey sent as Appkey header in the http request to authenticate the request.

  • Resource name in the url (/resourcename)

  • Any JSON data or JSON files containing information needed for requests, such as updating a record with new information.

General API Usage

The request data in POST (for create and update) will consist of request parameters required by each method in JSON format. Value of resource will determine which resource is being requested and the access method will determine whether you are trying to create, update or lookup that resource.

For lookup, the parameter list will be part of the request url.

Response

API will output the response in a JSON format discussed below.

Response
{
  "result": {
    "success": "1",
    "error": {
      "code": "0",
      "message": ""
    }
  },
  "Users": {
    "Id": "12562",
    "PartnerId": "5467",
    "Demo": {
      "6": "Rayaan",
      "7": "Ahmed"
    }
  }
}

The result of the api request will be determined by the value of the success property of result object. Here the value of success will either be 1 (true) or 0 (false) depending on whether the requested action succeed.

If value of success is 0 then an error will be generated inside the result object. Code property will have an error code. message property will have the details about the error. This value might be used to display the error in the client application. The response will always have a result object in it plus the individual response listed for each method.

If the value of success is 1 then the response parameters of the called method will also be output.

For GET requests we can pass limit as parameter in URL.

COMPONENT: Users

Users means the customers of your system. Users can be added, updated and searched for using the users resource from the api. For lookup, If a return parameter is specified Users JSON object will have those fields. If nothing is specified by default only UserId is returned.

Additionally (Array of) transaction object specifying parts of the transaction to be added to the new user can be specified. UserId, TransactionId and SubscriptionType will be ignored if specified for this case. As this is new user and new transaction is being added.

In this case the provided demographic information in users JSON object will be used to create a new user in ONEcount and then a response will be generated. Before creating a new user, a check for duplicate will be performed based on Dedupe columns and if found, and error code will be generated.

If username and password is not one of the parameters being passed, then a random username and password will be generated for the user while creating his user account in ONEcount.

Return parameter will have the comma separated list of question Ids that is requested back from the API.

Return is an optional parameter in request. If return is not requested then by default, only UserId (which is ONEcount ID) will be returned in the Users object.

Method

Url

Action

GET

/users

Get users data limiting 25.

GET

/users/<ocid or ocid_hash>

Get data for user id 1. The user id can be a numeric value or a hash

GET

/users/lookup?1=user1@email.com&return=1,2

Lookup for user whose question id (1) is equal to supplied value. The users object returned will have value of questions 1 & 2. Here for example assumed to be firstname and last name.

Return parameter defines a CSV of question id that are requested back in response.

POST

/users

Create a new users

Parameters required to create the user needs to be sent as post data in JSON format. Below is the example of data

Example:

{"Users":{"PartnerId":1,"Demo":{"1":"rayaan@onecount.net","4":"Rayaan","5":"Ahmed"}},"DedupeColumns":"1","Transactions":[],"Return":"4,5,1"}

1) PartherId is required, this can be any integer value.

2) Demo is required it contains JSON object of user demographic information key as demo id and value as actual information of user.

3) DedupeColumn is required, this contains demo id as value, used to check duplicate user based on demo id.

4) Transactions is required, If user does not have any transaction pass empty array if user has a transaction pass transaction JSON object. please refer transaction API body for JSON object.
 

PUT

/users/1

Update user id 1. The user id can be a numeric value or a hash

Parameters required to update the user needs to be sent as post data in JSON format.

GET

/users/1/partners/2

Get user id 1 and partner id 2's ONEcount hash. The user id can be a numeric value or a hash.

POST

/users/login

Check to see user exist with username/email and password.

Parameters required to create JSON object with u as username, e as email and p as password and sent is as POST param.

Example:

{"u":"abc@one-count.com","e":"abc@one-count.com","p":"1234"}

OR

{"u":"abc@one-count.com","p":"1234"}

OR

{"e":"abc@one-count.com","p":"1234"}

OUTPUT : Should get OCID of the user if it finds it otherwise get and error with msg user not found.

GET All Users



Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get All Users Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/users',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get All Users Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Users": [
        {
            "Id": 10,
            "OCID_HASH": "309d0ba643ac9cf164fa7089db622444fb82bf031c79ebb97c8566d0b91a224c",
            "Demo": {
                "1": "ORISH+IMNG12373@gcnmedia.com",
                "2": "user_26_2",
                "3": "pass_262",
                "4": "orish123"
            }
        },
        {
            "Id": 26,
            "OCID_HASH": "362b0815ab579017802c0539fa30d45c46f2e357025756e3a998225aa2c3f123",
            "Demo": {
                "1": "ORISH+IMNG12374@gcnmedia.com",
                "2": "user_82_2",
                "3": "pass_822",
                "4": "orish111"
            }
        },
        {
            "Id": 34,
            "OCID_HASH": "508ae86cfa9185a59a855b6f0aaf1ef52e1895c7a7bd1ee01d1f7be82ea233d2",
            "Demo": {
                "1": "",
                "2": "user_1405614567717",
                "3": "",
                "4": "sonish",
                "5": "shrestha",
                "6": "Test",
                "7": "GCN",
                "8": "Sterling",
                "9": "Norwalk",
                "10": "",
                "11": "",
                "12": "",
                "13": "Nepa",
                "14": "",
                "15": ""
            }
        },
        {
            "Id": 42,
            "OCID_HASH": "3fd11fb98076330290d14edd70265c273eaf5ad72e498fc9ac4f2b580a2f36cc",
            "Demo": {
                "1": "orish@gcnpublishing.com",
                "2": "user_106_42",
                "3": "f5a622347842b9384cae63bb998f2aa19aea2ebc43fa2f00800e9accd85a8dd1",
                "4": "Orish",
                "5": "Shrestha",
                "6": "Director of Engineering",
                "7": "ONEcount",
                "8": "194 Main Street",
                "9": "Suite 2NW",
                "10": "Norwalk",
                "11": "CT",
                "12": "06851",
                "13": "",
                "15": "",
                "106": "",
                "114": "",
                "130": "",
                "138": "",
                "146": "",
                "234": "",
                "242": "",
                "250": ""
            }
        },
        {
            "Id": 50,
            "OCID_HASH": "88d721f543c79f8ea718d9020897c9036d1d303099a649585f6d4c37e354c5d3",
            "Demo": {
                "1": "sundeep@gcnpublishing.com",
                "2": "",
                "3": "",
                "4": "Sundeep",
                "5": "Dangol",
                "6": "Director of Integrations",
                "7": "ONEcount",
                "8": "194 Main Street",
                "9": "Suite 2NW",
                "10": "Norwalk",
                "11": "CT",
                "12": "06851",
                "13": "",
                "15": "",
                "106": "",
                "114": "",
                "130": "",
                "138": "",
                "146": "",
                "234": "",
                "242": ""
            }
        },
        {
            "Id": 58,
            "OCID_HASH": "c45f5d1d27364ee19973148d6c02999cbfbc8b2ca80f7655dd6a873b864eb211",
            "Demo": {
                "1": "sean@gcnpublishing.com",
                "2": "user_106_34",
                "3": "pass_10634",
                "4": "Sean",
                "5": "Fulton",
                "6": "Vice President",
                "7": "ONEcount",
                "8": "194 Main Street",
                "9": "Suite 2NW",
                "10": "Norwalk",
                "11": "CT",
                "12": "06851",
                "13": "UNITED STATES"
            }
        },
        {
            "Id": 66,
            "OCID_HASH": "f037520f7af46301532a95b39d8fd8e607988afe3c7b67f086740e6676775bee",
            "Demo": {
                "1": "joanne@gcnpublishing.com",
                "2": "user_106_2",
                "3": "c55b18c5a4e475034ccc8cd14e132e1fd7e2aadcd8dcc625996ba51d145f160e",
                "4": "Joanne",
                "5": "Persico",
                "6": "President",
                "7": "ONEcount",
                "8": "194 Main Street",
                "9": "Suite 2NW",
                "10": "Norwalk",
                "11": "CT",
                "12": "06851",
                "13": "UNITED STATES",
                "234": "",
                "242": "",
                "250": ""
            }
        },
        {
            "Id": 74,
            "OCID_HASH": "abb8adfb275030ad96808967edea5003e3ed9da5965b6d8f4537597dff17af4f",
            "Demo": {
                "1": "melanie@gcnpublishing.com",
                "2": "user_106_18",
                "3": "pass_10618",
                "4": "Melanie",
                "5": "Mason",
                "6": "Director of  Customer Experience",
                "7": "ONEcount",
                "8": "194 Main Street",
                "9": "Suite 2NW",
                "10": "Norwalk",
                "11": "CT",
                "12": "06851",
                "13": "UNITED STATES",
                "14": "",
                "15": "",
                "106": "",
                "114": "",
                "130": "",
                "138": "",
                "146": "",
                "154": "",
                "162": "",
                "170": "",
                "178": "",
                "186": "",
                "202": "",
                "218": "",
                "226": "",
                "234": "",
                "242": "",
                "250": ""
            }
        },
        {
            "Id": 82,
            "OCID_HASH": "6b2635a195d46e9df53ec6069d198fa0fe26d26111c0b71b9bc39652935f6034",
            "Demo": {
                "1": "doug@gcnpublishing.com",
                "2": "user_106_58",
                "3": "pass_10658",
                "4": "Doug",
                "5": "LaFarge",
                "7": "ONEcount",
                "8": "194 Main Street",
                "9": "Suite 2NW",
                "10": "Norwalk",
                "11": "CT",
                "12": "06851",
                "13": "UNITED STATES"
            }
        },
        {
            "Id": 90,
            "OCID_HASH": "869434d36ef71f8244c5eacaac35cb87d9ee16f3c8bbeddaddb87869588deb52",
            "Demo": {
                "1": "subash@gcnpublishing.com",
                "2": "user_106_50",
                "3": "pass_10650",
                "4": "Subash",
                "5": "Tamang",
                "7": "ONEcount",
                "8": "194 Main Street",
                "9": "Suite 2NW",
                "10": "Norwalk",
                "11": "CT",
                "12": "06851",
                "13": "UNITED STATES"
            }
        },
        {
            "Id": 98,
            "OCID_HASH": "f46e4d07d8c2aede8e3f0b4d30cf984f9ce507147b75cff17315642d456d7cca",
            "Demo": {
                "1": "sonish@gcnpublishing.com",
                "2": "user_106_10",
                "3": "pass_10610",
                "4": "Sonishs",
                "5": "Shrestha",
                "8": "334 Street",
                "10": "Ashburn",
                "11": "VA",
                "12": "11118",
                "13": "United States"
            }
        },
        {
            "Id": 162,
            "OCID_HASH": "86616a428abeabe722079cb29ffd3b76341aa7895b2bd3579dfd89e01a737f0c",
            "Demo": {
                "1": "orish+1@gcnpublishing.com",
                "2": "user_130_42",
                "3": "pass_13042",
                "4": "OrishGCN",
                "5": "Shrestha",
                "8": "123 street",
                "10": "New Rochelle",
                "11": "NY",
                "12": "11111",
                "13": "United States"
            }
        },
        {
            "Id": 170,
            "OCID_HASH": "3fb40dbcd3c0ca47fd3a80f5a34290c68a2e7ff79d4d8f28b388677bea2df2ac",
            "Demo": {
                "1": "sundeep+1@gcnpublishing.com",
                "2": "user_130_26",
                "3": "pass_13026",
                "4": "SundeepGCN",
                "5": "Dangol",
                "8": "456 Street",
                "10": "Bridgeport",
                "11": "CT",
                "12": "11112",
                "13": "United States"
            }
        },
        {
            "Id": 178,
            "OCID_HASH": "ca72068a59896a3cec1faf52a4701d13b539039467cbe9d5d9b60b54e263040f",
            "Demo": {
                "1": "sean+1@gcnpublishing.com",
                "2": "user_130_34",
                "3": "pass_13034",
                "4": "SeanGCN",
                "5": "Fulton",
                "8": "222 Street",
                "10": "Norwalk",
                "11": "CT",
                "12": "11113",
                "13": "United States"
            }
        },
        {
            "Id": 186,
            "OCID_HASH": "4b643f02f3d30d0b6ae465b4d758a721574e798712c3d42bd5458a1fd5634243",
            "Demo": {
                "1": "joanne+1@gcnpublishing.com",
                "2": "user_130_2",
                "3": "pass_1302",
                "4": "JoanneGCN",
                "5": "Persico",
                "8": "222 Street",
                "10": "Norwalk",
                "11": "CT",
                "12": "11114",
                "13": "United States"
            }
        },
        {
            "Id": 194,
            "OCID_HASH": "d3200217585d2d954e0b55ee9ff1c939f265067420ff82c6e924dcdd71ccc960",
            "Demo": {
                "1": "melanie+1@gcnpublishing.com",
                "2": "user_130_18",
                "3": "pass_13018",
                "4": "MelanieGCN",
                "5": "Mason",
                "6": "",
                "7": "",
                "8": "345 Street",
                "9": "",
                "10": "Norwalk",
                "11": "CT",
                "12": "11115",
                "13": "United States",
                "14": "",
                "15": "",
                "106": "",
                "114": "",
                "130": "",
                "138": "",
                "146": "",
                "154": "",
                "162": "",
                "170": "",
                "178": "",
                "186": "",
                "202": "",
                "218": "",
                "226": "",
                "234": "",
                "242": "",
                "250": "",
                "266": "01"
            }
        },
        {
            "Id": 202,
            "OCID_HASH": "a7c7d5016322340c4394538d68f601a0720e70850091387114963aba0f1bae09",
            "Demo": {
                "1": "doug+1@gcnpublishing.com",
                "2": "user_130_58",
                "3": "pass_13058",
                "4": "DougGCN",
                "5": "La Farge",
                "8": "849 Street",
                "10": "Tuson",
                "11": "AZ",
                "12": "11116",
                "13": "United States"
            }
        },
        {
            "Id": 210,
            "OCID_HASH": "f0f0d59478e9a4aa9b0fad6ae5bfc4292a169f899135e8c4d16cada9e9dc267d",
            "Demo": {
                "1": "subash+1@gcnpublishing.com",
                "2": "user_130_50",
                "3": "pass_13050",
                "4": "SubashGCN",
                "5": "Tamang",
                "8": "112 Street",
                "10": "Herndon",
                "11": "VA",
                "12": "11117",
                "13": "United States"
            }
        },
        {
            "Id": 218,
            "OCID_HASH": "4939a3be6dfd79c715a1144d82815f2abe8e413d04e4311284a05610589ad87b",
            "Demo": {
                "1": "sonish+1@gcnpublishing.com",
                "2": "user_130_10",
                "3": "pass_13010",
                "4": "SonishGCN",
                "5": "Shrestha",
                "8": "334 Street",
                "10": "Reston",
                "11": "VA",
                "12": "11118",
                "13": "United States"
            }
        },
        {
            "Id": 282,
            "OCID_HASH": "44421a4b109b0f5eb412b29e0037df61aae9ea95003d73f0175e5d6db8c0f928",
            "Demo": {
                "1": "orish+11@gcnpublishing.com",
                "2": "user_138_42",
                "3": "pass_13842",
                "4": "OrishGCN",
                "5": "Shrestha",
                "8": "123 street",
                "10": "New Rochelle",
                "11": "NY",
                "12": "11111",
                "13": "United States"
            }
        },
        {
            "Id": 290,
            "OCID_HASH": "971c357d4808224595f83a30bba9f05d1118bd7fd4f1d51160cad57dfd6b2137",
            "Demo": {
                "1": "sundeep+11@gcnpublishing.com",
                "2": "user_138_26",
                "3": "pass_13826",
                "4": "SundeepGCN",
                "5": "Dangol",
                "8": "456 Street",
                "10": "Bridgeport",
                "11": "CT",
                "12": "11112",
                "13": "United States"
            }
        },
        {
            "Id": 298,
            "OCID_HASH": "4fa0426afe48ee79602e9c47dda1987797b1983ecaa5975a09885ac4480f5033",
            "Demo": {
                "1": "sean+11@gcnpublishing.com",
                "2": "user_138_34",
                "3": "pass_13834",
                "4": "SeanGCN",
                "5": "Fulton",
                "8": "222 Street",
                "10": "Norwalk",
                "11": "CT",
                "12": "11113",
                "13": "United States"
            }
        },
        {
            "Id": 306,
            "OCID_HASH": "67037db60fea235ebcb48fae4eeef08a4b33c2f8860944925b615e602ba7a6e1",
            "Demo": {
                "1": "joanne+11@gcnpublishing.com",
                "2": "user_138_2",
                "3": "pass_1382",
                "4": "JoanneGCN",
                "5": "Persico",
                "8": "222 Street",
                "10": "Norwalk",
                "11": "CT",
                "12": "11114",
                "13": "United States"
            }
        },
        {
            "Id": 314,
            "OCID_HASH": "6421cab33907111f038ead8fc0aeafed785642e9b92cda544b2048f90ada259f",
            "Demo": {
                "1": "melanie+11@gcnpublishing.com",
                "2": "user_138_18",
                "3": "pass_13818",
                "4": "MelanieGCN",
                "5": "Mason",
                "8": "345 Street",
                "10": "Norwalk",
                "11": "CT",
                "12": "11115",
                "13": "United States"
            }
        },
        {
            "Id": 322,
            "OCID_HASH": "334b6f64d387b9a45b8ac7e0901d438cace133899b608c03a0f8c1f706882958",
            "Demo": {
                "1": "doug+11@gcnpublishing.com",
                "2": "user_138_58",
                "3": "pass_13858",
                "4": "DougGCN",
                "5": "La Farge",
                "8": "849 Street",
                "10": "Tuson",
                "11": "AZ",
                "12": "11116",
                "13": "United States"
            }
        }
    ]
}

GET specific User



Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get specific User Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/users/{{OCID}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get specific user Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Users": [
        {
            "Id": 8418,
            "PartnerId": null,
            "OCID_HASH": "7eedae58c56e97e79a9d42e85e7ef6e252563e60e92bd6d9ac7b7be748ffa823",
            "Demo": {
                "1": "",
                "2": "user_242_5634",
                "3": "pass_2425634",
                "4": "Stuart",
                "5": "Allen",
                "6": "Pub",
                "7": "Latinfinance",
                "9": "2121 Ponce de Leon Blvd",
                "10": "Coral Gables",
                "11": "Fl",
                "12": "33134",
                "13": "",
                "15": "",
                "106": "",
                "114": "",
                "122": "305-448-6593",
                "130": "",
                "138": "",
                "146": "5434982f-a05b-5f1e-2176-4809012686bb"
            },
            "Products": [
                34
            ],
            "Resources": [
                114,
                98
            ],
            "Segments": []
        }
    ]
}

POST User Login


Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"e":"rayaan@one-count.com","p":"12345"}

Example


Request

User login Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/users/login',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"e":"rayaan@one-count.com","p":"12345"}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Login user Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Users": [
        "1845775"
    ]
}

GET lookup User


Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Query Params


2                                                                                                           user_242_6298
return                                                                                                   1,2,3,4

Example


Request

Lookup user Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/users/lookup?2=user_242_6298&return=1,2,3,4',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Lookup user Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Users": [
        {
            "Id": 9082,
            "PartnerId": null,
            "OCID_HASH": "c91c697bc764c64a78bb0bbc9a848ace303169fb17da177a06264d4ede2ca659",
            "Demo": {
                "2": "user_242_6298",
                "3": "pass_2426298"
            }
        }
    ]
}

GET Partners


Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

POST Create user


POST method should be used to create users.

Request

Type

Description

Users

Users

Users object that contains information about user to create. PartnerId Needs to be specified. PartnerId is any integer value.

Transactions

Transactions

(Array of) transaction object specifying parts of the transaction to be added to the new user. UserId and TransactionId, SubscriptionType will be ignored if specified. As this is new user and new transaction is being added.

DedupeColumns

String

CSV of question id's that should be considered to find duplicate.

Return

String

CSV of ONEcount QuestionId's requested back in Users object in response.

Response

Type

Description

Users

Users

Created users returned with the demo field requested in return parameter in json format. If return was not specified only UserId will be returned.

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Users":{"PartnerId":1,"Demo":{"1":"testApirayaan7@onecount.net","4":"Rayaan","5":"Ahmed"}},"DedupeColumns":"1","Transactions":[]}

Example


Request

Create User Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/users',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"Users":{"PartnerId":1,"Demo":{"1":"testApirayaan6@onecount.net","4":"Rayaan","5":"Ahmed"}},"DedupeColumns":"1","Transactions":[]}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Create user Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Users": {
        "Id": 1845831
    }
}

PUT Update user


PUT method should be used to update users.

Request

Type

Description

Users

Users

Users object with update fields. Return property has CSV of questions id requested back in Users object.

Return

String

CSV of ONEcount QuestionId's requested back in Users object in response

RequestDate

Date

RequestDate to use for the demo update. If not provided current date will be used.

Response

Type

Description

Users

Users

Updated user returned with the demo field requested in return parameter in json format.

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Users":{"Demo":{"6":"title1"}}}

Example


Request

Update User Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/users/{{OCID}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{"Users":{"Demo":{"6":"title"}}}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Update user Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Users": [
        {
            "Id": 1845823,
            "OCID_HASH": "fccaa8dc7afadccc5882528d47b27c2bb53e2788dd0ac1fe170abef77a9c4d5b"
        }
    ]
}

COMPONENT: Questions

All data fields in ONEcount are made up of questions. Questions are configurable on a per-client basis, and no two customer installations will have the same question (ie., field) layout. Therefore, before querying or updating any ONEcount installation, you'll need to get an understanding of the question layout of the installation. This API segment will allow you to query ONEcount to determine the question layout for the installation. It will also allow you to create new questions within the system. This resource does not allow you to update the data for a specific user (see User section).

This resource is for manipulating questions resource. Questions in ONEcount means any question that is asked to the subscriber. It could be any questions that appears on customer forms or print forms that gets answered by a subscriber. Questions api call will allow creation, update and search of question in ONEcount. To add a new questions to the system you'll make a POST api call to the questions resource.

The data that is sent should be in JSON format and of type questions as described in References section. The type property of questions object is described below. Questions object will only need a choices block if the question is a multiple choice question(type=4 or 5 or 6)

There can be 6 types of questions:

Type

Description

0

Text type questions or short response type question. The response length needs to be less than 255 characters.

1

Textarea type question or long response type question.

2

 

Password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *.

   3Numeric type question.

4

Select or dropdown type questions. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the select question.

5

Radio button type question. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the radio question.

6

Checkbox type question. This is a multiple choice, multi response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the checkbox question.

   7  Date type question.

Method

Url

Action

GET

/questions

List all questions

GET

/questions/1

Returns question id 1

GET

/questions/lookup?Text=Email

Returns all questions with “Email" in question text

POST

/questions

Create a new question

JSON of the Questions type object needs to be sent as post data. Id field should not be sent.

PUT

/questions

Update a question

JSON of the Questions type object needs to be sent as post data. Id field is mandatory for update.

NOTE: While updating a select and checkbox type question you need to pass complete set of Choices for that question including the one which are already existing. If not the choices will be overwritten from the choices from the body.

GET All Questions



https://api.onecount.net/v2/questions

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get All Questions Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/questions',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: 70856f83422599c8e36191098f1536ae06e7bbcd'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get All Questions Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Questions": [
        {
            "Id": 1,
            "Text": "Email",
            "Type": "0",
            "Alias": "Email"
        },
        {
            "Id": 2,
            "Text": "Username",
            "Type": "0",
            "Alias": "Username"
        },
        {
            "Id": 3,
            "Text": "Password",
            "Type": "2",
            "Alias": "Password"
        },
        {
            "Id": 4,
            "Text": "First Name",
            "Type": "0",
            "Alias": "First Name"
        },
        {
            "Id": 5,
            "Text": "Last Name",
            "Type": "0",
            "Alias": "Last Name"
        },
        {
            "Id": 6,
            "Text": "Title",
            "Type": "0",
            "Alias": "Title"
        },
        {
            "Id": 7,
            "Text": "Company Name",
            "Type": "0",
            "Alias": "Company Name"
        },
        {
            "Id": 8,
            "Text": "Company Address",
            "Type": "0",
            "Alias": "Company Address"
        },
        {
            "Id": 9,
            "Text": "Address2",
            "Type": "0",
            "Alias": "Address2"
        },
        {
            "Id": 10,
            "Text": "City",
            "Type": "0",
            "Alias": "City"
        },
        {
            "Id": 11,
            "Text": "State/Province",
            "Type": "4",
            "Alias": "State/Province",
            "Choices": [
                {
                    "Id": 1554,
                    "QuestionId": 11,
                    "Text": "Select One",
                    "Value": "",
                    "Order": 1
                },
                {
                    "Id": 1562,
                    "QuestionId": 11,
                    "Text": "Alabama",
                    "Value": "AL",
                    "Order": 2
                },
                {
                    "Id": 1570,
                    "QuestionId": 11,
                    "Text": "Alaska",
                    "Value": "AK",
                    "Order": 3
                },
                {
                    "Id": 1578,
                    "QuestionId": 11,
                    "Text": "Arizona",
                    "Value": "AZ",
                    "Order": 4
                },
                {
                    "Id": 1586,
                    "QuestionId": 11,
                    "Text": "Arkansas",
                    "Value": "AR",
                    "Order": 5
                },
                {
                    "Id": 1594,
                    "QuestionId": 11,
                    "Text": "California",
                    "Value": "CA",
                    "Order": 6
                },
                {
                    "Id": 1602,
                    "QuestionId": 11,
                    "Text": "Colorado",
                    "Value": "CO",
                    "Order": 7
                },
                {
                    "Id": 1610,
                    "QuestionId": 11,
                    "Text": "Connecticut",
                    "Value": "CT",
                    "Order": 8
                },
                {
                    "Id": 1618,
                    "QuestionId": 11,
                    "Text": "Delaware",
                    "Value": "DE",
                    "Order": 9
                },
                {
                    "Id": 1626,
                    "QuestionId": 11,
                    "Text": "District of Columbia",
                    "Value": "DC",
                    "Order": 10
                },
                {
                    "Id": 1634,
                    "QuestionId": 11,
                    "Text": "Florida",
                    "Value": "FL",
                    "Order": 11
                },
                {
                    "Id": 1642,
                    "QuestionId": 11,
                    "Text": "Georgia",
                    "Value": "GA",
                    "Order": 12
                },
                {
                    "Id": 1650,
                    "QuestionId": 11,
                    "Text": "Hawaii",
                    "Value": "HI",
                    "Order": 13
                },
                {
                    "Id": 1658,
                    "QuestionId": 11,
                    "Text": "Idaho",
                    "Value": "ID",
                    "Order": 14
                },
                {
                    "Id": 1666,
                    "QuestionId": 11,
                    "Text": "Illinois",
                    "Value": "IL",
                    "Order": 15
                },
                {
                    "Id": 1674,
                    "QuestionId": 11,
                    "Text": "Indiana",
                    "Value": "IN",
                    "Order": 16
                },
                {
                    "Id": 1682,
                    "QuestionId": 11,
                    "Text": "Iowa",
                    "Value": "IA",
                    "Order": 17
                },
                {
                    "Id": 1690,
                    "QuestionId": 11,
                    "Text": "Kansas",
                    "Value": "KS",
                    "Order": 18
                },
                {
                    "Id": 1698,
                    "QuestionId": 11,
                    "Text": "Kentucky",
                    "Value": "KY",
                    "Order": 19
                },
                {
                    "Id": 1706,
                    "QuestionId": 11,
                    "Text": "Louisiana",
                    "Value": "LA",
                    "Order": 20
                },
                {
                    "Id": 1714,
                    "QuestionId": 11,
                    "Text": "Maine",
                    "Value": "ME",
                    "Order": 21
                },
                {
                    "Id": 1722,
                    "QuestionId": 11,
                    "Text": "Maryland",
                    "Value": "MD",
                    "Order": 22
                },
                {
                    "Id": 1730,
                    "QuestionId": 11,
                    "Text": "Massachusetts",
                    "Value": "MA",
                    "Order": 23
                },
                {
                    "Id": 1738,
                    "QuestionId": 11,
                    "Text": "Michigan",
                    "Value": "MI",
                    "Order": 24
                },
                {
                    "Id": 1746,
                    "QuestionId": 11,
                    "Text": "Minnesota",
                    "Value": "MN",
                    "Order": 25
                },
                {
                    "Id": 1754,
                    "QuestionId": 11,
                    "Text": "Mississippi",
                    "Value": "MS",
                    "Order": 26
                },
                {
                    "Id": 1762,
                    "QuestionId": 11,
                    "Text": "Missouri",
                    "Value": "MO",
                    "Order": 27
                },
                {
                    "Id": 1770,
                    "QuestionId": 11,
                    "Text": "Montana",
                    "Value": "MT",
                    "Order": 28
                },
                {
                    "Id": 1778,
                    "QuestionId": 11,
                    "Text": "Nebraska",
                    "Value": "NE",
                    "Order": 29
                },
                {
                    "Id": 1786,
                    "QuestionId": 11,
                    "Text": "Nevada",
                    "Value": "NV",
                    "Order": 30
                },
                {
                    "Id": 1794,
                    "QuestionId": 11,
                    "Text": "New Hampshire",
                    "Value": "NH",
                    "Order": 31
                },
                {
                    "Id": 1802,
                    "QuestionId": 11,
                    "Text": "New Jersey",
                    "Value": "NJ",
                    "Order": 32
                },
                {
                    "Id": 1810,
                    "QuestionId": 11,
                    "Text": "New Mexico",
                    "Value": "NM",
                    "Order": 33
                },
                {
                    "Id": 1818,
                    "QuestionId": 11,
                    "Text": "New York",
                    "Value": "NY",
                    "Order": 34
                },
                {
                    "Id": 1826,
                    "QuestionId": 11,
                    "Text": "North Carolina",
                    "Value": "NC",
                    "Order": 35
                },
                {
                    "Id": 1834,
                    "QuestionId": 11,
                    "Text": "Ohio",
                    "Value": "OH",
                    "Order": 37
                },
                {
                    "Id": 1842,
                    "QuestionId": 11,
                    "Text": "Oklahoma",
                    "Value": "OK",
                    "Order": 38
                },
                {
                    "Id": 1850,
                    "QuestionId": 11,
                    "Text": "Oregon",
                    "Value": "OR",
                    "Order": 39
                },
                {
                    "Id": 1858,
                    "QuestionId": 11,
                    "Text": "Pennsylvania",
                    "Value": "PA",
                    "Order": 40
                },
                {
                    "Id": 1866,
                    "QuestionId": 11,
                    "Text": "Rhode Island",
                    "Value": "RI",
                    "Order": 41
                },
                {
                    "Id": 1874,
                    "QuestionId": 11,
                    "Text": "South Carolina",
                    "Value": "SC",
                    "Order": 42
                },
                {
                    "Id": 1882,
                    "QuestionId": 11,
                    "Text": "South Dakota",
                    "Value": "SD",
                    "Order": 43
                },
                {
                    "Id": 1890,
                    "QuestionId": 11,
                    "Text": "Tennessee",
                    "Value": "TN",
                    "Order": 44
                },
                {
                    "Id": 1898,
                    "QuestionId": 11,
                    "Text": "Texas",
                    "Value": "TX",
                    "Order": 45
                },
                {
                    "Id": 1906,
                    "QuestionId": 11,
                    "Text": "Utah",
                    "Value": "UT",
                    "Order": 46
                },
                {
                    "Id": 1914,
                    "QuestionId": 11,
                    "Text": "Vermont",
                    "Value": "VT",
                    "Order": 47
                },
                {
                    "Id": 1922,
                    "QuestionId": 11,
                    "Text": "Virginia",
                    "Value": "VA",
                    "Order": 48
                },
                {
                    "Id": 1930,
                    "QuestionId": 11,
                    "Text": "Washington",
                    "Value": "WA",
                    "Order": 49
                },
                {
                    "Id": 1938,
                    "QuestionId": 11,
                    "Text": "West Virginia",
                    "Value": "WV",
                    "Order": 50
                },
                {
                    "Id": 1946,
                    "QuestionId": 11,
                    "Text": "Wisconsin",
                    "Value": "WI",
                    "Order": 51
                },
                {
                    "Id": 1954,
                    "QuestionId": 11,
                    "Text": "Wyoming",
                    "Value": "WY",
                    "Order": 52
                },
                {
                    "Id": 1962,
                    "QuestionId": 11,
                    "Text": "American Samoa",
                    "Value": "AS",
                    "Order": 53
                },
                {
                    "Id": 1970,
                    "QuestionId": 11,
                    "Text": "North Dakota",
                    "Value": "ND",
                    "Order": 36
                },
                {
                    "Id": 1978,
                    "QuestionId": 11,
                    "Text": "Federated States of Micronesia",
                    "Value": "FM",
                    "Order": 54
                },
                {
                    "Id": 1986,
                    "QuestionId": 11,
                    "Text": "Guam",
                    "Value": "GU",
                    "Order": 55
                },
                {
                    "Id": 1994,
                    "QuestionId": 11,
                    "Text": "Marshall Islands",
                    "Value": "MH",
                    "Order": 56
                },
                {
                    "Id": 2002,
                    "QuestionId": 11,
                    "Text": "Northern Mariana Islands",
                    "Value": "MP",
                    "Order": 57
                },
                {
                    "Id": 2010,
                    "QuestionId": 11,
                    "Text": "Palau",
                    "Value": "PW",
                    "Order": 58
                },
                {
                    "Id": 2018,
                    "QuestionId": 11,
                    "Text": "Puerto Rico",
                    "Value": "PR",
                    "Order": 59
                },
                {
                    "Id": 2026,
                    "QuestionId": 11,
                    "Text": "U.S. Virgin Islands",
                    "Value": "VI",
                    "Order": 60
                },
                {
                    "Id": 2034,
                    "QuestionId": 11,
                    "Text": "Armed Forces Africa",
                    "Value": "AE",
                    "Order": 61
                },
                {
                    "Id": 2042,
                    "QuestionId": 11,
                    "Text": "Armed Forces Americas (except Canada)",
                    "Value": "AA",
                    "Order": 62
                },
                {
                    "Id": 2050,
                    "QuestionId": 11,
                    "Text": "Armed Forces Canada",
                    "Value": "AE",
                    "Order": 63
                },
                {
                    "Id": 2058,
                    "QuestionId": 11,
                    "Text": "Armed Forces Europe",
                    "Value": "AE",
                    "Order": 64
                },
                {
                    "Id": 2066,
                    "QuestionId": 11,
                    "Text": "Armed Forces Middle East",
                    "Value": "AE",
                    "Order": 65
                },
                {
                    "Id": 2074,
                    "QuestionId": 11,
                    "Text": "Armed Forces Pacific",
                    "Value": "AP",
                    "Order": 66
                },
                {
                    "Id": 2082,
                    "QuestionId": 11,
                    "Text": "Non-US/Not Applicable",
                    "Value": "Non-US/Not Applicable",
                    "Order": 67
                },
                {
                    "Id": 2090,
                    "QuestionId": 11,
                    "Text": "Ontario",
                    "Value": "Ontario",
                    "Order": 68
                },
                {
                    "Id": 2098,
                    "QuestionId": 11,
                    "Text": "Quebec",
                    "Value": "Quebec",
                    "Order": 69
                },
                {
                    "Id": 2106,
                    "QuestionId": 11,
                    "Text": "Nova Scotia",
                    "Value": "Nova Scotia",
                    "Order": 70
                },
                {
                    "Id": 2114,
                    "QuestionId": 11,
                    "Text": "New Brunswick",
                    "Value": "New Brunswick",
                    "Order": 71
                },
                {
                    "Id": 2122,
                    "QuestionId": 11,
                    "Text": "Manitoba",
                    "Value": "Manitoba",
                    "Order": 72
                },
                {
                    "Id": 2130,
                    "QuestionId": 11,
                    "Text": "Brittish Columbia",
                    "Value": "Brittish Columbia",
                    "Order": 73
                },
                {
                    "Id": 2138,
                    "QuestionId": 11,
                    "Text": "Prince Edward Island",
                    "Value": "Prince Edward Island",
                    "Order": 74
                },
                {
                    "Id": 2146,
                    "QuestionId": 11,
                    "Text": "Saskatchewan",
                    "Value": "Saskatchewan",
                    "Order": 75
                },
                {
                    "Id": 2154,
                    "QuestionId": 11,
                    "Text": "Alberta",
                    "Value": "Alberta",
                    "Order": 76
                },
                {
                    "Id": 2162,
                    "QuestionId": 11,
                    "Text": "Newfoundland and Labrador",
                    "Value": "Newfoundland and Labrador",
                    "Order": 77
                },
                {
                    "Id": 2170,
                    "QuestionId": 11,
                    "Text": "British Columbia",
                    "Value": "British Columbia",
                    "Order": 78
                },
                {
                    "Id": 2178,
                    "QuestionId": 11,
                    "Text": "Ontario",
                    "Value": "ON",
                    "Order": 79
                }
            ]
        },
        {
            "Id": 12,
            "Text": "Zip/Postal Code",
            "Type": "0",
            "Alias": "Zip/Postal Code"
        },
        {
            "Id": 13,
            "Text": "Country",
            "Type": "4",
            "Alias": "Country",
            "Choices": [
                {
                    "Id": 2,
                    "QuestionId": 13,
                    "Text": "Select One",
                    "Value": "",
                    "Order": 1
                },
                {
                    "Id": 10,
                    "QuestionId": 13,
                    "Text": "Afghanistan",
                    "Value": "Afghanistan",
                    "Order": 3
                },
                {
                    "Id": 18,
                    "QuestionId": 13,
                    "Text": "Albania",
                    "Value": "Albania",
                    "Order": 4
                },
                {
                    "Id": 26,
                    "QuestionId": 13,
                    "Text": "Algeria",
                    "Value": "Algeria",
                    "Order": 5
                },
                {
                    "Id": 34,
                    "QuestionId": 13,
                    "Text": "Andorra",
                    "Value": "Andorra",
                    "Order": 6
                },
                {
                    "Id": 42,
                    "QuestionId": 13,
                    "Text": "Angola",
                    "Value": "Angola",
                    "Order": 7
                },
                {
                    "Id": 50,
                    "QuestionId": 13,
                    "Text": "Antigua and Barbuda",
                    "Value": "Antigua and Barbuda",
                    "Order": 8
                },
                {
                    "Id": 58,
                    "QuestionId": 13,
                    "Text": "Argentina",
                    "Value": "Argentina",
                    "Order": 9
                },
                {
                    "Id": 66,
                    "QuestionId": 13,
                    "Text": "Armenia",
                    "Value": "Armenia",
                    "Order": 10
                },
                {
                    "Id": 74,
                    "QuestionId": 13,
                    "Text": "Australia",
                    "Value": "Australia",
                    "Order": 11
                },
                {
                    "Id": 82,
                    "QuestionId": 13,
                    "Text": "Austria",
                    "Value": "Austria",
                    "Order": 12
                },
                {
                    "Id": 90,
                    "QuestionId": 13,
                    "Text": "Azerbaijan",
                    "Value": "Azerbaijan",
                    "Order": 13
                },
                {
                    "Id": 98,
                    "QuestionId": 13,
                    "Text": "Bahamas",
                    "Value": "Bahamas",
                    "Order": 14
                },
                {
                    "Id": 106,
                    "QuestionId": 13,
                    "Text": "Bahrain",
                    "Value": "Bahrain",
                    "Order": 15
                },
                {
                    "Id": 114,
                    "QuestionId": 13,
                    "Text": "Bangladesh",
                    "Value": "Bangladesh",
                    "Order": 16
                },
                {
                    "Id": 122,
                    "QuestionId": 13,
                    "Text": "Barbados",
                    "Value": "Barbados",
                    "Order": 17
                },
                {
                    "Id": 130,
                    "QuestionId": 13,
                    "Text": "Belarus",
                    "Value": "Belarus",
                    "Order": 18
                },
                {
                    "Id": 138,
                    "QuestionId": 13,
                    "Text": "Belgium",
                    "Value": "Belgium",
                    "Order": 19
                },
                {
                    "Id": 146,
                    "QuestionId": 13,
                    "Text": "Belize",
                    "Value": "Belize",
                    "Order": 20
                },
                {
                    "Id": 154,
                    "QuestionId": 13,
                    "Text": "Benin",
                    "Value": "Benin",
                    "Order": 21
                },
                {
                    "Id": 162,
                    "QuestionId": 13,
                    "Text": "Bhutan",
                    "Value": "Bhutan",
                    "Order": 22
                },
                {
                    "Id": 170,
                    "QuestionId": 13,
                    "Text": "Bolivia",
                    "Value": "Bolivia",
                    "Order": 23
                },
                {
                    "Id": 178,
                    "QuestionId": 13,
                    "Text": "Bosnia and Herzegovina",
                    "Value": "Bosnia and Herzegovina",
                    "Order": 24
                },
                {
                    "Id": 186,
                    "QuestionId": 13,
                    "Text": "Botswana",
                    "Value": "Botswana",
                    "Order": 25
                },
                {
                    "Id": 194,
                    "QuestionId": 13,
                    "Text": "Brazil",
                    "Value": "Brazil",
                    "Order": 26
                },
                {
                    "Id": 202,
                    "QuestionId": 13,
                    "Text": "Brunei",
                    "Value": "Brunei",
                    "Order": 27
                },
                {
                    "Id": 210,
                    "QuestionId": 13,
                    "Text": "Bulgaria",
                    "Value": "Bulgaria",
                    "Order": 28
                },
                {
                    "Id": 218,
                    "QuestionId": 13,
                    "Text": "Burkina Faso",
                    "Value": "Burkina Faso",
                    "Order": 29
                },
                {
                    "Id": 226,
                    "QuestionId": 13,
                    "Text": "Burundi",
                    "Value": "Burundi",
                    "Order": 30
                },
                {
                    "Id": 234,
                    "QuestionId": 13,
                    "Text": "Cambodia",
                    "Value": "Cambodia",
                    "Order": 31
                },
                {
                    "Id": 242,
                    "QuestionId": 13,
                    "Text": "Cameroon",
                    "Value": "Cameroon",
                    "Order": 32
                },
                {
                    "Id": 250,
                    "QuestionId": 13,
                    "Text": "Canada",
                    "Value": "Canada",
                    "Order": 33
                },
                {
                    "Id": 258,
                    "QuestionId": 13,
                    "Text": "Cape Verde",
                    "Value": "Cape Verde",
                    "Order": 34
                },
                {
                    "Id": 266,
                    "QuestionId": 13,
                    "Text": "Central African Republic",
                    "Value": "Central African Republic",
                    "Order": 35
                },
                {
                    "Id": 274,
                    "QuestionId": 13,
                    "Text": "Chad",
                    "Value": "Chad",
                    "Order": 36
                },
                {
                    "Id": 282,
                    "QuestionId": 13,
                    "Text": "Chile",
                    "Value": "Chile",
                    "Order": 37
                },
                {
                    "Id": 290,
                    "QuestionId": 13,
                    "Text": "China",
                    "Value": "China",
                    "Order": 38
                },
                {
                    "Id": 298,
                    "QuestionId": 13,
                    "Text": "Colombia",
                    "Value": "Colombia",
                    "Order": 39
                },
                {
                    "Id": 306,
                    "QuestionId": 13,
                    "Text": "Comoros",
                    "Value": "Comoros",
                    "Order": 40
                },
                {
                    "Id": 314,
                    "QuestionId": 13,
                    "Text": "Congo (Brazzaville)",
                    "Value": "Congo (Brazzaville)",
                    "Order": 41
                },
                {
                    "Id": 322,
                    "QuestionId": 13,
                    "Text": "Congo",
                    "Value": "Congo",
                    "Order": 42
                },
                {
                    "Id": 330,
                    "QuestionId": 13,
                    "Text": "Costa Rica",
                    "Value": "Costa Rica",
                    "Order": 43
                },
                {
                    "Id": 338,
                    "QuestionId": 13,
                    "Text": "Cote d'Ivoire",
                    "Value": "Cote d'Ivoire",
                    "Order": 44
                },
                {
                    "Id": 346,
                    "QuestionId": 13,
                    "Text": "Croatia",
                    "Value": "Croatia",
                    "Order": 45
                },
                {
                    "Id": 354,
                    "QuestionId": 13,
                    "Text": "Cuba",
                    "Value": "Cuba",
                    "Order": 46
                },
                {
                    "Id": 362,
                    "QuestionId": 13,
                    "Text": "Cyprus",
                    "Value": "Cyprus",
                    "Order": 47
                },
                {
                    "Id": 370,
                    "QuestionId": 13,
                    "Text": "Czech Republic",
                    "Value": "Czech Republic",
                    "Order": 48
                },
                {
                    "Id": 378,
                    "QuestionId": 13,
                    "Text": "Denmark",
                    "Value": "Denmark",
                    "Order": 49
                },
                {
                    "Id": 386,
                    "QuestionId": 13,
                    "Text": "Djibouti",
                    "Value": "Djibouti",
                    "Order": 50
                },
                {
                    "Id": 394,
                    "QuestionId": 13,
                    "Text": "Dominica",
                    "Value": "Dominica",
                    "Order": 51
                },
                {
                    "Id": 402,
                    "QuestionId": 13,
                    "Text": "Dominican Republic",
                    "Value": "Dominican Republic",
                    "Order": 52
                },
                {
                    "Id": 410,
                    "QuestionId": 13,
                    "Text": "East Timor",
                    "Value": "East Timor",
                    "Order": 53
                },
                {
                    "Id": 418,
                    "QuestionId": 13,
                    "Text": "Ecuador",
                    "Value": "Ecuador",
                    "Order": 54
                },
                {
                    "Id": 426,
                    "QuestionId": 13,
                    "Text": "Egypt",
                    "Value": "Egypt",
                    "Order": 55
                },
                {
                    "Id": 434,
                    "QuestionId": 13,
                    "Text": "El Salvador",
                    "Value": "El Salvador",
                    "Order": 56
                },
                {
                    "Id": 442,
                    "QuestionId": 13,
                    "Text": "Equatorial Guinea",
                    "Value": "Equatorial Guinea",
                    "Order": 57
                },
                {
                    "Id": 450,
                    "QuestionId": 13,
                    "Text": "Eritrea",
                    "Value": "Eritrea",
                    "Order": 58
                },
                {
                    "Id": 458,
                    "QuestionId": 13,
                    "Text": "Estonia",
                    "Value": "Estonia",
                    "Order": 59
                },
                {
                    "Id": 466,
                    "QuestionId": 13,
                    "Text": "Ethiopia",
                    "Value": "Ethiopia",
                    "Order": 60
                },
                {
                    "Id": 474,
                    "QuestionId": 13,
                    "Text": "Fiji",
                    "Value": "Fiji",
                    "Order": 61
                },
                {
                    "Id": 482,
                    "QuestionId": 13,
                    "Text": "Finland",
                    "Value": "Finland",
                    "Order": 62
                },
                {
                    "Id": 490,
                    "QuestionId": 13,
                    "Text": "France",
                    "Value": "France",
                    "Order": 63
                },
                {
                    "Id": 498,
                    "QuestionId": 13,
                    "Text": "Gabon",
                    "Value": "Gabon",
                    "Order": 64
                },
                {
                    "Id": 506,
                    "QuestionId": 13,
                    "Text": "Gambia, The",
                    "Value": "Gambia, The",
                    "Order": 65
                },
                {
                    "Id": 514,
                    "QuestionId": 13,
                    "Text": "Georgia",
                    "Value": "Georgia",
                    "Order": 66
                },
                {
                    "Id": 522,
                    "QuestionId": 13,
                    "Text": "Germany",
                    "Value": "Germany",
                    "Order": 67
                },
                {
                    "Id": 530,
                    "QuestionId": 13,
                    "Text": "Ghana",
                    "Value": "Ghana",
                    "Order": 68
                },
                {
                    "Id": 538,
                    "QuestionId": 13,
                    "Text": "Greece",
                    "Value": "Greece",
                    "Order": 69
                },
                {
                    "Id": 546,
                    "QuestionId": 13,
                    "Text": "Grenada",
                    "Value": "Grenada",
                    "Order": 70
                },
                {
                    "Id": 554,
                    "QuestionId": 13,
                    "Text": "Guatemala",
                    "Value": "Guatemala",
                    "Order": 71
                },
                {
                    "Id": 562,
                    "QuestionId": 13,
                    "Text": "Guinea",
                    "Value": "Guinea",
                    "Order": 72
                },
                {
                    "Id": 570,
                    "QuestionId": 13,
                    "Text": "Guinea-Bissau",
                    "Value": "Guinea-Bissau",
                    "Order": 73
                },
                {
                    "Id": 578,
                    "QuestionId": 13,
                    "Text": "Guyana",
                    "Value": "Guyana",
                    "Order": 74
                },
                {
                    "Id": 586,
                    "QuestionId": 13,
                    "Text": "Haiti",
                    "Value": "Haiti",
                    "Order": 75
                },
                {
                    "Id": 594,
                    "QuestionId": 13,
                    "Text": "Honduras",
                    "Value": "Honduras",
                    "Order": 76
                },
                {
                    "Id": 602,
                    "QuestionId": 13,
                    "Text": "Hungary",
                    "Value": "Hungary",
                    "Order": 77
                },
                {
                    "Id": 610,
                    "QuestionId": 13,
                    "Text": "Iceland",
                    "Value": "Iceland",
                    "Order": 78
                },
                {
                    "Id": 618,
                    "QuestionId": 13,
                    "Text": "India",
                    "Value": "India",
                    "Order": 79
                },
                {
                    "Id": 626,
                    "QuestionId": 13,
                    "Text": "Indonesia",
                    "Value": "Indonesia",
                    "Order": 80
                },
                {
                    "Id": 634,
                    "QuestionId": 13,
                    "Text": "Iran",
                    "Value": "Iran",
                    "Order": 81
                },
                {
                    "Id": 642,
                    "QuestionId": 13,
                    "Text": "Iraq",
                    "Value": "Iraq",
                    "Order": 82
                },
                {
                    "Id": 650,
                    "QuestionId": 13,
                    "Text": "Ireland",
                    "Value": "Ireland",
                    "Order": 83
                },
                {
                    "Id": 658,
                    "QuestionId": 13,
                    "Text": "Israel",
                    "Value": "Israel",
                    "Order": 84
                },
                {
                    "Id": 666,
                    "QuestionId": 13,
                    "Text": "Italy",
                    "Value": "Italy",
                    "Order": 85
                },
                {
                    "Id": 674,
                    "QuestionId": 13,
                    "Text": "Jamaica",
                    "Value": "Jamaica",
                    "Order": 86
                },
                {
                    "Id": 682,
                    "QuestionId": 13,
                    "Text": "Japan",
                    "Value": "Japan",
                    "Order": 87
                },
                {
                    "Id": 690,
                    "QuestionId": 13,
                    "Text": "Jordan",
                    "Value": "Jordan",
                    "Order": 88
                },
                {
                    "Id": 698,
                    "QuestionId": 13,
                    "Text": "Kazakhstan",
                    "Value": "Kazakhstan",
                    "Order": 89
                },
                {
                    "Id": 706,
                    "QuestionId": 13,
                    "Text": "Kenya",
                    "Value": "Kenya",
                    "Order": 90
                },
                {
                    "Id": 714,
                    "QuestionId": 13,
                    "Text": "Kiribati",
                    "Value": "Kiribati",
                    "Order": 91
                },
                {
                    "Id": 722,
                    "QuestionId": 13,
                    "Text": "Korea, North",
                    "Value": "Korea, North",
                    "Order": 92
                },
                {
                    "Id": 730,
                    "QuestionId": 13,
                    "Text": "Korea, South",
                    "Value": "Korea, South",
                    "Order": 93
                },
                {
                    "Id": 738,
                    "QuestionId": 13,
                    "Text": "Kuwait",
                    "Value": "Kuwait",
                    "Order": 94
                },
                {
                    "Id": 746,
                    "QuestionId": 13,
                    "Text": "Kyrgyzstan",
                    "Value": "Kyrgyzstan",
                    "Order": 95
                },
                {
                    "Id": 754,
                    "QuestionId": 13,
                    "Text": "Laos",
                    "Value": "Laos",
                    "Order": 96
                },
                {
                    "Id": 762,
                    "QuestionId": 13,
                    "Text": "Latvia",
                    "Value": "Latvia",
                    "Order": 97
                },
                {
                    "Id": 770,
                    "QuestionId": 13,
                    "Text": "Lebanon",
                    "Value": "Lebanon",
                    "Order": 98
                },
                {
                    "Id": 778,
                    "QuestionId": 13,
                    "Text": "Lesotho",
                    "Value": "Lesotho",
                    "Order": 99
                },
                {
                    "Id": 786,
                    "QuestionId": 13,
                    "Text": "Liberia",
                    "Value": "Liberia",
                    "Order": 100
                },
                {
                    "Id": 794,
                    "QuestionId": 13,
                    "Text": "Libya",
                    "Value": "Libya",
                    "Order": 101
                },
                {
                    "Id": 802,
                    "QuestionId": 13,
                    "Text": "Liechtenstein",
                    "Value": "Liechtenstein",
                    "Order": 102
                },
                {
                    "Id": 810,
                    "QuestionId": 13,
                    "Text": "Lithuania",
                    "Value": "Lithuania",
                    "Order": 103
                },
                {
                    "Id": 818,
                    "QuestionId": 13,
                    "Text": "Luxembourg",
                    "Value": "Luxembourg",
                    "Order": 104
                },
                {
                    "Id": 826,
                    "QuestionId": 13,
                    "Text": "Macedonia",
                    "Value": "Macedonia",
                    "Order": 105
                },
                {
                    "Id": 834,
                    "QuestionId": 13,
                    "Text": "Madagascar",
                    "Value": "Madagascar",
                    "Order": 106
                },
                {
                    "Id": 842,
                    "QuestionId": 13,
                    "Text": "Malawi",
                    "Value": "Malawi",
                    "Order": 107
                },
                {
                    "Id": 850,
                    "QuestionId": 13,
                    "Text": "Malaysia",
                    "Value": "Malaysia",
                    "Order": 108
                },
                {
                    "Id": 858,
                    "QuestionId": 13,
                    "Text": "Maldives",
                    "Value": "Maldives",
                    "Order": 109
                },
                {
                    "Id": 866,
                    "QuestionId": 13,
                    "Text": "Mali",
                    "Value": "Mali",
                    "Order": 110
                },
                {
                    "Id": 874,
                    "QuestionId": 13,
                    "Text": "Malta",
                    "Value": "Malta",
                    "Order": 111
                },
                {
                    "Id": 882,
                    "QuestionId": 13,
                    "Text": "Marshall Islands",
                    "Value": "Marshall Islands",
                    "Order": 112
                },
                {
                    "Id": 890,
                    "QuestionId": 13,
                    "Text": "Mauritania",
                    "Value": "Mauritania",
                    "Order": 113
                },
                {
                    "Id": 898,
                    "QuestionId": 13,
                    "Text": "Mauritius",
                    "Value": "Mauritius",
                    "Order": 114
                },
                {
                    "Id": 906,
                    "QuestionId": 13,
                    "Text": "Mexico",
                    "Value": "Mexico",
                    "Order": 115
                },
                {
                    "Id": 914,
                    "QuestionId": 13,
                    "Text": "Micronesia",
                    "Value": "Micronesia",
                    "Order": 116
                },
                {
                    "Id": 922,
                    "QuestionId": 13,
                    "Text": "Moldova",
                    "Value": "Moldova",
                    "Order": 117
                },
                {
                    "Id": 930,
                    "QuestionId": 13,
                    "Text": "Monaco",
                    "Value": "Monaco",
                    "Order": 118
                },
                {
                    "Id": 938,
                    "QuestionId": 13,
                    "Text": "Mongolia",
                    "Value": "Mongolia",
                    "Order": 119
                },
                {
                    "Id": 946,
                    "QuestionId": 13,
                    "Text": "Morocco",
                    "Value": "Morocco",
                    "Order": 120
                },
                {
                    "Id": 954,
                    "QuestionId": 13,
                    "Text": "Mozambique",
                    "Value": "Mozambique",
                    "Order": 121
                },
                {
                    "Id": 962,
                    "QuestionId": 13,
                    "Text": "Myanmar",
                    "Value": "Myanmar",
                    "Order": 122
                },
                {
                    "Id": 970,
                    "QuestionId": 13,
                    "Text": "Namibia",
                    "Value": "Namibia",
                    "Order": 123
                },
                {
                    "Id": 978,
                    "QuestionId": 13,
                    "Text": "Nauru",
                    "Value": "Nauru",
                    "Order": 124
                },
                {
                    "Id": 986,
                    "QuestionId": 13,
                    "Text": "Nepa",
                    "Value": "Nepa",
                    "Order": 125
                },
                {
                    "Id": 994,
                    "QuestionId": 13,
                    "Text": "Netherlands",
                    "Value": "Netherlands",
                    "Order": 126
                },
                {
                    "Id": 1002,
                    "QuestionId": 13,
                    "Text": "New Zealand",
                    "Value": "New Zealand",
                    "Order": 127
                },
                {
                    "Id": 1010,
                    "QuestionId": 13,
                    "Text": "Nicaragua",
                    "Value": "Nicaragua",
                    "Order": 128
                },
                {
                    "Id": 1018,
                    "QuestionId": 13,
                    "Text": "Niger",
                    "Value": "Niger",
                    "Order": 129
                },
                {
                    "Id": 1026,
                    "QuestionId": 13,
                    "Text": "Nigeria",
                    "Value": "Nigeria",
                    "Order": 130
                },
                {
                    "Id": 1034,
                    "QuestionId": 13,
                    "Text": "Norway",
                    "Value": "Norway",
                    "Order": 131
                },
                {
                    "Id": 1042,
                    "QuestionId": 13,
                    "Text": "Oman",
                    "Value": "Oman",
                    "Order": 132
                },
                {
                    "Id": 1050,
                    "QuestionId": 13,
                    "Text": "Pakistan",
                    "Value": "Pakistan",
                    "Order": 133
                },
                {
                    "Id": 1058,
                    "QuestionId": 13,
                    "Text": "Palau",
                    "Value": "Palau",
                    "Order": 134
                },
                {
                    "Id": 1066,
                    "QuestionId": 13,
                    "Text": "Panama",
                    "Value": "Panama",
                    "Order": 135
                },
                {
                    "Id": 1074,
                    "QuestionId": 13,
                    "Text": "Papua New Guinea",
                    "Value": "Papua New Guinea",
                    "Order": 136
                },
                {
                    "Id": 1082,
                    "QuestionId": 13,
                    "Text": "Paraguay",
                    "Value": "Paraguay",
                    "Order": 137
                },
                {
                    "Id": 1090,
                    "QuestionId": 13,
                    "Text": "Peru",
                    "Value": "Peru",
                    "Order": 138
                },
                {
                    "Id": 1098,
                    "QuestionId": 13,
                    "Text": "Philippines",
                    "Value": "Philippines",
                    "Order": 139
                },
                {
                    "Id": 1106,
                    "QuestionId": 13,
                    "Text": "Poland",
                    "Value": "Poland",
                    "Order": 140
                },
                {
                    "Id": 1114,
                    "QuestionId": 13,
                    "Text": "Portugal",
                    "Value": "Portugal",
                    "Order": 141
                },
                {
                    "Id": 1122,
                    "QuestionId": 13,
                    "Text": "Qatar",
                    "Value": "Qatar",
                    "Order": 142
                },
                {
                    "Id": 1130,
                    "QuestionId": 13,
                    "Text": "Romania",
                    "Value": "Romania",
                    "Order": 143
                },
                {
                    "Id": 1138,
                    "QuestionId": 13,
                    "Text": "Russia",
                    "Value": "Russia",
                    "Order": 144
                },
                {
                    "Id": 1146,
                    "QuestionId": 13,
                    "Text": "Rwanda",
                    "Value": "Rwanda",
                    "Order": 145
                },
                {
                    "Id": 1154,
                    "QuestionId": 13,
                    "Text": "Saint Kitts and Nevis",
                    "Value": "Saint Kitts and Nevis",
                    "Order": 146
                },
                {
                    "Id": 1162,
                    "QuestionId": 13,
                    "Text": "Saint Lucia",
                    "Value": "Saint Lucia",
                    "Order": 147
                },
                {
                    "Id": 1170,
                    "QuestionId": 13,
                    "Text": "Saint Vincent",
                    "Value": "Saint Vincent",
                    "Order": 148
                },
                {
                    "Id": 1178,
                    "QuestionId": 13,
                    "Text": "Samoa",
                    "Value": "Samoa",
                    "Order": 149
                },
                {
                    "Id": 1186,
                    "QuestionId": 13,
                    "Text": "San Marino",
                    "Value": "San Marino",
                    "Order": 150
                },
                {
                    "Id": 1194,
                    "QuestionId": 13,
                    "Text": "Sao Tome and Principe",
                    "Value": "Sao Tome and Principe",
                    "Order": 151
                },
                {
                    "Id": 1202,
                    "QuestionId": 13,
                    "Text": "Saudi Arabia",
                    "Value": "Saudi Arabia",
                    "Order": 152
                },
                {
                    "Id": 1210,
                    "QuestionId": 13,
                    "Text": "Senegal",
                    "Value": "Senegal",
                    "Order": 153
                },
                {
                    "Id": 1218,
                    "QuestionId": 13,
                    "Text": "Serbia and Montenegro",
                    "Value": "Serbia and Montenegro",
                    "Order": 154
                },
                {
                    "Id": 1226,
                    "QuestionId": 13,
                    "Text": "Seychelles",
                    "Value": "Seychelles",
                    "Order": 155
                },
                {
                    "Id": 1234,
                    "QuestionId": 13,
                    "Text": "Sierra Leone",
                    "Value": "Sierra Leone",
                    "Order": 156
                },
                {
                    "Id": 1242,
                    "QuestionId": 13,
                    "Text": "Singapore",
                    "Value": "Singapore",
                    "Order": 157
                },
                {
                    "Id": 1250,
                    "QuestionId": 13,
                    "Text": "Slovakia",
                    "Value": "Slovakia",
                    "Order": 158
                },
                {
                    "Id": 1258,
                    "QuestionId": 13,
                    "Text": "Slovenia",
                    "Value": "Slovenia",
                    "Order": 159
                },
                {
                    "Id": 1266,
                    "QuestionId": 13,
                    "Text": "Solomon Islands",
                    "Value": "Solomon Islands",
                    "Order": 160
                },
                {
                    "Id": 1274,
                    "QuestionId": 13,
                    "Text": "Somalia",
                    "Value": "Somalia",
                    "Order": 161
                },
                {
                    "Id": 1282,
                    "QuestionId": 13,
                    "Text": "South Africa",
                    "Value": "South Africa",
                    "Order": 162
                },
                {
                    "Id": 1290,
                    "QuestionId": 13,
                    "Text": "Spain",
                    "Value": "Spain",
                    "Order": 163
                },
                {
                    "Id": 1298,
                    "QuestionId": 13,
                    "Text": "Sri Lanka",
                    "Value": "Sri Lanka",
                    "Order": 164
                },
                {
                    "Id": 1306,
                    "QuestionId": 13,
                    "Text": "Sudan",
                    "Value": "Sudan",
                    "Order": 165
                },
                {
                    "Id": 1314,
                    "QuestionId": 13,
                    "Text": "Suriname",
                    "Value": "Suriname",
                    "Order": 166
                },
                {
                    "Id": 1322,
                    "QuestionId": 13,
                    "Text": "Swaziland",
                    "Value": "Swaziland",
                    "Order": 167
                },
                {
                    "Id": 1330,
                    "QuestionId": 13,
                    "Text": "Sweden",
                    "Value": "Sweden",
                    "Order": 168
                },
                {
                    "Id": 1338,
                    "QuestionId": 13,
                    "Text": "Switzerland",
                    "Value": "Switzerland",
                    "Order": 169
                },
                {
                    "Id": 1346,
                    "QuestionId": 13,
                    "Text": "Syria",
                    "Value": "Syria",
                    "Order": 170
                },
                {
                    "Id": 1354,
                    "QuestionId": 13,
                    "Text": "Taiwan",
                    "Value": "Taiwan",
                    "Order": 171
                },
                {
                    "Id": 1362,
                    "QuestionId": 13,
                    "Text": "Tajikistan",
                    "Value": "Tajikistan",
                    "Order": 172
                },
                {
                    "Id": 1370,
                    "QuestionId": 13,
                    "Text": "Tanzania",
                    "Value": "Tanzania",
                    "Order": 173
                },
                {
                    "Id": 1378,
                    "QuestionId": 13,
                    "Text": "Thailand",
                    "Value": "Thailand",
                    "Order": 174
                },
                {
                    "Id": 1386,
                    "QuestionId": 13,
                    "Text": "Togo",
                    "Value": "Togo",
                    "Order": 175
                },
                {
                    "Id": 1394,
                    "QuestionId": 13,
                    "Text": "Tonga",
                    "Value": "Tonga",
                    "Order": 176
                },
                {
                    "Id": 1402,
                    "QuestionId": 13,
                    "Text": "Trinidad and Tobago",
                    "Value": "Trinidad and Tobago",
                    "Order": 177
                },
                {
                    "Id": 1410,
                    "QuestionId": 13,
                    "Text": "Tunisia",
                    "Value": "Tunisia",
                    "Order": 178
                },
                {
                    "Id": 1418,
                    "QuestionId": 13,
                    "Text": "Turkey",
                    "Value": "Turkey",
                    "Order": 179
                },
                {
                    "Id": 1426,
                    "QuestionId": 13,
                    "Text": "Turkmenistan",
                    "Value": "Turkmenistan",
                    "Order": 180
                },
                {
                    "Id": 1434,
                    "QuestionId": 13,
                    "Text": "Tuvalu",
                    "Value": "Tuvalu",
                    "Order": 181
                },
                {
                    "Id": 1442,
                    "QuestionId": 13,
                    "Text": "Uganda",
                    "Value": "Uganda",
                    "Order": 182
                },
                {
                    "Id": 1450,
                    "QuestionId": 13,
                    "Text": "Ukraine",
                    "Value": "Ukraine",
                    "Order": 183
                },
                {
                    "Id": 1458,
                    "QuestionId": 13,
                    "Text": "United Arab Emirates",
                    "Value": "United Arab Emirates",
                    "Order": 184
                },
                {
                    "Id": 1466,
                    "QuestionId": 13,
                    "Text": "United Kingdom",
                    "Value": "United Kingdom",
                    "Order": 185
                },
                {
                    "Id": 1474,
                    "QuestionId": 13,
                    "Text": "United States",
                    "Value": "United States",
                    "Order": 2
                },
                {
                    "Id": 1482,
                    "QuestionId": 13,
                    "Text": "Uruguay",
                    "Value": "Uruguay",
                    "Order": 186
                },
                {
                    "Id": 1490,
                    "QuestionId": 13,
                    "Text": "Uzbekistan",
                    "Value": "Uzbekistan",
                    "Order": 187
                },
                {
                    "Id": 1498,
                    "QuestionId": 13,
                    "Text": "Vanuatu",
                    "Value": "Vanuatu",
                    "Order": 188
                },
                {
                    "Id": 1506,
                    "QuestionId": 13,
                    "Text": "Vatican City",
                    "Value": "Vatican City",
                    "Order": 189
                },
                {
                    "Id": 1514,
                    "QuestionId": 13,
                    "Text": "Venezuela",
                    "Value": "Venezuela",
                    "Order": 190
                },
                {
                    "Id": 1522,
                    "QuestionId": 13,
                    "Text": "Vietnam",
                    "Value": "Vietnam",
                    "Order": 191
                },
                {
                    "Id": 1530,
                    "QuestionId": 13,
                    "Text": "Yemen",
                    "Value": "Yemen",
                    "Order": 192
                },
                {
                    "Id": 1538,
                    "QuestionId": 13,
                    "Text": "Zambia",
                    "Value": "Zambia",
                    "Order": 193
                },
                {
                    "Id": 1546,
                    "QuestionId": 13,
                    "Text": "Zimbabwe",
                    "Value": "Zimbabwe",
                    "Order": 194
                },
                {
                    "Id": 2186,
                    "QuestionId": 13,
                    "Text": "British Columbia",
                    "Value": "British Columbia",
                    "Order": 195
                }
            ]
        },
        {
            "Id": 14,
            "Text": "Phone",
            "Type": "0",
            "Alias": "Phone"
        },
        {
            "Id": 15,
            "Text": "Fax",
            "Type": "0",
            "Alias": "Fax"
        },
        {
            "Id": 18,
            "Text": "  NEW QUESTION",
            "Type": "0",
            "Alias": ""
        },
        {
            "Id": 26,
            "Text": "  NEW QUESTION",
            "Type": "0",
            "Alias": ""
        },
        {
            "Id": 34,
            "Text": "  NEW QUESTION",
            "Type": "0",
            "Alias": ""
        },
        {
            "Id": 42,
            "Text": "  NEW QUESTION",
            "Type": "0",
            "Alias": ""
        },
        {
            "Id": 50,
            "Text": "  NEW QUESTION",
            "Type": "0",
            "Alias": ""
        },
        {
            "Id": 58,
            "Text": "  NEW QUESTION",
            "Type": "0",
            "Alias": ""
        },
        {
            "Id": 66,
            "Text": "  NEW QUESTION",
            "Type": "0",
            "Alias": ""
        },
        {
            "Id": 74,
            "Text": "  NEW QUESTION",
            "Type": "0",
            "Alias": ""
        },
        {
            "Id": 82,
            "Text": "  NEW QUESTION",
            "Type": "0",
            "Alias": ""
        },
        {
            "Id": 90,
            "Text": "  NEW QUESTION",
            "Type": "0",
            "Alias": ""
        }
    ]
}

GET specific Question


 https://api.onecount.net/v2/questions/{{QUESTION ID}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get specific Question Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/questions/{{QUESTION ID}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get specific question Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Questions": [
        {
            "Id": 3,
            "Text": "Password",
            "Type": "2",
            "Alias": "Password"
        }
    ]
}

GET lookup question by text


https://api.onecount.net/v2/questions/lookup?Text=COUNTRY

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Query Params


Text                                                                                                      COUNTRY
 

Example


Request

Lookup question by text Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/questions/lookup?Text=COUNTRY',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Lookup question by title Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Questions": [
        {
            "Id": 13,
            "Text": "Country",
            "Type": "4",
            "Alias": "Country",
            "Choices": [
                {
                    "Id": 2,
                    "QuestionId": 13,
                    "Text": "Select One",
                    "Value": "",
                    "Order": 1
                },
                {
                    "Id": 10,
                    "QuestionId": 13,
                    "Text": "Afghanistan",
                    "Value": "Afghanistan",
                    "Order": 3
                },
                {
                    "Id": 18,
                    "QuestionId": 13,
                    "Text": "Albania",
                    "Value": "Albania",
                    "Order": 4
                },
                {
                    "Id": 26,
                    "QuestionId": 13,
                    "Text": "Algeria",
                    "Value": "Algeria",
                    "Order": 5
                },
                {
                    "Id": 34,
                    "QuestionId": 13,
                    "Text": "Andorra",
                    "Value": "Andorra",
                    "Order": 6
                },
                {
                    "Id": 42,
                    "QuestionId": 13,
                    "Text": "Angola",
                    "Value": "Angola",
                    "Order": 7
                },
                {
                    "Id": 50,
                    "QuestionId": 13,
                    "Text": "Antigua and Barbuda",
                    "Value": "Antigua and Barbuda",
                    "Order": 8
                },
                {
                    "Id": 58,
                    "QuestionId": 13,
                    "Text": "Argentina",
                    "Value": "Argentina",
                    "Order": 9
                },
                {
                    "Id": 66,
                    "QuestionId": 13,
                    "Text": "Armenia",
                    "Value": "Armenia",
                    "Order": 10
                },
                {
                    "Id": 74,
                    "QuestionId": 13,
                    "Text": "Australia",
                    "Value": "Australia",
                    "Order": 11
                },
                {
                    "Id": 82,
                    "QuestionId": 13,
                    "Text": "Austria",
                    "Value": "Austria",
                    "Order": 12
                },
                {
                    "Id": 90,
                    "QuestionId": 13,
                    "Text": "Azerbaijan",
                    "Value": "Azerbaijan",
                    "Order": 13
                },
                {
                    "Id": 98,
                    "QuestionId": 13,
                    "Text": "Bahamas",
                    "Value": "Bahamas",
                    "Order": 14
                },
                {
                    "Id": 106,
                    "QuestionId": 13,
                    "Text": "Bahrain",
                    "Value": "Bahrain",
                    "Order": 15
                },
                {
                    "Id": 114,
                    "QuestionId": 13,
                    "Text": "Bangladesh",
                    "Value": "Bangladesh",
                    "Order": 16
                },
                {
                    "Id": 122,
                    "QuestionId": 13,
                    "Text": "Barbados",
                    "Value": "Barbados",
                    "Order": 17
                },
                {
                    "Id": 130,
                    "QuestionId": 13,
                    "Text": "Belarus",
                    "Value": "Belarus",
                    "Order": 18
                },
                {
                    "Id": 138,
                    "QuestionId": 13,
                    "Text": "Belgium",
                    "Value": "Belgium",
                    "Order": 19
                },
                {
                    "Id": 146,
                    "QuestionId": 13,
                    "Text": "Belize",
                    "Value": "Belize",
                    "Order": 20
                },
                {
                    "Id": 154,
                    "QuestionId": 13,
                    "Text": "Benin",
                    "Value": "Benin",
                    "Order": 21
                },
                {
                    "Id": 162,
                    "QuestionId": 13,
                    "Text": "Bhutan",
                    "Value": "Bhutan",
                    "Order": 22
                },
                {
                    "Id": 170,
                    "QuestionId": 13,
                    "Text": "Bolivia",
                    "Value": "Bolivia",
                    "Order": 23
                },
                {
                    "Id": 178,
                    "QuestionId": 13,
                    "Text": "Bosnia and Herzegovina",
                    "Value": "Bosnia and Herzegovina",
                    "Order": 24
                },
                {
                    "Id": 186,
                    "QuestionId": 13,
                    "Text": "Botswana",
                    "Value": "Botswana",
                    "Order": 25
                },
                {
                    "Id": 194,
                    "QuestionId": 13,
                    "Text": "Brazil",
                    "Value": "Brazil",
                    "Order": 26
                },
                {
                    "Id": 202,
                    "QuestionId": 13,
                    "Text": "Brunei",
                    "Value": "Brunei",
                    "Order": 27
                },
                {
                    "Id": 210,
                    "QuestionId": 13,
                    "Text": "Bulgaria",
                    "Value": "Bulgaria",
                    "Order": 28
                },
                {
                    "Id": 218,
                    "QuestionId": 13,
                    "Text": "Burkina Faso",
                    "Value": "Burkina Faso",
                    "Order": 29
                },
                {
                    "Id": 226,
                    "QuestionId": 13,
                    "Text": "Burundi",
                    "Value": "Burundi",
                    "Order": 30
                },
                {
                    "Id": 234,
                    "QuestionId": 13,
                    "Text": "Cambodia",
                    "Value": "Cambodia",
                    "Order": 31
                },
                {
                    "Id": 242,
                    "QuestionId": 13,
                    "Text": "Cameroon",
                    "Value": "Cameroon",
                    "Order": 32
                },
                {
                    "Id": 250,
                    "QuestionId": 13,
                    "Text": "Canada",
                    "Value": "Canada",
                    "Order": 33
                },
                {
                    "Id": 258,
                    "QuestionId": 13,
                    "Text": "Cape Verde",
                    "Value": "Cape Verde",
                    "Order": 34
                },
                {
                    "Id": 266,
                    "QuestionId": 13,
                    "Text": "Central African Republic",
                    "Value": "Central African Republic",
                    "Order": 35
                },
                {
                    "Id": 274,
                    "QuestionId": 13,
                    "Text": "Chad",
                    "Value": "Chad",
                    "Order": 36
                },
                {
                    "Id": 282,
                    "QuestionId": 13,
                    "Text": "Chile",
                    "Value": "Chile",
                    "Order": 37
                },
                {
                    "Id": 290,
                    "QuestionId": 13,
                    "Text": "China",
                    "Value": "China",
                    "Order": 38
                },
                {
                    "Id": 298,
                    "QuestionId": 13,
                    "Text": "Colombia",
                    "Value": "Colombia",
                    "Order": 39
                },
                {
                    "Id": 306,
                    "QuestionId": 13,
                    "Text": "Comoros",
                    "Value": "Comoros",
                    "Order": 40
                },
                {
                    "Id": 314,
                    "QuestionId": 13,
                    "Text": "Congo (Brazzaville)",
                    "Value": "Congo (Brazzaville)",
                    "Order": 41
                },
                {
                    "Id": 322,
                    "QuestionId": 13,
                    "Text": "Congo",
                    "Value": "Congo",
                    "Order": 42
                },
                {
                    "Id": 330,
                    "QuestionId": 13,
                    "Text": "Costa Rica",
                    "Value": "Costa Rica",
                    "Order": 43
                },
                {
                    "Id": 338,
                    "QuestionId": 13,
                    "Text": "Cote d'Ivoire",
                    "Value": "Cote d'Ivoire",
                    "Order": 44
                },
                {
                    "Id": 346,
                    "QuestionId": 13,
                    "Text": "Croatia",
                    "Value": "Croatia",
                    "Order": 45
                },
                {
                    "Id": 354,
                    "QuestionId": 13,
                    "Text": "Cuba",
                    "Value": "Cuba",
                    "Order": 46
                },
                {
                    "Id": 362,
                    "QuestionId": 13,
                    "Text": "Cyprus",
                    "Value": "Cyprus",
                    "Order": 47
                },
                {
                    "Id": 370,
                    "QuestionId": 13,
                    "Text": "Czech Republic",
                    "Value": "Czech Republic",
                    "Order": 48
                },
                {
                    "Id": 378,
                    "QuestionId": 13,
                    "Text": "Denmark",
                    "Value": "Denmark",
                    "Order": 49
                },
                {
                    "Id": 386,
                    "QuestionId": 13,
                    "Text": "Djibouti",
                    "Value": "Djibouti",
                    "Order": 50
                },
                {
                    "Id": 394,
                    "QuestionId": 13,
                    "Text": "Dominica",
                    "Value": "Dominica",
                    "Order": 51
                },
                {
                    "Id": 402,
                    "QuestionId": 13,
                    "Text": "Dominican Republic",
                    "Value": "Dominican Republic",
                    "Order": 52
                },
                {
                    "Id": 410,
                    "QuestionId": 13,
                    "Text": "East Timor",
                    "Value": "East Timor",
                    "Order": 53
                },
                {
                    "Id": 418,
                    "QuestionId": 13,
                    "Text": "Ecuador",
                    "Value": "Ecuador",
                    "Order": 54
                },
                {
                    "Id": 426,
                    "QuestionId": 13,
                    "Text": "Egypt",
                    "Value": "Egypt",
                    "Order": 55
                },
                {
                    "Id": 434,
                    "QuestionId": 13,
                    "Text": "El Salvador",
                    "Value": "El Salvador",
                    "Order": 56
                },
                {
                    "Id": 442,
                    "QuestionId": 13,
                    "Text": "Equatorial Guinea",
                    "Value": "Equatorial Guinea",
                    "Order": 57
                },
                {
                    "Id": 450,
                    "QuestionId": 13,
                    "Text": "Eritrea",
                    "Value": "Eritrea",
                    "Order": 58
                },
                {
                    "Id": 458,
                    "QuestionId": 13,
                    "Text": "Estonia",
                    "Value": "Estonia",
                    "Order": 59
                },
                {
                    "Id": 466,
                    "QuestionId": 13,
                    "Text": "Ethiopia",
                    "Value": "Ethiopia",
                    "Order": 60
                },
                {
                    "Id": 474,
                    "QuestionId": 13,
                    "Text": "Fiji",
                    "Value": "Fiji",
                    "Order": 61
                },
                {
                    "Id": 482,
                    "QuestionId": 13,
                    "Text": "Finland",
                    "Value": "Finland",
                    "Order": 62
                },
                {
                    "Id": 490,
                    "QuestionId": 13,
                    "Text": "France",
                    "Value": "France",
                    "Order": 63
                },
                {
                    "Id": 498,
                    "QuestionId": 13,
                    "Text": "Gabon",
                    "Value": "Gabon",
                    "Order": 64
                },
                {
                    "Id": 506,
                    "QuestionId": 13,
                    "Text": "Gambia, The",
                    "Value": "Gambia, The",
                    "Order": 65
                },
                {
                    "Id": 514,
                    "QuestionId": 13,
                    "Text": "Georgia",
                    "Value": "Georgia",
                    "Order": 66
                },
                {
                    "Id": 522,
                    "QuestionId": 13,
                    "Text": "Germany",
                    "Value": "Germany",
                    "Order": 67
                },
                {
                    "Id": 530,
                    "QuestionId": 13,
                    "Text": "Ghana",
                    "Value": "Ghana",
                    "Order": 68
                },
                {
                    "Id": 538,
                    "QuestionId": 13,
                    "Text": "Greece",
                    "Value": "Greece",
                    "Order": 69
                },
                {
                    "Id": 546,
                    "QuestionId": 13,
                    "Text": "Grenada",
                    "Value": "Grenada",
                    "Order": 70
                },
                {
                    "Id": 554,
                    "QuestionId": 13,
                    "Text": "Guatemala",
                    "Value": "Guatemala",
                    "Order": 71
                },
                {
                    "Id": 562,
                    "QuestionId": 13,
                    "Text": "Guinea",
                    "Value": "Guinea",
                    "Order": 72
                },
                {
                    "Id": 570,
                    "QuestionId": 13,
                    "Text": "Guinea-Bissau",
                    "Value": "Guinea-Bissau",
                    "Order": 73
                },
                {
                    "Id": 578,
                    "QuestionId": 13,
                    "Text": "Guyana",
                    "Value": "Guyana",
                    "Order": 74
                },
                {
                    "Id": 586,
                    "QuestionId": 13,
                    "Text": "Haiti",
                    "Value": "Haiti",
                    "Order": 75
                },
                {
                    "Id": 594,
                    "QuestionId": 13,
                    "Text": "Honduras",
                    "Value": "Honduras",
                    "Order": 76
                },
                {
                    "Id": 602,
                    "QuestionId": 13,
                    "Text": "Hungary",
                    "Value": "Hungary",
                    "Order": 77
                },
                {
                    "Id": 610,
                    "QuestionId": 13,
                    "Text": "Iceland",
                    "Value": "Iceland",
                    "Order": 78
                },
                {
                    "Id": 618,
                    "QuestionId": 13,
                    "Text": "India",
                    "Value": "India",
                    "Order": 79
                },
                {
                    "Id": 626,
                    "QuestionId": 13,
                    "Text": "Indonesia",
                    "Value": "Indonesia",
                    "Order": 80
                },
                {
                    "Id": 634,
                    "QuestionId": 13,
                    "Text": "Iran",
                    "Value": "Iran",
                    "Order": 81
                },
                {
                    "Id": 642,
                    "QuestionId": 13,
                    "Text": "Iraq",
                    "Value": "Iraq",
                    "Order": 82
                },
                {
                    "Id": 650,
                    "QuestionId": 13,
                    "Text": "Ireland",
                    "Value": "Ireland",
                    "Order": 83
                },
                {
                    "Id": 658,
                    "QuestionId": 13,
                    "Text": "Israel",
                    "Value": "Israel",
                    "Order": 84
                },
                {
                    "Id": 666,
                    "QuestionId": 13,
                    "Text": "Italy",
                    "Value": "Italy",
                    "Order": 85
                },
                {
                    "Id": 674,
                    "QuestionId": 13,
                    "Text": "Jamaica",
                    "Value": "Jamaica",
                    "Order": 86
                },
                {
                    "Id": 682,
                    "QuestionId": 13,
                    "Text": "Japan",
                    "Value": "Japan",
                    "Order": 87
                },
                {
                    "Id": 690,
                    "QuestionId": 13,
                    "Text": "Jordan",
                    "Value": "Jordan",
                    "Order": 88
                },
                {
                    "Id": 698,
                    "QuestionId": 13,
                    "Text": "Kazakhstan",
                    "Value": "Kazakhstan",
                    "Order": 89
                },
                {
                    "Id": 706,
                    "QuestionId": 13,
                    "Text": "Kenya",
                    "Value": "Kenya",
                    "Order": 90
                },
                {
                    "Id": 714,
                    "QuestionId": 13,
                    "Text": "Kiribati",
                    "Value": "Kiribati",
                    "Order": 91
                },
                {
                    "Id": 722,
                    "QuestionId": 13,
                    "Text": "Korea, North",
                    "Value": "Korea, North",
                    "Order": 92
                },
                {
                    "Id": 730,
                    "QuestionId": 13,
                    "Text": "Korea, South",
                    "Value": "Korea, South",
                    "Order": 93
                },
                {
                    "Id": 738,
                    "QuestionId": 13,
                    "Text": "Kuwait",
                    "Value": "Kuwait",
                    "Order": 94
                },
                {
                    "Id": 746,
                    "QuestionId": 13,
                    "Text": "Kyrgyzstan",
                    "Value": "Kyrgyzstan",
                    "Order": 95
                },
                {
                    "Id": 754,
                    "QuestionId": 13,
                    "Text": "Laos",
                    "Value": "Laos",
                    "Order": 96
                },
                {
                    "Id": 762,
                    "QuestionId": 13,
                    "Text": "Latvia",
                    "Value": "Latvia",
                    "Order": 97
                },
                {
                    "Id": 770,
                    "QuestionId": 13,
                    "Text": "Lebanon",
                    "Value": "Lebanon",
                    "Order": 98
                },
                {
                    "Id": 778,
                    "QuestionId": 13,
                    "Text": "Lesotho",
                    "Value": "Lesotho",
                    "Order": 99
                },
                {
                    "Id": 786,
                    "QuestionId": 13,
                    "Text": "Liberia",
                    "Value": "Liberia",
                    "Order": 100
                },
                {
                    "Id": 794,
                    "QuestionId": 13,
                    "Text": "Libya",
                    "Value": "Libya",
                    "Order": 101
                },
                {
                    "Id": 802,
                    "QuestionId": 13,
                    "Text": "Liechtenstein",
                    "Value": "Liechtenstein",
                    "Order": 102
                },
                {
                    "Id": 810,
                    "QuestionId": 13,
                    "Text": "Lithuania",
                    "Value": "Lithuania",
                    "Order": 103
                },
                {
                    "Id": 818,
                    "QuestionId": 13,
                    "Text": "Luxembourg",
                    "Value": "Luxembourg",
                    "Order": 104
                },
                {
                    "Id": 826,
                    "QuestionId": 13,
                    "Text": "Macedonia",
                    "Value": "Macedonia",
                    "Order": 105
                },
                {
                    "Id": 834,
                    "QuestionId": 13,
                    "Text": "Madagascar",
                    "Value": "Madagascar",
                    "Order": 106
                },
                {
                    "Id": 842,
                    "QuestionId": 13,
                    "Text": "Malawi",
                    "Value": "Malawi",
                    "Order": 107
                },
                {
                    "Id": 850,
                    "QuestionId": 13,
                    "Text": "Malaysia",
                    "Value": "Malaysia",
                    "Order": 108
                },
                {
                    "Id": 858,
                    "QuestionId": 13,
                    "Text": "Maldives",
                    "Value": "Maldives",
                    "Order": 109
                },
                {
                    "Id": 866,
                    "QuestionId": 13,
                    "Text": "Mali",
                    "Value": "Mali",
                    "Order": 110
                },
                {
                    "Id": 874,
                    "QuestionId": 13,
                    "Text": "Malta",
                    "Value": "Malta",
                    "Order": 111
                },
                {
                    "Id": 882,
                    "QuestionId": 13,
                    "Text": "Marshall Islands",
                    "Value": "Marshall Islands",
                    "Order": 112
                },
                {
                    "Id": 890,
                    "QuestionId": 13,
                    "Text": "Mauritania",
                    "Value": "Mauritania",
                    "Order": 113
                },
                {
                    "Id": 898,
                    "QuestionId": 13,
                    "Text": "Mauritius",
                    "Value": "Mauritius",
                    "Order": 114
                },
                {
                    "Id": 906,
                    "QuestionId": 13,
                    "Text": "Mexico",
                    "Value": "Mexico",
                    "Order": 115
                },
                {
                    "Id": 914,
                    "QuestionId": 13,
                    "Text": "Micronesia",
                    "Value": "Micronesia",
                    "Order": 116
                },
                {
                    "Id": 922,
                    "QuestionId": 13,
                    "Text": "Moldova",
                    "Value": "Moldova",
                    "Order": 117
                },
                {
                    "Id": 930,
                    "QuestionId": 13,
                    "Text": "Monaco",
                    "Value": "Monaco",
                    "Order": 118
                },
                {
                    "Id": 938,
                    "QuestionId": 13,
                    "Text": "Mongolia",
                    "Value": "Mongolia",
                    "Order": 119
                },
                {
                    "Id": 946,
                    "QuestionId": 13,
                    "Text": "Morocco",
                    "Value": "Morocco",
                    "Order": 120
                },
                {
                    "Id": 954,
                    "QuestionId": 13,
                    "Text": "Mozambique",
                    "Value": "Mozambique",
                    "Order": 121
                },
                {
                    "Id": 962,
                    "QuestionId": 13,
                    "Text": "Myanmar",
                    "Value": "Myanmar",
                    "Order": 122
                },
                {
                    "Id": 970,
                    "QuestionId": 13,
                    "Text": "Namibia",
                    "Value": "Namibia",
                    "Order": 123
                },
                {
                    "Id": 978,
                    "QuestionId": 13,
                    "Text": "Nauru",
                    "Value": "Nauru",
                    "Order": 124
                },
                {
                    "Id": 986,
                    "QuestionId": 13,
                    "Text": "Nepa",
                    "Value": "Nepa",
                    "Order": 125
                },
                {
                    "Id": 994,
                    "QuestionId": 13,
                    "Text": "Netherlands",
                    "Value": "Netherlands",
                    "Order": 126
                },
                {
                    "Id": 1002,
                    "QuestionId": 13,
                    "Text": "New Zealand",
                    "Value": "New Zealand",
                    "Order": 127
                },
                {
                    "Id": 1010,
                    "QuestionId": 13,
                    "Text": "Nicaragua",
                    "Value": "Nicaragua",
                    "Order": 128
                },
                {
                    "Id": 1018,
                    "QuestionId": 13,
                    "Text": "Niger",
                    "Value": "Niger",
                    "Order": 129
                },
                {
                    "Id": 1026,
                    "QuestionId": 13,
                    "Text": "Nigeria",
                    "Value": "Nigeria",
                    "Order": 130
                },
                {
                    "Id": 1034,
                    "QuestionId": 13,
                    "Text": "Norway",
                    "Value": "Norway",
                    "Order": 131
                },
                {
                    "Id": 1042,
                    "QuestionId": 13,
                    "Text": "Oman",
                    "Value": "Oman",
                    "Order": 132
                },
                {
                    "Id": 1050,
                    "QuestionId": 13,
                    "Text": "Pakistan",
                    "Value": "Pakistan",
                    "Order": 133
                },
                {
                    "Id": 1058,
                    "QuestionId": 13,
                    "Text": "Palau",
                    "Value": "Palau",
                    "Order": 134
                },
                {
                    "Id": 1066,
                    "QuestionId": 13,
                    "Text": "Panama",
                    "Value": "Panama",
                    "Order": 135
                },
                {
                    "Id": 1074,
                    "QuestionId": 13,
                    "Text": "Papua New Guinea",
                    "Value": "Papua New Guinea",
                    "Order": 136
                },
                {
                    "Id": 1082,
                    "QuestionId": 13,
                    "Text": "Paraguay",
                    "Value": "Paraguay",
                    "Order": 137
                },
                {
                    "Id": 1090,
                    "QuestionId": 13,
                    "Text": "Peru",
                    "Value": "Peru",
                    "Order": 138
                },
                {
                    "Id": 1098,
                    "QuestionId": 13,
                    "Text": "Philippines",
                    "Value": "Philippines",
                    "Order": 139
                },
                {
                    "Id": 1106,
                    "QuestionId": 13,
                    "Text": "Poland",
                    "Value": "Poland",
                    "Order": 140
                },
                {
                    "Id": 1114,
                    "QuestionId": 13,
                    "Text": "Portugal",
                    "Value": "Portugal",
                    "Order": 141
                },
                {
                    "Id": 1122,
                    "QuestionId": 13,
                    "Text": "Qatar",
                    "Value": "Qatar",
                    "Order": 142
                },
                {
                    "Id": 1130,
                    "QuestionId": 13,
                    "Text": "Romania",
                    "Value": "Romania",
                    "Order": 143
                },
                {
                    "Id": 1138,
                    "QuestionId": 13,
                    "Text": "Russia",
                    "Value": "Russia",
                    "Order": 144
                },
                {
                    "Id": 1146,
                    "QuestionId": 13,
                    "Text": "Rwanda",
                    "Value": "Rwanda",
                    "Order": 145
                },
                {
                    "Id": 1154,
                    "QuestionId": 13,
                    "Text": "Saint Kitts and Nevis",
                    "Value": "Saint Kitts and Nevis",
                    "Order": 146
                },
                {
                    "Id": 1162,
                    "QuestionId": 13,
                    "Text": "Saint Lucia",
                    "Value": "Saint Lucia",
                    "Order": 147
                },
                {
                    "Id": 1170,
                    "QuestionId": 13,
                    "Text": "Saint Vincent",
                    "Value": "Saint Vincent",
                    "Order": 148
                },
                {
                    "Id": 1178,
                    "QuestionId": 13,
                    "Text": "Samoa",
                    "Value": "Samoa",
                    "Order": 149
                },
                {
                    "Id": 1186,
                    "QuestionId": 13,
                    "Text": "San Marino",
                    "Value": "San Marino",
                    "Order": 150
                },
                {
                    "Id": 1194,
                    "QuestionId": 13,
                    "Text": "Sao Tome and Principe",
                    "Value": "Sao Tome and Principe",
                    "Order": 151
                },
                {
                    "Id": 1202,
                    "QuestionId": 13,
                    "Text": "Saudi Arabia",
                    "Value": "Saudi Arabia",
                    "Order": 152
                },
                {
                    "Id": 1210,
                    "QuestionId": 13,
                    "Text": "Senegal",
                    "Value": "Senegal",
                    "Order": 153
                },
                {
                    "Id": 1218,
                    "QuestionId": 13,
                    "Text": "Serbia and Montenegro",
                    "Value": "Serbia and Montenegro",
                    "Order": 154
                },
                {
                    "Id": 1226,
                    "QuestionId": 13,
                    "Text": "Seychelles",
                    "Value": "Seychelles",
                    "Order": 155
                },
                {
                    "Id": 1234,
                    "QuestionId": 13,
                    "Text": "Sierra Leone",
                    "Value": "Sierra Leone",
                    "Order": 156
                },
                {
                    "Id": 1242,
                    "QuestionId": 13,
                    "Text": "Singapore",
                    "Value": "Singapore",
                    "Order": 157
                },
                {
                    "Id": 1250,
                    "QuestionId": 13,
                    "Text": "Slovakia",
                    "Value": "Slovakia",
                    "Order": 158
                },
                {
                    "Id": 1258,
                    "QuestionId": 13,
                    "Text": "Slovenia",
                    "Value": "Slovenia",
                    "Order": 159
                },
                {
                    "Id": 1266,
                    "QuestionId": 13,
                    "Text": "Solomon Islands",
                    "Value": "Solomon Islands",
                    "Order": 160
                },
                {
                    "Id": 1274,
                    "QuestionId": 13,
                    "Text": "Somalia",
                    "Value": "Somalia",
                    "Order": 161
                },
                {
                    "Id": 1282,
                    "QuestionId": 13,
                    "Text": "South Africa",
                    "Value": "South Africa",
                    "Order": 162
                },
                {
                    "Id": 1290,
                    "QuestionId": 13,
                    "Text": "Spain",
                    "Value": "Spain",
                    "Order": 163
                },
                {
                    "Id": 1298,
                    "QuestionId": 13,
                    "Text": "Sri Lanka",
                    "Value": "Sri Lanka",
                    "Order": 164
                },
                {
                    "Id": 1306,
                    "QuestionId": 13,
                    "Text": "Sudan",
                    "Value": "Sudan",
                    "Order": 165
                },
                {
                    "Id": 1314,
                    "QuestionId": 13,
                    "Text": "Suriname",
                    "Value": "Suriname",
                    "Order": 166
                },
                {
                    "Id": 1322,
                    "QuestionId": 13,
                    "Text": "Swaziland",
                    "Value": "Swaziland",
                    "Order": 167
                },
                {
                    "Id": 1330,
                    "QuestionId": 13,
                    "Text": "Sweden",
                    "Value": "Sweden",
                    "Order": 168
                },
                {
                    "Id": 1338,
                    "QuestionId": 13,
                    "Text": "Switzerland",
                    "Value": "Switzerland",
                    "Order": 169
                },
                {
                    "Id": 1346,
                    "QuestionId": 13,
                    "Text": "Syria",
                    "Value": "Syria",
                    "Order": 170
                },
                {
                    "Id": 1354,
                    "QuestionId": 13,
                    "Text": "Taiwan",
                    "Value": "Taiwan",
                    "Order": 171
                },
                {
                    "Id": 1362,
                    "QuestionId": 13,
                    "Text": "Tajikistan",
                    "Value": "Tajikistan",
                    "Order": 172
                },
                {
                    "Id": 1370,
                    "QuestionId": 13,
                    "Text": "Tanzania",
                    "Value": "Tanzania",
                    "Order": 173
                },
                {
                    "Id": 1378,
                    "QuestionId": 13,
                    "Text": "Thailand",
                    "Value": "Thailand",
                    "Order": 174
                },
                {
                    "Id": 1386,
                    "QuestionId": 13,
                    "Text": "Togo",
                    "Value": "Togo",
                    "Order": 175
                },
                {
                    "Id": 1394,
                    "QuestionId": 13,
                    "Text": "Tonga",
                    "Value": "Tonga",
                    "Order": 176
                },
                {
                    "Id": 1402,
                    "QuestionId": 13,
                    "Text": "Trinidad and Tobago",
                    "Value": "Trinidad and Tobago",
                    "Order": 177
                },
                {
                    "Id": 1410,
                    "QuestionId": 13,
                    "Text": "Tunisia",
                    "Value": "Tunisia",
                    "Order": 178
                },
                {
                    "Id": 1418,
                    "QuestionId": 13,
                    "Text": "Turkey",
                    "Value": "Turkey",
                    "Order": 179
                },
                {
                    "Id": 1426,
                    "QuestionId": 13,
                    "Text": "Turkmenistan",
                    "Value": "Turkmenistan",
                    "Order": 180
                },
                {
                    "Id": 1434,
                    "QuestionId": 13,
                    "Text": "Tuvalu",
                    "Value": "Tuvalu",
                    "Order": 181
                },
                {
                    "Id": 1442,
                    "QuestionId": 13,
                    "Text": "Uganda",
                    "Value": "Uganda",
                    "Order": 182
                },
                {
                    "Id": 1450,
                    "QuestionId": 13,
                    "Text": "Ukraine",
                    "Value": "Ukraine",
                    "Order": 183
                },
                {
                    "Id": 1458,
                    "QuestionId": 13,
                    "Text": "United Arab Emirates",
                    "Value": "United Arab Emirates",
                    "Order": 184
                },
                {
                    "Id": 1466,
                    "QuestionId": 13,
                    "Text": "United Kingdom",
                    "Value": "United Kingdom",
                    "Order": 185
                },
                {
                    "Id": 1474,
                    "QuestionId": 13,
                    "Text": "United States",
                    "Value": "United States",
                    "Order": 2
                },
                {
                    "Id": 1482,
                    "QuestionId": 13,
                    "Text": "Uruguay",
                    "Value": "Uruguay",
                    "Order": 186
                },
                {
                    "Id": 1490,
                    "QuestionId": 13,
                    "Text": "Uzbekistan",
                    "Value": "Uzbekistan",
                    "Order": 187
                },
                {
                    "Id": 1498,
                    "QuestionId": 13,
                    "Text": "Vanuatu",
                    "Value": "Vanuatu",
                    "Order": 188
                },
                {
                    "Id": 1506,
                    "QuestionId": 13,
                    "Text": "Vatican City",
                    "Value": "Vatican City",
                    "Order": 189
                },
                {
                    "Id": 1514,
                    "QuestionId": 13,
                    "Text": "Venezuela",
                    "Value": "Venezuela",
                    "Order": 190
                },
                {
                    "Id": 1522,
                    "QuestionId": 13,
                    "Text": "Vietnam",
                    "Value": "Vietnam",
                    "Order": 191
                },
                {
                    "Id": 1530,
                    "QuestionId": 13,
                    "Text": "Yemen",
                    "Value": "Yemen",
                    "Order": 192
                },
                {
                    "Id": 1538,
                    "QuestionId": 13,
                    "Text": "Zambia",
                    "Value": "Zambia",
                    "Order": 193
                },
                {
                    "Id": 1546,
                    "QuestionId": 13,
                    "Text": "Zimbabwe",
                    "Value": "Zimbabwe",
                    "Order": 194
                },
                {
                    "Id": 2186,
                    "QuestionId": 13,
                    "Text": "British Columbia",
                    "Value": "British Columbia",
                    "Order": 195
                }
            ]
        }
    ]
}

GET lookup question by Type


https://api.onecount.net/v2/questions/lookup?Type=4

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Query Params


Type                                                                                                      4
 

Example


Request

Lookup question by Type Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/questions/lookup?Type=4',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Lookup question by type Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Questions": [
        {
            "Id": 11,
            "Text": "State/Province",
            "Type": "4",
            "Alias": "State/Province",
            "Choices": [
                {
                    "Id": 1554,
                    "QuestionId": 11,
                    "Text": "Select One",
                    "Value": "",
                    "Order": 1
                },
                {
                    "Id": 1562,
                    "QuestionId": 11,
                    "Text": "Alabama",
                    "Value": "AL",
                    "Order": 2
                },
                {
                    "Id": 1570,
                    "QuestionId": 11,
                    "Text": "Alaska",
                    "Value": "AK",
                    "Order": 3
                },
                {
                    "Id": 1578,
                    "QuestionId": 11,
                    "Text": "Arizona",
                    "Value": "AZ",
                    "Order": 4
                },
                {
                    "Id": 1586,
                    "QuestionId": 11,
                    "Text": "Arkansas",
                    "Value": "AR",
                    "Order": 5
                },
                {
                    "Id": 1594,
                    "QuestionId": 11,
                    "Text": "California",
                    "Value": "CA",
                    "Order": 6
                },
                {
                    "Id": 1602,
                    "QuestionId": 11,
                    "Text": "Colorado",
                    "Value": "CO",
                    "Order": 7
                },
                {
                    "Id": 1610,
                    "QuestionId": 11,
                    "Text": "Connecticut",
                    "Value": "CT",
                    "Order": 8
                },
                {
                    "Id": 1618,
                    "QuestionId": 11,
                    "Text": "Delaware",
                    "Value": "DE",
                    "Order": 9
                },
                {
                    "Id": 1626,
                    "QuestionId": 11,
                    "Text": "District of Columbia",
                    "Value": "DC",
                    "Order": 10
                },
                {
                    "Id": 1634,
                    "QuestionId": 11,
                    "Text": "Florida",
                    "Value": "FL",
                    "Order": 11
                },
                {
                    "Id": 1642,
                    "QuestionId": 11,
                    "Text": "Georgia",
                    "Value": "GA",
                    "Order": 12
                },
                {
                    "Id": 1650,
                    "QuestionId": 11,
                    "Text": "Hawaii",
                    "Value": "HI",
                    "Order": 13
                },
                {
                    "Id": 1658,
                    "QuestionId": 11,
                    "Text": "Idaho",
                    "Value": "ID",
                    "Order": 14
                },
                {
                    "Id": 1666,
                    "QuestionId": 11,
                    "Text": "Illinois",
                    "Value": "IL",
                    "Order": 15
                },
                {
                    "Id": 1674,
                    "QuestionId": 11,
                    "Text": "Indiana",
                    "Value": "IN",
                    "Order": 16
                },
                {
                    "Id": 1682,
                    "QuestionId": 11,
                    "Text": "Iowa",
                    "Value": "IA",
                    "Order": 17
                },
                {
                    "Id": 1690,
                    "QuestionId": 11,
                    "Text": "Kansas",
                    "Value": "KS",
                    "Order": 18
                },
                {
                    "Id": 1698,
                    "QuestionId": 11,
                    "Text": "Kentucky",
                    "Value": "KY",
                    "Order": 19
                },
                {
                    "Id": 1706,
                    "QuestionId": 11,
                    "Text": "Louisiana",
                    "Value": "LA",
                    "Order": 20
                },
                {
                    "Id": 1714,
                    "QuestionId": 11,
                    "Text": "Maine",
                    "Value": "ME",
                    "Order": 21
                },
                {
                    "Id": 1722,
                    "QuestionId": 11,
                    "Text": "Maryland",
                    "Value": "MD",
                    "Order": 22
                },
                {
                    "Id": 1730,
                    "QuestionId": 11,
                    "Text": "Massachusetts",
                    "Value": "MA",
                    "Order": 23
                },
                {
                    "Id": 1738,
                    "QuestionId": 11,
                    "Text": "Michigan",
                    "Value": "MI",
                    "Order": 24
                },
                {
                    "Id": 1746,
                    "QuestionId": 11,
                    "Text": "Minnesota",
                    "Value": "MN",
                    "Order": 25
                },
                {
                    "Id": 1754,
                    "QuestionId": 11,
                    "Text": "Mississippi",
                    "Value": "MS",
                    "Order": 26
                },
                {
                    "Id": 1762,
                    "QuestionId": 11,
                    "Text": "Missouri",
                    "Value": "MO",
                    "Order": 27
                },
                {
                    "Id": 1770,
                    "QuestionId": 11,
                    "Text": "Montana",
                    "Value": "MT",
                    "Order": 28
                },
                {
                    "Id": 1778,
                    "QuestionId": 11,
                    "Text": "Nebraska",
                    "Value": "NE",
                    "Order": 29
                },
                {
                    "Id": 1786,
                    "QuestionId": 11,
                    "Text": "Nevada",
                    "Value": "NV",
                    "Order": 30
                },
                {
                    "Id": 1794,
                    "QuestionId": 11,
                    "Text": "New Hampshire",
                    "Value": "NH",
                    "Order": 31
                },
                {
                    "Id": 1802,
                    "QuestionId": 11,
                    "Text": "New Jersey",
                    "Value": "NJ",
                    "Order": 32
                },
                {
                    "Id": 1810,
                    "QuestionId": 11,
                    "Text": "New Mexico",
                    "Value": "NM",
                    "Order": 33
                },
                {
                    "Id": 1818,
                    "QuestionId": 11,
                    "Text": "New York",
                    "Value": "NY",
                    "Order": 34
                },
                {
                    "Id": 1826,
                    "QuestionId": 11,
                    "Text": "North Carolina",
                    "Value": "NC",
                    "Order": 35
                },
                {
                    "Id": 1834,
                    "QuestionId": 11,
                    "Text": "Ohio",
                    "Value": "OH",
                    "Order": 37
                },
                {
                    "Id": 1842,
                    "QuestionId": 11,
                    "Text": "Oklahoma",
                    "Value": "OK",
                    "Order": 38
                },
                {
                    "Id": 1850,
                    "QuestionId": 11,
                    "Text": "Oregon",
                    "Value": "OR",
                    "Order": 39
                },
                {
                    "Id": 1858,
                    "QuestionId": 11,
                    "Text": "Pennsylvania",
                    "Value": "PA",
                    "Order": 40
                },
                {
                    "Id": 1866,
                    "QuestionId": 11,
                    "Text": "Rhode Island",
                    "Value": "RI",
                    "Order": 41
                },
                {
                    "Id": 1874,
                    "QuestionId": 11,
                    "Text": "South Carolina",
                    "Value": "SC",
                    "Order": 42
                },
                {
                    "Id": 1882,
                    "QuestionId": 11,
                    "Text": "South Dakota",
                    "Value": "SD",
                    "Order": 43
                },
                {
                    "Id": 1890,
                    "QuestionId": 11,
                    "Text": "Tennessee",
                    "Value": "TN",
                    "Order": 44
                },
                {
                    "Id": 1898,
                    "QuestionId": 11,
                    "Text": "Texas",
                    "Value": "TX",
                    "Order": 45
                },
                {
                    "Id": 1906,
                    "QuestionId": 11,
                    "Text": "Utah",
                    "Value": "UT",
                    "Order": 46
                },
                {
                    "Id": 1914,
                    "QuestionId": 11,
                    "Text": "Vermont",
                    "Value": "VT",
                    "Order": 47
                },
                {
                    "Id": 1922,
                    "QuestionId": 11,
                    "Text": "Virginia",
                    "Value": "VA",
                    "Order": 48
                },
                {
                    "Id": 1930,
                    "QuestionId": 11,
                    "Text": "Washington",
                    "Value": "WA",
                    "Order": 49
                },
                {
                    "Id": 1938,
                    "QuestionId": 11,
                    "Text": "West Virginia",
                    "Value": "WV",
                    "Order": 50
                },
                {
                    "Id": 1946,
                    "QuestionId": 11,
                    "Text": "Wisconsin",
                    "Value": "WI",
                    "Order": 51
                },
                {
                    "Id": 1954,
                    "QuestionId": 11,
                    "Text": "Wyoming",
                    "Value": "WY",
                    "Order": 52
                },
                {
                    "Id": 1962,
                    "QuestionId": 11,
                    "Text": "American Samoa",
                    "Value": "AS",
                    "Order": 53
                },
                {
                    "Id": 1970,
                    "QuestionId": 11,
                    "Text": "North Dakota",
                    "Value": "ND",
                    "Order": 36
                },
                {
                    "Id": 1978,
                    "QuestionId": 11,
                    "Text": "Federated States of Micronesia",
                    "Value": "FM",
                    "Order": 54
                },
                {
                    "Id": 1986,
                    "QuestionId": 11,
                    "Text": "Guam",
                    "Value": "GU",
                    "Order": 55
                },
                {
                    "Id": 1994,
                    "QuestionId": 11,
                    "Text": "Marshall Islands",
                    "Value": "MH",
                    "Order": 56
                },
                {
                    "Id": 2002,
                    "QuestionId": 11,
                    "Text": "Northern Mariana Islands",
                    "Value": "MP",
                    "Order": 57
                },
                {
                    "Id": 2010,
                    "QuestionId": 11,
                    "Text": "Palau",
                    "Value": "PW",
                    "Order": 58
                },
                {
                    "Id": 2018,
                    "QuestionId": 11,
                    "Text": "Puerto Rico",
                    "Value": "PR",
                    "Order": 59
                },
                {
                    "Id": 2026,
                    "QuestionId": 11,
                    "Text": "U.S. Virgin Islands",
                    "Value": "VI",
                    "Order": 60
                },
                {
                    "Id": 2034,
                    "QuestionId": 11,
                    "Text": "Armed Forces Africa",
                    "Value": "AE",
                    "Order": 61
                },
                {
                    "Id": 2042,
                    "QuestionId": 11,
                    "Text": "Armed Forces Americas (except Canada)",
                    "Value": "AA",
                    "Order": 62
                },
                {
                    "Id": 2050,
                    "QuestionId": 11,
                    "Text": "Armed Forces Canada",
                    "Value": "AE",
                    "Order": 63
                },
                {
                    "Id": 2058,
                    "QuestionId": 11,
                    "Text": "Armed Forces Europe",
                    "Value": "AE",
                    "Order": 64
                },
                {
                    "Id": 2066,
                    "QuestionId": 11,
                    "Text": "Armed Forces Middle East",
                    "Value": "AE",
                    "Order": 65
                },
                {
                    "Id": 2074,
                    "QuestionId": 11,
                    "Text": "Armed Forces Pacific",
                    "Value": "AP",
                    "Order": 66
                },
                {
                    "Id": 2082,
                    "QuestionId": 11,
                    "Text": "Non-US/Not Applicable",
                    "Value": "Non-US/Not Applicable",
                    "Order": 67
                },
                {
                    "Id": 2090,
                    "QuestionId": 11,
                    "Text": "Ontario",
                    "Value": "Ontario",
                    "Order": 68
                },
                {
                    "Id": 2098,
                    "QuestionId": 11,
                    "Text": "Quebec",
                    "Value": "Quebec",
                    "Order": 69
                },
                {
                    "Id": 2106,
                    "QuestionId": 11,
                    "Text": "Nova Scotia",
                    "Value": "Nova Scotia",
                    "Order": 70
                },
                {
                    "Id": 2114,
                    "QuestionId": 11,
                    "Text": "New Brunswick",
                    "Value": "New Brunswick",
                    "Order": 71
                },
                {
                    "Id": 2122,
                    "QuestionId": 11,
                    "Text": "Manitoba",
                    "Value": "Manitoba",
                    "Order": 72
                },
                {
                    "Id": 2130,
                    "QuestionId": 11,
                    "Text": "Brittish Columbia",
                    "Value": "Brittish Columbia",
                    "Order": 73
                },
                {
                    "Id": 2138,
                    "QuestionId": 11,
                    "Text": "Prince Edward Island",
                    "Value": "Prince Edward Island",
                    "Order": 74
                },
                {
                    "Id": 2146,
                    "QuestionId": 11,
                    "Text": "Saskatchewan",
                    "Value": "Saskatchewan",
                    "Order": 75
                },
                {
                    "Id": 2154,
                    "QuestionId": 11,
                    "Text": "Alberta",
                    "Value": "Alberta",
                    "Order": 76
                },
                {
                    "Id": 2162,
                    "QuestionId": 11,
                    "Text": "Newfoundland and Labrador",
                    "Value": "Newfoundland and Labrador",
                    "Order": 77
                },
                {
                    "Id": 2170,
                    "QuestionId": 11,
                    "Text": "British Columbia",
                    "Value": "British Columbia",
                    "Order": 78
                },
                {
                    "Id": 2178,
                    "QuestionId": 11,
                    "Text": "Ontario",
                    "Value": "ON",
                    "Order": 79
                }
            ]
        },
        {
            "Id": 13,
            "Text": "Country",
            "Type": "4",
            "Alias": "Country",
            "Choices": [
                {
                    "Id": 2,
                    "QuestionId": 13,
                    "Text": "Select One",
                    "Value": "",
                    "Order": 1
                },
                {
                    "Id": 10,
                    "QuestionId": 13,
                    "Text": "Afghanistan",
                    "Value": "Afghanistan",
                    "Order": 3
                },
                {
                    "Id": 18,
                    "QuestionId": 13,
                    "Text": "Albania",
                    "Value": "Albania",
                    "Order": 4
                },
                {
                    "Id": 26,
                    "QuestionId": 13,
                    "Text": "Algeria",
                    "Value": "Algeria",
                    "Order": 5
                },
                {
                    "Id": 34,
                    "QuestionId": 13,
                    "Text": "Andorra",
                    "Value": "Andorra",
                    "Order": 6
                },
                {
                    "Id": 42,
                    "QuestionId": 13,
                    "Text": "Angola",
                    "Value": "Angola",
                    "Order": 7
                },
                {
                    "Id": 50,
                    "QuestionId": 13,
                    "Text": "Antigua and Barbuda",
                    "Value": "Antigua and Barbuda",
                    "Order": 8
                },
                {
                    "Id": 58,
                    "QuestionId": 13,
                    "Text": "Argentina",
                    "Value": "Argentina",
                    "Order": 9
                },
                {
                    "Id": 66,
                    "QuestionId": 13,
                    "Text": "Armenia",
                    "Value": "Armenia",
                    "Order": 10
                },
                {
                    "Id": 74,
                    "QuestionId": 13,
                    "Text": "Australia",
                    "Value": "Australia",
                    "Order": 11
                },
                {
                    "Id": 82,
                    "QuestionId": 13,
                    "Text": "Austria",
                    "Value": "Austria",
                    "Order": 12
                },
                {
                    "Id": 90,
                    "QuestionId": 13,
                    "Text": "Azerbaijan",
                    "Value": "Azerbaijan",
                    "Order": 13
                },
                {
                    "Id": 98,
                    "QuestionId": 13,
                    "Text": "Bahamas",
                    "Value": "Bahamas",
                    "Order": 14
                },
                {
                    "Id": 106,
                    "QuestionId": 13,
                    "Text": "Bahrain",
                    "Value": "Bahrain",
                    "Order": 15
                },
                {
                    "Id": 114,
                    "QuestionId": 13,
                    "Text": "Bangladesh",
                    "Value": "Bangladesh",
                    "Order": 16
                },
                {
                    "Id": 122,
                    "QuestionId": 13,
                    "Text": "Barbados",
                    "Value": "Barbados",
                    "Order": 17
                },
                {
                    "Id": 130,
                    "QuestionId": 13,
                    "Text": "Belarus",
                    "Value": "Belarus",
                    "Order": 18
                },
                {
                    "Id": 138,
                    "QuestionId": 13,
                    "Text": "Belgium",
                    "Value": "Belgium",
                    "Order": 19
                },
                {
                    "Id": 146,
                    "QuestionId": 13,
                    "Text": "Belize",
                    "Value": "Belize",
                    "Order": 20
                },
                {
                    "Id": 154,
                    "QuestionId": 13,
                    "Text": "Benin",
                    "Value": "Benin",
                    "Order": 21
                },
                {
                    "Id": 162,
                    "QuestionId": 13,
                    "Text": "Bhutan",
                    "Value": "Bhutan",
                    "Order": 22
                },
                {
                    "Id": 170,
                    "QuestionId": 13,
                    "Text": "Bolivia",
                    "Value": "Bolivia",
                    "Order": 23
                },
                {
                    "Id": 178,
                    "QuestionId": 13,
                    "Text": "Bosnia and Herzegovina",
                    "Value": "Bosnia and Herzegovina",
                    "Order": 24
                },
                {
                    "Id": 186,
                    "QuestionId": 13,
                    "Text": "Botswana",
                    "Value": "Botswana",
                    "Order": 25
                },
                {
                    "Id": 194,
                    "QuestionId": 13,
                    "Text": "Brazil",
                    "Value": "Brazil",
                    "Order": 26
                },
                {
                    "Id": 202,
                    "QuestionId": 13,
                    "Text": "Brunei",
                    "Value": "Brunei",
                    "Order": 27
                },
                {
                    "Id": 210,
                    "QuestionId": 13,
                    "Text": "Bulgaria",
                    "Value": "Bulgaria",
                    "Order": 28
                },
                {
                    "Id": 218,
                    "QuestionId": 13,
                    "Text": "Burkina Faso",
                    "Value": "Burkina Faso",
                    "Order": 29
                },
                {
                    "Id": 226,
                    "QuestionId": 13,
                    "Text": "Burundi",
                    "Value": "Burundi",
                    "Order": 30
                },
                {
                    "Id": 234,
                    "QuestionId": 13,
                    "Text": "Cambodia",
                    "Value": "Cambodia",
                    "Order": 31
                },
                {
                    "Id": 242,
                    "QuestionId": 13,
                    "Text": "Cameroon",
                    "Value": "Cameroon",
                    "Order": 32
                },
                {
                    "Id": 250,
                    "QuestionId": 13,
                    "Text": "Canada",
                    "Value": "Canada",
                    "Order": 33
                },
                {
                    "Id": 258,
                    "QuestionId": 13,
                    "Text": "Cape Verde",
                    "Value": "Cape Verde",
                    "Order": 34
                },
                {
                    "Id": 266,
                    "QuestionId": 13,
                    "Text": "Central African Republic",
                    "Value": "Central African Republic",
                    "Order": 35
                },
                {
                    "Id": 274,
                    "QuestionId": 13,
                    "Text": "Chad",
                    "Value": "Chad",
                    "Order": 36
                },
                {
                    "Id": 282,
                    "QuestionId": 13,
                    "Text": "Chile",
                    "Value": "Chile",
                    "Order": 37
                },
                {
                    "Id": 290,
                    "QuestionId": 13,
                    "Text": "China",
                    "Value": "China",
                    "Order": 38
                },
                {
                    "Id": 298,
                    "QuestionId": 13,
                    "Text": "Colombia",
                    "Value": "Colombia",
                    "Order": 39
                },
                {
                    "Id": 306,
                    "QuestionId": 13,
                    "Text": "Comoros",
                    "Value": "Comoros",
                    "Order": 40
                },
                {
                    "Id": 314,
                    "QuestionId": 13,
                    "Text": "Congo (Brazzaville)",
                    "Value": "Congo (Brazzaville)",
                    "Order": 41
                },
                {
                    "Id": 322,
                    "QuestionId": 13,
                    "Text": "Congo",
                    "Value": "Congo",
                    "Order": 42
                },
                {
                    "Id": 330,
                    "QuestionId": 13,
                    "Text": "Costa Rica",
                    "Value": "Costa Rica",
                    "Order": 43
                },
                {
                    "Id": 338,
                    "QuestionId": 13,
                    "Text": "Cote d'Ivoire",
                    "Value": "Cote d'Ivoire",
                    "Order": 44
                },
                {
                    "Id": 346,
                    "QuestionId": 13,
                    "Text": "Croatia",
                    "Value": "Croatia",
                    "Order": 45
                },
                {
                    "Id": 354,
                    "QuestionId": 13,
                    "Text": "Cuba",
                    "Value": "Cuba",
                    "Order": 46
                },
                {
                    "Id": 362,
                    "QuestionId": 13,
                    "Text": "Cyprus",
                    "Value": "Cyprus",
                    "Order": 47
                },
                {
                    "Id": 370,
                    "QuestionId": 13,
                    "Text": "Czech Republic",
                    "Value": "Czech Republic",
                    "Order": 48
                },
                {
                    "Id": 378,
                    "QuestionId": 13,
                    "Text": "Denmark",
                    "Value": "Denmark",
                    "Order": 49
                },
                {
                    "Id": 386,
                    "QuestionId": 13,
                    "Text": "Djibouti",
                    "Value": "Djibouti",
                    "Order": 50
                },
                {
                    "Id": 394,
                    "QuestionId": 13,
                    "Text": "Dominica",
                    "Value": "Dominica",
                    "Order": 51
                },
                {
                    "Id": 402,
                    "QuestionId": 13,
                    "Text": "Dominican Republic",
                    "Value": "Dominican Republic",
                    "Order": 52
                },
                {
                    "Id": 410,
                    "QuestionId": 13,
                    "Text": "East Timor",
                    "Value": "East Timor",
                    "Order": 53
                },
                {
                    "Id": 418,
                    "QuestionId": 13,
                    "Text": "Ecuador",
                    "Value": "Ecuador",
                    "Order": 54
                },
                {
                    "Id": 426,
                    "QuestionId": 13,
                    "Text": "Egypt",
                    "Value": "Egypt",
                    "Order": 55
                },
                {
                    "Id": 434,
                    "QuestionId": 13,
                    "Text": "El Salvador",
                    "Value": "El Salvador",
                    "Order": 56
                },
                {
                    "Id": 442,
                    "QuestionId": 13,
                    "Text": "Equatorial Guinea",
                    "Value": "Equatorial Guinea",
                    "Order": 57
                },
                {
                    "Id": 450,
                    "QuestionId": 13,
                    "Text": "Eritrea",
                    "Value": "Eritrea",
                    "Order": 58
                },
                {
                    "Id": 458,
                    "QuestionId": 13,
                    "Text": "Estonia",
                    "Value": "Estonia",
                    "Order": 59
                },
                {
                    "Id": 466,
                    "QuestionId": 13,
                    "Text": "Ethiopia",
                    "Value": "Ethiopia",
                    "Order": 60
                },
                {
                    "Id": 474,
                    "QuestionId": 13,
                    "Text": "Fiji",
                    "Value": "Fiji",
                    "Order": 61
                },
                {
                    "Id": 482,
                    "QuestionId": 13,
                    "Text": "Finland",
                    "Value": "Finland",
                    "Order": 62
                },
                {
                    "Id": 490,
                    "QuestionId": 13,
                    "Text": "France",
                    "Value": "France",
                    "Order": 63
                },
                {
                    "Id": 498,
                    "QuestionId": 13,
                    "Text": "Gabon",
                    "Value": "Gabon",
                    "Order": 64
                },
                {
                    "Id": 506,
                    "QuestionId": 13,
                    "Text": "Gambia, The",
                    "Value": "Gambia, The",
                    "Order": 65
                },
                {
                    "Id": 514,
                    "QuestionId": 13,
                    "Text": "Georgia",
                    "Value": "Georgia",
                    "Order": 66
                },
                {
                    "Id": 522,
                    "QuestionId": 13,
                    "Text": "Germany",
                    "Value": "Germany",
                    "Order": 67
                },
                {
                    "Id": 530,
                    "QuestionId": 13,
                    "Text": "Ghana",
                    "Value": "Ghana",
                    "Order": 68
                },
                {
                    "Id": 538,
                    "QuestionId": 13,
                    "Text": "Greece",
                    "Value": "Greece",
                    "Order": 69
                },
                {
                    "Id": 546,
                    "QuestionId": 13,
                    "Text": "Grenada",
                    "Value": "Grenada",
                    "Order": 70
                },
                {
                    "Id": 554,
                    "QuestionId": 13,
                    "Text": "Guatemala",
                    "Value": "Guatemala",
                    "Order": 71
                },
                {
                    "Id": 562,
                    "QuestionId": 13,
                    "Text": "Guinea",
                    "Value": "Guinea",
                    "Order": 72
                },
                {
                    "Id": 570,
                    "QuestionId": 13,
                    "Text": "Guinea-Bissau",
                    "Value": "Guinea-Bissau",
                    "Order": 73
                },
                {
                    "Id": 578,
                    "QuestionId": 13,
                    "Text": "Guyana",
                    "Value": "Guyana",
                    "Order": 74
                },
                {
                    "Id": 586,
                    "QuestionId": 13,
                    "Text": "Haiti",
                    "Value": "Haiti",
                    "Order": 75
                },
                {
                    "Id": 594,
                    "QuestionId": 13,
                    "Text": "Honduras",
                    "Value": "Honduras",
                    "Order": 76
                },
                {
                    "Id": 602,
                    "QuestionId": 13,
                    "Text": "Hungary",
                    "Value": "Hungary",
                    "Order": 77
                },
                {
                    "Id": 610,
                    "QuestionId": 13,
                    "Text": "Iceland",
                    "Value": "Iceland",
                    "Order": 78
                },
                {
                    "Id": 618,
                    "QuestionId": 13,
                    "Text": "India",
                    "Value": "India",
                    "Order": 79
                },
                {
                    "Id": 626,
                    "QuestionId": 13,
                    "Text": "Indonesia",
                    "Value": "Indonesia",
                    "Order": 80
                },
                {
                    "Id": 634,
                    "QuestionId": 13,
                    "Text": "Iran",
                    "Value": "Iran",
                    "Order": 81
                },
                {
                    "Id": 642,
                    "QuestionId": 13,
                    "Text": "Iraq",
                    "Value": "Iraq",
                    "Order": 82
                },
                {
                    "Id": 650,
                    "QuestionId": 13,
                    "Text": "Ireland",
                    "Value": "Ireland",
                    "Order": 83
                },
                {
                    "Id": 658,
                    "QuestionId": 13,
                    "Text": "Israel",
                    "Value": "Israel",
                    "Order": 84
                },
                {
                    "Id": 666,
                    "QuestionId": 13,
                    "Text": "Italy",
                    "Value": "Italy",
                    "Order": 85
                },
                {
                    "Id": 674,
                    "QuestionId": 13,
                    "Text": "Jamaica",
                    "Value": "Jamaica",
                    "Order": 86
                },
                {
                    "Id": 682,
                    "QuestionId": 13,
                    "Text": "Japan",
                    "Value": "Japan",
                    "Order": 87
                },
                {
                    "Id": 690,
                    "QuestionId": 13,
                    "Text": "Jordan",
                    "Value": "Jordan",
                    "Order": 88
                },
                {
                    "Id": 698,
                    "QuestionId": 13,
                    "Text": "Kazakhstan",
                    "Value": "Kazakhstan",
                    "Order": 89
                },
                {
                    "Id": 706,
                    "QuestionId": 13,
                    "Text": "Kenya",
                    "Value": "Kenya",
                    "Order": 90
                },
                {
                    "Id": 714,
                    "QuestionId": 13,
                    "Text": "Kiribati",
                    "Value": "Kiribati",
                    "Order": 91
                },
                {
                    "Id": 722,
                    "QuestionId": 13,
                    "Text": "Korea, North",
                    "Value": "Korea, North",
                    "Order": 92
                },
                {
                    "Id": 730,
                    "QuestionId": 13,
                    "Text": "Korea, South",
                    "Value": "Korea, South",
                    "Order": 93
                },
                {
                    "Id": 738,
                    "QuestionId": 13,
                    "Text": "Kuwait",
                    "Value": "Kuwait",
                    "Order": 94
                },
                {
                    "Id": 746,
                    "QuestionId": 13,
                    "Text": "Kyrgyzstan",
                    "Value": "Kyrgyzstan",
                    "Order": 95
                },
                {
                    "Id": 754,
                    "QuestionId": 13,
                    "Text": "Laos",
                    "Value": "Laos",
                    "Order": 96
                },
                {
                    "Id": 762,
                    "QuestionId": 13,
                    "Text": "Latvia",
                    "Value": "Latvia",
                    "Order": 97
                },
                {
                    "Id": 770,
                    "QuestionId": 13,
                    "Text": "Lebanon",
                    "Value": "Lebanon",
                    "Order": 98
                },
                {
                    "Id": 778,
                    "QuestionId": 13,
                    "Text": "Lesotho",
                    "Value": "Lesotho",
                    "Order": 99
                },
                {
                    "Id": 786,
                    "QuestionId": 13,
                    "Text": "Liberia",
                    "Value": "Liberia",
                    "Order": 100
                },
                {
                    "Id": 794,
                    "QuestionId": 13,
                    "Text": "Libya",
                    "Value": "Libya",
                    "Order": 101
                },
                {
                    "Id": 802,
                    "QuestionId": 13,
                    "Text": "Liechtenstein",
                    "Value": "Liechtenstein",
                    "Order": 102
                },
                {
                    "Id": 810,
                    "QuestionId": 13,
                    "Text": "Lithuania",
                    "Value": "Lithuania",
                    "Order": 103
                },
                {
                    "Id": 818,
                    "QuestionId": 13,
                    "Text": "Luxembourg",
                    "Value": "Luxembourg",
                    "Order": 104
                },
                {
                    "Id": 826,
                    "QuestionId": 13,
                    "Text": "Macedonia",
                    "Value": "Macedonia",
                    "Order": 105
                },
                {
                    "Id": 834,
                    "QuestionId": 13,
                    "Text": "Madagascar",
                    "Value": "Madagascar",
                    "Order": 106
                },
                {
                    "Id": 842,
                    "QuestionId": 13,
                    "Text": "Malawi",
                    "Value": "Malawi",
                    "Order": 107
                },
                {
                    "Id": 850,
                    "QuestionId": 13,
                    "Text": "Malaysia",
                    "Value": "Malaysia",
                    "Order": 108
                },
                {
                    "Id": 858,
                    "QuestionId": 13,
                    "Text": "Maldives",
                    "Value": "Maldives",
                    "Order": 109
                },
                {
                    "Id": 866,
                    "QuestionId": 13,
                    "Text": "Mali",
                    "Value": "Mali",
                    "Order": 110
                },
                {
                    "Id": 874,
                    "QuestionId": 13,
                    "Text": "Malta",
                    "Value": "Malta",
                    "Order": 111
                },
                {
                    "Id": 882,
                    "QuestionId": 13,
                    "Text": "Marshall Islands",
                    "Value": "Marshall Islands",
                    "Order": 112
                },
                {
                    "Id": 890,
                    "QuestionId": 13,
                    "Text": "Mauritania",
                    "Value": "Mauritania",
                    "Order": 113
                },
                {
                    "Id": 898,
                    "QuestionId": 13,
                    "Text": "Mauritius",
                    "Value": "Mauritius",
                    "Order": 114
                },
                {
                    "Id": 906,
                    "QuestionId": 13,
                    "Text": "Mexico",
                    "Value": "Mexico",
                    "Order": 115
                },
                {
                    "Id": 914,
                    "QuestionId": 13,
                    "Text": "Micronesia",
                    "Value": "Micronesia",
                    "Order": 116
                },
                {
                    "Id": 922,
                    "QuestionId": 13,
                    "Text": "Moldova",
                    "Value": "Moldova",
                    "Order": 117
                },
                {
                    "Id": 930,
                    "QuestionId": 13,
                    "Text": "Monaco",
                    "Value": "Monaco",
                    "Order": 118
                },
                {
                    "Id": 938,
                    "QuestionId": 13,
                    "Text": "Mongolia",
                    "Value": "Mongolia",
                    "Order": 119
                },
                {
                    "Id": 946,
                    "QuestionId": 13,
                    "Text": "Morocco",
                    "Value": "Morocco",
                    "Order": 120
                },
                {
                    "Id": 954,
                    "QuestionId": 13,
                    "Text": "Mozambique",
                    "Value": "Mozambique",
                    "Order": 121
                },
                {
                    "Id": 962,
                    "QuestionId": 13,
                    "Text": "Myanmar",
                    "Value": "Myanmar",
                    "Order": 122
                },
                {
                    "Id": 970,
                    "QuestionId": 13,
                    "Text": "Namibia",
                    "Value": "Namibia",
                    "Order": 123
                },
                {
                    "Id": 978,
                    "QuestionId": 13,
                    "Text": "Nauru",
                    "Value": "Nauru",
                    "Order": 124
                },
                {
                    "Id": 986,
                    "QuestionId": 13,
                    "Text": "Nepa",
                    "Value": "Nepa",
                    "Order": 125
                },
                {
                    "Id": 994,
                    "QuestionId": 13,
                    "Text": "Netherlands",
                    "Value": "Netherlands",
                    "Order": 126
                },
                {
                    "Id": 1002,
                    "QuestionId": 13,
                    "Text": "New Zealand",
                    "Value": "New Zealand",
                    "Order": 127
                },
                {
                    "Id": 1010,
                    "QuestionId": 13,
                    "Text": "Nicaragua",
                    "Value": "Nicaragua",
                    "Order": 128
                },
                {
                    "Id": 1018,
                    "QuestionId": 13,
                    "Text": "Niger",
                    "Value": "Niger",
                    "Order": 129
                },
                {
                    "Id": 1026,
                    "QuestionId": 13,
                    "Text": "Nigeria",
                    "Value": "Nigeria",
                    "Order": 130
                },
                {
                    "Id": 1034,
                    "QuestionId": 13,
                    "Text": "Norway",
                    "Value": "Norway",
                    "Order": 131
                },
                {
                    "Id": 1042,
                    "QuestionId": 13,
                    "Text": "Oman",
                    "Value": "Oman",
                    "Order": 132
                },
                {
                    "Id": 1050,
                    "QuestionId": 13,
                    "Text": "Pakistan",
                    "Value": "Pakistan",
                    "Order": 133
                },
                {
                    "Id": 1058,
                    "QuestionId": 13,
                    "Text": "Palau",
                    "Value": "Palau",
                    "Order": 134
                },
                {
                    "Id": 1066,
                    "QuestionId": 13,
                    "Text": "Panama",
                    "Value": "Panama",
                    "Order": 135
                },
                {
                    "Id": 1074,
                    "QuestionId": 13,
                    "Text": "Papua New Guinea",
                    "Value": "Papua New Guinea",
                    "Order": 136
                },
                {
                    "Id": 1082,
                    "QuestionId": 13,
                    "Text": "Paraguay",
                    "Value": "Paraguay",
                    "Order": 137
                },
                {
                    "Id": 1090,
                    "QuestionId": 13,
                    "Text": "Peru",
                    "Value": "Peru",
                    "Order": 138
                },
                {
                    "Id": 1098,
                    "QuestionId": 13,
                    "Text": "Philippines",
                    "Value": "Philippines",
                    "Order": 139
                },
                {
                    "Id": 1106,
                    "QuestionId": 13,
                    "Text": "Poland",
                    "Value": "Poland",
                    "Order": 140
                },
                {
                    "Id": 1114,
                    "QuestionId": 13,
                    "Text": "Portugal",
                    "Value": "Portugal",
                    "Order": 141
                },
                {
                    "Id": 1122,
                    "QuestionId": 13,
                    "Text": "Qatar",
                    "Value": "Qatar",
                    "Order": 142
                },
                {
                    "Id": 1130,
                    "QuestionId": 13,
                    "Text": "Romania",
                    "Value": "Romania",
                    "Order": 143
                },
                {
                    "Id": 1138,
                    "QuestionId": 13,
                    "Text": "Russia",
                    "Value": "Russia",
                    "Order": 144
                },
                {
                    "Id": 1146,
                    "QuestionId": 13,
                    "Text": "Rwanda",
                    "Value": "Rwanda",
                    "Order": 145
                },
                {
                    "Id": 1154,
                    "QuestionId": 13,
                    "Text": "Saint Kitts and Nevis",
                    "Value": "Saint Kitts and Nevis",
                    "Order": 146
                },
                {
                    "Id": 1162,
                    "QuestionId": 13,
                    "Text": "Saint Lucia",
                    "Value": "Saint Lucia",
                    "Order": 147
                },
                {
                    "Id": 1170,
                    "QuestionId": 13,
                    "Text": "Saint Vincent",
                    "Value": "Saint Vincent",
                    "Order": 148
                },
                {
                    "Id": 1178,
                    "QuestionId": 13,
                    "Text": "Samoa",
                    "Value": "Samoa",
                    "Order": 149
                },
                {
                    "Id": 1186,
                    "QuestionId": 13,
                    "Text": "San Marino",
                    "Value": "San Marino",
                    "Order": 150
                },
                {
                    "Id": 1194,
                    "QuestionId": 13,
                    "Text": "Sao Tome and Principe",
                    "Value": "Sao Tome and Principe",
                    "Order": 151
                },
                {
                    "Id": 1202,
                    "QuestionId": 13,
                    "Text": "Saudi Arabia",
                    "Value": "Saudi Arabia",
                    "Order": 152
                },
                {
                    "Id": 1210,
                    "QuestionId": 13,
                    "Text": "Senegal",
                    "Value": "Senegal",
                    "Order": 153
                },
                {
                    "Id": 1218,
                    "QuestionId": 13,
                    "Text": "Serbia and Montenegro",
                    "Value": "Serbia and Montenegro",
                    "Order": 154
                },
                {
                    "Id": 1226,
                    "QuestionId": 13,
                    "Text": "Seychelles",
                    "Value": "Seychelles",
                    "Order": 155
                },
                {
                    "Id": 1234,
                    "QuestionId": 13,
                    "Text": "Sierra Leone",
                    "Value": "Sierra Leone",
                    "Order": 156
                },
                {
                    "Id": 1242,
                    "QuestionId": 13,
                    "Text": "Singapore",
                    "Value": "Singapore",
                    "Order": 157
                },
                {
                    "Id": 1250,
                    "QuestionId": 13,
                    "Text": "Slovakia",
                    "Value": "Slovakia",
                    "Order": 158
                },
                {
                    "Id": 1258,
                    "QuestionId": 13,
                    "Text": "Slovenia",
                    "Value": "Slovenia",
                    "Order": 159
                },
                {
                    "Id": 1266,
                    "QuestionId": 13,
                    "Text": "Solomon Islands",
                    "Value": "Solomon Islands",
                    "Order": 160
                },
                {
                    "Id": 1274,
                    "QuestionId": 13,
                    "Text": "Somalia",
                    "Value": "Somalia",
                    "Order": 161
                },
                {
                    "Id": 1282,
                    "QuestionId": 13,
                    "Text": "South Africa",
                    "Value": "South Africa",
                    "Order": 162
                },
                {
                    "Id": 1290,
                    "QuestionId": 13,
                    "Text": "Spain",
                    "Value": "Spain",
                    "Order": 163
                },
                {
                    "Id": 1298,
                    "QuestionId": 13,
                    "Text": "Sri Lanka",
                    "Value": "Sri Lanka",
                    "Order": 164
                },
                {
                    "Id": 1306,
                    "QuestionId": 13,
                    "Text": "Sudan",
                    "Value": "Sudan",
                    "Order": 165
                },
                {
                    "Id": 1314,
                    "QuestionId": 13,
                    "Text": "Suriname",
                    "Value": "Suriname",
                    "Order": 166
                },
                {
                    "Id": 1322,
                    "QuestionId": 13,
                    "Text": "Swaziland",
                    "Value": "Swaziland",
                    "Order": 167
                },
                {
                    "Id": 1330,
                    "QuestionId": 13,
                    "Text": "Sweden",
                    "Value": "Sweden",
                    "Order": 168
                },
                {
                    "Id": 1338,
                    "QuestionId": 13,
                    "Text": "Switzerland",
                    "Value": "Switzerland",
                    "Order": 169
                },
                {
                    "Id": 1346,
                    "QuestionId": 13,
                    "Text": "Syria",
                    "Value": "Syria",
                    "Order": 170
                },
                {
                    "Id": 1354,
                    "QuestionId": 13,
                    "Text": "Taiwan",
                    "Value": "Taiwan",
                    "Order": 171
                },
                {
                    "Id": 1362,
                    "QuestionId": 13,
                    "Text": "Tajikistan",
                    "Value": "Tajikistan",
                    "Order": 172
                },
                {
                    "Id": 1370,
                    "QuestionId": 13,
                    "Text": "Tanzania",
                    "Value": "Tanzania",
                    "Order": 173
                },
                {
                    "Id": 1378,
                    "QuestionId": 13,
                    "Text": "Thailand",
                    "Value": "Thailand",
                    "Order": 174
                },
                {
                    "Id": 1386,
                    "QuestionId": 13,
                    "Text": "Togo",
                    "Value": "Togo",
                    "Order": 175
                },
                {
                    "Id": 1394,
                    "QuestionId": 13,
                    "Text": "Tonga",
                    "Value": "Tonga",
                    "Order": 176
                },
                {
                    "Id": 1402,
                    "QuestionId": 13,
                    "Text": "Trinidad and Tobago",
                    "Value": "Trinidad and Tobago",
                    "Order": 177
                },
                {
                    "Id": 1410,
                    "QuestionId": 13,
                    "Text": "Tunisia",
                    "Value": "Tunisia",
                    "Order": 178
                },
                {
                    "Id": 1418,
                    "QuestionId": 13,
                    "Text": "Turkey",
                    "Value": "Turkey",
                    "Order": 179
                },
                {
                    "Id": 1426,
                    "QuestionId": 13,
                    "Text": "Turkmenistan",
                    "Value": "Turkmenistan",
                    "Order": 180
                },
                {
                    "Id": 1434,
                    "QuestionId": 13,
                    "Text": "Tuvalu",
                    "Value": "Tuvalu",
                    "Order": 181
                },
                {
                    "Id": 1442,
                    "QuestionId": 13,
                    "Text": "Uganda",
                    "Value": "Uganda",
                    "Order": 182
                },
                {
                    "Id": 1450,
                    "QuestionId": 13,
                    "Text": "Ukraine",
                    "Value": "Ukraine",
                    "Order": 183
                },
                {
                    "Id": 1458,
                    "QuestionId": 13,
                    "Text": "United Arab Emirates",
                    "Value": "United Arab Emirates",
                    "Order": 184
                },
                {
                    "Id": 1466,
                    "QuestionId": 13,
                    "Text": "United Kingdom",
                    "Value": "United Kingdom",
                    "Order": 185
                },
                {
                    "Id": 1474,
                    "QuestionId": 13,
                    "Text": "United States",
                    "Value": "United States",
                    "Order": 2
                },
                {
                    "Id": 1482,
                    "QuestionId": 13,
                    "Text": "Uruguay",
                    "Value": "Uruguay",
                    "Order": 186
                },
                {
                    "Id": 1490,
                    "QuestionId": 13,
                    "Text": "Uzbekistan",
                    "Value": "Uzbekistan",
                    "Order": 187
                },
                {
                    "Id": 1498,
                    "QuestionId": 13,
                    "Text": "Vanuatu",
                    "Value": "Vanuatu",
                    "Order": 188
                },
                {
                    "Id": 1506,
                    "QuestionId": 13,
                    "Text": "Vatican City",
                    "Value": "Vatican City",
                    "Order": 189
                },
                {
                    "Id": 1514,
                    "QuestionId": 13,
                    "Text": "Venezuela",
                    "Value": "Venezuela",
                    "Order": 190
                },
                {
                    "Id": 1522,
                    "QuestionId": 13,
                    "Text": "Vietnam",
                    "Value": "Vietnam",
                    "Order": 191
                },
                {
                    "Id": 1530,
                    "QuestionId": 13,
                    "Text": "Yemen",
                    "Value": "Yemen",
                    "Order": 192
                },
                {
                    "Id": 1538,
                    "QuestionId": 13,
                    "Text": "Zambia",
                    "Value": "Zambia",
                    "Order": 193
                },
                {
                    "Id": 1546,
                    "QuestionId": 13,
                    "Text": "Zimbabwe",
                    "Value": "Zimbabwe",
                    "Order": 194
                },
                {
                    "Id": 2186,
                    "QuestionId": 13,
                    "Text": "British Columbia",
                    "Value": "British Columbia",
                    "Order": 195
                }
            ]
        },
        {
            "Id": 178,
            "Text": "Job Function",
            "Type": "4",
            "Alias": "Job Function",
            "Choices": [
                {
                    "Id": 2266,
                    "QuestionId": 178,
                    "Text": "Select One",
                    "Value": "",
                    "Order": 1
                },
                {
                    "Id": 2274,
                    "QuestionId": 178,
                    "Text": "Sales",
                    "Value": "Sales",
                    "Order": 2
                },
                {
                    "Id": 2282,
                    "QuestionId": 178,
                    "Text": "Marketing",
                    "Value": "Marketing",
                    "Order": 3
                },
                {
                    "Id": 2290,
                    "QuestionId": 178,
                    "Text": "New Media",
                    "Value": "New Media",
                    "Order": 4
                },
                {
                    "Id": 2298,
                    "QuestionId": 178,
                    "Text": "Audience Development",
                    "Value": "Audience Development",
                    "Order": 5
                },
                {
                    "Id": 2306,
                    "QuestionId": 178,
                    "Text": "Editorial",
                    "Value": "Editorial",
                    "Order": 6
                },
                {
                    "Id": 2314,
                    "QuestionId": 178,
                    "Text": "Information Technology",
                    "Value": "IT",
                    "Order": 7
                },
                {
                    "Id": 2322,
                    "QuestionId": 178,
                    "Text": "Corporate",
                    "Value": "Corporate",
                    "Order": 8
                },
                {
                    "Id": 2418,
                    "QuestionId": 178,
                    "Text": "Other",
                    "Value": "Other",
                    "Order": 9
                }
            ]
        },
        {
            "Id": 202,
            "Text": "Type of Publication",
            "Type": "4",
            "Alias": "Type of Publication",
            "Choices": [
                {
                    "Id": 2330,
                    "QuestionId": 202,
                    "Text": "Select One",
                    "Value": "",
                    "Order": 1
                },
                {
                    "Id": 2338,
                    "QuestionId": 202,
                    "Text": "Magazine",
                    "Value": "Magazine",
                    "Order": 2
                },
                {
                    "Id": 2346,
                    "QuestionId": 202,
                    "Text": "Newspaper",
                    "Value": "Newspaper",
                    "Order": 3
                },
                {
                    "Id": 2354,
                    "QuestionId": 202,
                    "Text": "Digital Publisher",
                    "Value": "Digital Publisher",
                    "Order": 4
                },
                {
                    "Id": 2362,
                    "QuestionId": 202,
                    "Text": "Book Publisher",
                    "Value": "Book Publisher",
                    "Order": 5
                },
                {
                    "Id": 2370,
                    "QuestionId": 202,
                    "Text": "Newsletter/Email",
                    "Value": "Newsletter/Email",
                    "Order": 6
                }
            ]
        },
        {
            "Id": 226,
            "Text": "What is your time frame for deployment?",
            "Type": "4",
            "Alias": "What is your time frame for deployment?",
            "Choices": [
                {
                    "Id": 2378,
                    "QuestionId": 226,
                    "Text": "Select One",
                    "Value": "",
                    "Order": 1
                },
                {
                    "Id": 2386,
                    "QuestionId": 226,
                    "Text": "0-3 months",
                    "Value": "0-3",
                    "Order": 2
                },
                {
                    "Id": 2394,
                    "QuestionId": 226,
                    "Text": "3-6 months",
                    "Value": "3-6",
                    "Order": 3
                },
                {
                    "Id": 2402,
                    "QuestionId": 226,
                    "Text": "6-12 months",
                    "Value": "6-12",
                    "Order": 4
                },
                {
                    "Id": 2410,
                    "QuestionId": 226,
                    "Text": "No Formal Plans",
                    "Value": "No Formal Plans",
                    "Order": 5
                }
            ]
        },
        {
            "Id": 250,
            "Text": "Industry",
            "Type": "4",
            "Alias": "Industry",
            "Choices": [
                {
                    "Id": 2426,
                    "QuestionId": 250,
                    "Text": "Agency",
                    "Value": "Agency",
                    "Order": 2
                },
                {
                    "Id": 2434,
                    "QuestionId": 250,
                    "Text": "Association",
                    "Value": "Association",
                    "Order": 3
                },
                {
                    "Id": 2442,
                    "QuestionId": 250,
                    "Text": "Direct Marketing",
                    "Value": "Direct Marketing",
                    "Order": 4
                },
                {
                    "Id": 2450,
                    "QuestionId": 250,
                    "Text": "Publisher",
                    "Value": "Publisher",
                    "Order": 5
                },
                {
                    "Id": 2458,
                    "QuestionId": 250,
                    "Text": "Service Bureau",
                    "Value": "Service Bureau",
                    "Order": 6
                },
                {
                    "Id": 2466,
                    "QuestionId": 250,
                    "Text": "Select One",
                    "Value": "Government",
                    "Order": 1
                },
                {
                    "Id": 2737,
                    "QuestionId": 250,
                    "Text": "Other",
                    "Value": "Other",
                    "Order": 7
                },
                {
                    "Id": 3051,
                    "QuestionId": 250,
                    "Text": "Business Services",
                    "Value": "Business Services",
                    "Order": 8
                },
                {
                    "Id": 3059,
                    "QuestionId": 250,
                    "Text": "Business Services, Media & Internet",
                    "Value": "Business Services, Media & Internet",
                    "Order": 9
                },
                {
                    "Id": 3067,
                    "QuestionId": 250,
                    "Text": "Business Services,Consumer Services",
                    "Value": "Business Services,Consumer Services",
                    "Order": 10
                },
                {
                    "Id": 3075,
                    "QuestionId": 250,
                    "Text": "Business Services,Finance",
                    "Value": "Business Services,Finance",
                    "Order": 11
                },
                {
                    "Id": 3083,
                    "QuestionId": 250,
                    "Text": "Business Services,Retail,Media & Internet",
                    "Value": "Business Services,Retail,Media & Internet",
                    "Order": 12
                },
                {
                    "Id": 3091,
                    "QuestionId": 250,
                    "Text": "Business Services,Telecommunications",
                    "Value": "Business Services,Telecommunications",
                    "Order": 13
                },
                {
                    "Id": 3099,
                    "QuestionId": 250,
                    "Text": "Energy, Utilities & Waste Treatment",
                    "Value": "Energy, Utilities & Waste Treatment",
                    "Order": 14
                },
                {
                    "Id": 3107,
                    "QuestionId": 250,
                    "Text": "Finance",
                    "Value": "Finance",
                    "Order": 15
                },
                {
                    "Id": 3115,
                    "QuestionId": 250,
                    "Text": "Hospitality",
                    "Value": "Hospitality",
                    "Order": 16
                },
                {
                    "Id": 3123,
                    "QuestionId": 250,
                    "Text": "Hospitality,Media & Internet",
                    "Value": "Hospitality,Media & Internet",
                    "Order": 17
                },
                {
                    "Id": 3131,
                    "QuestionId": 250,
                    "Text": "Insurance",
                    "Value": "Insurance",
                    "Order": 18
                },
                {
                    "Id": 3139,
                    "QuestionId": 250,
                    "Text": "Insurance, Finance",
                    "Value": "Insurance, Finance",
                    "Order": 19
                },
                {
                    "Id": 3147,
                    "QuestionId": 250,
                    "Text": "Manufacturing",
                    "Value": "Manufacturing",
                    "Order": 20
                },
                {
                    "Id": 3155,
                    "QuestionId": 250,
                    "Text": "Manufacturing,Business Services",
                    "Value": "Manufacturing,Business Services",
                    "Order": 21
                },
                {
                    "Id": 3163,
                    "QuestionId": 250,
                    "Text": "Manufacturing,Retail,Healthcare",
                    "Value": "Manufacturing,Retail,Healthcare",
                    "Order": 22
                },
                {
                    "Id": 3171,
                    "QuestionId": 250,
                    "Text": "Media & Internet",
                    "Value": "Media & Internet",
                    "Order": 23
                },
                {
                    "Id": 3179,
                    "QuestionId": 250,
                    "Text": "Media & Internet,Business Services",
                    "Value": "Media & Internet,Business Services",
                    "Order": 24
                },
                {
                    "Id": 3187,
                    "QuestionId": 250,
                    "Text": "Organizations",
                    "Value": "Organizations",
                    "Order": 25
                },
                {
                    "Id": 3195,
                    "QuestionId": 250,
                    "Text": "Real Estate",
                    "Value": "Real Estate",
                    "Order": 26
                },
                {
                    "Id": 3203,
                    "QuestionId": 250,
                    "Text": "Retail",
                    "Value": "Retail",
                    "Order": 27
                },
                {
                    "Id": 3211,
                    "QuestionId": 250,
                    "Text": "Retail,Software,Consumer Services",
                    "Value": "Retail,Software,Consumer Services",
                    "Order": 28
                },
                {
                    "Id": 3219,
                    "QuestionId": 250,
                    "Text": "Software",
                    "Value": "Software",
                    "Order": 29
                },
                {
                    "Id": 3227,
                    "QuestionId": 250,
                    "Text": "Retail, Manufacturing",
                    "Value": "Retail, Manufacturing",
                    "Order": 30
                },
                {
                    "Id": 3235,
                    "QuestionId": 250,
                    "Text": "Software,Manufacturing,Retail",
                    "Value": "Software,Manufacturing,Retail",
                    "Order": 31
                },
                {
                    "Id": 3243,
                    "QuestionId": 250,
                    "Text": "Business Services,Media & Internet",
                    "Value": "Business Services,Media & Internet",
                    "Order": 32
                },
                {
                    "Id": 3251,
                    "QuestionId": 250,
                    "Text": "Telecommunications",
                    "Value": "Telecommunications",
                    "Order": 33
                }
            ]
        },
        {
            "Id": 274,
            "Text": "How many employees work at your company?_Copy",
            "Type": "4",
            "Alias": "ALL",
            "Choices": [
                {
                    "Id": 2698,
                    "QuestionId": 274,
                    "Text": "1-25",
                    "Value": "01",
                    "Order": 1
                },
                {
                    "Id": 2706,
                    "QuestionId": 274,
                    "Text": "26-100",
                    "Value": "02",
                    "Order": 2
                },
                {
                    "Id": 2714,
                    "QuestionId": 274,
                    "Text": "101-250",
                    "Value": "03",
                    "Order": 3
                },
                {
                    "Id": 2722,
                    "QuestionId": 274,
                    "Text": "251-500",
                    "Value": "04",
                    "Order": 4
                },
                {
                    "Id": 2730,
                    "QuestionId": 274,
                    "Text": "500+",
                    "Value": "05",
                    "Order": 5
                }
            ]
        },
        {
            "Id": 281,
            "Text": "How many employees work at your company?_Copy",
            "Type": "4",
            "Alias": "How many employees work at your company?_Copy",
            "Choices": [
                {
                    "Id": 2745,
                    "QuestionId": 281,
                    "Text": "1-25",
                    "Value": "01",
                    "Order": 1
                },
                {
                    "Id": 2753,
                    "QuestionId": 281,
                    "Text": "26-100",
                    "Value": "02",
                    "Order": 2
                },
                {
                    "Id": 2761,
                    "QuestionId": 281,
                    "Text": "101-250",
                    "Value": "03",
                    "Order": 3
                },
                {
                    "Id": 2769,
                    "QuestionId": 281,
                    "Text": "251-500",
                    "Value": "04",
                    "Order": 4
                },
                {
                    "Id": 2777,
                    "QuestionId": 281,
                    "Text": "500+",
                    "Value": "05",
                    "Order": 5
                }
            ]
        },
        {
            "Id": 291,
            "Text": "DAS Question Update",
            "Type": "4",
            "Alias": "DAS Question Update",
            "Choices": [
                {
                    "Id": 2859,
                    "QuestionId": 291,
                    "Text": "Choice a Update",
                    "Value": "a Update",
                    "Order": 1
                },
                {
                    "Id": 2867,
                    "QuestionId": 291,
                    "Text": "Choice b Update",
                    "Value": "b Update",
                    "Order": 2
                }
            ]
        },
        {
            "Id": 363,
            "Text": "Group Size",
            "Type": "4",
            "Alias": "Group Size",
            "Choices": [
                {
                    "Id": 3027,
                    "QuestionId": 363,
                    "Text": "NA",
                    "Value": "NA",
                    "Order": 1
                },
                {
                    "Id": 3035,
                    "QuestionId": 363,
                    "Text": "0-10",
                    "Value": "0-10",
                    "Order": 2
                },
                {
                    "Id": 3043,
                    "QuestionId": 363,
                    "Text": "10-25",
                    "Value": "10-25",
                    "Order": 3
                }
            ]
        },
        {
            "Id": 399,
            "Text": "What best describes your job title?",
            "Type": "4",
            "Alias": "1105-title",
            "Choices": [
                {
                    "Id": 3255,
                    "QuestionId": 399,
                    "Text": "CIO, CTO, CKO, Technical/VP",
                    "Value": "CIO",
                    "Order": 1
                },
                {
                    "Id": 3263,
                    "QuestionId": 399,
                    "Text": "Corporate Management",
                    "Value": "corporate",
                    "Order": 2
                },
                {
                    "Id": 3271,
                    "QuestionId": 399,
                    "Text": "IS/IT Director/Manager",
                    "Value": "it",
                    "Order": 3
                },
                {
                    "Id": 3279,
                    "QuestionId": 399,
                    "Text": "Director of Softare Development",
                    "Value": "software director",
                    "Order": 4
                },
                {
                    "Id": 3287,
                    "QuestionId": 399,
                    "Text": "Application Development Manager",
                    "Value": "ADM",
                    "Order": 5
                }
            ]
        },
        {
            "Id": 407,
            "Text": "What is your organization's (or largest client, if you are a consultant) primary business at this location?",
            "Type": "4",
            "Alias": "1105 largest client",
            "Choices": [
                {
                    "Id": 3295,
                    "QuestionId": 407,
                    "Text": "Aerospace",
                    "Value": "aerospace",
                    "Order": 1
                },
                {
                    "Id": 3303,
                    "QuestionId": 407,
                    "Text": "Agriculture/Mining/Gas/Oil",
                    "Value": "ag",
                    "Order": 2
                },
                {
                    "Id": 3311,
                    "QuestionId": 407,
                    "Text": "Business Services/Consultants",
                    "Value": "bs",
                    "Order": 3
                },
                {
                    "Id": 3319,
                    "QuestionId": 407,
                    "Text": "Construction/Architecture/Engineering",
                    "Value": "construction",
                    "Order": 4
                },
                {
                    "Id": 3327,
                    "QuestionId": 407,
                    "Text": "Education/Training",
                    "Value": "education",
                    "Order": 5
                }
            ]
        },
        {
            "Id": 415,
            "Text": "What is the total number of employees in your entire organzation?",
            "Type": "4",
            "Alias": "1105 num employees",
            "Choices": [
                {
                    "Id": 3335,
                    "QuestionId": 415,
                    "Text": "10,000 or more",
                    "Value": "10000",
                    "Order": 1
                },
                {
                    "Id": 3343,
                    "QuestionId": 415,
                    "Text": "5,000 - 9,999",
                    "Value": "5000",
                    "Order": 2
                },
                {
                    "Id": 3351,
                    "QuestionId": 415,
                    "Text": "1,000 - 4,999",
                    "Value": "1000",
                    "Order": 3
                },
                {
                    "Id": 3359,
                    "QuestionId": 415,
                    "Text": "500 - 999",
                    "Value": "500",
                    "Order": 4
                },
                {
                    "Id": 3367,
                    "QuestionId": 415,
                    "Text": "100 - 499",
                    "Value": "100",
                    "Order": 5
                },
                {
                    "Id": 3375,
                    "QuestionId": 415,
                    "Text": "Under 100",
                    "Value": "Under 100",
                    "Order": 6
                }
            ]
        },
        {
            "Id": 423,
            "Text": "saaa",
            "Type": "4",
            "Alias": "test",
            "Choices": [
                {
                    "Id": 3383,
                    "QuestionId": 423,
                    "Text": "1",
                    "Value": "1",
                    "Order": 1
                },
                {
                    "Id": 3391,
                    "QuestionId": 423,
                    "Text": "3",
                    "Value": "3",
                    "Order": 2
                }
            ]
        }
    ]
}

POST Create question type numeric, text, password, textarea and date


https://api.onecount.net/v2/questions

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Text":"Test from API 3","Type":0,"Alias":"Test from API 3"}

Example


Request

Create Question Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/questions',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"Text":"Test from API 3","Type":0,"Alias":"Test from API 3"}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Create question Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Questions": [
        {
            "Id": 455
        }
    ]
}

POST Create question type select, radio and checkbox


https://api.onecount.net/v2/questions

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Text":"Test from API 6","Type":4,"Alias":"Test from API 6", "Choices":[{"Text":"test 1","Value":"test 1"},{"Text":"test 2","Value":"test 2"}]}

Example


Request

Create Question Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/questions',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"Text":"Test from API 5","Type":4,"Alias":"Test from API 5", "Choices":[{"Text":"test 1","Value":"test 1"},{"Text":"test 2","Value":"test 2"}]}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Create question Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Questions": [
        {
            "Id": 495
        }
    ]
}

PUT Update question

NOTE: While updating a select and checkbox type question you need to pass complete set of Choices for that question including the one which are already existing. If not the choices will be overwritten from the choices from the body.

 https://api.onecount.net/v2/questions/{{QUESTION ID}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Text":"Test from API 6 changed","Type":4,"Alias":"Test from API 6 changed", "Choices":[{"Text":"test 1","Value":"test 1"},{"Text":"test 2","Value":"test 2"}]}

Example


Request

Update Question Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/questions/{{QUESTION ID}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{"Text":"Test from API 6 changed","Type":4,"Alias":"Test from API 6 changed", "Choices":[{"Text":"test 1","Value":"test 1"},{"Text":"test 2","Value":"test 2"}]}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Update Question Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Questions": [
        {
            "Id": 503
        }
    ]
}

COMPONENT: Products

This resource is for manipulating products resource. A product can be created, updated or searched.

Method

Url

Action

GET

/products

Get all product details

GET

/products/5

Get product id 5

GET

/products/lookup?Title=productname

Lookup products by Title

POST

/products

JSON of the Products type object needs to be sent as post data. Id field should not be sent.

PUT

/products/5

JSON of the Products type object needs to be sent as post data. Id field is mandatory for update.

POST

/products/attachResource

JSON of the Product and Resource ids to be sent as post data.

Both fields are mandatory.

Example:

{"ProductID":"65","ResourceID":”121"}

GET All Products



https://api.onecount.net/v2/products

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get All Products Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/products',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get All Products Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Products": [
        {
            "ProductId": 26,
            "Title": "ONEcount Product Demo",
            "Description": "",
            "ResourceIDs": [],
            "PrimaryFormID": [
                "307",
                "34"
            ],
            "Terms": {
                "Id": 26,
                "Name": "Please contact me to arrange a demo",
                "Description": "",
                "Duration": 1,
                "DurationUnit": "I",
                "Price": "0",
                "ProductId": 26
            }
        },
        {
            "ProductId": 34,
            "Title": "ONEcount Promotional Emails",
            "Description": "Master List of ONEcount prospects to receive promotional emails, etc.",
            "ResourceIDs": [
                98,
                114
            ],
            "PrimaryFormID": [
                "194"
            ],
            "Terms": {
                "Id": 34,
                "Name": "ONEcount Promotional Emails",
                "Description": "ONEcount promotional emails",
                "Duration": 1,
                "DurationUnit": "I",
                "Price": "0",
                "ProductId": 34
            }
        },
        {
            "ProductId": 42,
            "Title": "ONEcount Staff",
            "Description": "ONEcount/GCN Media Staff",
            "ResourceIDs": [
                18
            ],
            "PrimaryFormID": [
                "186"
            ],
            "Terms": {
                "Id": 42,
                "Name": "ONEcount Staff List",
                "Description": "List of ONEcount/GCN Media Staff",
                "Duration": 1,
                "DurationUnit": "I",
                "Price": "0",
                "ProductId": 42
            }
        },
        {
            "ProductId": 49,
            "Title": "ONEcount Medical Publishers",
            "Description": "For blasts to medical publishers and associations",
            "ResourceIDs": [
                137
            ],
            "PrimaryFormID": [
                "170"
            ],
            "Terms": {
                "Id": 49,
                "Name": "ONEcount Medical Publishers",
                "Description": "ONEcount Medical Publishers and Associations",
                "Duration": 1,
                "DurationUnit": "I",
                "Price": "0",
                "ProductId": 49
            }
        },
        {
            "ProductId": 57,
            "Title": "000 Pop-Up Form",
            "Description": "",
            "ResourceIDs": [
                145
            ],
            "PrimaryFormID": [
                "170"
            ],
            "Terms": {
                "Id": 57,
                "Name": "000 Pop-Up Term",
                "Description": "",
                "Duration": 1,
                "DurationUnit": "I",
                "Price": "0",
                "ProductId": 57
            }
        },
        {
            "ProductId": 65,
            "Title": "TEST",
            "Description": "",
            "ResourceIDs": [],
            "PrimaryFormID": [
                "194"
            ],
            "Terms": {}
        },
        {
            "ProductId": 67,
            "Title": "Gated Product Example PKG",
            "Description": "",
            "ResourceIDs": [],
            "PrimaryFormID": [
                "195"
            ],
            "Terms": {
                "Id": 59,
                "Name": "Get it for free",
                "Description": "",
                "Duration": 1,
                "DurationUnit": "I",
                "Price": "0",
                "ProductId": 67
            }
        },
        {
            "ProductId": 75,
            "Title": "SB: Apple Moves To Limit Tracking in Safari: Prove",
            "Description": "",
            "ResourceIDs": [],
            "PrimaryFormID": [],
            "Terms": {}
        },
        {
            "ProductId": 83,
            "Title": "SB: Audience Extension: Turning Identity Into Cash",
            "Description": "",
            "ResourceIDs": [],
            "PrimaryFormID": [],
            "Terms": {}
        },
        {
            "ProductId": 91,
            "Title": "DAS_freepass_00",
            "Description": "",
            "ResourceIDs": [
                187
            ],
            "PrimaryFormID": [
                "267"
            ],
            "Terms": {
                "Id": 67,
                "Name": "DAS_freepass_00",
                "Description": "",
                "Duration": 30,
                "DurationUnit": "D",
                "Price": "0",
                "ProductId": 91
            }
        },
        {
            "ProductId": 99,
            "Title": "Test12311111",
            "Description": "Testss",
            "ResourceIDs": [],
            "PrimaryFormID": [
                "10"
            ],
            "Terms": {
                "Id": 75,
                "Name": "Product123",
                "Description": null,
                "Duration": 0,
                "DurationUnit": "",
                "Price": "0",
                "ProductId": 99
            }
        },
        {
            "ProductId": 107,
            "Title": "Test123-456",
            "Description": "Testss updated",
            "ResourceIDs": [
                98
            ],
            "PrimaryFormID": [
                "10"
            ],
            "Terms": {
                "Id": 83,
                "Name": "Product123",
                "Description": null,
                "Duration": 0,
                "DurationUnit": "",
                "Price": "0",
                "ProductId": 107
            }
        },
        {
            "ProductId": 109,
            "Title": "Webinar: Enhanced Analytics 2-26-2019 at 1 PM",
            "Description": "",
            "ResourceIDs": [
                197
            ],
            "PrimaryFormID": [],
            "Terms": {
                "Id": 93,
                "Name": "Enhanced Analytics Webinar",
                "Description": "Check the box to register for the February 26th webinar.",
                "Duration": 1,
                "DurationUnit": "I",
                "Price": "0",
                "ProductId": 109
            }
        }
    ]
}

GET specific Product


 https://api.onecount.net/v2/users/products/{{product id}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get specific Product Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/users/products/{{product id}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get specific Product Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Products": [
        {
            "ProductId": 109,
            "Title": "Webinar: Enhanced Analytics 2-26-2019 at 1 PM",
            "Description": "",
            "ResourceIDs": [
                197
            ],
            "PrimaryFormID": [],
            "Terms": {
                "Id": 93,
                "Name": "Enhanced Analytics Webinar",
                "Description": "Check the box to register for the February 26th webinar.",
                "Duration": 1,
                "DurationUnit": "I",
                "Price": "0",
                "ProductId": 109
            }
        }
    ]
}

GET lookup Product


https://api.onecount.net/v2/products/lookup?Title={{Product Name}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Query Params


Title                                                                                                        {{Product Name}} 

Example


Request

Lookup Product Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/products/lookup?Title={{Product Name}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Lookup Product Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Products": [
        {
            "ProductId": 107,
            "Title": "Test123-456",
            "Description": "Testss updated",
            "Terms": {
                "Id": 83,
                "Name": "Product123",
                "Description": null,
                "Duration": 0,
                "DurationUnit": "",
                "Price": "0",
                "ProductId": 107
            }
        }
    ]
}

POST Create Product


https://api.onecount.net/v2/products

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Title":"Test API package creation 2","Description": "Test API package creation 2","Terms":{"Name":"Test term for API 2"},"PrimaryFormId":0}

Example


Request

Create Product Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/products',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"Title":"Test API package creation 1","Description": "Test API package creation 1","Terms":{"Name":"Test term for API 1"},"PrimaryFormId":0}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Create Product Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Products": [
        {
            "ProductId": 599
        }
    ]
}

PUT Update Product


 https://api.onecount.net/v2/products/{{Product id}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Title":"Test API package 23","Description": "Test API package 23","PrimaryFormId":0}

Example


Request

Update Product Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/products/{{Product id}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{"Title":"Test API package 1","Description": "Test API package 1","PrimaryFormId":0}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
 

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Update Product Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Products": [
        {
            "ProductId": 599,
            "Title": "Test API package 1",
            "Description": "Test API package 1"
        }
    ]
}

POST Attach Resource to Product


https://api.onecount.net/v2/products/attachResource

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"ProductID":"599","ResourceID":"903"}

Example


Request

Attach Resource to Product Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/products/attachResource',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"ProductID":"599","ResourceID":"903"}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Create Product Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Products": "599"
}

COMPONENT: Terms

This resource is for manipulating terms resource. A term can be created, updated or searched.

Method

Url

Action

GET

/terms/5

Get term id 5

GET

/terms/lookup?Name=termname

Lookup terms by Name

POST

/terms

JSON of the terms type object needs to be sent as post data. Id field should not be sent.

PUT

/terms/5

JSON of the terms type object needs to be sent as post data. Id field is mandatory for update.

GET All Terms



https://api.onecount.net/v2/terms

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get All Terms Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/terms',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get All Terms Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Terms": [
        {
            "Id": 26,
            "Name": "Please contact me to arrange a demo",
            "Description": "",
            "Duration": 1,
            "DurationUnit": "I",
            "Price": "0",
            "ProductId": 26
        },
        {
            "Id": 34,
            "Name": "ONEcount Promotional Emails",
            "Description": "ONEcount promotional emails",
            "Duration": 1,
            "DurationUnit": "I",
            "Price": "0",
            "ProductId": 34
        },
        {
            "Id": 42,
            "Name": "ONEcount Staff List",
            "Description": "List of ONEcount/GCN Media Staff",
            "Duration": 1,
            "DurationUnit": "I",
            "Price": "0",
            "ProductId": 42
        },
        {
            "Id": 49,
            "Name": "ONEcount Medical Publishers",
            "Description": "ONEcount Medical Publishers and Associations",
            "Duration": 1,
            "DurationUnit": "I",
            "Price": "0",
            "ProductId": 49
        },
        {
            "Id": 57,
            "Name": "000 Pop-Up Term",
            "Description": "",
            "Duration": 1,
            "DurationUnit": "I",
            "Price": "0",
            "ProductId": 57
        },
        {
            "Id": 59,
            "Name": "Get it for free",
            "Description": "",
            "Duration": 1,
            "DurationUnit": "I",
            "Price": "0",
            "ProductId": 67
        },
        {
            "Id": 67,
            "Name": "DAS_freepass_00",
            "Description": "",
            "Duration": 30,
            "DurationUnit": "D",
            "Price": "0",
            "ProductId": 91
        },
        {
            "Id": 75,
            "Name": "Product123",
            "Description": null,
            "Duration": 0,
            "DurationUnit": "",
            "Price": "0",
            "ProductId": 99
        },
        {
            "Id": 83,
            "Name": "Product123",
            "Description": null,
            "Duration": 0,
            "DurationUnit": "",
            "Price": "0",
            "ProductId": 107
        },
        {
            "Id": 91,
            "Name": "Test123 update ",
            "Description": "Testss updated",
            "Duration": 10,
            "DurationUnit": "",
            "Price": "0",
            "ProductId": 107
        },
        {
            "Id": 93,
            "Name": "Enhanced Analytics Webinar",
            "Description": "Check the box to register for the February 26th webinar.",
            "Duration": 1,
            "DurationUnit": "I",
            "Price": "0",
            "ProductId": 109
        },
        {
            "Id": 423,
            "Name": "Test term for API",
            "Description": null,
            "Duration": 0,
            "DurationUnit": "",
            "Price": "0.00",
            "ProductId": 591
        },
        {
            "Id": 431,
            "Name": "Test term for API 1",
            "Description": null,
            "Duration": 0,
            "DurationUnit": "",
            "Price": "0.00",
            "ProductId": 599
        }
    ]
}

GET specific Term


 https://api.onecount.net/v2/terms/{{Term Id}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get specific Term Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/terms/{{Term Id}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get specific Term Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Terms": [
        {
            "Id": 431,
            "Name": "Test term for API 1",
            "Description": null,
            "Duration": 0,
            "DurationUnit": "",
            "Price": "0.00",
            "ProductId": 599
        }
    ]
}

GET lookup Term


https://api.onecount.net/v2/terms/lookup?Name={{Term Name}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Query Params


Name                                                                                                     {{Term Name}}

Example


Request

Lookup Term Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/terms/lookup?Name={{Term Name}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Lookup Term Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Terms": [
        {
            "Id": 431,
            "Name": "Test term for API 1",
            "Description": null,
            "Duration": 0,
            "DurationUnit": "",
            "Price": "0.00",
            "ProductId": 599
        }
    ]
}

POST Create Term


https://api.onecount.net/v2/terms

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Name":"Test API term creation","Description":"Test API term creation","Duration":10,"ProductId":599}

Example


Request

Create Term Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/terms',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"Name":"Test API term creation","Description":"Test API term creation","Duration":10,"ProductId":599}

'
,
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Create Term Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Terms": [
        {
            "Id": 447
        }
    ]
}

PUT Update Term


 https://api.onecount.net/v2/terms/{{Term Id}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Name":"Test API term creation update","Description":"Test API term creation update","Duration":10,"ProductId":599}

Example


Request

Update Term Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/terms/{{Term Id}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{"Name":"Test API term creation update","Description":"Test API term creation update","Duration":10,"ProductId":599}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Update Term Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Terms": [
        {
            "Id": 447,
            "Name": "Test API term creation update",
            "Description": "Test API term creation update",
            "Duration": 10,
            "DurationUnit": "",
            "Price": "0.00",
            "ProductId": 599
        }
    ]
}

COMPONENT: Resources

Resources are the available entities that can be accessed/modified via API. Each resource can be created, updated or requested by using the corresponding http method described above.

  • questions

  • users

  • products

  • terms

  • resources

  • sources

  • transactions

 

This resource is for manipulating resources resource. A resource can be created, updated or searched.

Method

Url

Action

GET

/resources/5

Get resource id 5

GET

/resources/lookup?Name=resourcename

Lookup resources by Name

POST

/resources

JSON of the resources type object needs to be sent as post data. Id field should not be sent.

PUT

/resources/5

JSON of the resources type object needs to be sent as post data. Id field is mandatory for update.

GET All Resources



https://api.onecount.net/v2/resources

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get All Resource Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/resources',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get All Resource Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Resources": [
        {
            "Id": 18,
            "Name": "ONEcount/GCN Staff Newsletter Resource",
            "Description": "ONEcount/GCN Staff Newsletter List",
            "Type": "2",
            "Value": "57|53|55",
            "FreePass": 0
        },
        {
            "Id": 26,
            "Name": "GCN TEST GROUP",
            "Description": "THESE USER WILL GET TEST MESSAGE",
            "Type": "2",
            "Value": "47",
            "FreePass": 0
        },
        {
            "Id": 98,
            "Name": "ONEcount Prospects List",
            "Description": "Newsletter List of ONEcount Prospects",
            "Type": "2",
            "Value": "55",
            "FreePass": 0
        },
        {
            "Id": 106,
            "Name": "Google Ads Form",
            "Description": "",
            "Type": "3",
            "Value": "http://ocreg.one-count.com/onecount/reg/registerForm.cgi?form=186&brand=OC",
            "FreePass": 0
        },
        {
            "Id": 114,
            "Name": "secure files",
            "Description": "",
            "Type": "3",
            "Value": "/download.php",
            "FreePass": 0
        },
        {
            "Id": 130,
            "Name": "REQUEST A DEMO",
            "Description": "",
            "Type": "3",
            "Value": "http://ocreg.one-count.com/onecount/flexreg/displayform.cgi?g=0&form=34",
            "FreePass": 0
        },
        {
            "Id": 137,
            "Name": "ONEcount Medical Publishers",
            "Description": "ONEcount Medical Publishers and Associations",
            "Type": "2",
            "Value": "61",
            "FreePass": 0
        },
        {
            "Id": 145,
            "Name": "Pop-Up Test Page",
            "Description": "",
            "Type": "3",
            "Value": "http://omar.gcnmedia.com/projects/form/gated.html",
            "FreePass": 0
        },
        {
            "Id": 146,
            "Name": "Platform Resource",
            "Description": "Test Resource",
            "Type": "3",
            "Value": "/Platform",
            "FreePass": 0
        },
        {
            "Id": 153,
            "Name": "Submitted",
            "Description": "",
            "Type": "3",
            "Value": "http://gcn-reg.onecount.net/onecount/reg/tSuccessView.php?brand=oc",
            "FreePass": 0
        }
    ]
}

GET specific Resource


 https://api.onecount.net/v2/resources/{{Resource ID}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get specific Resource Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/resources/{{Resource ID}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get specific Resource Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Resources": [
        {
            "Id": 623,
            "Name": "TOP 3 THINGS - NonStop Local News",
            "Description": "Tap into Non-Stop News from Montana Right Now! From the Big Story to the 3 Things to Know - we have the moment's essential headlines.",
            "Type": "2",
            "Value": "",
            "FreePass": 0
        }
    ]
}

GET lookup Resource


https://api.onecount.net/v2/resources/lookup?Name={{Resource Name}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Query Params


Name                                                                                                    {{Resource Name}}

Example


Request

Lookup Resource Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/resources/lookup?Name={{Resource Name}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Lookup Resource Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Resources": [
        {
            "Id": 479,
            "Name": "Virtualization Review",
            "Description": "",
            "Type": "0",
            "Value": "",
            "FreePass": 0
        }
    ]
}

POST Create Resource


https://api.onecount.net/v2/resources

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Name":"Test API product creation 22","Description":"Test API product creation 22","Type":3,"FreePass":1,"Value":["http://one-count.com"],"Gating":false,"Price":0,"PrimaryFormId":"","VendorId":1}

Example


Request

Create Resource Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/resources',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"Name":"Test API product creation 21","Description":"Test API product creation 21","Type":3,"FreePass":1,"Value":["http://one-count.com"],"Gating":false,"Price":0,"PrimaryFormId":"","VendorId":1}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Create Resource Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Resources": [
        {
            "Id": 871,
            "Name": "Test API product creation 21",
            "Description": "Test API product creation 21",
            "Type": "3",
            "Value": "http://one-count.com",
            "FreePass": 1
        }
    ]
}

PUT Update Resource


 https://api.onecount.net/v2/resources/{{resource id}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Name":"Test API product creation 23","Description":"Test API product creation 23","Type":3,"FreePass":1,"Value":["http://one-count.com","onecount.net"],"Gating":false,"Price":0,"PrimaryFormId":"","VendorId":1}

Example


Request

Update Resource Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/resources/{{resource id}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{"Name":"Test API product creation 23","Description":"Test API product creation 23","Type":3,"FreePass":1,"Value":["http://one-count.com","onecount.net"],"Gating":false,"Price":0,"PrimaryFormId":"","VendorId":1}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Update Resource Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Resources": [
        {
            "Id": 903,
            "Name": "Test API product creation 23",
            "Description": "Test API product creation 23",
            "Type": "3",
            "Value": "http://one-count.com",
            "FreePass": 1
        },
        {
            "Id": 903,
            "Name": "Test API product creation 23",
            "Description": "Test API product creation 23",
            "Type": "3",
            "Value": "onecount.net",
            "FreePass": 1
        }
    ]
}

COMPONENT: Source Codes

    • ===

This resource is for manipulating source code for a resource. A source code can be created, updated or searched.

Method

Url

Action

GET

/sources/1

Get source id 1.

GET

/sources/lookup?Source=sourcename

Lookup sources by source.

POST

/sources

JSON of the Sources type object needs to be sent as post data. Id field should not be sent.

PUT

/sources

JSON of the Sources type object needs to be sent as post data. Id field is mandatory for update.

GET All Source codes



https://api.onecount.net/v2/sources

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get All Source code Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/sources',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                      200 OK

Get All Source code Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Sources": [
        {
            "Id": 26,
            "Source": "GCN-Member",
            "Description": "Uploaded from Reston VA",
            "Parent": 0
        },
        {
            "Id": 34,
            "Source": "SugarID",
            "Description": "Sugar IDs cleaned contacts list and cleaned leads list sent by Sean Fulton for upload.",
            "Parent": 0
        },
        {
            "Id": 42,
            "Source": "DEMOFORM",
            "Description": "\"Request a Demo\" form from one-count.com",
            "Parent": 0
        },
        {
            "Id": 50,
            "Source": "ABM ANNUAL 2014",
            "Description": "ABM Annual 2014 - Registration List for Sponsors",
            "Parent": 0
        },
        {
            "Id": 58,
            "Source": "BIMS REG LIST",
            "Description": "BIMS Registration List for Sponsors (2013/2014)",
            "Parent": 0
        },
        {
            "Id": 66,
            "Source": "SIPA 13",
            "Description": "SIPA 2013 - sponsor - attendees",
            "Parent": 0
        },
        {
            "Id": 74,
            "Source": "Google Ads",
            "Description": "From Google Banner Ads",
            "Parent": 0
        },
        {
            "Id": 82,
            "Source": "EDIT PROFILE",
            "Description": "FOR EDIT PROFILE FORM",
            "Parent": 0
        },
        {
            "Id": 83,
            "Source": "Test Source Code",
            "Description": "",
            "Parent": 0
        },
        {
            "Id": 91,
            "Source": "NEWSLETTER",
            "Description": "Newsletter",
            "Parent": 0
        },
        {
            "Id": 99,
            "Source": "INFOTANKS-comps-only_12032019",
            "Description": "",
            "Parent": 0
        },
        {
            "Id": 107,
            "Source": "INFOTANKS-DMP-only_12102019",
            "Description": "",
            "Parent": 0
        },
        {
            "Id": 109,
            "Source": "BMVM",
            "Description": "Active Attendees",
            "Parent": 0
        },
        {
            "Id": 115,
            "Source": "USECASES",
            "Description": "Use Case PDF",
            "Parent": 0
        },
        {
            "Id": 123,
            "Source": "Borrell Miami 2022",
            "Description": "",
            "Parent": 0
        },
        {
            "Id": 131,
            "Source": "05092022-telemarketing",
            "Description": "",
            "Parent": 0
        },
        {
            "Id": 139,
            "Source": "WEBINAR6.15.22",
            "Description": "Live Webinar Series June 15, 2022",
            "Parent": 0
        },
        {
            "Id": 147,
            "Source": "LMA Show List",
            "Description": "",
            "Parent": 0
        },
        {
            "Id": 155,
            "Source": "AAA",
            "Description": "",
            "Parent": 0
        },
        {
            "Id": 163,
            "Source": "MGS2022",
            "Description": "",
            "Parent": 0
        },
        {
            "Id": 171,
            "Source": "MGS2023",
            "Description": "",
            "Parent": 0
        },
        {
            "Id": 179,
            "Source": "Sugar Leads",
            "Description": "",
            "Parent": 0
        },
        {
            "Id": 187,
            "Source": "seansbox",
            "Description": "",
            "Parent": 0
        },
        {
            "Id": 191,
            "Source": "SEEITLIVE",
            "Description": "Lunch & Learn Webinar Series with Special Partner Guests",
            "Parent": 0
        },
        {
            "Id": 199,
            "Source": "80-percent-conversion-rates",
            "Description": "",
            "Parent": 0
        }
    ]
}

GET specific Source code


 https://api.onecount.net/v2/sources/{{source code id}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get specific Source Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/sources/{{source code id}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get specific Source Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Sources": [
        {
            "Id": 26,
            "Source": "GCN-Member",
            "Description": "Uploaded from Reston VA",
            "Parent": 0
        }
    ]
}

GET lookup Source code


https://api.onecount.net/v2/sources/lookup?Source={{Source code Name}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Query Params


Source                                                                                                  {{Source code Name}}

Example


Request

Lookup Source code Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/sources/lookup?Source={{Source code Name}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                      200 OK

Lookup Source code Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Sources": [
        {
            "Id": 26,
            "Source": "GCN-Member",
            "Description": "Uploaded from Reston VA",
            "Parent": 0
        }
    ]
}

POST Create Source code


https://api.onecount.net/v2/sources

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Source":"Test source code from API"}

Example


Request

Create Source code Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/sources',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"Source":"Test source code from API"}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Create Source code Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Sources": [
        {
            "Id": 223,
            "Source": "Test source code from API",
            "Description": "",
            "Parent": 0
        }
    ]
}

PUT Update Source code


 https://api.onecount.net/v2/sources/{{source code id}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Source":"Test API","Parent":215}

Example


Request

Update Source code Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/sources/{{source code id}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{"Source":"Test API","Parent":215}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Update Source code Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Sources": [
        {
            "Id": 223,
            "Source": "Test API",
            "Description": "",
            "Parent": 215
        }
    ]
}

COMPONENT: Transactions

This resource is for manipulating transactions resource. A transaction can be created or searched.

Method

Url

Action

GET

/transactions

List all transactions

GET

/transactions/lookup?UserId=1

Lookup all transaction of UserId = 1

POST

/transactions

JSON of the Transactions type object needs to be sent as post data. Id field should not be sent.

GET All Transactions



https://api.onecount.net/v2/transactions

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get All Transaction Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/transactions',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get All Transaction Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Transactions": [
        {
            "Id": 10,
            "UserId": 10,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "10:02:13",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 26,
            "UserId": 10,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "10:41:59",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "r",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 50,
            "UserId": 26,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:25:38",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 58,
            "UserId": 10,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:25:43",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "r",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 66,
            "UserId": 42,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:57:11",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 26,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 74,
            "UserId": 50,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:57:11",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 26,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 82,
            "UserId": 58,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:57:11",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 26,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 90,
            "UserId": 66,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:57:11",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 26,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 98,
            "UserId": 74,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:57:11",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 26,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 106,
            "UserId": 82,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:57:11",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 26,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 114,
            "UserId": 90,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:57:11",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 26,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 122,
            "UserId": 98,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:57:11",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 26,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 130,
            "UserId": 42,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:59:10",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "r",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 138,
            "UserId": 50,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:59:10",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "r",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 146,
            "UserId": 58,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:59:10",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "r",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 154,
            "UserId": 66,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:59:10",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "r",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 162,
            "UserId": 74,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:59:10",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "r",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 170,
            "UserId": 82,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:59:10",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "r",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 178,
            "UserId": 90,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:59:10",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "r",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 186,
            "UserId": 98,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "12:59:10",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "r",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 194,
            "UserId": 162,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:00:42",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 202,
            "UserId": 170,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:00:42",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 210,
            "UserId": 178,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:00:42",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 218,
            "UserId": 186,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:00:42",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 226,
            "UserId": 194,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:00:42",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 234,
            "UserId": 202,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:00:42",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 242,
            "UserId": 210,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:00:42",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 250,
            "UserId": 218,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:00:42",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 258,
            "UserId": 282,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:02:19",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 266,
            "UserId": 290,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:02:19",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 274,
            "UserId": 298,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:02:19",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 282,
            "UserId": 306,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:02:19",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 290,
            "UserId": 314,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:02:19",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 298,
            "UserId": 322,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:02:19",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 306,
            "UserId": 330,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:02:19",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 10,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 466,
            "UserId": 698,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:13:06",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 26,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 474,
            "UserId": 706,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:13:06",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 26,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 482,
            "UserId": 714,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:13:06",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 26,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 490,
            "UserId": 722,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:13:06",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 26,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 498,
            "UserId": 730,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:13:06",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 26,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 506,
            "UserId": 738,
            "TermId": 2,
            "TransactionDate": "2014-07-17",
            "TransactionTime": "13:13:06",
            "RequestDate": "2014-07-17",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 2,
            "Source": 26,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 522,
            "UserId": 754,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 530,
            "UserId": 762,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 538,
            "UserId": 770,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 546,
            "UserId": 778,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 554,
            "UserId": 786,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 570,
            "UserId": 802,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 578,
            "UserId": 810,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 586,
            "UserId": 818,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 602,
            "UserId": 834,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 610,
            "UserId": 842,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 618,
            "UserId": 850,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 626,
            "UserId": 858,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 634,
            "UserId": 866,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 642,
            "UserId": 874,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 650,
            "UserId": 882,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 658,
            "UserId": 890,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 666,
            "UserId": 898,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 674,
            "UserId": 906,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 682,
            "UserId": 914,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 690,
            "UserId": 922,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 698,
            "UserId": 930,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 706,
            "UserId": 938,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 714,
            "UserId": 946,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 722,
            "UserId": 954,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 730,
            "UserId": 962,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 738,
            "UserId": 970,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 746,
            "UserId": 978,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 754,
            "UserId": 986,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 762,
            "UserId": 994,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 770,
            "UserId": 1002,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 778,
            "UserId": 1010,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 786,
            "UserId": 1018,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 794,
            "UserId": 1026,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 802,
            "UserId": 1034,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 810,
            "UserId": 1042,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 818,
            "UserId": 1050,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 826,
            "UserId": 1058,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 834,
            "UserId": 1066,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 842,
            "UserId": 1074,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 850,
            "UserId": 1082,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 858,
            "UserId": 1090,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 866,
            "UserId": 1098,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 874,
            "UserId": 1106,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 882,
            "UserId": 1114,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 890,
            "UserId": 1122,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 898,
            "UserId": 1130,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 906,
            "UserId": 1138,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 914,
            "UserId": 1146,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 922,
            "UserId": 1154,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 930,
            "UserId": 1162,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 938,
            "UserId": 1170,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 946,
            "UserId": 1178,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 954,
            "UserId": 1186,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 962,
            "UserId": 1194,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 970,
            "UserId": 1202,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 978,
            "UserId": 1210,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 986,
            "UserId": 1218,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 994,
            "UserId": 1226,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 1002,
            "UserId": 1234,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        }
    ]
}

GET specific Transaction


 https://api.onecount.net/v2/transactions/{{Transaction id}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get specific Transaction Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/transactions/{{Transaction id}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get specific Transaction Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Transactions": [
        {
            "Id": 1002,
            "UserId": 1234,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        }
    ]
}

GET lookup Transaction


https://api.onecount.net/v2/transactions/lookup?UserId={{OCID}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Query Params


UserId                                                                                                   {{OCID}}

Example


Request

Lookup Transaction Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/transactions/lookup?UserId={{OCID}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Lookup Transaction Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Transactions": [
        {
            "Id": 52494786,
            "UserId": 1234,
            "TermId": 34,
            "TransactionDate": "2016-01-19",
            "TransactionTime": "15:30:04",
            "RequestDate": "2016-01-19",
            "UserIP": "12.226.247.2",
            "SubscriptionType": "u",
            "ProductId": 34,
            "Source": 0,
            "ProductStatus": 0,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 42654041,
            "UserId": 1234,
            "TermId": 34,
            "TransactionDate": "2015-09-09",
            "TransactionTime": "11:20:39",
            "RequestDate": "2015-09-09",
            "UserIP": "24.187.236.98",
            "SubscriptionType": "n",
            "ProductId": 34,
            "Source": 0,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 97251022,
            "UserId": 1234,
            "TermId": 34,
            "TransactionDate": "2015-06-04",
            "TransactionTime": "14:59:42",
            "RequestDate": "2015-06-04",
            "UserIP": "12.226.247.2",
            "SubscriptionType": "u",
            "ProductId": 34,
            "Source": 0,
            "ProductStatus": 0,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 55492559,
            "UserId": 1234,
            "TermId": 34,
            "TransactionDate": "2015-04-03",
            "TransactionTime": "16:32:04",
            "RequestDate": "2015-04-03",
            "UserIP": "24.187.236.98",
            "SubscriptionType": "r",
            "ProductId": 34,
            "Source": 58,
            "ProductStatus": 106,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 98173391,
            "UserId": 1234,
            "TermId": 34,
            "TransactionDate": "2015-04-03",
            "TransactionTime": "15:50:45",
            "RequestDate": "2014-08-19",
            "UserIP": "24.187.236.98",
            "SubscriptionType": "n",
            "ProductId": 34,
            "Source": 34,
            "ProductStatus": 106,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 91711793,
            "UserId": 1234,
            "TermId": 18,
            "TransactionDate": "2015-04-27",
            "TransactionTime": "14:24:51",
            "RequestDate": "2015-04-27",
            "UserIP": "24.187.236.98",
            "SubscriptionType": "u",
            "ProductId": 18,
            "Source": 0,
            "ProductStatus": 106,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 74936400,
            "UserId": 1234,
            "TermId": 18,
            "TransactionDate": "2015-04-27",
            "TransactionTime": "12:35:18",
            "RequestDate": "2015-04-27",
            "UserIP": "68.196.187.74",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 106,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 21664714,
            "UserId": 1234,
            "TermId": 18,
            "TransactionDate": "2015-04-03",
            "TransactionTime": "15:50:46",
            "RequestDate": "2015-04-03",
            "UserIP": "24.187.236.98",
            "SubscriptionType": "u",
            "ProductId": 18,
            "Source": 0,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 81129263,
            "UserId": 1234,
            "TermId": 18,
            "TransactionDate": "2014-08-19",
            "TransactionTime": "11:18:55",
            "RequestDate": "2014-08-19",
            "UserIP": "74.201.38.1",
            "SubscriptionType": "n",
            "ProductId": 18,
            "Source": 34,
            "ProductStatus": 2,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 30461748,
            "UserId": 1234,
            "ResourceId": 459,
            "TransactionDate": "2023-03-15",
            "TransactionTime": "12:07:55",
            "RequestDate": "2023-03-15",
            "UserIP": "74.201.38.12",
            "SubscriptionType": "n",
            "SourceCode": 0,
            "ProductStatus": 0,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 25858253,
            "UserId": 1234,
            "ResourceId": 451,
            "TransactionDate": "2023-03-15",
            "TransactionTime": "11:45:19",
            "RequestDate": "2023-03-15",
            "UserIP": "74.201.38.12",
            "SubscriptionType": "n",
            "SourceCode": 0,
            "ProductStatus": 0,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 69453260,
            "UserId": 1234,
            "ResourceId": 411,
            "TransactionDate": "2022-06-07",
            "TransactionTime": "17:03:14",
            "RequestDate": "2022-06-07",
            "UserIP": "74.201.38.12",
            "SubscriptionType": "n",
            "SourceCode": 0,
            "ProductStatus": 0,
            "MediaFilePath": "",
            "Amount": ""
        },
        {
            "Id": 51354425,
            "UserId": 1234,
            "ResourceId": 355,
            "TransactionDate": "2020-04-06",
            "TransactionTime": "12:24:08",
            "RequestDate": "2020-04-06",
            "UserIP": "74.201.38.12",
            "SubscriptionType": "n",
            "SourceCode": 0,
            "ProductStatus": 0,
            "MediaFilePath": "",
            "Amount": ""
        }
    ]
}

POST Create Transaction


https://api.onecount.net/v2/transactions

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"UserId": 1845775,"TermId":447 ,"UserIP":"192.168.0.1" ,"SubscriptionType":"n" , "ProductId":599 ,"FormId": "8f93834c-adce-4dc7-acd0-f3a1e0f7c63f","Source": 83,"ProductStatus": 2,"Amount":"0.00" ,"PaypalTransId":"" , "MediaFilePath":"" ,"Remarks": "USER SUBSCRIBED","BatchId":"1234" ,"Quantity": 1, "ExpireDate":"20251211" }

Example


Request

Create Transaction Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/transactions',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"UserId": 1845775,"TermId":447 ,"UserIP":"192.168.0.1" ,"SubscriptionType":"n" , "ProductId":599 ,"FormId": "8f93834c-adce-4dc7-acd0-f3a1e0f7c63f","Source": 83,"ProductStatus": 2,"Amount":"0.00" ,"PaypalTransId":"" , "MediaFilePath":"" ,"Remarks": "USER SUBSCRIBED","BatchId":"1234" ,"Quantity": 1, "ExpireDate":"20251211" }',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Create Transaction Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Transactions": {
        "Id": "1234",
        "UserId": 1845775,
        "TermId": 447,
        "TransactionDate": "20231211",
        "TransactionTime": "09:34:26",
        "RequestDate": "20231211",
        "UserIP": "192.168.0.1",
        "SubscriptionType": "n",
        "ProductId": 599,
        "Source": 83,
        "ProductStatus": 2,
        "MediaFilePath": "",
        "Amount": "0.00"
    }
}

COMPONENT: Engagements

Engagement can be added, updated and searched for using the engagements resource from the api. 

Method

Url

Action

GET

/engagements

Get engagement data limiting 25.

GET

/engagements/<engagement id>

Get data for engagement id. The engagement id is a string

POST

/engagements

Create a new engagement

Parameters required to create the engagement needs to be sent as post data in JSON format.

PUT

/engagements/<engagement id>

Update engagement by engagement id. The engagement id string 

Parameters required to update the engagement needs to be sent as post data in JSON format.

NOTE: While updating a select and checkbox type question you need to pass complete set of Choices for that question including the one which are already existing. If not the choices will be overwritten from the choices from the body.

POST/engagements/metric/<engagement id>

Add options to specific metric in an engagement without passing all options and overriding existing options. 

Parameters required to update the engagement needs to be sent as post data in JSON format.

This API is used to add options only for select and checkbox metrics.

POST

/engagements/addUser

Add user to engagement

Parameters required to add user to the engagement needs to be sent as post data in JSON format.

GET All Engagements



https://api.onecount.net/v2/engagements

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get All Engagement Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/engagements',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get all engagements Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Engagements": [
        {
            "Id": "048d38e9-d6c3-432e-9671-3f31809d48b3",
            "Name": "Test Engagement 1",
            "Engagement Fields": [
                {
                    "Name": "id",
                    "Type": "text"
                },
                {
                    "Name": "activity_time",
                    "Type": "text"
                },
                {
                    "Name": "Name",
                    "Type": "text"
                },
                {
                    "Name": "Test Field",
                    "Type": "select",
                    "Values": [
                        {
                            "text": "Test 1",
                            "value": "Test1"
                        }
                    ]
                }
            ]
        }
    ]
}

GET Specific Engagement



https://api.onecount.net/v2/engagements/{{Engagement ID}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get Specific Engagement Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/engagements/{{Engagement ID}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get specific engagement Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Engagements": [
        {
            "Id": "048d38e9-d6c3-432e-9671-3f31809d48b3",
            "Name": "Test Engagement 1",
            "Engagement Fields": [
                {
                    "Name": "id",
                    "Type": "text"
                },
                {
                    "Name": "activity_time",
                    "Type": "text"
                },
                {
                    "Name": "Name",
                    "Type": "text"
                },
                {
                    "Name": "Test Field",
                    "Type": "select",
                    "Values": [
                        {
                            "text": "Test 1",
                            "value": "Test1"
                        }
                    ]
                }
            ]
        }
    ]
}

POST Create Engagement


https://api.onecount.net/v2/engagements

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Name":"Engagement Name", "Description":"Engagement Description", "Metrics":[
    {"Name":[{"webinar ID 1":"Webinar 1"},{"webinar ID 3":"Webinar 3"},{"webinar ID 3":"Webinar 3"}],"Type": "select"},
    {"Attendance Status":[{"attended":"Attended"},{"not_attended":"Not Attended"}],"Type": "select"},
    {"Price":[],"Type": "numeric"},
    {"Transaction Date":[],"Type": "date"}
]}

Example


Request

Create Engagement Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/engagements',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"Name":"Test engagement 2", "Description":"Test engagement 2", "Metrics":[
    {"Name":[{"text":"Webinar 1","value":"Webinar_1"},{"text":"Webinar 2","value":"Webinar_2"}],"Type": "select"},
    {"Attendance Status":[{"text":"Attended","value":"attended"},{"text":"Not Attended","value":"not_attended"}],"Type": "select"},
    {"Price":[],"Type": "numeric"},
    {"Transaction Date":[],"Type": "text"}
]}'
,
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}',
   'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Create Engagement Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Engagements": [
        {
            "Id": "71c1115f-e5bb-470a-bedf-6940f5ac8565",
            "Name": "Test engagement 2",
            "Metrics": [
                {
                    "Name": "Name",
                    "Type": "select",
                    "Values": [
                        {
                            "text": "Webinar 1",
                            "value": "Webinar_1"
                        },
                        {
                            "text": "Webinar 2",
                            "value": "Webinar_2"
                        }
                    ]
                },
                {
                    "Name": "Attendance Status",
                    "Type": "select",
                    "Values": [
                        {
                            "text": "Attended",
                            "value": "attended"
                        },
                        {
                            "text": "Not Attended",
                            "value": "not_attended"
                        }
                    ]
                },
                {
                    "Name": "Price",
                    "Type": "numeric"
                },
                {
                    "Name": "Transaction Date",
                    "Type": "text"
                },
                {
                    "Name": "id",
                    "Type": "text"
                },
                {
                    "Name": "activity_time",
                    "Type": "text"
                }
            ]
        }
    ]
}

PUT Update Engagement


 https://api.onecount.net/v2/engagements/{{Engagement Id}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Name":"Test engagement 3", "Metrics":[
    {"Attendance Status":[{"text":"Attended","value":"attended"},{"text":"Not Attended","value":"not_attended"}],"Type": "select"},
    {"Price":[],"Type": "text"}
    ]}

Example


Request

Update Engagement Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/engagements/{{Engagement Id}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{"Name":"Test engagement 3", "Metrics":[
    {"Attendance Status":[{"text":"Attended","value":"attended"},{"text":"Not Attended","value":"not_attended"}],"Type": "select"},
    {"Price":[],"Type": "text"}
    ]}'
,
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}',
   'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Update Engagement Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Engagements": [
        {
            "Id": "e0e816ec-77ba-4db1-bfc0-22d340337357",
            "Name": "Test engagement 3",
            "Metrics": [
                {
                    "Name": "Attendance Status",
                    "Type": "select",
                    "Values": [
                        {
                            "text": "Attended",
                            "value": "attended"
                        },
                        {
                            "text": "Not Attended",
                            "value": "not_attended"
                        }
                    ]
                },
                {
                    "Name": "Price",
                    "Type": "text"
                },
                {
                    "Name": "Name",
                    "Type": "select",
                    "Values": [
                        {
                            "text": "Webinar 1",
                            "value": "Webinar_1"
                        },
                        {
                            "text": "Webinar 2",
                            "value": "Webinar_2"
                        }
                    ]
                },
                {
                    "Name": "Transaction Date",
                    "Type": "text"
                },
                {
                    "Name": "id",
                    "Type": "text"
                },
                {
                    "Name": "activity_time",
                    "Type": "text"
                }
            ]
        }
    ]
}

POST Add options to metric


 https://api.onecount.net/v2/engagements/metric/{{Engagement Id}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Metrics":[
    {"Attendance Status":[{"text":"checks","value":"checks"},{"text":"c","value":"c"}]},
    {"lagacy status":[{"text":"c","value":"c"}]}
    ]}

Example


Request

Add options to metric
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/engagements/metric/{{Engagement Id}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS =>'{"Metrics":[
    {"Attendance Status":[{"text":"checks","value":"checks"},{"text":"c","value":"c"}]},
    {"lagacy status":[{"text":"c","value":"c"}]}
    ]}'
,
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}',
   'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Add options to metric
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Engagements": [
        {
            "Id": "e0e816ec-77ba-4db1-bfc0-22d340337357",
            "Name": "Test engagement 3",
            "Metrics": [
                {
                    "Name": "Attendance Status",
                    "Type": "select",
                    "Values": [
                        {
                            "text": "Attended",
                            "value": "attended"
                        },
                        {
                            "text": "Not Attended",
                            "value": "not_attended"
                        },
                        {
                            "text":"checks",
                            "value":"checks"
                        },
                        {
                            "text":"c",
                            "value":"c"
                        }
                    ]
                },
                {
                    "Name": "Price",
                    "Type": "text"
                },
                {
                    "Name": "Name",
                    "Type": "select",
                    "Values": [
                        {
                            "text": "Webinar 1",
                            "value": "Webinar_1"
                        },
                        {
                            "text": "Webinar 2",
                            "value": "Webinar_2"
                        }
                    ]
                },
                {
                    "Name": "Transaction Date",
                    "Type": "text"
                },
                {
                    "Name": "id",
                    "Type": "text"
                },
                {
                    "Name": "activity_time",
                    "Type": "text"
                }
            ]
        }
    ]
}

POST Add User to Engagement


https://api.onecount.net/v2/engagements/addUser

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"engagement id":"e0e816ec-77ba-4db1-bfc0-22d340337357","name":"Webinar_1","ocid":"1845775", "date":"2023-12-31 14:12:38", "data":{"price":"10","attendance_status":"not_attended"},"segment":{}}

Example


Request

Add User to Engagement Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/engagements/addUser',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"engagement id":"e0e816ec-77ba-4db1-bfc0-22d340337357","name":"Webinar_1","ocid":"1845775", "date":"2023-12-31 14:12:38", "data":{"price":"10","attendance_status":"not_attended"},"segment":{}}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Add Users to Engagement Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Users": {
        "ocid": 1845775,
        "uuid": {
            "type": {
                "name": "uuid"
            },
            "uuid": "a1425a04-4c0c-4790-bcd6-425bc7729fd7",
            "version": 4
        },
        "blacklisted": null,
        "demo": {
            "1": "rayaan@one-count.com",
            "2": "user_1701788987",
            "3": "5994471abb01112afcc18159f6cc74b4f511b99806da59b3caf5a9c173cacfc5"
        },
        "email": "rayaan@one-count.com",
        "espid": null,
        "known": {
            "type": {
                "name": "smallint"
            },
            "value": "1"
        },
        "ocid_hash": "57b81cf5536171c84e6e8a0b762251ee7819737b2e95f1390fed97acc11a277b",
        "partners_hash": null,
        "password": "5994471abb01112afcc18159f6cc74b4f511b99806da59b3caf5a9c173cacfc5",
        "payment_cc_exp": null,
        "payment_vendor_token": null,
        "products": {
            "599": "447"
        },
        "remarks": null,
        "resources": null,
        "smartlink_hash": null,
        "subscription_active_resource_info": null,
        "subscription_active_term_info": {
            "447": "{\"renewed\":1,\"expiration_month\":202512,\"product_status\":\"2\",\"expiration_date\":20251211}"
        },
        "subscription_log": {
            "type": {
                "valueType": {
                    "name": "varchar"
                }
            },
            "values": [
                "{\"batch_id\":\"1234\",\"__cuuid\":\"49\",\"subscription_time\":\"2023-12-11 09:09:01\",\"product_status\":\"2\",\"promo_code\":\"\",\"type\":\"term\",\"expiration_date\":20251211,\"subscription_date\":20231211,\"ocid\":1845775,\"product_uid\":\"599\",\"timestamp\":1702303741,\"amount\":0,\"quantity\":1,\"import_id\":\"83\",\"ip\":\"10.10.20.7\",\"form_id\":\"8f93834c-adce-4dc7-acd0-f3a1e0f7c63f\",\"previous_expiration_date\":20231211,\"term_uid\":\"447\",\"renewed\":1,\"request_date\":20231211,\"payment_transaction_id\":\"0\",\"subscription_type\":\"n\",\"payment_processor\":\"\",\"remarks\":\"USER SUBSCRIBED\",\"user_uid\":\"a1425a04-4c0c-4790-bcd6-425bc7729fd7\"}",
                "{\"batch_id\":\"1234\",\"__cuuid\":\"49\",\"subscription_time\":\"2023-12-11 09:20:49\",\"product_status\":\"2\",\"promo_code\":\"\",\"type\":\"term\",\"expiration_date\":20251211,\"subscription_date\":20231211,\"ocid\":1845775,\"product_uid\":\"599\",\"timestamp\":1702304449,\"amount\":0,\"quantity\":1,\"import_id\":\"83\",\"ip\":\"10.10.20.7\",\"form_id\":\"8f93834c-adce-4dc7-acd0-f3a1e0f7c63f\",\"previous_expiration_date\":20231211,\"term_uid\":\"447\",\"renewed\":1,\"request_date\":20231211,\"payment_transaction_id\":\"0\",\"subscription_type\":\"n\",\"payment_processor\":\"\",\"remarks\":\"USER SUBSCRIBED\",\"user_uid\":\"a1425a04-4c0c-4790-bcd6-425bc7729fd7\"}",
                "{\"batch_id\":\"1234\",\"__cuuid\":\"49\",\"subscription_time\":\"2023-12-11 09:34:26\",\"product_status\":\"2\",\"promo_code\":\"\",\"type\":\"term\",\"expiration_date\":20251211,\"subscription_date\":20231211,\"ocid\":1845775,\"product_uid\":\"599\",\"timestamp\":1702305266,\"amount\":0,\"quantity\":1,\"import_id\":\"83\",\"ip\":\"10.10.20.7\",\"form_id\":\"8f93834c-adce-4dc7-acd0-f3a1e0f7c63f\",\"previous_expiration_date\":20231211,\"term_uid\":\"447\",\"renewed\":1,\"request_date\":20231211,\"payment_transaction_id\":\"0\",\"subscription_type\":\"n\",\"payment_processor\":\"\",\"remarks\":\"USER SUBSCRIBED\",\"user_uid\":\"a1425a04-4c0c-4790-bcd6-425bc7729fd7\"}"
            ]
        },
        "subscription_log_by_resource": null,
        "subscription_source_code": [
            "83"
        ],
        "targets": null,
        "timestamp": {
            "type": {
                "name": "bigint"
            },
            "value": "1701788987"
        },
        "unconfirmed": null,
        "update_time": null,
        "username": "user_1701788987",
        "vendor_blacklisted": null,
        "vendor_esp": null,
        "vendor_unconfirmed": null
    }
}

COMPONENT: Segments

    • ===

This resource is for manipulating segment for a resource. A segment can be searched (or) add users to segment (or)  get all segment for a user.

Method

Url

Action

GET

/segments

Get all segments.

GET

/segments/{{Segment id}}

Get specific segment based on segment id.

POST

/segments/addUsers

Add users to segment.

GET

/segments/users/{{ocid}}

Get all segment user has be subscribed based on user id.

GET All Segments



https://api.onecount.net/v2/segments

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get All Segments Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/segments',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                      200 OK

Get All Segments Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Segments": [
        {
            "Id": "891aa4b6-9e0e-4706-b08a-e7acb54e7e43",
            "Name": "2022 Use Cases PDF Download"
        },
        {
            "Id": "a639cb1f-6509-447b-a1d7-93a8e8ef61b1",
            "Name": "58-percent conversion-rate"
        },
        {
            "Id": "43eefdc6-89ab-4472-88c3-e16fb9619138",
            "Name": "Audience Marketing Pop-Up"
        },
        {
            "Id": "68219b37-c155-4459-a5ce-497261286ffe",
            "Name": "Bold Minds Reminders"
        },
        {
            "Id": "6450defc-7658-4182-9c2a-a8f8420f801e",
            "Name": "Demo - Aviator's Guide - NL Popup"
        },
        {
            "Id": "28774f7c-9fd3-4dff-a42e-683460f437c0",
            "Name": "Getting 80-Percent Conversion Rates Pop-up"
        },
        {
            "Id": "71b655e6-a11a-46af-bed5-b9eb1d6ac3aa",
            "Name": "Holiday Special Offer - 3 mo. Pilot"
        },
        {
            "Id": "16305ad0-8e65-4085-942e-04d99fd39207",
            "Name": "Identity Resolution Test II"
        },
        {
            "Id": "fcdfa9cb-baa2-4cc8-86b3-8f604471f2f3",
            "Name": "Live ONEcount Popup Example Segment"
        },
        {
            "Id": "2463b0a3-1e22-4fd0-97b2-bbdae30e585a",
            "Name": "Live webinar - June 15 - Accelerate Revenue"
        },
        {
            "Id": "d8d1bc9d-ede2-4c82-a747-10ab9fb979de",
            "Name": "LIVE WEBINAR ONEcount BI Pop-up Campaign"
        },
        {
            "Id": "d883ecdb-5307-416d-9558-c196472021c9",
            "Name": "New Year - Increase Revenue 30-Percent"
        },
        {
            "Id": "08abbc5b-aafe-4834-90f5-ac45fe025d73",
            "Name": "OC Test"
        },
        {
            "Id": "24cf72e9-ad71-489c-89ef-b80d0c42e2e2",
            "Name": "Something big"
        },
        {
            "Id": "0d37c79e-deb2-4287-9444-ae4812a9d8f0",
            "Name": "Something No Other Platform Has"
        },
        {
            "Id": "5eaa0345-a825-4ba0-a787-336312a77744",
            "Name": "Something Revolutionary"
        },
        {
            "Id": "c905d313-8d5e-45c1-aaab-7f8c8adc2bea",
            "Name": "Something that will change your life"
        },
        {
            "Id": "1bfb1c06-4b26-4ac3-a616-eb6b225e5f0e",
            "Name": "Something You Have Always Wanted"
        },
        {
            "Id": "28361c73-e253-49bb-a791-5481be2070a0",
            "Name": "Something You Never Thought Possible"
        },
        {
            "Id": "86e7129a-a538-4c56-a731-7e9c08fa8814",
            "Name": "Test behaviour "
        },
        {
            "Id": "e5e53cd4-bbd0-465b-b426-e267964fd0b4",
            "Name": "Test behaviour banner segment"
        },
        {
            "Id": "78ffd6d7-0b40-4e5a-8f32-622a04fb5561",
            "Name": "Test behaviour combo"
        },
        {
            "Id": "0022394d-7901-4aff-98c2-0c8c04fcb27a",
            "Name": "Test behaviour content"
        },
        {
            "Id": "89424642-1363-476e-9842-4f0a2544151f",
            "Name": "Test behaviour email"
        },
        {
            "Id": "ca848e53-3f3e-43c6-ae61-f331f3135c6c",
            "Name": "Test demographic segments"
        },
        {
            "Id": "e11d11fa-7603-4dee-a361-c6e909249ecd",
            "Name": "Test with unknown only selecting all filters"
        }
    ]
}

GET specific Segments


 https://api.onecount.net/v2/segments/{{segment id}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get specific Segment Request
 <?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/segments/{{segment id}}',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get specific Segments Response
 {
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Segments": {
        "Id": "e5e53cd4-bbd0-465b-b426-e267964fd0b4",
        "Demos": {
            "_empty_": [],
            "type": ""
        },
        "Description": "",
        "Action": {
            "action": {}
        },
        "Name": "Test behaviour banner segment",
        "Behaviours": [
            {
                "end_date": "05/26/2022",
                "date_type": "Future",
                "sub_category_values": [],
                "sub_category": "clicked",
                "category": "1",
                "targets": [
                    "all"
                ],
                "joining_logic": "AND",
                "frequency": "1",
                "start_date": "04/26/2022",
                "day_count": "100"
            }
        ],
        "Accounts": []
    }
}

POST Add users to segments


https://api.onecount.net/v2/segments/addUsers

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Body raw (json)


Body
{"Id":"78ffd6d7-0b40-4e5a-8f32-622a04fb5561","Users":[164499,676172,2134321]}

Example


Request

Add users to Segment Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://api.onecount.net/v2/segments/addUsers',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{"Id":"78ffd6d7-0b40-4e5a-8f32-622a04fb5561","Users":[164499,676172,2134321]}',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}',
   'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Add users to segment Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Segments": {
        "Error user ids": [
            676172,
            2134321
        ],
        "Inserted user ids": [
            164499
        ]
    }
}

GET all segments for a User


 https://api.onecount.net/v2/segments/users/{{ocid}}

Request Headers


Appkey                                                                                                 {{ONECOUNT API KEY}}

Example


Request

Get all segments for a user Request
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'rayaan.onecount.net/api/v2/segments/users/••••••',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
   'Appkey: {{ONECOUNT API KEY}}'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response                                                                                                                                                                                                                                                                                                                                                                       200 OK

Get all Segments for a user Response
{
    "result": {
        "success": "1",
        "error": {
            "code": "",
            "message": ""
        }
    },
    "Segments": [
        "0d37c79e-deb2-4287-9444-ae4812a9d8f0",
        "1bfb1c06-4b26-4ac3-a616-eb6b225e5f0e",
        "24cf72e9-ad71-489c-89ef-b80d0c42e2e2",
        "28361c73-e253-49bb-a791-5481be2070a0",
        "28774f7c-9fd3-4dff-a42e-683460f437c0",
        "5eaa0345-a825-4ba0-a787-336312a77744",
        "71b655e6-a11a-46af-bed5-b9eb1d6ac3aa",
        "a639cb1f-6509-447b-a1d7-93a8e8ef61b1",
        "bcb403a2-c0a1-414f-90c1-277a41009c97",
        "c905d313-8d5e-45c1-aaab-7f8c8adc2bea",
        "d883ecdb-5307-416d-9558-c196472021c9",
        "d8d1bc9d-ede2-4c82-a747-10ab9fb979de"
    ]
}

COMPONENT: Leads

    • ===

Stats resource can be used to submit any type of stat collected on the third party systems. Each type of stat will be represented by a sub-resource. So, for telemarketing it could be /stats/telemarketing endpoint, for videos it can be /stats/videos, for webinar it could be /stats/webinars etc. Right now we only have telemarketing sub-resource.

Telemarketing Leads

This resource is for manipulating telemarketing stat resource. A telemarketing stat can be created or listed.

Method

Url

Action

GET

/stats/telemarketing

List telemarketing stats

GET

/stats/telemarketing/1000

Get telemarketing stat whose id is 1000 in the system.

POST

/stats/telemarketing

JSON of the Telemarketing type object needs to be sent as post data. Id field should not be sent.

POST method can be used to create telemarketing stat. Telemarketing info needs to be sent as request and an Id will be returned when the transaction is created.

Request

Type

Description

Telemarketing

Telemarketing

Contains fields that define a telemarketing stat. Id field should not be set. Refer to telemarketing object in references section.

Workflow: OCID: This id is required field. This represents the unique id of the user in onecount system. This id can be looked up from the /user/lookup resource if the ocid is not known by providing user demographic questions, if not found new user needs to be created in the onecount system by posting the user demographic from /user resource. If the ocid is found send the demo data to user resource (PUT) to update the demographic information.

E.g

{

"Telemarketing":[

{

"OCID":"5000",

"Date": "2016-01-01",

"Time": "10:10:10",

"ResourceId":"250",

"PageUrl": "http://www.one-count.com/detail/a.php",

"PageTitle":"tests"

}

]

}

 

 

 

Response

Type

Description

Ids

String

Returns telemarketing ids of the newly created transaction. If multiple stats are sent, multiple ids are returned in cvs format.

API REFERENCE

Type: Questions

Property Name

Type

Description

Id

Int

Id of the question.

Text

String

Text of the question.

Type

Int

Determines which type of question it is. Textbox, checkbox, select, radio.
There can be 6 types of questions.
type=1 means textbox type questions or short response type question. The response length needs to be less than 255 characters.
type=2 means textarea type question or long response type question.
type=3 means password type question. This is basically same as type 1 but when displayed in ONEcount frontend forms typed characters appears as *
type = 4 means select or dropdown type questions. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the select question.
type=5 means radio button type question. This is a multiple choice, 1 response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the radio question.
type=6 means checkbox type question. This is a multiple choice, multi response type question. When creating this type of question the choices block also needs to be part of the questions object that will hold the possible choices of the checkbox question.

Choices

choices

If multiple choice question this field will have the choices.

Alias

String

Alias for admin purpose.

Type: Choices

Property Name

Type

Description

Id

int

Id of the choice.

Text

string

Display text of choice.

Value

String

Value stored in db.

Order

Int

Display order.

QuestionId

Int

Tied to which question id.

Type: Users

Property Name

Type

Description

Id

Int

ID of the user in ONEcount.

PartnerId

Int

ID of the user in partners system (e.g. id of your system).

Demo

Demo

Object of user's demo question ids and respective response values.

RequestDate

Date

Request date.

Type: Demo

Property Name

Type

Description

QuestionId (e.g 6)

String

6 is the value of “Id” property of question resource(Text = “First Name”)

QuestionId (e.g 7)

String

7 is the value of “Id” property of question resource(Text = “Last Name”)

...

...

...

Type: Transactions

Property Name

Type

Description

Id

Int

ID of the transaction.

UserId

Int

Id of user in ONEcount.

TermId

Int

TermId in ONEcount.

ProductStatus

Int

Status ID.

SubscriptionType

Char

Can be n,r or u for new, renew or unsubscribe.

TransactionDate

Date

Date when the transaction occurred.

TransactionTime

Time

Time of transaction.

RequestDate

Date

The effective request date for the transaction.

UserIP

String

IP of the user.

Source

String

The transaction needs to be tied to a source code this will define it.

MediaFilePath

String

The url of media associated with that transaction. Eg image, audio.

ExpireDate

Date

Date when the subscription expires.

Amount

Float

If there is amount (USD) included in transaction.

Type: Sources

Property Name

Type

Description

Id

Int

Id of the source.

Source

String

Value of the source.

Description

Text

Description of the source.

ParentId

int

If this is a child source then list the parent source id.

Type: Products

Property Name

Type

Description

Id

Int

Specify only for update.

Name

String

Name of the Product.

Description

Text

Description of the product.

Terms

Terms

(Array of) Terms associated with the product.

Type: Terms

Property Name

Type

Description

Id

int

Id of the term.

Name

string

Name of the Term.

Description

text

Description of the term.

Duration

int

Duration of term validity.

DurationUnit

sting

Y (year), M (Month), D (Days).

ProductId

int

Id of the product the term is tied to.

Price

float

If there is price (USD) for the term.

Type: Resources

Property Name

Type

Description

Id

Int

Specify only for update.

Name

String

Name of the Resource.

Description

Text

Description of the Resource.

Type

Int

Type Options

0 : File

2 : Newsletter

3 : Section

4 : Page

5 : Function

Value

String

or

Array

Value of Resource Type:

When requesting a resource (GET), you should expect a string if there is only one value. If there are multiple values, you should expect an array.

For creating/updating a resource (POST/PUT), it is highly recommended to send an array - this will handle single and multiple value requests.

Example :

if the Type sent is 3 with one value then Value would be "/digital/" or ["/digital"/]. We recommend using the second approach of ["/digital"/].
if the Type sent is 3 with two values then Value would be ["/digital/", "/articles/"]

For Function type resource leave it blank.

limit

Int

Default limit is 25 but if all the data needs to be pulled then pass limit=0.

FreePass

Int

Default value is 0. This parameter is used to provide access to protected content.

Type: Telemarketing

Property Name

Type

Description

Id

int

Id of the telemarketing stat. This is autogenerated from the system and can be used to lookup the stat.

OCID

int

Onecount ID of the user.

Date

Date

Date when the stat occurred. Format: yyyy-mm-dd

Time

Time

Time of stat. Format: h:m:s (24 hour format)

ResourceId

int

Id of resource currently being sent for the sat. If the resource type is page type resource then need to send

PageTitle otherwise it will follow the process described in PageTitle.

PageUrl

string

Page Url belongs to resource that is being sent with this request. If the resource is file type then it needs to be path to that file and if the resource is section it needs to be section. Basically the value here needs to exact what is defined while creating resource.

PageTitle

string

Page title that belongs to the page url that is being sent. If not provided it try to pull the title from the page but if unsuccessful then it will set it as blank.

If the page url already exists and it doesn't match with the one that is being sent then it will throw conflict error with the title in our system.