Storage Locations
albert.resources.storage_locations
StorageLocation
Bases: BaseResource
A specific place where an Inventory Item is physically stored.
Examples include a flammables cabinet, a freezer, or a storeroom shelf. Every
storage location belongs to a parent Location
(Location), and Inventory search filters
can narrow results to items held in a given storage location. Managed through
StorageLocationsCollection.
Example
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"
},
"category": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Category"
}
},
"required": [
"id"
],
"title": "EntityLink",
"type": "object"
},
"Location": {
"description": "A physical lab or site location in Albert.\n\nLocations are referenced by Tasks and Inventory Items to record where an\nactivity is performed or where a material lives, and each Location can hold\none or more Storage Locations\n([`StorageLocation`][albert.resources.storage_locations.StorageLocation]). Managed\nthrough [`LocationCollection`][albert.collections.locations.LocationCollection].\n\n!!! example\n ```python\n from albert.resources.locations import Location\n location = Location(\n name=\"Boston Lab\",\n latitude=42.3601,\n longitude=-71.0589,\n address=\"1 Main St\",\n country=\"US\",\n )\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The human-readable name of the location.",
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the location. Assigned by Albert and populated once the location has been created or retrieved.",
"title": "Albertid"
},
"latitude": {
"description": "The latitude of the location, in decimal degrees.",
"title": "Latitude",
"type": "number"
},
"longitude": {
"description": "The longitude of the location, in decimal degrees.",
"title": "Longitude",
"type": "number"
},
"address": {
"description": "The street address of the location.",
"title": "Address",
"type": "string"
},
"country": {
"anyOf": [
{
"maxLength": 2,
"minLength": 2,
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The two-letter country code of the location (for example, ``\"US\"``).",
"title": "Country"
}
},
"required": [
"name",
"latitude",
"longitude",
"address"
],
"title": "Location",
"type": "object"
},
"Status": {
"description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n The resource is fully operational and visible in normal operations.\nINACTIVE : str\n The resource is hidden from normal operations and disabled from use.",
"enum": [
"active",
"inactive"
],
"title": "Status",
"type": "string"
}
},
"description": "A specific place where an Inventory Item is physically stored.\n\nExamples include a flammables cabinet, a freezer, or a storeroom shelf. Every\nstorage location belongs to a parent Location\n([`Location`][albert.resources.locations.Location]), and Inventory search filters\ncan narrow results to items held in a given storage location. Managed through\n[`StorageLocationsCollection`][albert.collections.storage_locations.StorageLocationsCollection].\n\n!!! example\n ```python\n from albert import Albert\n from albert.resources.storage_locations import StorageLocation\n client = Albert()\n parent = client.locations.get_by_id(id=\"...\")\n storage_location = StorageLocation(name=\"Freezer A\", location=parent)\n ```",
"properties": {
"status": {
"anyOf": [
{
"$ref": "#/$defs/Status"
},
{
"type": "null"
}
],
"default": null,
"description": "The status of the resource, optional."
},
"Created": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the creation of the resource, optional."
},
"Updated": {
"anyOf": [
{
"$ref": "#/$defs/AuditFields"
},
{
"type": "null"
}
],
"default": null,
"description": "Audit fields for the update of the resource, optional."
},
"name": {
"description": "The human-readable name of the storage location (2 to 255 characters).",
"maxLength": 255,
"minLength": 2,
"title": "Name",
"type": "string"
},
"albertId": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"description": "The Albert ID of the storage location (format ``STL...``). Assigned by Albert and populated once the storage location has been created or retrieved.",
"title": "Albertid"
},
"Location": {
"anyOf": [
{
"$ref": "#/$defs/Location"
},
{
"$ref": "#/$defs/EntityLink"
}
],
"description": "The parent Location this storage location belongs to.",
"title": "Location"
}
},
"required": [
"name",
"Location"
],
"title": "StorageLocation",
"type": "object"
}
Fields:
StorageLocationFilter
Bases: BaseAlbertModel
A name-based storage location filter for inventory search.
Inventory search and listing serialize the storage location filter by
storage-location name only, so unlike StorageLocation
(the create/update type, which requires a parent location) this filter
needs just the exact storage location name.
Example
Show JSON schema:
{
"description": "A name-based storage location filter for inventory search.\n\nInventory search and listing serialize the storage location filter by\nstorage-location name only, so unlike [`StorageLocation`][albert.resources.storage_locations.StorageLocation]\n(the create/update type, which requires a parent ``location``) this filter\nneeds just the exact storage location name.\n\n!!! example\n ```python\n from albert import Albert\n from albert.resources.storage_locations import StorageLocationFilter\n client = Albert()\n items = client.inventory.search(\n storage_location=[StorageLocationFilter(name=\"Freezer A\")]\n )\n ```",
"properties": {
"name": {
"description": "The exact name of the storage location to filter by (2 to 255 characters).",
"maxLength": 255,
"minLength": 2,
"title": "Name",
"type": "string"
}
},
"required": [
"name"
],
"title": "StorageLocationFilter",
"type": "object"
}
Fields: