Description
Use these endpoints to retrieve PDF reports for completed orders or jobs.
Key Features
- List the reports available for an order or job
- Use a report's download link to retrieve the PDF
Get a List of Reports
Testing: GET https://cat-api.hill-laboratories.com/client/api/v3/orders/{orderId}/reports
Production: GET https://api.hill-laboratories.com/client/api/v3/orders/{orderId}/reports
Download Specific Report
Testing: GET https://cat-api.hill-laboratories.com/client/api/v3/orders/{orderId}/reports/download/{reportHashId}
Production: GET https://api.hill-laboratories.com/client/api/v3/orders/{orderId}/reports/download/{reportHashId}
Required Headers
Authorization: Bearer YOUR_ACCESS_TOKEN
Use Case Example
Use these steps to retrieve a report:
1. Get List of Reports
To list reports for order ID 8066, send a GET request to https://api.hill-laboratories.com/client/api/v3/orders/8066/reports with a valid bearer token.
The response includes a download URL, for example:
{
"reports": [
{
"name": "Standard PDF Report",
"approvedAt": "2021-08-04T20:38:27.762Z",
"isFinal": true,
"version": "6.2",
"downloadUrl": "https://api.hill-laboratories.com/client/api/v3/orders/1/reports/download/V6meRH"
}
]
}
2. Download Report
To download a report, send a GET request to the returned downloadUrl with a valid bearer token, for example: https://api.hill-laboratories.com/client/api/v3/orders/1/reports/download/V6meRH.
The API returns the PDF file.
Possible Responses
| Code | Description | When |
|---|---|---|
| 200 | 200 OK | The request completed OK and a report PDF is returned |
| 400 | 400 Bad Request | Incorrect request. Includes a description of the problem |
| 401 | 401 Unauthorized | An invalid/expired authentication token was supplied |
| 404 | 404 Not Found | The “orderId” or “reportHashId” supplied did not match an existing order |
| 500 | 500 Internal Server Error | An error occurred on the server while looking up order reports |