Welcome! This document explains how to access the CarpetGuys Leads API, authenticate, and handle the data it returns.
All requests go to this endpoint:
https://www.carpetguys.com/apis/saved-queries/hubspot.php
You must include your API key in each request. Two supported methods:
https://www.carpetguys.com/apis/saved-queries/hubspot.php?api_key=YOUR_API_KEY
Send your API key using the X-API-KEY header.
Example using curl:
curl -H "X-API-KEY: YOUR_API_KEY" \
"https://www.carpetguys.com/apis/saved-queries/hubspot.php"
[
{
"type": "GRAND TOTAL",
"custid": "",
"name": "",
"Contract": 45230.50
},
{
"type": "Customer",
"custid": "12345",
"name": "John Doe",
"email": "john@example.com",
"phone": "555-1234",
"status": "Closed Won",
"leadresults": "Installed",
"intiated": "2025-09-24 14:23:10",
"first_contact": "2025-09-10",
"lifetime_spend": 90320.00,
"contacts": 4,
"Contract": 12000.00
},
...
]
If something goes wrong, the API returns a JSON error object:
Missing or Invalid API Key → 401 Unauthorized
{"error": "Unauthorized: Invalid or missing API key"}
Blacklisted IP → 403 Forbidden
{"error": "Forbidden: Your IP is blocked."}
Database or Query Error → 500 Internal Error
{"error": "Query failed", "details": [...]}
Data is returned in JSON format.
You can consume this data into:
{
"info": {
"name": "CarpetGuys Leads API",
"_postman_id": "c7c33c8b-1234-5678-90ab-carp-guys-api",
"description": "Postman collection for accessing CarpetGuys Leads API with API Key authentication.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Get Leads (Query String Auth)",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://www.carpetguys.com/apis/saved-queries/hs.php?api_key={{API_KEY}}",
"protocol": "https",
"host": ["www", "carpetguys", "com"],
"path": ["apis", "saved-queries", "hs.php"],
"query": [
{
"key": "api_key",
"value": "{{API_KEY}}"
}
]
}
},
"response": []
},
{
"name": "Get Leads (Header Auth)",
"request": {
"method": "GET",
"header": [
{
"key": "X-API-KEY",
"value": "{{API_KEY}}",
"type": "text"
}
],
"url": {
"raw": "https://www.carpetguys.com/apis/saved-queries/hs.php",
"protocol": "https",
"host": ["www", "carpetguys", "com"],
"path": ["apis", "saved-queries", "hs.php"]
}
},
"response": []
}
],
"variable": [
{
"key": "API_KEY",
"value": "your_api_key_here"
}
]
}