Inventory
Warehouses, stock per product and manual movements. Requires authentication.
See Resource template · stock effect by type in Documents → matrix.
Warehouses
| Method | Path | Description |
|---|---|---|
| GET | /warehouses | List warehouses |
| GET | /warehouses/:id | One warehouse |
| POST | /warehouses | Create warehouse |
Create warehouse
json
{
"name": "Central Warehouse",
"code": "BC",
"address": "Tegucigalpa",
"isActive": true
}bash
curl -X POST "https://api.abaco.hn/warehouses" \
-H "Authorization: Bearer YOUR_KEY_ID:YOUR_SECRET" \
-H "Content-Type: application/json" \
-d '{"name":"Central Warehouse","code":"BC","isActive":true}'GET /warehouses/:id (example)
json
{
"id": 1,
"name": "Central Warehouse",
"code": "BC",
"address": "Tegucigalpa",
"isActive": true,
"companyId": 1
}Locations
POST /warehouse-locationsjson
{
"warehouseId": 1,
"name": "Aisle A",
"code": "A1",
"isActive": true
}Stock
| Method | Path | Description |
|---|---|---|
| GET | /stocks | List |
| GET | /stocks/:id | One record |
| GET | /stock/by-warehouse/:productId | Product stock by warehouse |
Stock normally arrives via documents or manual movements, not hand-editing /stocks.
Manual movements
Base: /inventory-movements. Types: ingreso, salida, transferencia, revalorizacion.
| Method | Path | Description |
|---|---|---|
| GET | /inventory-movements | List |
| GET | /inventory-movements/:id | Detail + lines |
| POST | /inventory-movements | Create |
| POST | /inventory-movements/:id/print | PDF (Jasper) |
Create — entry
json
{
"type": "ingreso",
"date": "2026-11-03",
"observations": "Opening adjustment via API",
"lines": [
{
"productId": 5,
"quantity": 10,
"warehouseId": 1,
"locationId": 3,
"cost": 320.00
}
]
}Create — transfer
json
{
"type": "transferencia",
"date": "2026-11-03",
"lines": [
{
"productId": 5,
"quantity": 2,
"warehouseId": 1,
"warehouseIdTo": 2,
"locationId": 3,
"locationIdTo": null
}
]
}Common errors
json
{
"error": "Bodega origen y destino son obligatorias para transferencias"
}| HTTP | When |
|---|---|
| 400 | Invalid type, missing warehouses, insufficient stock |
| 401 | Invalid API key / session |
| 403 | No warehouse/inventory permission |
| 404 | Warehouse or movement not found |