2A API Documentation
General Information & Authentication
🚀 Overview
The 2A-FFL API provides the most comprehensive and accessible way to retrieve Federal Firearms License (FFL) data. Search by location, license number, and more with real-time, up-to-date information for businesses and individuals in the firearms industry.
📋 Prerequisites
To get started with the API, you’ll need:
- ✅ Active monthly subscription
- ✅ Valid API key
- ✅ Authorized domain
1 API Configuration
Base URL
https://api.2acommerce.com/api/v1/
Required Headers
X-API-KEY: <Your_API_Key> Origin: https://myauthorized.domain.com Content-Type: application/json Accept: application/json
⚠️ Important: The Origin header must match the domain permanently bound to your API key during activation.
2 API Key Activation
🔐 One-time setup: Activate your API key to bind it to your domain permanently.
Endpoint
POST /api-keys/ffl
Success Response (200 OK)
{ "status": "ok", "data": { "message": "API Key has been activated." } }
3 Key Status Verification
Endpoint
GET /api-keys/ffl
Success Response (200 OK)
{ "status": "ok", "data": { "name": "ffl", "expires_at": "2024-12-31T23:59:59Z" } }
❌ Error Handling
401 Unauthorized
Occurs when:
- API key is invalid or expired
- Origin domain doesn’t match the authorized domain
- Missing required headers
{ "status": "error", "data": { "message": "Unauthorized. Invalid API Key or Origin" } }
Need help? Contact our support team