Job Report Download

Allows retrieval of PDF reports for a completed Order/Job

  • Request a list of available reports for an Order/Job
  • Receive a Download link to retrieve available 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

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}

“Authorization”, “Bearer Add Your Authentication Token here

Below describes an example of how to utilize these endpoints:

1. Get List of Reports

For example Order ID 8066, pass the appropriate URL (e.g. GET https://api.hill-laboratories.com/client/api/v3/orders/8066/reports) with a valid bearer token.

Example of returned result:

{
  "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 

Pass the provided “downloadUrl” to the API (e.g GET https://api.hill-laboratories.com/client/api/v3/orders/1/reports/download/V6meRH) with a valid bearer token.

An appropriate file should be sent.

CodeDescriptionWhen
200200 OKThe request completed OK and a report PDF is returned
400400 Bad RequestIncorrect request. Includes a description of the problem
401401 UnauthorizedAn invalid/expired authentication token was supplied
404404 Not FoundThe “orderId” or “reportHashId” supplied did not match an existing order
500500 Internal Server ErrorAn error occurred on the server while looking up order reports