The Inventory Movements API provides read and import access to the audit trail of all stock movements recorded by Dragon Guard, including receipts, shipments, transfers, adjustments, and opening balances. For GrupoMAS tenants, movement queries and journal endpoints proxy live data from the MAS system.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/CodexaCP/DG_BACK/llms.txt
Use this file to discover all available pages before exploring further.
GET /api/movements
Returns a paginated list of inventory movements for the authenticated company. Supports rich filtering by item, bin, location, movement type, reference, and date range. For GrupoMAS tenants, results are sourced from the MAS movements endpoint. Authentication:Authorization: Bearer <token> (required).
Tenant company ID.
Free-text search across item number, description, bin code, reference number, and movement type.
Filter by item ID.
Filter by bin ID.
Filter by item number (partial match).
Filter by warehouse location code.
Filter by bin code (partial match).
Exact movement type code (e.g.,
IN, OUT, ADJUSTMENT).Reference document number (partial match).
Start of date range filter (inclusive).
End of date range filter (inclusive).
1-based page. Defaults to
1.Page size. Defaults to
20, max 200.Sort by creation date descending. Defaults to
true.Current page.
Page size.
Total movements matching filters.
Total pages.
GET /api/movements/
Returns a single inventory movement record by its ID. Authentication:Authorization: Bearer <token> (required).
Movement record ID.
Tenant company ID.
| Status | Meaning |
|---|---|
| 404 | Movement not found for the given ID and company. |
GET /api/movements/item/
Returns all inventory movements for a specific item. Authentication:Authorization: Bearer <token> (required).
Item ID whose movement history to retrieve.
Tenant company ID.
Movement records for the item (same shape as
InventoryMovementDto).GET /api/movements/journals
Returns product journals (movement journals) from the GrupoMAS ERP. For non-GrupoMAS tenants, returns an empty page rather than an error. Authentication:Authorization: Bearer <token> (required).
This endpoint returns live data only for GrupoMAS Native tenants. Calling it on a non-GrupoMAS tenant returns an empty result set.
Tenant company ID.
Search term for journal lookup.
Page number. Defaults to
1.Page size. Defaults to
50, max 200.Journal summaries from MAS.
Current page.
Page size.
Total journals found.
Total pages.
GET /api/movements/journals/
Returns detailed lines for a specific GrupoMAS journal by journal number. Authentication:Authorization: Bearer <token> (required).
GrupoMAS Native tenants only. Returns
404 for non-GrupoMAS tenants.Journal number in GrupoMAS.
Tenant company ID.
| Status | Meaning |
|---|---|
| 404 | Journal not found or tenant is not configured for GrupoMAS Native. |
PUT /api/movements/journals/
Saves or posts a GrupoMAS product journal. Submits the journal entry to the MAS system. Authentication:Authorization: Bearer <token> (required).
GrupoMAS Native tenants only. Returns
400 with an error message for non-GrupoMAS tenants.Journal number to save.
Tenant company ID.
Journal lines to update in MAS.
GET /api/movements/export-config
Exports inventory movements for the tenant as an Excel config package (.xlsx) with data validation dropdowns for items, bins, locations, and movement types.
Authentication: Authorization: Bearer <token> (required).
Tenant company ID.
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet with filename inventory_movements_config_package.xlsx.
POST /api/movements/preview-config
Previews an inventory movements config package import without persisting changes. Returns validation results including stock availability checks. Authentication:Authorization: Bearer <token> (required).
Multipart form upload. Must be a valid Dragon Guard
INVENTORY_MOVEMENTS config package .xlsx.Tenant company ID.
Whether the package passes all validations.
Number of movements that would be created.
Token required by
apply-config to confirm this exact file.Row-level validation errors.
Preview of first 50 rows.
POST /api/movements/apply-config
Imports inventory movements from a Dragon Guard config package Excel file. Validates stock availability before creating movements for items that do not allow negative inventory. Authentication:Authorization: Bearer <token> (required).
Multipart form upload. Must be a valid Dragon Guard
INVENTORY_MOVEMENTS config package .xlsx.Confirmation token obtained from
POST /api/movements/preview-config.Tenant company ID.
Number of movements created.
Always
0 (movements are append-only).Any errors encountered.
GET /api/recounts
Returns all inventory recount (physical count) documents for the authenticated company. Authentication:Authorization: Bearer <token> (required).
Tenant company ID.
List of recount document summaries with status, date, and item counts.
POST /api/recounts
Creates a new inventory recount (physical count) document. Authentication:Authorization: Bearer <token> (required).
New recount document ID.
Initial status on creation.
GET /api/recounts/
Returns a single recount document by ID. Authentication:Authorization: Bearer <token> (required).
Recount document ID.
| Status | Meaning |
|---|---|
| 404 | Recount document not found. |
PUT /api/recounts/
Updates a recount document (e.g., updates counted quantities on lines). Authentication:Authorization: Bearer <token> (required).
Recount document ID.
POST /api/recounts//release
Releases a recount document for physical counting. Authentication:Authorization: Bearer <token> (required).
Recount document ID.
POST /api/recounts//reopen
Reopens a released recount document for further editing. Authentication:Authorization: Bearer <token> (required).
Recount document ID.