Files are binary or text artifacts produced by Syntage resources, such as PDFs, XML files, CSV exports, and generated reports.
Most file records are returned from another resource first. For example, an invoice, tax return, export, background check, or company verification report may include one or more files. Use the file endpoint when you need the file metadata, and use the download endpoint when you need the actual file content.
The download response content type depends on the stored file. Common formats include PDF, XML, CSV, XLSX, JSON, and plain text.
Use the file metadata to inspect the file type, name, size, and related resource before downloading the content.
How Files Are Used
- Get a resource that references a file, such as an invoice, export, tax return, report, or background check.
- Store the file ID or file IRI if your integration needs to retrieve the file later.
- Retrieve the file when you need metadata such as filename, media type, size, or related resource.
- Use the download endpoint when you need the file content.
Download URLs
To download a file, call GET /files/{id}/download with the file ID from the file resource.
The download response returns a redirect: the Location header contains the actual URL where the file content is served. Your HTTP client must follow the redirect to receive the bytes. The redirect URL is short-lived, so request it again each time you need to download.
Most HTTP clients follow redirects by default. If yours does not, enable redirect following (for example, curl -L) before reading the response body. You can also pass ?redirect=false to receive a JSON response containing the generated url.
For endpoint details, see Files API Reference.