Download the full product catalog.
Ideal for bulk analytics, indexing, and offline enrichment.
Base URL: https://api.salescaddy.ai/api
Endpoint
GET /products
→ returns text/csv (binary).
Authentication: Authorization: Bearer <token>
.
Response media type:
text/csv
(streamable). No query parameters. citeturn1view0
Example — Download full dataset
curl -sS "https://api.salescaddy.ai/api/products" -H "Authorization: Bearer $TOKEN" --output products.csv
// Node.js (stream to file)
import fs from "fs";
const res = await fetch("https://api.salescaddy.ai/api/products", {
headers: { Authorization: `Bearer ${process.env.TOKEN}` }
});
const file = fs.createWriteStream("products.csv");
await new Promise((resolve, reject) => {
res.body.pipe(file);
res.body.on("error", reject);
file.on("finish", resolve);
});
# Python (stream to file)
import os, requests
with requests.get("https://api.salescaddy.ai/api/products",
headers={"Authorization": f"Bearer {os.environ['TOKEN']}"},
stream=True) as r:
r.raise_for_status()
with open("products.csv", "wb") as f:
for chunk in r.iter_content(chunk_size=8192):
if chunk:
f.write(chunk)
// C# (HttpClient, streaming)
using System.Net.Http.Headers;
using (var http = new HttpClient())
{
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", TOKEN);
using var stream = await http.GetStreamAsync("https://api.salescaddy.ai/api/products");
using var file = System.IO.File.Create("products.csv");
await stream.CopyToAsync(file);
}
Sample CSV (snippet)
Illustrative preview — column set may evolve. For a structured shape see the JSON schema for products (ProductDTO/ProductPagedDTO) in the API schema. citeturn1view0
id,name,description,category,categoryId,vendorDomain,reviewCount,starRating,avgRating
prod_hubspot_crm,HubSpot CRM,CRM platform for sales & marketing,CRM,cat_crm,hubspot.com,5321,4.4,4.3
prod_salesforce_salescloud,Salesforce Sales Cloud,Sales CRM,CRM,cat_crm,salesforce.com,10421,4.5,4.4
prod_snowflake,Snowflake,Cloud data platform,Data Warehouse,cat_warehouse,snowflake.com,3120,4.6,4.5
Handling large files (best practices)
- Stream the response to disk (see examples above) — avoid loading the whole file into memory.
- Use retries with backoff on transient errors (429/5xx).
- If automating nightly exports, version the output (e.g., timestamped filenames).
- Validate the CSV (row/column counts) before ingesting downstream.
Errors
Code | Meaning | How to fix |
---|---|---|
401 | Unauthorized | Obtain/refresh token; set Authorization |
403 | Forbidden | Verify client has access |
429 | Rate limit exceeded | Retry with exponential backoff |
500 | Internal server error | Retry later; contact support if persistent |