This guide will take you through the minimum required steps to begin making API requests. By the end of this guide, you’ll be able to retrieve the closest gun dealer(s) list with all the required information. Before we begin, here are a few key concepts:

  • API requests require a token to get data, and API tokens are issued on a per-site basis. You may register for a free trial which will automatically expire after 14 days.
  • API Credentials can be generated from user control panel. If you are testing requests  for a single site, start here to quickly get your token and begin making API calls.


About Our API

Want to make API Requests right away? Check out the Authentication.

FFL API allows you to get the closest and active gun dealers’ list by the given zip code and radius information for license details and store address.


You need to get API credentials that are available to developers wishing to make requests against FFL API:

API Credentials (created in a user control panel)

FFL API Credentials are generated when a FFL API Developer Account is created in user control panel (API Keys > Generate Key). These credentials are used to programmatically interact with an api.


Our team frequently enhances its core product and is actively developing  API endpoints. By using the newest API version, you will ensure that your app has access to the latest resources.


//you need to use below example with GuzzleHttp package

use GuzzleHttp;

$client = new GuzzleHttp\Client(['base_uri' => 'https://app.fflapi.com/v1/']);

try {

    $response = $client->request('POST', 'get-ffl', [
            'headers' => [
                'Content-Type' => 'application/json', //required header
                'X-Requested-With'     => 'XMLHttpRequest', //required header
                'X-Authorization'      => 'Your API key' //required header - your API key that generated
            'json' => [
                'zipcode' => '33133', // zipcode
                'radius' => '5' // mile , you can set between 1 and 100

    $fflLists = json_decode($response->getBody()->getContents());

    foreach ($fflLists as $ffl)
        * returned parameters are :


} catch (GuzzleHttp\Exception\ClientException $exception) {
    $response = $exception->getResponse();
    $responseBodyAsString = $response->getBody()->getContents();

    echo ($responseBodyAsString);
//add container where if you want to show widget
//add before our js sdk your page's b body tag //add that script and initialize widget with parameters <script type="text/javascript"> FFL.init({ container : 'ffl_container', // container id apiKey: 'Your API Key', // your API Key geoKey: 'Your own Google Maps API Key', // Make sure you have Google Maps API Key cBack : getSelected // callback function }); function getSelected(data) { console.log(data); let license_name = data.license_name; let premise_city = data.premise_city; let premise_state = data.premise_state; let premise_street = data.premise_street; let premise_zip_code = data.premise_zip_code; let voice_phone = data.voice_phone; alert(license_name); } </script>


BigCommerce and WooCommerce App Integrations Coming Soon

Error Codes

Status Code Reason
The request could not be understood by the server due to malformed syntax.
The server understands the content type of the request entity and the syntax of the request entity is correct but was unable to process the contained instructions.
The usage limit for your application has been exceeded for the hour time period.