Transactions API Documentation
Overview
This folder contains comprehensive API documentation for all inventory transaction endpoints.
Available Documentation
Transaction Management
- Transactions API - Complete transaction processing
- All 5 transaction types (Purchase, Sale, Movement, Adjustment, Assembly)
- Transaction creation and validation
- Immutable audit trail
- Type-specific details handling
- Transaction history and reporting
Transaction Types
Purchase Transactions
Receive goods from suppliers
POST /api/transactions/purchase
{
"transactionDate": "2025-01-24T10:00:00Z",
"vendorId": "vendor-001-id",
"purchaseOrderId": "PO-2025-001",
"invoiceNumber": "INV-2025-001",
"items": [ /* ... */ ]
}
Sales Transactions
Ship goods to customers
POST /api/transactions/sales
{
"transactionDate": "2025-01-24T14:00:00Z",
"customerId": "customer-001-id",
"salesOrderId": "SO-2025-001",
"items": [ /* ... */ ]
}
Movement Transactions
Transfer between locations
POST /api/transactions/movement
{
"transactionDate": "2025-01-24T16:00:00Z",
"sourceLocationId": "warehouse-a-id",
"destinationLocationId": "warehouse-b-id",
"items": [ /* ... */ ]
}
Adjustment Transactions
Correct inventory discrepancies
POST /api/transactions/adjustment
{
"transactionDate": "2025-01-24T18:00:00Z",
"adjustmentType": "Positive",
"locationId": "warehouse-main-id",
"reason": "Cycle count correction",
"items": [ /* ... */ ]
}
Assembly Transactions
Manufacture finished goods
POST /api/transactions/assembly
{
"transactionDate": "2025-01-24T20:00:00Z",
"bomId": "bom-widget-001",
"producedItemId": "widget-001-id",
"producedQuantity": 100.0,
"assemblyLocationId": "production-floor-id"
}
Related APIs
- Items API - For items used in transactions
- Locations API - For transaction locations
- BOM API - For assembly transactions
- Inventory API - For inventory levels
Integration Guides
Frontend Integration
Transaction Workflow:
- Select transaction type
- Gather required information
- Validate prerequisites (items exist, locations operational, etc.)
- Submit transaction
- Handle response and show confirmation
Backend Integration
Event Handling:
- Listen for
TransactionCreatedEventdomain events - Update inventory records reactively
- Publish integration events to Finance module
- Maintain audit trail
Last Updated: 2025-10-24 | API Version: 1.0