Skip to content

Inventory ​

Warehouses, stock per product and manual movements. Requires authentication.

See Resource template · stock effect by type in Documents → matrix.

Warehouses ​

MethodPathDescription
GET/warehousesList warehouses
GET/warehouses/:idOne warehouse
POST/warehousesCreate 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-locations
json
{
  "warehouseId": 1,
  "name": "Aisle A",
  "code": "A1",
  "isActive": true
}

Stock ​

MethodPathDescription
GET/stocksList
GET/stocks/:idOne record
GET/stock/by-warehouse/:productIdProduct 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.

MethodPathDescription
GET/inventory-movementsList
GET/inventory-movements/:idDetail + lines
POST/inventory-movementsCreate
POST/inventory-movements/:id/printPDF (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"
}
HTTPWhen
400Invalid type, missing warehouses, insufficient stock
401Invalid API key / session
403No warehouse/inventory permission
404Warehouse or movement not found

Documents · API index