Tank units are the atomic record in OxygenDispatch — one row per physical cylinder in your facility. Every tank carries a unique serial number, knows which batch it came from, which product it represents, where it is located, its technical approval state, and its operational status. All actions performed on a tank (intake, transfer, status change, dispatch, decommission) are recorded as inventory movements, giving you a complete, tamper-evident audit trail.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Janblack07/OxygenDispatch/llms.txt
Use this file to discover all available pages before exploring further.
Tank unit IDs are UUIDs, not auto-incrementing integers. Always use the UUID when referencing a tank in URLs or API calls (e.g.
GET /tanks/018f4c2a-3b1e-7000-9c3d-d2e1f4a5b6c7).Tank unit fields
The following fields are stored on every tank unit record:| Field | Type | Description |
|---|---|---|
id | UUID | Primary key. Globally unique identifier for this cylinder. |
serial | string | Full serial string, e.g. OXI-000042. Unique across the entire system. |
serial_prefix | string | The alphabetic/numeric prefix portion, e.g. OXI. |
serial_number | bigInteger | The numeric counter portion used for ordering within a prefix. Stored as unsignedBigInteger in the database. |
batch_id | integer | Foreign key to the batches table. |
product_id | integer | Foreign key to catalog_products. |
gas_type_id | integer | Inherited from the product at generation time. |
capacity_id | integer | Inherited from the product at generation time. |
warehouse_area_id | integer | The area where the cylinder is currently located. |
technical_status_id | integer | The current technical approval status from the catalog. |
sanitary_registry | string|null | Sanitary registry code, when available. |
manufactured_at | date|null | Manufacture date. |
expires_at | date|null | Expiry date of the cylinder. |
status | TankStatus enum | Operational status: DISPONIBLE (1), DESPACHADO (2), or BAJA (3). |
dispatched_at | datetime|null | Timestamp of when the tank was dispatched, if applicable. |
Viewing tanks
GET /tanks returns a paginated list of all tank units (20 per page), ordered by creation date descending, with related batch, product, gas type, capacity, warehouse area, and technical status eager-loaded.
Apply any combination of the following query string filters:
| Parameter | Type | Behaviour |
|---|---|---|
batch_number | string | Partial match on the linked batch’s batch_number field |
status | integer | Exact match on TankStatus value: 1 = DISPONIBLE, 2 = DESPACHADO, 3 = BAJA |
gas_type_id | integer | Exact match on gas type |
capacity_id | integer | Exact match on cylinder capacity |
warehouse_area_id | integer | Exact match on current warehouse area |
technical_status_id | integer | Exact match on current technical status |
serial | string | Partial match on the full serial string (case-insensitive LIKE) |
Tank detail
GET /tanks/{tank} loads the full detail view for a single tank unit. The page displays:
- Linked batch, gas type, capacity, warehouse area, and technical status
- The last 50 inventory movements for this tank, with from/to area details for each movement
- Quick-action forms for transferring the tank, changing its technical status, and decommissioning it
Transferring a tank
SubmitPOST /tanks/{tank}/transfer to move a tank from its current warehouse area to another. A TRASLADO inventory movement is recorded automatically, capturing both the origin and destination areas.
The destination warehouse area (
warehouse_areas.id). Must exist in the catalog.Optional free-text notes about the reason for the transfer. Maximum 500 characters.
warehouse_area_id as from_area_id and the new area as to_area_id. The tank’s warehouse_area_id is updated atomically inside a database transaction.
Changing technical status
SubmitPOST /tanks/{tank}/technical-status to update the technical approval state of a tank. A CAMBIO_ESTADO_TECNICO inventory movement is recorded automatically.
The new technical status (
technical_statuses.id). Must exist in the catalog.Optional notes describing the reason for or outcome of the status change. Maximum 500 characters.
technical_status_id on the tank record and records the event in the movement log. It does not automatically move the tank to a different warehouse area — use the transfer endpoint for that separately if required.
Decommissioning a tank
SubmitPOST /tanks/{tank}/decommission to permanently mark a cylinder as out of service. This sets the tank’s status to BAJA (value 3) and records a CAMBIO_ESTADO_TECNICO inventory movement. The movement’s notes field is always prefixed with [BAJA].
Optional explanation for the decommission (damage, expiry, regulatory recall, etc.). Maximum 500 characters. If provided, stored as
[BAJA] <your notes>; if omitted, stored as [BAJA].status=BAJA makes it ineligible for dispatch or transfer in normal workflows.
Dispatch eligibility
A tank can only be selected for dispatch when all three of the following conditions are simultaneously true:| Condition | Required value |
|---|---|
status | DISPONIBLE (1) |
technicalStatus.name | Aprobado |
warehouseArea.name | Productos aprobados |
isAvailableForDispatch()— an instance method onTankUnitthat performs the check against the loaded relations and returns a boolean.scopeDispatchable()— an Eloquent query scope onTankUnitthat applies all three conditions asWHEREclauses, used when building dispatch order lists.