Update a package
Changed onUpdate the Distru-tracked fields of an existing package. Packages cannot be created through the API, only updated.
These are Distru-side attributes only — this endpoint does not push anything to Metrc or BioTrack, does not move inventory, and does not change the package's quantity or status. To change a package's location use POST /public/v1/packages/move; to finish it use POST /public/v1/packages/finish.
is_inactive flips the package between active and inactive. Inactivating hides the package from active inventory in Distru and excludes its quantity from its product's active-quantity figures; it does not change the package's quantity, distru_status, or anything in the compliance system, and it can be reversed at any time by sending false. The flip runs in the same transaction as the rest of the update, so if it is rejected the whole request is rolled back and nothing is persisted.
Supports sparse updates: only the fields included in the request body are changed; omitted fields are left untouched. A field sent explicitly as null clears it (see bin_ids for the array-clearing rule). The path id is the package's ID from GET /public/v1/packages; an unknown id returns 404, and one your team restrictions hide returns 403.
Required permission: products_permissions_edit.
Request
- Base URLhttps://app.distru.com
- AuthHTTP bearer
Path parameters
The package's ID (the id string returned by GET /public/v1/packages).
Request body
Response
The updated package
Example response
{
"data": {
"license": {
"id": "02c88a3f-d759-4973-88f9-60049d682524",
"license_number": "C11-1234567890"
},
"location": {
"address": "1234 Warehouse Street, Oakland, CA",
"company_id": "02c88a3f-d759-4973-88f9-60049d682524",
"id": "02c88a3f-d759-4973-88f9-60049d682524",
"license_id": "02c88a3f-d759-4973-88f9-60049d682524",
"name": "Warehouse 1"
},
"product": {
"batches_with_active_quantity_by_location": [
{
"location": {
"address": "1234 Warehouse Street, Oakland, CA",
"company_id": "02c88a3f-d759-4973-88f9-60049d682524",
"id": "02c88a3f-d759-4973-88f9-60049d682524",
"license_id": "02c88a3f-d759-4973-88f9-60049d682524",
"name": "Warehouse 1"
}
}
],
"brand": {
"id": "3f128a34-cc59-4b49-8883-23bf10e59c6c",
"name": "Retailer 1"
},
"packages_with_active_quantity_by_location": [
{
"location": {
"address": "1234 Warehouse Street, Oakland, CA",
"company_id": "02c88a3f-d759-4973-88f9-60049d682524",
"id": "02c88a3f-d759-4973-88f9-60049d682524",
"license_id": "02c88a3f-d759-4973-88f9-60049d682524",
"name": "Warehouse 1"
}
}
],
"quantity_active_by_location": [
{
"location": {
"address": "1234 Warehouse Street, Oakland, CA",
"company_id": "02c88a3f-d759-4973-88f9-60049d682524",
"id": "02c88a3f-d759-4973-88f9-60049d682524",
"license_id": "02c88a3f-d759-4973-88f9-60049d682524",
"name": "Warehouse 1"
}
}
],
"vendor": {
"id": "3f128a34-cc59-4b49-8883-23bf10e59c6c",
"name": "Retailer 1"
}
}
}
}Changes
- info
added the required property
//to the response with the status - info
added the required property
//to the response with the status - info
added the required property
///to the response with the status - info
added the required property
///to the response with the status
- info