CaseIDs

caseids_import

Imports a CaseID into a dispensary’s inventory, creating or updating the associated POS Package UID, Catalog Product, and Inventory Package records.

Endpoint

POST /api/v1.2/caseids/import/

Example Payload

{
  "case_uuid": "<case_uuid>",
  "packaged_product_uuid": "<packaged_product_uuid>",
  "pos_product_id": "<pos_product_id>",
  "pos_inventory_id": "<pos_inventory_id>",
  "package_uid": "<package_uid>"
}

Request Fields

Field

Type

Required

Description

case_uuid

string (ShortUUID)

yes

UUID of the case to import

packaged_product_uuid

string (ShortUUID)

yes

UUID of the packaged product within the case

pos_product_id

string

yes

POS catalog/product ID

pos_inventory_id

string

yes

POS inventory record/package ID

package_uid

string

yes

Package UID

sku

string

no

Product SKU

Responses

200

Success response

{
  "case_uuid": "<case_uuid>",
  "packaged_product_uuid": "<packaged_product_uuid>",
  "package_uid": "<package_uid>"
}

Bad Request

400

will be returned for business rule violations

{
  "detail": "This case has already been scanned for another dispensary."
}

will be returned when the CaseID/packaged product is already imported

{
  "detail": "Items in CaseID <case_uuid> are already imported into inventory <package_uid>."
}

will be returned for field-level validation errors

{
  "case_uuid": ["This field is required."],
  "pos_product_id": ["This field is required."]
}

caseids_import_remove

Removes a previously imported CaseID from a dispensary’s inventory. Deletes the associated import records and removes the LucidIDs from the inventory collection.

Endpoint

POST /api/v1.2/caseids/import/remove/

Example Payload

{
  "case_uuid": "<case_uuid>",
  "package_uid": "<package_uid>",
  "packaged_product_uuid": "<packaged_product_uuid>"
}

Request Fields

Field

Type

Required

Description

case_uuid

string (ShortUUID)

yes

UUID of the case to remove

package_uid

string

yes

Package UID

packaged_product_uuid

string (ShortUUID)

no

UUID of the packaged product to remove (for multi-batch cases)

Responses

200

Bad Request

400

will be returned for business rule violations

{
  "detail": "POS Package UID not found for package_uid=PKG-001."
}

caseids_for_package_uid

Returns the CaseIDs associated with a given Package UID, each annotated with its import status. Use this to discover which CaseIDs should be auto-imported into a Package UID before calling caseids_import, and to detect CaseIDs that have already been imported (is_imported is true) — those will fail caseids_import.

If no CaseIDs are associated with the supplied Package UID, or none of the associated CaseIDs have been associated with the caller’s dispensary, an empty case_ids object is returned.

Endpoint

GET /api/v1.2/package-uids/<package_uid>/caseids/

Path Parameters

Field

Type

Required

Description

package_uid

string

yes

Package UID (e.g. the regulator/Metrc UID) to look up CaseIDs for

Responses

200

Success response

{
  "package_uid": "<package_uid>",
  "case_ids": {
    "<case_uuid_1>": {
      "is_imported": true,
      "imported_on": "2026-05-10T15:00:00Z",
      "package_uid": "<package_uid>",
      "dispensary": {
        "uuid": "<dispensary_uuid>",
        "name": "<dispensary_name>",
        "state": "CA"
      }
    },
    "<case_uuid_2>": {
      "is_imported": true,
      "imported_on": "2026-05-09T10:00:00Z",
      "package_uid": null,
      "dispensary": null
    },
    "<case_uuid_3>": {
      "is_imported": false,
      "imported_on": null,
      "package_uid": null,
      "dispensary": null
    }
  }
}

Response Fields

case_ids is an object keyed by CaseID shortuuid. Each value contains:

Field

Type

Description

is_imported

bool

true if the CaseID has been imported into inventory by any dispensary; false otherwise.

imported_on

datetime (ISO 8601) | null

Timestamp of the most recent import across all dispensaries. null when is_imported is false.

package_uid

string | null

The Package UID the CaseID was imported into. Populated only when the CaseID was imported by a dispensary that belongs to the same company as the API client’s dispensary. null otherwise.

dispensary

object | null

Details of the dispensary into which the CaseID was imported. Populated only when the CaseID was imported by a dispensary that belongs to the same company as the API client’s dispensary. null otherwise.

dispensary.uuid

string

Dispensary UUID.

dispensary.name

string

Dispensary name.

dispensary.state

string

Two-letter US state code.