Download Site
TrackVision generates a static product website for each of your sites. You can download the fully built site as a ZIP file and deploy it anywhere.
Endpoint
GET /v1/sites/{id}/download
Returns the built site as a ZIP file.
Getting Your Site ID
To find your site ID, list your sites:
curl https://api.acme.trackvision.ai/v1/sites \
-H "Authorization: Bearer $TV_API_KEY"
Response:
{
"sites": [
{
"id": "c3d4e5f6-a7b8-9012-cdef-012345678902",
"name": "Organic Cotton Collection",
"domain": "products.acme.com",
"status": "live",
"createdAt": "2024-01-15T10:00:00Z"
}
]
}
Downloading the ZIP
curl https://api.acme.trackvision.ai/v1/sites/c3d4e5f6-a7b8-9012-cdef-012345678902/download \
-H "Authorization: Bearer $TV_API_KEY" \
-o my-site.zip
Response
The response is a binary ZIP file with Content-Type: application/zip. The Content-Disposition header contains the suggested filename:
Content-Disposition: attachment; filename="acme-organic-cotton-collection.zip"
What's in the ZIP
The ZIP contains a fully self-contained static website:
index.html # Homepage
products/
index.html # Product listing
organic-cotton-tshirt/
index.html # Individual product page with DPP data
assets/
main.css # Compiled styles
main.js # Compiled JavaScript
logo.png # Brand assets
img/
product-1.jpg # Product images
The site is built with standard HTML, CSS, and JavaScript — no server required. Any static file host can serve it.
Automated Downloads
You can automate site downloads with a cron job or CI/CD pipeline to keep a local copy in sync with your TrackVision site:
#!/bin/bash
# download-site.sh
SITE_ID="c3d4e5f6-a7b8-9012-cdef-012345678902"
OUTPUT_DIR="./dist"
curl "https://api.acme.trackvision.ai/v1/sites/$SITE_ID/download" \
-H "Authorization: Bearer $TV_API_KEY" \
-o site.zip
unzip -o site.zip -d "$OUTPUT_DIR"
rm site.zip
echo "Site downloaded to $OUTPUT_DIR"