Get assemblies
Get a page of assemblies, each with its full outputs, inputs, and costs, ordered oldest to newest by their last modified date. All filters below are ANDed together, and results are paginated.
Because the order is by last modified date, an assembly that is modified while you are paging moves to the end of the order and can appear again on a later page — walking the pages is safe as long as you treat a repeated ID as the same assembly. No assembly is ever skipped this way.
Nested input_* and output_* filters match against an assembly's inputs and outputs. When you combine several filters for the same side, a single line must satisfy all of them: e.g. input_product_ids + input_batch_ids keeps only assemblies that have one input matching both. Input and output filters combine across sides too — an assembly must have a matching input AND a matching output to be returned.
This endpoint returns eventually consistent data, with changes taking up to 1 second to propagate in responses — an assembly you just created or updated (including via the upsert or split-package endpoints) may not appear here for up to a second.
Required permission: assemblies_permissions_view. Results are scoped to your company and further filtered to only the assemblies the authenticated user's team restrictions allow them to see, so a restricted key may see fewer rows than exist.
Query parameters
Restrict the result to specific assemblies by ID (the same ID returned as each assembly'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.
Filter by the datetime an assembly was completed, as an inclusive after,before range of ISO 8601 timestamps. Either side may be left blank: 2022-07-10T00:00:00Z, returns everything completed on or after that instant, ,2022-07-10T00:00:00Z everything completed on or before it, and 2022-07-01T00:00:00Z,2022-07-31T00:00:00Z the closed interval between the two. Only COMPLETED assemblies have a completion datetime, so any value here implicitly excludes PENDING assemblies.
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.
Filter to assemblies that originated a given way, matching exactly one value. • MANUALLY_CREATED — built by hand in Distru or via the upsert endpoint (the only source this API can modify). • SALES_ORDER — generated to fulfill a sales order. • SPLIT_PACKAGE — produced by splitting a Metrc package (including via the split-package endpoint). • LAB_TESTING — created to pull a test sample. Note: this attribute is unreliable for assemblies created before September 2020, which may report MANUALLY_CREATED regardless of their true origin.
Filter to assemblies tied to the license with this exact license number within your company (exact match, not a substring). Assemblies on non-compliance (NONE) licenses have no license number and are excluded when this is set.
Filter by assembly status, matching exactly one value. • PENDING — still in progress; ingredient inventory is claimed but not yet consumed and the assembly can still be edited or deleted. • COMPLETED — finished; inputs are consumed and outputs produced into inventory, and the assembly is frozen.
Filter by custom field values, as custom_data[{id}]=value where {id} is a custom field's numeric id. Repeat with different ids to filter on several fields at once; a record must match every one (AND). Matching is case-sensitive exact against the value stored on the record. The id must be a filterable custom field defined on this entity — use GET /public/v1/custom-fields?parent_object=assembly to list the ids, their types, and which are filterable. A non-numeric id, an id not defined on this entity, or an id that isn't filterable returns a 400.
Filter by when the assembly was created, as an inclusive after,before range of ISO 8601 timestamps. Either side may be left blank to make the range open-ended.
Filter by when the assembly was last modified, as an inclusive after,before range of ISO 8601 timestamps. Either side may be left blank to make the range open-ended.
Restrict to assemblies owned by any of these user IDs (matched against each assembly's owner_id). Repeat the bracketed key once per ID. Unknown IDs match nothing; an empty list is no filter. At most 200 IDs.
Restrict to assemblies tied to any of these license IDs. This is the exact-ID counterpart to license_number; both may be combined (ANDed). Assemblies on non-compliance (NONE) licenses have no license and are excluded when this is set. Repeat the bracketed key once per ID. Unknown IDs match nothing; an empty list is no filter. At most 200 IDs.
Restrict to assemblies with an input of any of these product IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an input drawn from any of these package IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an input drawn from any of these batch IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an input package carrying any of these Metrc compliance labels (case-sensitive exact match per value). Repeat the bracketed key per label. At most 200.
Restrict to assemblies with an input package whose Distru batch number is any of these (case-sensitive exact match per value). Repeat the bracketed key per value. At most 200.
Restrict to assemblies with an input batch whose batch number is any of these (case-sensitive exact match per value). Repeat the bracketed key per value. At most 200.
Restrict to assemblies with an input whose product belongs to any of these category IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an input whose product belongs to any of these subcategory IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an input whose product SKU is any of these (case-insensitive exact match per value). Repeat the bracketed key per SKU. At most 200.
Restrict to assemblies with an input whose product belongs to any of these product group IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an input whose product belongs to any of these brand IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an input whose product is tied to any of these vendor (company relationship) IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an input whose product carries any of these tag IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an input whose product belongs to any of these strain IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an output of any of these product IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an output produced into any of these package IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an output produced into any of these batch IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an output package carrying any of these Metrc compliance labels (case-sensitive exact match per value). Repeat the bracketed key per label. At most 200.
Restrict to assemblies with an output package whose Distru batch number is any of these (case-sensitive exact match per value). Repeat the bracketed key per value. At most 200.
Restrict to assemblies with an output batch whose batch number is any of these (case-sensitive exact match per value). Repeat the bracketed key per value. At most 200.
Restrict to assemblies with an output whose product belongs to any of these category IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an output whose product belongs to any of these subcategory IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an output whose product SKU is any of these (case-insensitive exact match per value). Repeat the bracketed key per SKU. At most 200.
Restrict to assemblies with an output whose product belongs to any of these product group IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an output whose product belongs to any of these brand IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an output whose product is tied to any of these vendor (company relationship) IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an output whose product carries any of these tag IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Restrict to assemblies with an output whose product belongs to any of these strain IDs. Repeat the bracketed key per ID. At most 200. Unknown IDs match nothing; an empty list is no filter.
Response
A list of assemblies
Changes
No recorded changes to this endpoint across all 1 revision of this API.