Introduction
The Movements API enables tracking of all inventory changes for products. Every stock change is recorded as a movement with complete audit information.Movement Types
The system supports three types of inventory movements:ENTRY
Stock received from suppliers or new inventory
EXIT
Stock sold or removed from inventory (uses FIFO costing)
ADJUSTMENT
Manual corrections or adjustments to inventory
Movement Object
All movements share the following structure:FIFO Costing
For EXIT movements, the system automatically calculates the cost of goods sold (COGS) using the First-In-First-Out (FIFO) method:- Batch Tracking: Each ENTRY creates a batch with its unit cost
- Exit Processing: EXIT movements deduct from the oldest batches first
- Cost Calculation: The
total_costfield contains the actual COGS - Profit Analysis: Compare
total_price(revenue) vstotal_cost(COGS)
Role Requirements
Required roles:
admin, gestorRequired roles:
admin, gestor, consultorBase URL
Related Resources
- Products API - Product management
- Batches API - Batch tracking for FIFO
- Authentication - How to authenticate requests