api.routes.internal.location¶
Attributes¶
Classes¶
Functions¶
|
Retrieves warehouse location information for a specific unit. |
|
Update the location field of a warehouse unit in Airtable. |
Module Contents¶
- api.routes.internal.location.logger¶
- class api.routes.internal.location.WarehouseLocationResponse¶
Bases:
pydantic.BaseModel- name: str¶
- serialNumber: str¶
- imageUrls: list[str]¶
- currentLocation: str¶
- possibleLocations: list[str]¶
- api.routes.internal.location.router¶
- async api.routes.internal.location.get_location(record_id: str)¶
Retrieves warehouse location information for a specific unit.
Fetches data from Airtable for the given record ID and returns structured location information including current location and all possible locations.
- Parameters:
record_id – The Airtable record ID for the warehouse unit.
- Returns:
- Structured data containing unit name, serial number,
image URLs, current location, and possible locations.
- Return type:
- Raises:
HTTPException –
400 if record_id is missing or empty
404 if the record is not found or missing required name field
500 for any other errors during Airtable data retrieval
- async api.routes.internal.location.update_location(record_id: str, payload: UpdateLocationRequest)¶
Update the location field of a warehouse unit in Airtable.
Returns a success message with the old and new location.