Lots
albert.resources.lots
LotStatus
Lot
Bases: BaseResource
A lot in Albert.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
LotId | None
|
The Albert ID of the lot. Set when the lot is retrieved from Albert. |
inventory_id |
InventoryId
|
The Albert ID of the inventory item associated with the lot. |
task_id |
str | None
|
The Albert ID of the task associated with the creation of lot. Optional. |
notes |
str | None
|
The notes associated with the lot. Optional. |
expiration_date |
str | None
|
The expiration date of the lot. YYYY-MM-DD format. Optional. |
manufacturer_lot_number |
str | None
|
The manufacturer lot number of the lot. Optional. |
storage_location |
StorageLocation | None
|
The storage location of the lot. Optional. |
pack_size |
str | None
|
The pack size of the lot. Optional. Used to calculate the cost per unit. |
initial_quantity |
NonNegativeFloat | None
|
The initial quantity of the lot. Optional. |
cost |
NonNegativeFloat | None
|
The cost of the lot. Optional. |
inventory_on_hand |
NonNegativeFloat
|
The inventory on hand of the lot. |
owner |
list[User] | None
|
The owners of the lot. Optional. |
lot_number |
str | None
|
The lot number of the lot. Optional. |
external_barcode_id |
str | None
|
The external barcode ID of the lot. Optional. |
metadata |
dict[str, str | list[EntityLink] | EntityLink] | None
|
The metadata of the lot. Optional. Metadata allowed values can be found using the Custom Fields API. |
has_notes |
bool
|
Whether the lot has notes. Read-only. |
has_attachments |
bool
|
Whether the lot has attachments. Read-only. |
barcode_id |
str
|
The barcode ID of the lot. Read-only. |
Methods:
| Name | Description |
|---|---|
validate_has_notes |
|
validate_has_attachments |
|
serialize_initial_quantity |
|
serialize_cost |
|
serialize_inventory_on_hand |
|
manufacturer_lot_number
manufacturer_lot_number: str | None = Field(
None, alias="manufacturerLotNumber"
)
storage_location
storage_location: (
SerializeAsEntityLink[StorageLocation] | None
) = Field(alias="StorageLocation", default=None)
has_notes
has_notes: bool | None = Field(
default=None,
alias="hasNotes",
exclude=True,
frozen=True,
)
has_attachments
has_attachments: bool | None = Field(
default=None,
alias="hasAttachments",
exclude=True,
frozen=True,
)
parent_name
parent_name: str | None = Field(
default=None,
alias="parentName",
exclude=True,
frozen=True,
)
parent_unit
parent_unit: str | None = Field(
default=None,
alias="parentUnit",
exclude=True,
frozen=True,
)
parent_category
parent_category: InventoryCategory | None = Field(
default=None,
alias="parentCategory",
exclude=True,
frozen=True,
)
barcode_id
barcode_id: str | None = Field(
default=None,
alias="barcodeId",
exclude=True,
frozen=True,
)
task_completion_date
task_completion_date: str | None = Field(
default=None,
alias="taskCompletionDate",
exclude=True,
frozen=True,
)
validate_has_notes
validate_has_attachments
serialize_initial_quantity
serialize_cost
serialize_inventory_on_hand
LotSearchItem
Bases: BaseAlbertModel, HydrationMixin[Lot]
Lightweight representation of a Lot returned from search().
Show JSON schema:
{
"$defs": {
"InventoryCategory": {
"enum": [
"RawMaterials",
"Consumables",
"Equipment",
"Formulas"
],
"title": "InventoryCategory",
"type": "string"
}
},
"description": "Lightweight representation of a Lot returned from search().",
"properties": {
"albertId": {
"title": "Albertid",
"type": "string"
},
"parentId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parentid"
},
"parentName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parentname"
},
"parentUnit": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parentunit"
},
"parentIdCategory": {
"anyOf": [
{
"$ref": "#/$defs/InventoryCategory"
},
{
"type": "null"
}
],
"default": null
},
"taskId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Taskid"
},
"barcodeId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Barcodeid"
},
"expirationDate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expirationdate"
},
"manufacturerLotNumber": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Manufacturerlotnumber"
},
"number": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Number"
}
},
"required": [
"albertId"
],
"title": "LotSearchItem",
"type": "object"
}
Fields:
-
_collection(BaseCollection | None) -
id(LotId) -
inventory_id(InventoryId | None) -
parent_name(str | None) -
parent_unit(str | None) -
parent_category(InventoryCategory | None) -
task_id(str | None) -
barcode_id(str | None) -
expiration_date(str | None) -
manufacturer_lot_number(str | None) -
lot_number(str | None)