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. |
Show JSON schema:
{
"$defs": {
"AuditFields": {
"description": "The audit fields for a resource",
"properties": {
"by": {
"default": null,
"title": "By",
"type": "string"
},
"byName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Byname"
},
"at": {
"anyOf": [
{
"format": "date-time",
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "At"
}
},
"title": "AuditFields",
"type": "object"
},
"EntityLink": {
"properties": {
"id": {
"title": "Id",
"type": "string"
},
"name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Name"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"InventoryCategory": {
"enum": [
"RawMaterials",
"Consumables",
"Equipment",
"Formulas"
],
"title": "InventoryCategory",
"type": "string"
},
"Location": {
"description": "A location in Albert.\n\nAttributes\n----------\nname : str\n The name of the location.\nid : str | None\n The Albert ID of the location. Set when the location is retrieved from Albert.\nlatitude : float\n The latitude of the location.\nlongitude : float\n The longitude of the location.\naddress : str\n The address of the location.\ncountry : str | None\n The country code of the location. Must be two characters long.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"latitude": {
"title": "Latitude",
"type": "number"
},
"longitude": {
"title": "Longitude",
"type": "number"
},
"address": {
"title": "Address",
"type": "string"
},
"country": {
"anyOf": [
{
"maxLength": 2,
"minLength": 2,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Country"
}
},
"required": [
"name",
"latitude",
"longitude",
"address"
],
"title": "Location",
"type": "object"
},
"LotStatus": {
"description": "The status of a lot",
"enum": [
"active",
"inactive",
"quarantined"
],
"title": "LotStatus",
"type": "string"
},
"Role": {
"description": "A role in Albert. Note: Roles are not currently creatable via the SDK.\n\nAttributes\n----------\nname : str\n The name of the role.\nid : str\n The Albert ID of the role. Set when the role is retrieved from Albert.\npolicies : list[Any] | None\n The policies associated with the role.\ntenant : str\n The tenant ID of the role.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"name": {
"title": "Name",
"type": "string"
},
"policies": {
"anyOf": [
{
"items": {},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Policies"
},
"tenant": {
"title": "Tenant",
"type": "string"
}
},
"required": [
"name",
"tenant"
],
"title": "Role",
"type": "object"
},
"Status": {
"description": "The status of a resource",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
},
"StorageLocation": {
"description": "A storage location entity. For example, a specific flammables cabinet or a storage room.\n\nAttributes\n----------\nname : str\n The name of the storage location.\nid : str | None\n The Albert ID of the storage location. Set when the storage location is retrieved from Albert.\nlocation : Location\n The location entity link of the storage location.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"maxLength": 255,
"minLength": 2,
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"Location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"$ref": "#/$defs/EntityLink"
}
],
"title": "Location"
}
},
"required": [
"name",
"Location"
],
"title": "StorageLocation",
"type": "object"
},
"User": {
"description": "Represents a User on the Albert Platform\n\nAttributes\n----------\nname : str\n The name of the user.\nid : str | None\n The Albert ID of the user. Set when the user is retrieved from Albert.\nlocation : Location | None\n The location of the user.\nemail : EmailStr | None\n The email of the user.\nroles : list[Role]\n The roles of the user.\nuser_class : UserClass\n The ACL class level of the user.\nmetadata : dict[str, str | list[EntityLink] | EntityLink] | None",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"name": {
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"Location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Location"
},
"email": {
"default": null,
"format": "email",
"title": "Email",
"type": "string"
},
"Roles": {
"items": {
"anyOf": [
{
"$ref": "#/$defs/Role"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"maxItems": 1,
"title": "Roles",
"type": "array"
},
"userClass": {
"$ref": "#/$defs/UserClass",
"default": "standard"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"$ref": "#/$defs/EntityLink"
},
"type": "array"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
}
},
"required": [
"name"
],
"title": "User",
"type": "object"
},
"UserClass": {
"description": "The ACL class level of the user",
"enum": [
"guest",
"standard",
"trusted",
"privileged",
"admin"
],
"title": "UserClass",
"type": "string"
}
},
"description": "A lot in Albert.\n\nAttributes\n----------\nid : LotId | None\n The Albert ID of the lot. Set when the lot is retrieved from Albert.\ninventory_id : InventoryId\n The Albert ID of the inventory item associated with the lot.\ntask_id : str | None\n The Albert ID of the task associated with the creation of lot. Optional.\nnotes : str | None\n The notes associated with the lot. Optional.\nexpiration_date : str | None\n The expiration date of the lot. YYYY-MM-DD format. Optional.\nmanufacturer_lot_number : str | None\n The manufacturer lot number of the lot. Optional.\nstorage_location : StorageLocation | None\n The storage location of the lot. Optional.\npack_size : str | None\n The pack size of the lot. Optional. Used to calculate the cost per unit.\ninitial_quantity : NonNegativeFloat | None\n The initial quantity of the lot. Optional.\ncost : NonNegativeFloat | None\n The cost of the lot. Optional.\ninventory_on_hand : NonNegativeFloat\n The inventory on hand of the lot.\nowner : list[User] | None\n The owners of the lot. Optional.\nlot_number : str | None\n The lot number of the lot. Optional.\nexternal_barcode_id : str | None\n The external barcode ID of the lot. Optional.\nmetadata : dict[str, str | list[EntityLink] | EntityLink] | None\n The metadata of the lot. Optional. Metadata allowed values can be found using the Custom Fields API.\nhas_notes : bool\n Whether the lot has notes. Read-only.\nhas_attachments : bool\n Whether the lot has attachments. Read-only.\nbarcode_id : str\n The barcode ID of the lot. Read-only.",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/LotStatus"
},
{
"type": "null"
}
],
"default": null
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Albertid"
},
"parentId": {
"title": "Parentid",
"type": "string"
},
"taskId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Taskid"
},
"expirationDate": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Expirationdate"
},
"manufacturerLotNumber": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Manufacturerlotnumber"
},
"StorageLocation": {
"anyOf": [
{
"$ref": "#/$defs/StorageLocation"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Storagelocation"
},
"packSize": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Packsize"
},
"initialQuantity": {
"anyOf": [
{
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Initialquantity"
},
"cost": {
"anyOf": [
{
"minimum": 0,
"type": "number"
},
{
"type": "null"
}
],
"default": null,
"title": "Cost"
},
"inventoryOnHand": {
"title": "Inventoryonhand",
"type": "number"
},
"Owner": {
"anyOf": [
{
"items": {
"anyOf": [
{
"$ref": "#/$defs/User"
},
{
"$ref": "#/$defs/EntityLink"
}
]
},
"type": "array"
},
{
"type": "null"
}
],
"default": null,
"title": "Owner"
},
"lotNumber": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Lotnumber"
},
"externalBarcodeId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Externalbarcodeid"
},
"Metadata": {
"anyOf": [
{
"additionalProperties": {
"anyOf": [
{
"type": "number"
},
{
"type": "integer"
},
{
"type": "string"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"items": {
"$ref": "#/$defs/EntityLink"
},
"type": "array"
},
{
"type": "null"
}
]
},
"type": "object"
},
{
"type": "null"
}
],
"default": null,
"title": "Metadata"
},
"Location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"$ref": "#/$defs/EntityLink"
},
{
"type": "null"
}
],
"default": null,
"title": "Location"
},
"notes": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Notes"
},
"hasNotes": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Hasnotes"
},
"hasAttachments": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Hasattachments"
},
"parentName": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parentname"
},
"parentUnit": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Parentunit"
},
"parentCategory": {
"anyOf": [
{
"$ref": "#/$defs/InventoryCategory"
},
{
"type": "null"
}
],
"default": null
},
"barcodeId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Barcodeid"
}
},
"required": [
"parentId",
"inventoryOnHand"
],
"title": "Lot",
"type": "object"
}
Fields:
-
created
(AuditFields | None
) -
updated
(AuditFields | None
) -
id
(LotId | None
) -
inventory_id
(InventoryId
) -
task_id
(str | None
) -
expiration_date
(str | None
) -
manufacturer_lot_number
(str | None
) -
storage_location
(SerializeAsEntityLink[StorageLocation] | None
) -
pack_size
(str | None
) -
initial_quantity
(NonNegativeFloat | None
) -
cost
(NonNegativeFloat | None
) -
inventory_on_hand
(float
) -
owner
(list[SerializeAsEntityLink[User]] | None
) -
lot_number
(str | None
) -
external_barcode_id
(str | None
) -
metadata
(dict[str, MetadataItem] | None
) -
status
(LotStatus | None
) -
location
(SerializeAsEntityLink[Location] | None
) -
notes
(str | None
) -
has_notes
(bool | None
) -
has_attachments
(bool | None
) -
parent_name
(str | None
) -
parent_unit
(str | None
) -
parent_category
(InventoryCategory | None
) -
barcode_id
(str | None
)
Validators: