Download File¶
GET /jobs/{job_id}/download
Get a pre-authenticated download URL for the filled Excel file. The file contains the original Excel workbook with your inputs written into the input cells and the calculated outputs.
Required permission: can_download
Path Parameters¶
| Parameter | Type | Description |
|---|---|---|
job_id |
UUID | The job ID from the execute endpoint |
Response¶
200 OK
{
"download_url": "https://...",
"filename": "property-calculator_7c9e6679_20260318_103000.xlsx",
"expires_at": "2026-03-18T11:30:00Z"
}
| Field | Type | Description |
|---|---|---|
download_url |
string | Pre-authenticated URL to download the file |
filename |
string | Suggested filename |
expires_at |
datetime | URL expiry time (approximately 1 hour) |
Download promptly
The download_url is a pre-authenticated SharePoint URL valid for approximately 1 hour. Download the file as soon as you receive the URL — no additional authentication headers are needed for the download itself.
Errors¶
400 Bad Request — job not yet completed
403 Forbidden — no download permission
404 Not Found — job not found or file not available
Example¶
# Get the download URL
DOWNLOAD_INFO=$(curl -s -H "X-API-Key: YOUR_API_KEY" \
https://api.xlsxapi.eu/jobs/JOB_ID/download)
# Extract URL and download (no auth headers needed)
URL=$(echo $DOWNLOAD_INFO | python3 -c "import sys,json; print(json.load(sys.stdin)['download_url'])")
curl -o output.xlsx "$URL"
import requests
headers = {"X-API-Key": "YOUR_API_KEY"}
# Get download URL
resp = requests.get(
f"https://api.xlsxapi.eu/jobs/{job_id}/download",
headers=headers,
)
info = resp.json()
# Download file (no auth needed for the URL)
file_resp = requests.get(info["download_url"])
with open(info["filename"], "wb") as f:
f.write(file_resp.content)