Dragon Guard organizes physical warehouse space in a two-level hierarchy: Locations represent distinct warehouses or warehouse zones, and Bins are individual storage slots within a location. Every stock movement, receipt, shipment, and inventory query resolves to a specificDocumentation 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.
(CompanyId, LocationId, BinId) triple, ensuring multi-tenant isolation and precise stock traceability.
The Location → Bin Hierarchy
- Every
Locationbelongs to exactly oneCompanyId. - Every
Binbelongs to exactly oneCompanyIdand exactly oneLocationId. - Bin codes are unique within a
(CompanyId, LocationId)pair but not globally — the same code such asDEFAULTcan exist in multiple locations. - Default location and bin are designated by
IsDefault = trueon the respective rows, not by a magic code.
The legacy
MAIN location code is fully supported for historical tenants, but
it is not architecturally required. Any valid tenant-specific location code
works identically everywhere in the system.Locations
List warehouse locations
Return only active locations.
Return only locations where
allowReceiving = true.Free-text match on
code, name, or city.Page number.
Records per page.
PagedResponse<LocationDto>
Location UUID.
Location code (the business key used in receipts, shipments, and integrations).
Display name.
Street address line 1.
Street address line 2.
City.
State or province.
Country code.
Postal/ZIP code.
Contact person at this location.
Phone number.
Email address.
Active flag.
Whether this location accepts inbound receipts.
Free-text notes.
Location configuration packages
Locations can be bulk-managed via Excel packages using the sameWMS_CONFIG_PACKAGE_V1 format used by items and movements.
Export
locations_config_package.xlsx with all current locations.Preview
Apply
Code, Name, Address, Address2, City, State, Country, PostalCode, ContactName, Phone, Email, IsActive, AllowReceiving, Notes.
Bins
Bins represent the physical storage slots within a location. They carry operational attributes that control how warehouse flows interact with them.List bins
Override company. Resolved from JWT when omitted.
Return only active bins.
Page number.
Records per page.
PagedResponse<BinDto>
Bin UUID.
Bin code. Unique within
(CompanyId, LocationId).Bin description.
Active flag.
Whether the bin is currently blocked from operational use.
Whether this is the default bin for its location.
Type classification (e.g.
STORAGE, RECEIVING, DISPATCH).Whether stock can be picked from this bin.
Whether stock can be put away into this bin.
Owning company UUID.
Get bin detail
BinDetailDto which extends BinDto with location context:
Owning company display name.
Creation timestamp.
Last modification timestamp.
The
GET /api/bins/{id} endpoint accepts requests from any company in the
caller’s accessible company list (as determined by the JWT), not just the
primary CompanyId. This supports multi-company admin scenarios.Bin Consistency Model
Bins are soft-unique per(CompanyId, LocationId). The same binCode string (e.g. DEFAULT) may exist in multiple locations of the same tenant with independent operational attributes. All bin resolution in receiving, shipment, movement, and stock queries must include both CompanyId and LocationId context.
Default resolution order used by all modules when an explicit bin is not provided:
- Caller-supplied
binId(highest precedence). - Active tenant default bin for the target location (
IsDefault = true). - Legacy compatibility fallback for historical rows with blank
binId(read-only display only).
| Attribute | Enforced by |
|---|---|
isBlocked = true | Receiving line update rejects the bin for putaway. |
allowPutaway = false | Receiving line update rejects the bin for putaway. |
allowPicking = false | Future pick validation will reject the bin for picking. |
MAIN Location / MAIN Bin Convention
When a new tenant is bootstrapped, Dragon Guard seeds a default location and a default bin. Bootstrap inputs may supply custom codes; if omitted, the system may create a location using theMAIN code as a compatibility default. Key rules:
MAINis legacy-compatible but not mandatory. Any location code the tenant provides during setup is equally valid everywhere in the system.- Existing tenants using
MAINare not affected. All operational flows (receipts, shipments, movements, handheld) checkIsDefaulton the database row, not the code string. - New integrations should use the tenant’s real location code (obtained from
GET /api/locations?activeOnly=true) rather than hardcodingMAIN.
Warehouse Setup
The warehouse setup controller provides CRUD operations for locations and bins without the Excel package ceremony.Document Sequences
Dragon Guard uses auto-incrementing document number sequences for all transactional documents. These sequences are company-scoped and self-healing — when a sequence row is missing for a tenant (common for older tenants), the relevant endpoint creates it automatically.documentType | Format | Used by |
|---|---|---|
ITEM_CREATED | ITM-NNNNNN | Item creation |
RECEIPT_CREATED | RCP-NNNNNNN | Receiving header creation |
POSTED_RECEIVE | PR-NNNNNN | Receiving post |
PURCHASE_ORDER | PO-NNNNNN | Auto-generated PO numbers |
SHIPMENT_CREATE | SHP-NNNNNN | Shipment creation |
POSTED_SHIPMENT | PS-NNNNNN | Shipment post |
SALES_ORDER | SO-NNNNN | Auto-generated SO numbers |
INVENTORY_RECOUNT | RC-NNNNNNN | Inventory recount creation |