Dragon Guard’s inventory engine is built on an append-only ledger stored inDocumentation 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.
InventoryMovements. Every inbound receipt, outbound shipment, opening balance, adjustment, or transfer writes one or more movement rows. The current on-hand quantity for any item in any bin is the running sum of all movement quantities for that (CompanyId, ItemId, BinId) combination. Positive quantities represent stock increases (inbound); negative quantities represent stock decreases (outbound).
All movement endpoints are company-scoped. CompanyId is resolved from the bearer token or the optional ?companyId= override.
Inventory Movements Ledger
List movements
Override company. Resolved from JWT when omitted.
Free-text match on
itemNo, itemDescription, binCode, referenceNo, and movementType.Filter by item UUID.
Partial match on item number.
Filter by bin UUID.
Partial match on bin code.
Exact match on location code.
Exact match on movement type (e.g.
IN, OUT, ADJUSTMENT).Partial match on reference number.
Filter movements created on or after this UTC datetime.
Filter movements created on or before this UTC datetime.
Sort by
createdAt descending.Page number.
Records per page (max 200).
Movement UUID.
Item UUID.
Item number.
Item description.
Bin UUID.
Bin code.
Location code of the bin.
Movement quantity (positive = in, negative = out).
Type code such as
IN, OUT, TRANSFER, ADJUSTMENT, OPENING_BALANCE, WEB_CREATION.Source document number (e.g.
PR-000001, PS-000001).Movement timestamp (UTC).
GrupoMASNative tenants:
GET /api/movements is a transparent proxy to
MAS GET /api/wms/movements, passing companyCode, filters, and pagination.
The response shape is identical to the local ledger so handheld and web
clients work without modification.Get a movement by ID
InventoryMovementDetailDto for the active company.
Get all movements for an item
itemId filter for pagination.
Product Journals (GrupoMASNative only)
Product journals are MAS-native inventory adjustment documents. These endpoints are only active for GrupoMASNative tenants. Standalone tenants receive an empty page (totalRecords: 0) from the list endpoint and 404 from the detail/update endpoints.
List product journals
Override company. Resolved from JWT when omitted.
Free-text search passed through to MAS.
Page number.
Records per page (max 200).
GET /api/wms/product-journals. MAS controls the DiarioRegistrado = False filter — only open, unposted journals are returned.
Get a product journal
Save a product journal
GrupoMasProductJournalSaveRequestDto)
The editable fields include:
Location code for the line.
Bin code for the line.
Item number.
Quantity to adjust.
Unit of measure.
Lot number (if lot-tracked).
Variant code.
Import & Export
Dragon Guard supports Excel-based bulk operations for inventory movements using theINVENTORY_MOVEMENTS configuration package format.
Export movements as Excel
inventory_movements_config_package.xlsx with the most recent 5,000 movement rows for the active company. The workbook includes the following tenant reference sheets to support data entry:
| Sheet | Contents |
|---|---|
Ref_Items | Active item numbers, descriptions, UOM, AllowNegativeAvailable flag |
Ref_Locations | Active tenant locations with IsDefault and AllowReceiving flags |
Ref_Bins | Active bins with location code, type, default/picking/putaway flags |
Ref_MovementTypes | Supported movement type values (data-validation list) |
ItemNo, BinCode, WarehouseCode, and MovementType columns so operators can select valid values from dropdowns.
Preview an import
Excel file (
.xlsx) generated from the export or matching the package schema.CREATE only — reimported rows are always new movements), validation errors, and a confirmationToken.
Apply an import
Excel file.
Token from preview response.
ItemNo, BinCode, WarehouseCode, Quantity, MovementType, ReferenceNo, EntityType, EntityId, OldStatus, NewStatus, SourceSystem, CreatedBy.
Validation rules enforced:
ItemNomust exist and be active for the tenant.Quantitymust be numeric and non-zero.MovementTypemust be one of the supported catalog values (see below).BinCodeis resolved withinWarehouseCode/LocationCodecontext. IfWarehouseCodeis blank and the bin code is ambiguous across locations, the row is rejected.- For items with
allowNegativeAvailable = false, the import simulates cumulative stock row-by-row and rejects any row that would result in negative available inventory.
Standard Movement Type Codes
Dragon Guard maintains aStandardMovementTypesCatalog that enumerates the supported movement types for configuration package import. The catalog includes type codes along with human-readable descriptions in Spanish, English, and Brazilian Portuguese. The following types are commonly used:
| Code | Direction | Typical source |
|---|---|---|
IN | Positive | Receiving post |
OUT | Negative | Shipment post |
TRANSFER | Positive or negative | Inter-location transfer |
ADJUSTMENT | Positive or negative | Inventory adjustment |
OPENING_BALANCE | Positive | Tenant onboarding / integration opening stock |
WEB_CREATION | Positive | Item created with initial quantity via web |
HANDHELD_CREATION | Positive | Item created with initial quantity via handheld |
When importing via Excel, submitting an unsupported custom movement type
returns a standardized error that lists all valid codes and their descriptions
in three languages, so operators understand what substitution to make.
Inventory Recounts
Inventory recounts (cycle counts) are standalone documents that record system quantities at a point in time alongside operator-counted quantities for variance analysis.List recounts
Match on
recountNo, status, or assigned operator.Page number.
Records per page.
PagedResponse<RecountHeaderDto>
Recount UUID.
Auto-generated number (
RC-NNNNNNN).Count date.
Operator assigned to perform the count.
OPEN, RELEASED, or APPROVED.Supervisor notes.
Creation timestamp.
User who created the recount.
Get recount detail
RecountDetailDto including all lines with itemNo, locationCode, binCode, systemQty, and countedQty.
Create a recount
CreateRecountDto)
Date of count.
Operator user ID.
Count lines with
itemNo, locationCode, binCode, systemQty, countedQty.INVENTORY_RECOUNT document sequence in format RC-NNNNNNN.
Update a recount
OPEN status. Replaces all lines and updates recountDate, assignedToUserId, and observations.
Updated count date.
Updated operator user ID.
Supervisor notes.
Replacement set of count lines.
Recount lifecycle actions
Release to operator
OPEN to RELEASED. Requires assignedToUserId to be set.Reopen
OPEN. Blocked for APPROVED documents.
Optional body: { "observations": "..." }.