Get test results
List test results for the authenticated company, most recently created last (ordered by creation time, then id). Each result is returned in full, including its potency values, lab metadata, additional_test_results, coa_url, is_primary flag, and the package_id/batch_id it is attached to.
Results are paginated; follow the next_page URL in the envelope to walk the full set. Reads are eventually consistent — a test result you just created or updated may take up to 1 second to appear or reflect its latest values here.
Required permission: products_permissions_view.
Query parameters
Restrict the result to specific test results by ID (the same ID returned as each test result's id). Repeat the bracketed key once per ID. Unknown IDs simply match nothing; an empty list is treated as no filter. At most 200 IDs may be given.
Restrict the result to test results attached to these packages by ID (the package's ID, as returned in each result's package_id). A result is attached to exactly one package or one batch, so this matches only package-attached results. This filter looks at direct attachment only: if a package inherits a test result from its assembly inputs, that package is not considered here — only packages the result is directly attached to are matched. Repeat the bracketed key once per ID. Unknown IDs match nothing; an empty list is treated as no filter. At most 200 IDs may be given.
Restrict the result to test results attached to these batches by ID (the batch's ID, as returned in each result's batch_id). A result is attached to exactly one package or one batch, so this matches only batch-attached results. This filter looks at direct attachment only: if a batch inherits a test result from its assembly inputs, that batch is not considered here — only batches the result is directly attached to are matched. Repeat the bracketed key once per ID. Unknown IDs match nothing; an empty list is treated as no filter. At most 200 IDs may be given.
Restrict the result to test results whose attached package or batch belongs to one of these products by ID. This filter looks at direct attachment only: it matches on the product of the package or batch the result is directly attached to, so if a package/batch inherits a test result from its assembly inputs, that product is not considered here. Repeat the bracketed key once per ID. Unknown IDs match nothing; an empty list is treated as no filter. At most 200 IDs may be given.
Restrict the result to test results with these Metrc lab-result identifiers — Metrc's own integer IDs (the metrc_id in the response), not Distru IDs. Matches a result if its Metrc ID equals any listed value. Only results synced from Metrc carry one. Repeat the bracketed key once per ID. An empty list is treated as no filter. At most 200 IDs may be given.
Filter to test results whose creation time falls in a range. Value is a comma-separated pair of ISO8601 UTC datetimes, <start>,<end>; either side may be left empty for an open-ended bound. Both bounds are inclusive. Example: ?inserted_datetime=,2022-07-10T00:00:00Z returns everything created on or before that instant; ?inserted_datetime=2022-07-01T00:00:00Z,2022-07-10T00:00:00Z bounds both ends.
Filter to test results whose last-modified time falls in a range. Value is a comma-separated pair of ISO8601 UTC datetimes, <start>,<end>; either side may be left empty for an open-ended bound. Both bounds are inclusive. Example: ?updated_datetime=,2022-07-10T00:00:00Z returns everything modified on or before that instant; ?updated_datetime=2022-07-01T00:00:00Z,2022-07-10T00:00:00Z bounds both ends.
Page selector. Page size is fixed by the server; paginate by following the next_page URL in each response rather than building page selectors yourself — it is null on the last page. next_page uses page[after]=<cursor>, an opaque token marking where the next page resumes; pass it back exactly as given, and only to the endpoint that issued it. This is seek-based, so every page stays fast no matter how deep you page.
Response
A list of test results
Changes
No recorded changes to this endpoint across all 1 revision of this API.