Inventory
Warehouses, stock per product and inventory queries. All routes require authentication.
Warehouses
| Method | Path | Description |
|---|---|---|
| GET | /warehouses | List warehouses |
| POST | /warehouses | Create a warehouse |
Stock
| Method | Path | Description |
|---|---|---|
| GET | /stocks | List stock records |
| GET | /stocks/:id | Get a stock record by ID |
| POST | /stocks | Create stock record |
| PUT | /stocks/:id | Update stock |
| GET | /stock/by-warehouse/:productId | Stock for a product by warehouse |
Manual inventory movements
Base path: /inventory-movements. Permissions depend on the operation (e.g. inventorys.view for read).
| Method | Path | Description |
|---|---|---|
| GET | /inventory-movements | List movements (query params per controller) |
| GET | /inventory-movements/:id | Movement detail and lines |
| POST | /inventory-movements | Create movement (entry, exit, transfer, revaluation) |
| POST | /inventory-movements/:id/print | Generate movement PDF (Jasper report movimiento_inventario). Response application/pdf; X-Filename header with suggested name. Same permission as viewing the movement (inventorys.view). |
Example: list warehouses
bash
curl -X GET "https://api.abaco.hn/warehouses" \
-H "Authorization: Bearer YOUR_KEY_ID:YOUR_SECRET"Example: stock by warehouse for a product
bash
curl -X GET "https://api.abaco.hn/stock/by-warehouse/123" \
-H "Authorization: Bearer YOUR_KEY_ID:YOUR_SECRET"Common errors
- 401: Invalid or expired API key.
- 403: No permission for the resource.
- 404: Resource not found.