Comprehensive guide to integrating with the SportFishTrader API. Select your account type below to view relevant documentation.
Welcome to the SportFishTrader API for individual brokers. This API allows you to programmatically create and manage your boat listings using a single API key tied to your broker account.
📌 Key Features:
All API requests require your broker API key in the x-api-key header. Your API key starts with sft_brkr_ and can be found in your account settings.
curl -X POST https://sportfishtrader.com/api/v1/listings \
-H "x-api-key: sft_brkr_your_api_key_here" \
-H "Content-Type: application/json"⚠️ Security Warning: Never expose your API key in client-side code or public repositories. Always keep it secure on your server.
/api/v1/listings
Creates a new listing automatically attributed to your broker account.
| Header | Value | Required |
|---|---|---|
x-api-key | Your broker API key (sft_brkr_...) | Yes |
Content-Type | application/json | Yes |
| Field | Type | Required | Description |
|---|---|---|---|
make | string | Yes | Boat manufacturer Example: Viking |
model | string | Yes | Boat model Example: 52 Sport Tower |
year | number | Yes | Year built Example: 2018 |
price | number | Yes | Asking price in USD Example: 1250000 |
length | number | Yes | Length in feet Example: 52 |
location | string | Yes | Boat location Example: Fort Lauderdale, FL |
description | string | Optional | Detailed description of the boat |
photoURLs | array | Optional | Array of photo URLs |
{
"success": true,
"listingId": "lst_abc123def456",
"message": "Listing created successfully"
}const axios = require('axios');
const createListing = async () => {
try {
const response = await axios.post(
'https://sportfishtrader.com/api/v1/listings',
{
make: 'Viking',
model: '52 Sport Tower',
year: 2018,
price: 1250000,
length: 52,
location: 'Fort Lauderdale, FL',
description: 'Pristine condition, low hours...',
photoURLs: [
'https://example.com/photo1.jpg',
'https://example.com/photo2.jpg'
]
},
{
headers: {
'x-api-key': 'sft_brkr_your_api_key_here',
'Content-Type': 'application/json'
}
}
);
console.log('Listing created:', response.data.listingId);
} catch (error) {
console.error('Error:', error.response.data);
}
};
createListing();import requests
def create_listing():
url = 'https://sportfishtrader.com/api/v1/listings'
headers = {
'x-api-key': 'sft_brkr_your_api_key_here',
'Content-Type': 'application/json'
}
data = {
'make': 'Viking',
'model': '52 Sport Tower',
'year': 2018,
'price': 1250000,
'length': 52,
'location': 'Fort Lauderdale, FL',
'description': 'Pristine condition, low hours...',
'photoURLs': [
'https://example.com/photo1.jpg',
'https://example.com/photo2.jpg'
]
}
try:
response = requests.post(url, json=data, headers=headers)
response.raise_for_status()
result = response.json()
print(f"Listing created: {result['listingId']}")
except requests.exceptions.RequestException as e:
print(f"Error: {e}")
create_listing()curl -X POST https://sportfishtrader.com/api/v1/listings \
-H "x-api-key: sft_brkr_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"make": "Viking",
"model": "52 Sport Tower",
"year": 2018,
"price": 1250000,
"length": 52,
"location": "Fort Lauderdale, FL",
"description": "Pristine condition, low hours...",
"photoURLs": [
"https://example.com/photo1.jpg",
"https://example.com/photo2.jpg"
]
}'/api/v1/listings/:listingId
Updates one or more fields of an existing listing you own.
| Header | Value | Required |
|---|---|---|
x-api-key | Your broker API key (sft_brkr_...) | Yes |
Content-Type | application/json | Yes |
| Parameter | Description |
|---|---|
listingId | The unique ID of the listing to update |
| Field | Type | Required | Description |
|---|---|---|---|
price | number | Optional | Updated price Example: 1199000 |
description | string | Optional | Updated description |
location | string | Optional | Updated location |
{
"success": true,
"message": "Listing updated successfully"
}const axios = require('axios');
const updateListing = async (listingId) => {
try {
const response = await axios.put(
`https://sportfishtrader.com/api/v1/listings/${listingId}`,
{
price: 1199000,
description: 'Updated description with price reduction...'
},
{
headers: {
'x-api-key': 'sft_brkr_your_api_key_here',
'Content-Type': 'application/json'
}
}
);
console.log('Listing updated successfully');
} catch (error) {
console.error('Error:', error.response.data);
}
};
updateListing('lst_abc123def456');/api/v1/listings/:listingId
Fetches details of a single listing by ID.
| Header | Value | Required |
|---|---|---|
x-api-key | Your broker API key (sft_brkr_...) | Yes |
| Parameter | Description |
|---|---|
listingId | The unique ID of the listing to retrieve |
{
"success": true,
"listing": {
"id": "lst_abc123def456",
"make": "Viking",
"model": "52 Sport Tower",
"year": 2018,
"price": 1250000,
"length": 52,
"location": "Fort Lauderdale, FL",
"createdAt": "2025-01-15T10:30:00Z",
"status": "active"
}
}Common errors you may encounter when using the Broker API:
Error Code: AUTH_001
Error Message: x-api-key header is required
Cause: Request was sent without the x-api-key header
Solution:
Error Code: AUTH_002
Error Message: API key must start with sft_brkr_, sft_brkrg_, or sft_org_
Cause: API key does not match the expected format
Solution:
Error Code: AUTH_003
Error Message: API key does not exist in our system
Cause: The provided API key is not registered
Solution:
Error Code: AUTH_004
Error Message: This API key has been deactivated
Cause: The API key status is not active
Solution: