Developer Guide

Create Account

Create new user account.

NOTE: You need to register for a Reseller API key before using this REST API. Please visit Reseller Program page for the information of reseller account application.

GET http://api.fraudlabspro.com/v1/account/create

Request
Parameter Description
key (required) Your reseller API key.
format (optional) Return the result in json or xml format. Default: xml
Valid values: json | xml
username (required) Username of the new account.
email (required) Email address of the new account.
name (required) Full name of the new user.
address1 (required) Address field.
address2 (optional) Additional address field.
city (required) City name.
state (required) State name.
zip_code (required) ZIP code/Postal code.
country (required) Country code.
It requires the input of ISO-3166 alpha-2 country code, e.g. US for United States. Please refer to Country Codes for complete list.
phone (required) Phone number.
fax (optional) Fax number.
company (required) Company name.
industry (required) Industry ID of the business involed. Please refer to Industry ID for complete list.
Response
Parameter Description
fraudlabspro_error Error code in this transaction. Please refer to Error Codes for complete list.
fraudlabspro_message More information about the status of this transaction. Please refer to Error Codes for complete list.
username Username of the new account.
password Password of the new account.
email Email address of the new account.
name Full name of the new user.
address1 Address field.
address2 Additional address field.
city City name.
state State name.
zip_code ZIP code/Postal code.
country Country code.
phone Phone number.
fax Fax number.
company Company name.
Sample Code
<?php
$apiKey = 'Your_Reseller_API_Key';
$params['format']           = 'json';
$params['username']         = 'demoaccount';
$params['email']            = 'demo@fraudlabspro.com';
$params['name']             = 'Demo Account';
$params['address1']         = '52 Woodstock Drive';
$params['city']             = 'Alhambra';
$params['state']            = 'California';
$params['zip_code']         = '91801';
$params['country']          = 'US';
$params['phone']            = '6264974363';
$params['company']          = 'FraudLabs Pro';
$params['industry']         = '1';

$query = '';

foreach($params as $key=>$value){
	$query .= '&' . $key . '=' . rawurlencode($value);
}

////////////
//For https request, please make sure you have enabled php_openssl.dll extension.
//
//How to enable https
//- Uncomment ;extension=php_openssl.dll by removing the semicolon in your php.ini, and restart the apache.
//
//In case you have difficulty to modify the php.ini, you can always make the http request instead of https.
////////////
$result = file_get_contents('https://api.fraudlabspro.com/v1/account/create?key=' . $apiKey . $query);

} while(!$result && $try++ < 3);

$data = json_decode($result);

print_r($data);
?>
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;

public class FLP {
	public static void main(String[] args) {
		try {

		URL url = new URL("https://api.fraudlabspro.com/v1/account/create?key=Your_Reseller_API_Key&format=json&username=demoaccount&email=demo@fraudlabpro.com&name=Demo+Account&address1=52+Woodstock+Drive&city=Alhambra&state=California&zip_code=91801&country=US&phone=6264974363&company=FraudLabs+Pro&industry=1");
		HttpURLConnection conn = (HttpURLConnection) url.openConnection();
		conn.setRequestMethod("GET");
		conn.setRequestProperty("Accept", "application/json");

		if (conn.getResponseCode() != 200) {
			throw new RuntimeException("Failed : HTTP error code : " + conn.getResponseCode());
		}

		BufferedReader br = new BufferedReader(new InputStreamReader(
			(conn.getInputStream())));

		String output;

		while ((output = br.readLine()) != null) {
			System.out.println(output);
		}

		conn.disconnect();

	  } catch (MalformedURLException e) {

		e.printStackTrace();

	  } catch (IOException e) {
		e.printStackTrace();
	  }
	}
}
Imports System.Net

Partial Public Class _Default
	Inherits System.Web.UI.Page

	Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
		Dim request As HttpWebRequest = Nothing
		Dim response As Net.HttpWebResponse = Nothing
		Dim stream As IO.Stream = Nothing

		Dim apiKey As String = "Your_Reseller_API_Key"
		Dim format As String = "json"
		Dim username As String = "demoaccount"
		Dim email As String = "demo@fraudlabpro.com"
		Dim name As String = "Demo Account"
		Dim address1 As String = " 52 Woodstock Drive"
		Dim city As String = "Alhambra"
		Dim state As String = "California"
		Dim zipCode As String = "91801"
		Dim country As String = "US"
		Dim phone As String = "6264974363"
		Dim company As String = "FraudLabs Pro"
		Dim industry As String = "1"

		request = Net.WebRequest.Create("https://api.fraudlabspro.com/v1/account/create?key=" & apiKey & _
		"&format=" & System.Web.HttpUtility.UrlEncode(format) & _
		"&username=" & System.Web.HttpUtility.UrlEncode(username) & _
		"&email=" & System.Web.HttpUtility.UrlEncode(email) & _
		"&name=" & System.Web.HttpUtility.UrlEncode(name) & _
		"&address1=" & System.Web.HttpUtility.UrlEncode(address1) & _
		"&city=" & System.Web.HttpUtility.UrlEncode(city) & _
		"&state=" & System.Web.HttpUtility.UrlEncode(state) & _
		"&zip_code=" & System.Web.HttpUtility.UrlEncode(zipCode) & _
		"&country=" & System.Web.HttpUtility.UrlEncode(country) & _
		"&phone=" & System.Web.HttpUtility.UrlEncode(phone) & _
		"&company=" & System.Web.HttpUtility.UrlEncode(company) & _
		"&industry=" & System.Web.HttpUtility.UrlEncode(industry))

		request.Method = "GET"
		response = request.GetResponse()

		Dim reader As System.IO.StreamReader = New IO.StreamReader(response.GetResponseStream())

		Page.Response.Write(reader.ReadToEnd)
	End Sub
End Class
using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;
using System.Net;

public partial class _Default : System.Web.UI.Page
{

	protected void Page_Load(object sender, System.EventArgs e)
	{
		HttpWebRequest request = null;
		System.Net.HttpWebResponse response = null;
		System.IO.Stream stream = null;

		string apiKey = "";
		string format = "json";
		string username = "demoaccount";
		string email = "demo@fraudlabpro.com";
		string name = "Demo Account";
		string address1 = "52 Woodstock Drive";
		string city = "Alhambra";
		string state = "California";
		string zipCode = "91801";
		string country = "US";
		string phone = "6264974363";
		string company = "FraudLabs Pro";
		string industry = "1";

		request = System.Net.WebRequest.Create("https://api.fraudlabspro.com/v1/account/create?key=" + apiKey + "&format=" + System.Web.HttpUtility.UrlEncode(format) + "&username=" + System.Web.HttpUtility.UrlEncode(username) + "&email=" + System.Web.HttpUtility.UrlEncode(email) + "&name=" + System.Web.HttpUtility.UrlEncode(name) + "&address1=" + System.Web.HttpUtility.UrlEncode(address1) + "&city=" + System.Web.HttpUtility.UrlEncode(city) + "&state=" + System.Web.HttpUtility.UrlEncode(state) + "&zip_code=" + System.Web.HttpUtility.UrlEncode(zipCode) + "&country=" + System.Web.HttpUtility.UrlEncode(country) + "&phone=" + System.Web.HttpUtility.UrlEncode(phone) + "&company=" + System.Web.HttpUtility.UrlEncode(company) + "&industry=" + System.Web.HttpUtility.UrlEncode(industry));

		request.Method = "GET";
		response = request.GetResponse();

		System.IO.StreamReader reader = new System.IO.StreamReader(response.GetResponseStream());

		Page.Response.Write(reader.ReadToEnd());
	}

	public _Default()
	{
		Load += Page_Load;
	}
}
import httplib
import urllib

p = { 'key': 'Your_Reseller_API_Key', 'format': 'json', 'username': 'demoaccount', 'email': 'demo@fraudlabpro.com', 'name': 'Demo Account', 'address1': '52 Woodstock Drive', 'city': 'Alhambra', 'state': 'California', 'zip_code': '91801', 'country': 'US', 'phone': '6264974363', 'company': 'FraudLabs Pro', 'industry': '1' }

conn = httplib.HTTPConnection("api.fraudlabspro.com")
conn.request("GET", "/v1/account/create?" + urllib.urlencode(p))
res = conn.getresponse()
print res.read()