TheDocumentation 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.
RfidTagRegistry is the EPC master catalogue for a tenant. Every physical tag that Dragon Guard needs to recognise — whether on a unit, case, pallet, bin, or fixed asset — must have a corresponding registry entry. Entries are tenant-scoped (keyed by CompanyId), and active EPC uniqueness is enforced with a filtered unique index on (CompanyId, NormalizedEpc), so the same EPC cannot be active twice within one tenant. Deactivation is always logical; no hard-delete route exists.
Data model
Object types
| Value | Description |
|---|---|
ITEM_UNIT | A single sellable or stockable unit — itemId required |
CASE | A case or outer containing individual units — itemId required |
PACK | A pack or inner grouping — itemId required |
PALLET | A full pallet — itemId required |
BIN | A warehouse bin — currentBinId required |
LOCATION | A warehouse location — currentLocationId required |
ASSET | A fixed or tracked asset — no item linkage required |
Tag statuses
| Value | Meaning |
|---|---|
COMMISSIONED | Tag has been programmed and registered; not yet in active circulation |
AVAILABLE | Tag is active and ready for warehouse operations |
VOID | Tag has been deactivated; IsActive is set to false |
Key fields — RfidTagDto
| Field | Type | Notes |
|---|---|---|
id | guid | Surrogate key |
epc | string | Normalised EPC — used for uniqueness enforcement |
rawEpc | string | As-read EPC string from the scanner |
objectType | string | One of the object type values above |
quantity | decimal | Must be ≥ 1 for inventory-bearing types; defaults to 1 for ITEM_UNIT |
status | string | COMMISSIONED, AVAILABLE, or VOID |
itemId | guid? | Required for ITEM_UNIT, CASE, PACK, PALLET |
itemNo | string? | Item number (denormalised snapshot) |
itemDescription | string? | Item description (denormalised snapshot) |
lotNo | string? | Lot number, if applicable |
serialNo | string? | Serial number, if applicable |
currentLocationId | guid? | Required for LOCATION; optional for others |
locationCode | string? | Location code (denormalised snapshot) |
currentBinId | guid? | Required for BIN; optional for others |
binCode | string? | Bin code (denormalised snapshot) |
lastSeenAtUtc | datetime? | Updated each time the tag is scanned |
isActive | bool | false after deactivation |
createdAtUtc | datetime | Audit timestamp |
createdBy | string | Operator e-mail |
updatedAtUtc | datetime? | Audit timestamp |
updatedBy | string? | Operator e-mail |
Tag registry endpoints
List tags
| Query parameter | Type | Description |
|---|---|---|
search | string | Free-text search across EPC, item number, lot, and serial |
item | string | Filter by item number |
lot | string | Filter by lot number |
serial | string | Filter by serial number |
objectType | string | Filter by object type |
status | string | Filter by status value |
activeOnly | bool | Default true; set false to include voided tags |
page | int | Page number (1-based) |
pageSize | int | Records per page |
Get tag by ID
RfidTagDto. Returns 404 if the tag does not exist or belongs to a different tenant.
Resolve EPC
RfidTagResolveDto containing the matched item, quantity, location, and bin.
If corrupted or migrated data has left more than one active row for the same EPC within a tenant, resolution returns
resolutionStatus: AMBIGUOUS_DUPLICATE rather than silently choosing one match. Resolve the duplicate via the PATCH or deactivate endpoints before scanning.RfidTagResolveDto):
| Field | Type | Notes |
|---|---|---|
requestedEpc | string | The EPC value supplied in the request |
epc | string | The normalised EPC from the matched registry row |
tagId | guid? | ID of the matched RfidTagRegistry row |
assignmentId | guid? | ID of the active tag assignment, if resolved via assignment |
objectType | string? | Object type of the matched tag |
status | string? | Status of the matched tag |
resolutionStatus | string | RESOLVED, NOT_FOUND, AMBIGUOUS_DUPLICATE, or INACTIVE |
resolutionSource | string | How the tag was resolved (e.g. TAG_REGISTRY, TAG_ASSIGNMENT) |
itemId | guid? | Resolved item ID |
itemNo | string? | Resolved item number |
itemDescription | string? | Resolved item description |
quantity | decimal? | Quantity associated with the tag |
currentLocationId | guid? | Current location ID |
locationCode | string? | Current location code |
currentBinId | guid? | Current bin ID |
binCode | string? | Current bin code |
isActive | bool | Whether the matched tag is active |
isResolved | bool | true when a matching registry row was found |
message | string? | Human-readable explanation when resolution fails |
Create a tag
The canonical EPC value used for uniqueness checks. Must be unique among active tags in the tenant.
The raw as-read EPC string. Defaults to
normalizedEpc if omitted.Object type of the physical entity bearing this tag. One of
ITEM_UNIT, CASE, PACK, PALLET, BIN, LOCATION, ASSET.Required when
objectType is ITEM_UNIT, CASE, PACK, or PALLET. Must reference an item that belongs to the calling tenant.Quantity of the item represented by this tag. Defaults to
1 for ITEM_UNIT. Must be ≥ 1 for all inventory-bearing types.Initial status. Defaults to
COMMISSIONED if omitted. Accepted values: COMMISSIONED, AVAILABLE.ID of the warehouse location where the tag currently resides. Required when
objectType is LOCATION.ID of the bin where the tag currently resides. Required when
objectType is BIN.Optional timestamp of the last known physical read. Omit to let the system set this on the first scan event.
201 Created with the full RfidTagDto. Returns 409 Conflict if an active tag with the same EPC already exists for the tenant.
Bulk import
RfidBulkImportDto body and returns an RfidBulkImportResultDto with per-line create, update, and error counts. Useful when commissioning large tag batches printed from ZPL label jobs.
| Body field | Type | Description |
|---|---|---|
batchReferenceNo | string? | Optional reference label for this import batch |
remarks | string? | Free-text notes |
continueOnError | bool | Default true — skip failing rows rather than aborting the entire batch |
allowUpdates | bool | When true, update existing active tags instead of returning a conflict |
items | array | Array of RfidBulkImportLineDto tag records (see fields below) |
items mirrors CreateRfidTagDto with an additional optional index field for error reporting.
Update a tag (partial)
UpdateRfidTagDto. Supports changes to EPC, status, quantity, item linkage, location, bin, and lastSeenAtUtc. Setting status to VOID automatically sets IsActive = false; any other valid status reactivates the tag.
UpdateRfidTagDto also exposes explicit clear flags — set the corresponding bool to true to null-out optional fields:
| Clear flag | Clears field |
|---|---|
clearItemId | Sets ItemId to null |
clearCurrentLocationId | Sets CurrentLocationId to null |
clearCurrentBinId | Sets CurrentBinId to null |
clearLastSeenAtUtc | Sets LastSeenAtUtc to null |
Update a tag (full)
PATCH using the same UpdateRfidTagDto payload. Provided for client compatibility.
Deactivate a tag
Status = VOID and IsActive = false. The tag record is retained for audit and re-commissioning review. Returns 404 if the tag does not exist in the tenant.
Tag assignment endpoints
Tag assignments link a registry entry to a specific document, item, lot, serial, package, location, or bin for a defined time window. TheRfidTagAssignmentsController exposes the following routes under api/rfid/tag-assignments.
List assignments
| Query parameter | Type | Description |
|---|---|---|
rfidTagRegistryId | guid | Filter by registry tag ID |
assignmentType | string | Filter by assignment type |
itemId | guid | Filter by item ID |
documentType | string | Filter by document type |
documentNo | string | Filter by document number |
isActive | bool | Filter by active/inactive status |
effectiveAtUtc | datetime | Return only assignments effective at this point in time |
page | int | Page number (1-based) |
pageSize | int | Records per page |
Get assignment by ID
RfidTagAssignmentDto. Returns 404 if not found or belonging to a different tenant.
Create assignment
201 Created with the saved RfidTagAssignmentDto, or 409 Conflict if an active conflicting assignment already exists.
Key request fields (CreateRfidTagAssignmentDto):
| Field | Type | Required | Description |
|---|---|---|---|
rfidTagRegistryId | guid | ✓ | The registry tag being assigned |
assignmentType | string | ✓ | Type of assignment (e.g. DOCUMENT, LOCATION, ITEM) |
itemId | guid? | Item linked to this assignment | |
lotNo | string? | Lot number | |
serialNo | string? | Serial number | |
packageCode | string? | Package code | |
documentType | string? | Document type (e.g. RECEIPT) | |
documentNo | string? | Document number | |
documentLineNo | string? | Document line number | |
locationId | guid? | Warehouse location ID | |
binId | guid? | Bin ID | |
quantity | decimal | ✓ | Quantity for this assignment |
source | string | ✓ | How the assignment was created (e.g. MANUAL, SYSTEM) |
effectiveFromUtc | datetime? | Start of effective window; defaults to now if omitted | |
effectiveToUtc | datetime? | End of effective window; null means open-ended | |
notes | string? | Free-text notes |
Update assignment
UpdateRfidTagAssignmentDto body. Returns 404 if the assignment is not found.
Deactivate assignment
204 No Content on success, 404 if not found.
Label print endpoint
Dragon Guard can generate a ZPL label string for a Zebra RFID printer. The ZPL includes^RFW commands to program the RFID chip during the print pass, so the print and encode steps happen in a single pass through the Zebra printer.
EPC to encode. Provide either
epc or tagId.ID of the
RfidTagRegistry row to look up the EPC from. Provide either tagId or epc.Number of label copies embedded in the ZPL (
^PQ). Range 1–99. Defaults to 1.Print darkness (
^MD). Range 0–30. Defaults to 15.PrintRfidLabelResponseDto):
| Field | Type | Description |
|---|---|---|
success | bool | Whether the ZPL was generated successfully |
message | string | Human-readable outcome message |
zplString | string | Complete ZPL string — send to the Zebra printer via TCP port 9100 |
epc | string? | The EPC encoded in the label |
itemId | string? | Item ID snapshot |
objectType | string? | Object type snapshot |
copies | int | Copy count embedded in the ZPL |
generatedAtUtc | datetime | UTC timestamp of generation |
Business rules
BIN tags must include a currentBinId. LOCATION tags must include a currentLocationId. Submitting without the matching reference will return 400 Bad Request.- Active EPC uniqueness — only one active row may exist per
(CompanyId, NormalizedEpc). Attempting to create a duplicate returns409 Conflict. - Quantity floor —
quantitymust be ≥ 1 for all inventory-bearing types (ITEM_UNIT,CASE,PACK,PALLET). - No hard delete — deactivation is the only way to retire a tag. Historical (inactive) rows remain for audit.
- Tenant isolation —
CompanyIdis resolved from the JWT; request bodies cannot override it.