Get a Metrc manifest

distru-get-metrc-manifestRead

Gets one Metrc transfer manifest by manifest number, with its recipients and packages.

Inputs

Every tool also takes the common inputs.

FieldTypeRequiredDescription
manifestNumberstringYese.g. 0000012345. Resolve via distru-search-metrc-manifests.
directionenum
INCOMINGOUTGOING
NoSide to read when the transfer is between two of the company's licenses. Defaults to OUTGOING, else INCOMING.
includeDeliveriesbooleanNoA package's status is SHIPPED until the recipient accepts, rejects or returns it; receivedQuantity and receivedUnitType null until received; package is the imported Distru package, null until imported or caller can't see it. package.hasCost true: it already has a cost, e.g. from a direct import, and importing the manifest as a purchase order adds another; package.quantityCost is that cost, the total for package.quantity (in the package's unit), not per unit, and null when the caller can't view costs. productMostRecentlyMappedToMetrcItem: the product its Metrc item was last mapped to on this license, null if never; distru-mutate-purchase-order uses package.product, else this, when a line omits productId.

Output

Presence on a nested field assumes its parent exists.

FieldTypePresence
manifestobjectCan be null
manifest.manifestNumberstringAlways
manifest.shipperNamestringAlways
manifest.shipperLicenseNumberstringAlways
manifest.transporterNamestringCan be null
manifest.transporterLicenseNumberstringCan be null
manifest.recipientsobject[]Always
manifest.recipients[].namestringAlways
manifest.recipients[].licenseNumberstringAlways
manifest.shipmentTypeNamestringCan be null
manifest.packageCountnumberAlways
manifest.importStatusenum
IGNOREDIMPORTABLEIMPORTEDUNIMPORTED
Always
manifest.isImportablebooleanAlways
manifest.importableDetailsstringCan be null
manifest.licenseobjectAlways
manifest.license.idstringAlways
manifest.license.licenseNumberstringAlways
manifest.salesOrderobjectCan be null
manifest.salesOrder.idstringAlways
manifest.salesOrder.orderNumberstringAlways
manifest.salesOrder.customerobjectCan be null
manifest.salesOrder.customer.idstringAlways
manifest.salesOrder.customer.namestringNull or absent
manifest.purchaseOrderobjectCan be null
manifest.purchaseOrder.idstringAlways
manifest.purchaseOrder.purchaseNumberstringAlways
manifest.createdDatetimestringAlways
manifest.lastModifiedDatetimestringAlways
manifest.receivedDatetimestringCan be null
manifest.voidedbooleanCan be null
manifest.fetchedDatetimestringAlways
manifest.deliveriesobject[]Can be absent
manifest.deliveries[].recipientNamestringAlways
manifest.deliveries[].recipientLicenseNumberstringAlways
manifest.deliveries[].actualDepartureDatetimestringCan be null
manifest.deliveries[].actualArrivalDatetimestringCan be null
manifest.deliveries[].receivedDatetimestringCan be null
manifest.deliveries[].packagesobject[]Always
manifest.deliveries[].packages[].labelstringAlways
manifest.deliveries[].packages[].itemNamestringAlways
manifest.deliveries[].packages[].itemCategoryNamestringAlways
manifest.deliveries[].packages[].statusenum
ACCEPTEDREJECTEDRETURNEDSHIPPED
Always
manifest.deliveries[].packages[].isTestingSamplebooleanAlways
manifest.deliveries[].packages[].shippedQuantitystringAlways
manifest.deliveries[].packages[].shippedUnitTypeobjectCan be null
manifest.deliveries[].packages[].shippedUnitType.idstringAlways
manifest.deliveries[].packages[].shippedUnitType.namestringAlways
manifest.deliveries[].packages[].receivedQuantitystringCan be null
manifest.deliveries[].packages[].receivedUnitTypeobjectCan be null
manifest.deliveries[].packages[].receivedUnitType.idstringAlways
manifest.deliveries[].packages[].receivedUnitType.namestringAlways
manifest.deliveries[].packages[].wholesalePricestringCan be null
manifest.deliveries[].packages[].packageobjectCan be null
manifest.deliveries[].packages[].package.idstringAlways
manifest.deliveries[].packages[].package.metrcLabelstringAlways
manifest.deliveries[].packages[].package.hasCostbooleanAlways
manifest.deliveries[].packages[].package.quantitystringAlways
manifest.deliveries[].packages[].package.quantityCoststringCan be null
manifest.deliveries[].packages[].package.productobjectAlways
manifest.deliveries[].packages[].package.product.idstringAlways
manifest.deliveries[].packages[].package.product.namestringAlways
manifest.deliveries[].packages[].productMostRecentlyMappedToMetrcItemobjectCan be null
manifest.deliveries[].packages[].productMostRecentlyMappedToMetrcItem.idstringAlways
manifest.deliveries[].packages[].productMostRecentlyMappedToMetrcItem.namestringAlways
manifest.directionenum
INCOMINGOUTGOING
Always
What the AI reads

Gets one Metrc transfer manifest by manifest number, as Distru last synced it from Metrc. recipients lists one entry per license an outgoing manifest delivers to; an incoming manifest's recipient is the company's own license. Pair salesOrder.customer with recipients to map customers to the Metrc licenses they were shipped to. fetchedDatetime is when Distru fetched this version from Metrc, not a Metrc time. importStatus is IMPORTED (as the salesOrder of an outgoing manifest, the purchaseOrder of an incoming one, or a stock transfer), IGNORED or UNIMPORTED, never IMPORTABLE; isImportable says whether Metrc's package states allow importing it. An outgoing manifest's receivedDatetime is when its last delivery was received. voided is true when the shipper canceled the manifest in Metrc, which is not a rejection by the recipient; a voided manifest is never received; null on manifests last synced before Metrc reported it. An internal transfer between two of the company's licenses appears as two manifests with the same manifestNumber, one per direction. Deliveries and their packages are left out unless you pass includeDeliveries. Use for a specific manifest; to browse manifests use distru-search-metrc-manifests, and for the manifest's PDF use distru-download-pdf. Returns null if no manifest matches the manifest number.