The Inventory & Supply Chain Module (/v1/inventory) forms the operational and logistics core of the GOAL ecosystem. It orchestrates physical storage facilities, product master catalogs, multi-tier commercial pricing, inter-warehouse movements, dynamic assortment catalogs, and comprehensive taxonomy hierarchies (brands, commercial lines, category trees, store classifications, dynamic attributes, units of measure, and SAP Business One accounting groups).
The module operates across a hybrid database topography:
goal-data-db (DB_DATA): Houses high-volume product catalogs (products), barcode registries (product_unit_measures), cost history, and pricing snapshots.goal-db (DB_CORE): Stores tenant configuration, operational warehouses, inventory transactions, pricing policies, taxonomy metadata, dynamic assortment catalogs, and SAP accounting mappings.SAP Business One: Authoritative ERP source for inventory valuation, cost accounting, warehouse codes (OWHS), price lists (OPLN/ITM1), item accounting groups (OITB), and formal GL debit/credit entries.To provide exhaustive, production-grade documentation for developers, sysadmins, and integrators, each sub-domain has a dedicated API specification:
| Module Domain | Description & Key Functionality | Dedicated API Document |
|---|---|---|
| Products & Master Catalog | Full SKU lifecycle, picker search, stock balances, recent costs, prices renewal, barcodes, and /product-resources/* lookups. |
Products API Specification |
| Warehouses & Storage Depots | Operational warehouse CRUD, physical/reserved stock levels (/{id}/stock), incoming purchase orders, SAP B1 OWHS synchronization, and layout map uploads. |
Warehouses API Specification |
| Price Lists & Tiers | Commercial pricing lists, customer tiers, line items (/{id}/lines), bulk renewals, and SAP B1 OPLN/ITM1 bi-directional synchronization. |
Price Lists API Specification |
| Inventory Transactions | Inter-warehouse stock transfers (stock-transfers), dispatch validation, and inventory adjustments/entries/exits (goods-movements). |
Transactions API Specification |
| Brands Master | Commercial brands catalog, SVG/PNG logo upload, soft-deletion, and restore lifecycle. | Brands API Specification |
| Merchandise Lines | Commercial product lines (product_lines) for commercial reporting and ERP grouping. |
Lines API Specification |
| Product Categories | Hierarchical category trees (product_categories), parent-child nesting, subcategories, and gallery image codes. |
Categories API Specification |
| Store Classifications | E-commerce and B2B store navigation categories (product_clasifications), hierarchical classifications, and autocomplete search. |
Classifications API Specification |
| Dynamic Attributes | Extensible product attributes (product_attributes), attribute groups, and presentation measures for technical specifications. |
Attributes API Specification |
| Unit Measures & KPIs | Physical units (unit_measures), KPI volumetric conversion ratios (HL hectoliters), and product packaging rows. |
Unit Measures API Specification |
| Accounting Groups | SAP Business One Item Groups (OITB), General Ledger account mappings for inventory valuation, COGS, variance, and revenues. |
Accounting Groups API Specification |
| Product Catalogs & Assortment | Dynamic rule-based catalog engine, inclusion/exclusion filter expressions, materialized lines compilation, and cross-channel distribution. | Product Catalogs API Specification |
All endpoints under /v1/inventory require authentication and tenant headers:
Authorization: Bearer <jwt-token>
x-app-stage: <stage-identifier>
x-app-uid: <application-uuid>
Content-Type: application/json
Accept: application/json
All requests must supply companyId (as a query parameter ?companyId={id} or request body attribute) to satisfy the multi-tenant company-validator and normalize-company-param middleware pipeline.
All endpoints return JSON responses conforming to App\Values\Core\ActionResult:
{
"success": true,
"message": "Operación exitosa.",
"data": { ... }
}
In the event of validation failures (HTTP 422):
{
"success": false,
"message": "Los datos proporcionados no son válidos.",
"errors": {
"code": [
"El código ya ha sido registrado para esta empresa."
]
}
}
In accordance with the GOAL platform architecture:
inventory:sync-stock, inventory:sync-prices, inventory:build-catalogs, bees:sync, inventory:sap-sync) are slated for detailed operational guides.goal-cli Executable: A standalone Go binary designed to interface with both planes remotely across distributed edge nodes and on-premise SAP B1 gateways.