Get Single Report Artifact for Company
The "Get Single Report Artifact for Company" API endpoint allows retrieval of a specific report file (PDF or CSV) for a company by specifying the URL-escaped report path along with query parameters for year, month, day, and report frequency, returning the report as a bytestream or an error message if the download fails.
Overview
This API route returns a report artifact specified by the URL-escaped :reportPath.
Example Request
https://api.phinsec.io/partners/a9F2YkZ997wCkLJfD6fN/companies/mh1GkfQwW5LEXFbaTwwL/report/performance-report.pdf?year=2023&month=3&day=14&type=weekly
URL parameters are used to determine the year, month, day, and frequency type. The report type is determined by the provided name in the path.
Response Reference
When given a valid reportPath, this endpoint returns a bytestream to download the specified report.
Response Sample
The response will be a text/csv or application/pdf file, as these are the report formats generated by the report generator.
Error Reference
| Code | Message | Explanation |
|---|---|---|
| 500 | Failed to download file. Please try again or reach out to Phin Support. | Could not retrieve the report for this partner/company. |