Use this endpoint to poll for historical test results.

The API returns result data in the standard format by default.

Do not poll more frequently than once every 20 minutes. Hill Labs recommends intervals of 30 to 60 minutes.

Specify dates and times in UTC when you call the endpoint.


This endpoint returns a paginated list of result summaries.

Testing: GET https://cat-api.hill-laboratories.com/client/api/v4/results?{parameters}

Production: GET https://api.hill-laboratories.com/client/api/v4/results?{parameters}

The Authorization header is required. The Accept header indicates that you expect a JSON response.

Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
  • Date Range Filtering: GET https://api.hill-laboratories.com/client/api/v4/results?dateFrom=2023-07-03T12:44:25Z&dateTo=2023-07-04T12:44:25Z&limit=5
  • Filter by Order ID: GET https://api.hill-laboratories.com/client/api/v4/results?orderId=123456
NameDescription
dateFrom and dateTo

Filter results by when each result was created, shown as resultCreatedAt in the result summary. Supply both parameters in UTC to set a date range, or omit both to use the default range of the last three months. The range includes results created at either boundary. Use ISO 8601 timestamps, for example 2023-07-03T12:44:25Z.

Validation rules:

  • dateFrom must be earlier than dateTo.
  • dateFrom must be earlier than the request time.
  • dateTo must be earlier than or equal to the request time.
  • dateTo must be no more than one year after dateFrom.
orderIdFilter results for a specific order ID.
finalOnlyReturn only final results.
clientReferenceFilter results by the order’s client reference.
clientOrderNumberFilter results by the order’s client order number.
additionalClientReferenceFilter results by the order’s additional client reference.
quoteNumberFilter results by the order’s quote number.
limitSet the maximum number of result summaries to return per page. Default: 100. Maximum: 200.
offsetSet the number of results to skip for pagination. Default: 0.
Field NameDescription
paginationObject containing pagination details for the results
resultsArray of result objects containing information about each result

Pagination

Fields in the pagination object.

Field NameDescription
limitNumber of results returned per page
offsetOffset for pagination
totalTotal number of results available (before applying pagination, i.e. can be > 200)
nextLink to the next page of results (null if there is no next page)
prevLink to the previous page of results (null if there is no prev page)

Result summary

Fields in each item of the results array.

Field NameDescription
resultIdUnique identifier for the result
orderIdUnique identifier for the order
labJobNumberUnique identifier for the lab job
numberOfSamplesNumber of samples associated with the result
isFinalBoolean indicating if the result is final
clientReferenceReference string for the client
additionalClientReferenceAdditional reference string for the client
quoteNumberQuote number associated with the order
clientOrderNumberClient’s order number
primaryPrimary contact name associated with the order
submitterSubmitter contact name associated with the order
chargeToCharge to information associated with the order
clientClient information associated with the order
resultCreatedAtDate and time when the result was created
jobRegisteredAtDate and time when the job was registered
Example Job Polling Result
{
  "pagination": {
    "limit": 5,
    "offset": 0,
    "total": 500,
    "next": "https://api.hill-laboratories.com/client/api/v4/results?dateFrom=2023-07-03T12:44:25Z&dateTo=2023-07-04T12:44:25Z&offset=1&limit=5",
    "prev": null
  },
  "results": [
    {
      "resultId": "6c8b519b-7b00-470b-86b8-065432109876",
      "orderId": 123456,
      "labJobNumber": 123456,
      "numberOfSamples": 1,
      "isFinal": true,
      "clientReference": "Client Reference",
      "additionalClientReference": "Additional Client Reference",
      "quoteNumber": 123455,
      "clientOrderNumber": "Client Order Number",
      "primary": "Primary Contact",
      "submitter": "Submitter",
      "chargeTo": "Charge to",
      "client": "Client",
      "resultCreatedAt": "2023-07-03T13:36:44Z",
      "jobRegisteredAt": "2023-07-01T13:36:44Z"
    },
    {
      "resultId": "2e3d29b3-1c5c-4147-aa76-e59ccddd4572",
      "orderId": 123456,
      "labJobNumber": 123456,
      "numberOfSamples": 5,
      "isFinal": true,
      "clientReference": "Client Reference",
      "additionalClientReference": "Additional Client Reference",
      "quoteNumber": 123455,
      "clientOrderNumber": "Client Order Number",
      "primary": "Primary Contact",
      "submitter": "Submitter",
      "chargeTo": "Charge to",
      "client": "Client",
      "resultCreatedAt": "2023-07-03T13:11:44Z",
      "jobRegisteredAt": "2023-07-01T13:36:44Z"
    },
    {
      "resultId": "7bf91e39-45ca-46ec-9f91-b016e30dd265",
      "orderId": 123456,
      "labJobNumber": 123456,
      "numberOfSamples": 8,
      "isFinal": false,
      "clientReference": "Client Reference",
      "additionalClientReference": "Additional Client Reference",
      "quoteNumber": 123455,
      "clientOrderNumber": "Client Order Number",
      "primary": "Primary Contact",
      "submitter": "Submitter",
      "chargeTo": "Charge to",
      "client": "Client",
      "resultCreatedAt": "2023-07-03T13:09:44Z",
      "jobRegisteredAt": "2023-07-01T13:36:44Z"
    },
    {
      "resultId": "4bfb9abf-7516-434e-bbaa-9cce637d6ed7",
      "orderId": 123456,
      "labJobNumber": 123456,
      "numberOfSamples": 1,
      "isFinal": true,
      "clientReference": "Client Reference",
      "additionalClientReference": "Additional Client Reference",
      "quoteNumber": 123455,
      "clientOrderNumber": "Client Order Number",
      "primary": "Primary Contact",
      "submitter": "Submitter",
      "chargeTo": "Charge to",
      "client": "Client",
      "resultCreatedAt": "2023-07-03T13:02:44Z",
      "jobRegisteredAt": "2023-07-01T13:36:44Z"
    },
    {
      "resultId": "93c92aaa-5906-43b5-8488-47896274312f",
      "orderId": 123456,
      "labJobNumber": 123456,
      "numberOfSamples": 9,
      "isFinal": true,
      "clientReference": "Client Reference",
      "additionalClientReference": "Additional Client Reference",
      "quoteNumber": 123455,
      "clientOrderNumber": "Client Order Number",
      "primary": "Primary Contact",
      "submitter": "Submitter",
      "chargeTo": "Charge to",
      "client": "Client",
      "resultCreatedAt": "2023-07-03T12:50:44Z",
      "jobRegisteredAt": "2023-07-01T13:36:44Z"
    }
  ]
}

Use this endpoint to retrieve the latest detailed result for a job.

Testing:  GET https://cat-api.hill-laboratories.com/client/api/v4/jobs/{labJobNumber}/latest-result

Production: GET https://api.hill-laboratories.com/client/api/v4/jobs/{labJobNumber}/latest-result

The Authorization header is required. The Accept header indicates that you expect a JSON response.

Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
  • Get the latest result for Job 123456: GET https://api.hill-laboratories.com/client/api/v4/jobs/123456/latest-result

Latest result

Fields returned by the latest-result endpoint.

Field NameDescription
resultIdUnique identifier for the result
orderIdUnique identifier for the order
labJobNumberUnique identifier for the lab job
isFinalBoolean indicating if the result is final
analystCommentsString providing comments on the job from the lab
jobReceivedAtDate and time when the job was received
jobRegisteredAtDate and time when the job was registered
jobFinishedAtDate and time when the job was finished
resultCreatedAtDate and time when the result was created
clientReferenceReference string for the client
additionalClientReferenceAdditional reference string for the client
quoteNumberQuote number associated with the order
clientOrderNumberClient’s order number
orderReferencesArray of custom order reference objects
contactsArray of contact objects related to the order
addressesArray of address objects related to the order
notesNotes associated with the job/order
samplesArray of sample objects related to the order
analyticalTestDefinitionsArray of analytical test definition objects

Order references

Fields in each item of the orderReferences array.

Field NameDescription
nameName of the custom reference
valueValue of the custom reference

Contacts

Fields in each item of the contacts array.

Field NameDescription
hillLabsContactIdThe unique ID for the contact
nameName of the contact
emailEmail address of the contact
orderRolesArray of order roles associated with the contact

Addresses

Fields in each item of the addresses array.

Field NameDescription
recipientRecipient name (nullable)
address1Address line 1
address2Address line 2
cityCity
regionRegion or state (nullable)
countryCountry
postCodePostal code
orderRolesArray of order roles associated with the address (roles are “INVOICE” or “DELIVERY”)

Samples

Fields in each item of the samples array.

Field NameDescription
nameSample name
clientSampleIdAn optional identifier allowing assignment of a reference number or code to a sample
sequenceSequence number of the sample
sampleTypeObject containing sample type information
locationObject containing location information
containersArray of container objects related to the sample
analyticalTestsArray of analytical test objects related to sample
testResultsArray of test result objects related to sample

Sample type

Fields in the sampleType object.

Field NameDescription
sampleTypeCodeSample type code
sampleTypeNameSample type name

Location

Fields in the location object.

Field NameDescription
intersectArray of objects containing latitude and longitude coordinates
nameName of the location (nullable)

Containers

Fields in each item of the containers array.

Field NameDescription
barcodeObject containing container barcode details

Barcode

Fields in the barcode object.

Field NameDescription
valueValue of the container barcode
typeType of the container barcode (e.g. LINEAR)

Analytical tests

Fields in each item of the analyticalTests array.

Field NameDescription
codeCode of the analytical test
nameName of the analytical test

Test results

Fields in each item of the testResults array.

Field NameDescription
statusStatus of the test result (e.g. IN_PROGRESS, COMPLETE)
completedAtDate and time when the test was completed
measurandCodeCode of the measurand (analyte)
measurandNameName of the measurand (analyte)
resultObject containing test result details

Result details

Fields in the result object.

Field NameDescription
unitOfMeasureUnit of measurement for the result
detectionLimitDetection limit of the result
formattedDetectionLimitFormatted detection limit of the result
upperLimitUpper limit of the result
rangeIndicatorIndicator if the result is above or below the limit
numericResultNumeric value of the result
formattedResultFormatted representation of the result
Example Job Polling Result
{
  "resultId": "6c8b519b-7b00-470b-86b8-065432109876",
  "orderId": 123456,
  "labJobNumber": 123456,
  "isFinal": true,
  "analystComments": "This is an example comment",
  "jobReceivedAt": "2023-07-20T03:04:05.412000+00:00",
  "jobRegisteredAt": "2023-07-20T03:05:36.787000+00:00",
  "jobFinishedAt": "2023-07-20T04:00:01.454000+00:00",
  "resultCreatedAt": "2023-07-20T20:05:43.873+00:00",
  "clientReference": "Example Client Reference",
  "additionalClientReference": "Example  Client Reference",
  "quoteNumber": 123455,
  "clientOrderNumber": "Example Client Order Number",
  "orderReferences": [
    {
      "name": "Example Custom Reference 1",
      "value": "Reference Value"
    },
    {
      "name": "Example Custom Reference 2",
      "value": "Reference Value"
    }
  ],
  "contacts": [
    {
      "hillLabsContactId": "0e529040-52d4-4878-85d1-4d503b4f9f24",
      "name": "Test",
      "orderRoles": [
        "CHARGE_TO",
        "CLIENT"
      ]
    },
    {
      "hillLabsContactId": "e3cb05ec-a088-4f9b-b50f-510c5426cf47",
      "name": "Test",
      "email": "testemail@hill-labs.co.nz",
      "orderRoles": [
        "PRIMARY",
        "SUBMITTER"
      ]
    }
  ],
  "addresses": [
    {
      "recipient": null,
      "address1": "28 Duke Street",
      "address2": "Frankton",
      "city": "Hamilton",
      "region": "",
      "country": "New Zealand",
      "postCode": "3204",
      "orderRoles": [
        "INVOICE"
      ]
    }
  ],
  "notes": "Some notes for the job/order",
  "samples": [
    {
      "name": "Sample 1",
      "sequence": 1,
      "sampleType": {
        "sampleTypeCode": "HoneyD",
        "sampleTypeName": "Honey"
      },
      "location": {
        "intersect": [
          {
            "longitude": 168.407300001865,
            "latitude": -46.0494999997713
          }
        ],
        "name": "Location name"
      },
      "containers": [
        {
          "barcode": {
            "value": "331001455044",
            "type": "LINEAR"
          }
        }
      ],
      "analyticalTests": [
        {
          "code": "Honey3in1"
        },
        {
          "code": "Honey_Forecast_withNPA"
        }
      ],
      "testResults": [
        {
          "status": "COMPLETE",
          "completedAt": "2023-07-20T03:56:53.194Z",
          "measurandCode": "Fmgo_20_max_weeks",
          "measurandName": "Forecasted Weeks to Maximum Methylglyoxal at 20°C",
          "result": {
            "unitOfMeasure": "weeks",
            "detectionLimit": 1,
            "formattedDetectionLimit": "1",
            "upperLimit": 104,
            "rangeIndicator": "ABOVE_UPPER_LIMIT",
            "numericResult": 214.428571428571,
            "formattedResult": "> 104"
          }
        },
        {
          "status": "COMPLETE",
          "completedAt": "2023-07-20T03:56:53.236Z",
          "measurandCode": "Fmgo_27_max_weeks",
          "measurandName": "Forecasted Weeks to Maximum Methylglyoxal at 27°C",
          "result": {
            "unitOfMeasure": "weeks",
            "detectionLimit": 1,
            "formattedDetectionLimit": "1",
            "upperLimit": 104,
            "rangeIndicator": "BETWEEN_LIMITS",
            "numericResult": 82.7142857142857,
            "formattedResult": "83"
          }
        },
        {
          "status": "COMPLETE",
          "completedAt": "2023-07-20T03:09:50.926Z",
          "measurandCode": "mgo_mgkg_ar_calc",
          "measurandName": "Methylglyoxal (MGO)",
          "result": {
            "unitOfMeasure": "mg/kg",
            "detectionLimit": 5,
            "formattedDetectionLimit": "5",
            "rangeIndicator": "BETWEEN_LIMITS",
            "numericResult": 658.22033149,
            "formattedResult": "658"
          }
        }
      ]
    }
  ],
  "analyticalTestDefinitions": [
    {
      "code": "Honey3in1",
      "name": "3 in 1 Honey Suite"
    },
    {
      "code": "Honey_Forecast_withNPA",
      "name": "Honey Forecast with NPA"
    }
  ]
}

Use this endpoint to retrieve a result by its result ID, including a previous result that has since been superseded.

Testing: GET https://cat-api.hill-laboratories.com/client/api/v4/results/{resultId}

Production: GET https://api.hill-laboratories.com/client/api/v4/results/{resultId}

The Authorization header is required. The Accept header indicates that you expect a JSON response.

Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
  • Get result details by result ID: GET https://api.hill-laboratories.com/client/api/v4/results/6c8b519b-7b00-470b-86b8-065432109876

Same as the above

Example Job Polling Result
{
  "resultId": "6c8b519b-7b00-470b-86b8-065432109876",
  "orderId": 123456,
  "labJobNumber": 123456,
  "isFinal": true,
  "analystComments": "This is an example comment",
  "jobReceivedAt": "2023-07-20T03:04:05.412000+00:00",
  "jobRegisteredAt": "2023-07-20T03:05:36.787000+00:00",
  "jobFinishedAt": "2023-07-20T04:00:01.454000+00:00",
  "resultCreatedAt": "2023-07-20T20:05:43.873+00:00",
  "clientReference": "Client Reference",
  "additionalClientReference": "Client Reference",
  "quoteNumber": 123455,
  "clientOrderNumber": "Client Order Number",
  "orderReferences": [
    {
      "name": "Example Custom Reference 1",
      "value": "Reference Value"
    },
    {
      "name": "Example Custom Reference 2",
      "value": "Reference Value"
    }
  ],
  "contacts": [
    {
      "hillLabsContactId": "0e529040-52d4-4878-85d1-4d503b4f9f24",
      "name": "Test",
      "orderRoles": [
        "CHARGE_TO",
        "CLIENT"
      ]
    },
    {
      "hillLabsContactId": "e3cb05ec-a088-4f9b-b50f-510c5426cf47",
      "name": "Test",
      "email": "jon.harris@hill-labs.co.nz",
      "orderRoles": [
        "PRIMARY",
        "SUBMITTER"
      ]
    }
  ],
  "addresses": [
    {
      "recipient": null,
      "address1": "28 Duke Street",
      "address2": "Frankton",
      "city": "Hamilton",
      "region": "",
      "country": "New Zealand",
      "postCode": "3204",
      "orderRoles": [
        "INVOICE"
      ]
    }
  ],
  "notes": "Some notes for the job/order",
  "samples": [
    {
      "name": "Sample 1",
      "sequence": 1,
      "sampleType": {
        "sampleTypeCode": "HoneyD",
        "sampleTypeName": "Honey"
      },
      "location": {
        "intersect": [
          {
            "longitude":,
            "latitude":
          }
        ],
        "name": "Location name"
      },
      "containers": [
        {
          "barcode": {
            "value": "331001455044",
            "type": "LINEAR"
          }
        }
      ],
      "analyticalTests": [
        {
          "code": "Honey3in1"
        },
        {
          "code": "Honey_Forecast_withNPA"
        }
      ],
      "testResults": [
        {
          "status": "COMPLETE",
          "completedAt": "2023-07-20T03:56:53.194Z",
          "measurandCode": "Fmgo_20_max_weeks",
          "measurandName": "Forecasted Weeks to Maximum Methylglyoxal at 20°C",
          "result": {
            "unitOfMeasure": "weeks",
            "detectionLimit": 1,
            "formattedDetectionLimit": "1",
            "upperLimit": 104,
            "rangeIndicator": "ABOVE_UPPER_LIMIT",
            "numericResult": 214.428571428571,
            "formattedResult": "> 104"
          }
        },
        {
          "status": "COMPLETE",
          "completedAt": "2023-07-20T03:56:53.236Z",
          "measurandCode": "Fmgo_27_max_weeks",
          "measurandName": "Forecasted Weeks to Maximum Methylglyoxal at 27°C",
          "result": {
            "unitOfMeasure": "weeks",
            "detectionLimit": 1,
            "formattedDetectionLimit": "1",
            "upperLimit": 104,
            "rangeIndicator": "BETWEEN_LIMITS",
            "numericResult": 82.7142857142857,
            "formattedResult": "83"
          }
        },
        {
          "status": "COMPLETE",
          "completedAt": "2023-07-20T03:09:50.926Z",
          "measurandCode": "mgo_mgkg_ar_calc",
          "measurandName": "Methylglyoxal (MGO)",
          "result": {
            "unitOfMeasure": "mg/kg",
            "detectionLimit": 5,
            "formattedDetectionLimit": "5",
            "rangeIndicator": "BETWEEN_LIMITS",
            "numericResult": 658.22033149,
            "formattedResult": "658"
          }
        }
      ]
    }
  ],
  "analyticalTestDefinitions": [
    {
      "code": "Honey3in1",
      "name": "3 in 1 Honey Suite"
    },
    {
      "code": "Honey_Forecast_withNPA",
      "name": "Honey Forecast with NPA"
    }
  ]
}