The Items API manages the product master catalog for each Dragon Guard tenant and exposes handheld-optimized inquiry endpoints that transparently proxy to GrupoMAS when the tenant is configured for native integration.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/items
Returns a paginated list of items for the specified company. Supports full-text search across item number, description, UOM, and item type. Authentication:Authorization: Bearer <token> (required).
Tenant company ID. If omitted, resolved from the JWT claims.
Free-text search term matched against
ItemNo, Description, UOM, and ItemType.Filter to active items only. Defaults to
true.1-based page number. Defaults to
1.Number of records per page. Defaults to
20.List of item summaries.
Current page.
Records per page.
Total matching records.
Total pages.
GET /api/items/
Returns full detail for a single item including stock quantities (on-hand, on-purchase order, on-sales order, available) and all images. Authentication:Authorization: Bearer <token> (required).
Item unique identifier.
Tenant company ID. Resolved from JWT if omitted.
Item ID.
Item number.
Item description.
Primary UOM.
Base UOM.
Sales UOM.
Purchase UOM.
UOM conversion factor.
Active flag.
Lot tracking enabled.
Serial number tracking enabled.
Expiration date tracking enabled.
Primary barcode.
Alternate barcode.
Supplier part number.
Alternative item code.
Current on-hand stock quantity.
Quantity open on purchase orders.
Quantity open on sales orders.
Available quantity (on-hand minus sales orders).
true when on-hand quantity is zero or negative.Item images.
| Status | Meaning |
|---|---|
| 404 | Item not found for the given ID and company. |
GET /api/items/by-itemno/
Returns full detail for a single item looked up by item number. For GrupoMAS tenants, proxies the lookup to MAS and falls back to the local catalog on error. Authentication:Authorization: Bearer <token> (required).
Item number / SKU to look up.
Tenant company ID. Resolved from JWT if omitted.
ItemDetailDto shape as GET /api/items/{id}.
Error codes
| Status | Meaning |
|---|---|
| 404 | Item not found for the given item number and company. |
GET /api/items/inquiry
Returns a paginated item inquiry with bin-level stock quantities per item. Joins item master, current stock, bins, and locations for each result row. Authentication:Authorization: Bearer <token> (required).
Tenant company ID.
Free-text search across item number, description, UOM, type, barcode, and alt barcode.
Filter to active items only. Defaults to
false.1-based page. Defaults to
1.Page size. Defaults to
20.Paginated item inquiry summaries with per-bin stock breakdown.
Current page.
Page size.
Total matching records.
Total pages.
GET /api/items/products-inquiry
Handheld-optimized product inquiry. For GrupoMAS tenants, proxies the search to the MAS API and returns live stock data. For local tenants, queries the Dragon Guard catalog with bin-level stock. Authentication:Authorization: Bearer <token> (required).
Tenant company ID.
Search term matched against item number, description, barcode, alt code, location code, and bin code.
Filter results to a specific warehouse location.
When
true, only items with quantity greater than zero are returned.1-based page. Defaults to
1.Page size. Defaults to
20.Current page.
Page size.
Total matching records.
Total pages.
Sum of stock quantities (zero when no search/location filter is active).
Display label for quantity (e.g.,
Cantidad).List of product lookup lines with item info and per-bin stock.
GET /api/items/products-locations
Returns the list of warehouse locations available for the handheld location filter dropdown. For GrupoMAS tenants, the list is fetched live from MAS. Always includes a leading “All locations” option with an emptylocationCode.
Authentication: Authorization: Bearer <token> (required).
Tenant company ID.
The pre-selected location code (empty string = all locations).
GET /api/items/export-config
Exports the full item catalog for the tenant as an Excel workbook (.xlsx) formatted as a Dragon Guard config package. The workbook contains an Items worksheet and a hidden __wms_package metadata sheet.
Authentication: Authorization: Bearer <token> (required).
Tenant company ID.
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet with filename items_config_package.xlsx.
POST /api/items/preview-config
Previews an items config package import without persisting any changes. Returns validation results and row-level action previews. Authentication:Authorization: Bearer <token> (required).
Multipart form upload. Must be a valid Dragon Guard
ITEMS_MASTER config package .xlsx.Tenant company ID.
Whether the package passes all validations.
Number of items that would be created.
Number of items that would be updated.
Row-level validation errors.
Preview of first 50 rows with planned action.
POST /api/items/apply-config
Imports items from a Dragon Guard config package Excel file. Upserts based onItemNo, Barcode, Part_No, or Alternative_Code. Returns counts of created and updated records. Blocked for ERP-owned tenants.
Authentication: Authorization: Bearer <token> (required).
Multipart form upload. Must be a valid Dragon Guard
ITEMS_MASTER config package .xlsx.Confirmation token obtained from
POST /api/items/preview-config to prevent accidental applies.Tenant company ID.
Whether the import completed without errors.
Number of new items created.
Number of existing items updated.
List of row-level validation errors if any.
POST /api/items/create_item
Creates a new item in the local catalog via the web interface. IfinitialQuantity is greater than zero, an opening stock inventory movement is created against the resolved bin. Blocked for tenants where the item master is owned by an ERP integration (e.g., GrupoMAS).
Authentication: Authorization: Bearer <token> with role ADMIN or SUPERVISOR (required).
Item description.
Primary unit of measure.
Primary barcode. Must be unique within the tenant.
Supplier part number.
Alternative item code.
Brand name.
Category or group code.
Opening stock quantity. Requires a valid location or bin. Defaults to
0.Location for initial stock placement. Uses default location if omitted.
Specific bin for initial stock. Uses default bin of the location if omitted.
Always
Item created successfully on success.New item ID.
Auto-generated item number (e.g.,
ITM-000001).| Status | Meaning |
|---|---|
| 400 | Missing required fields or invalid bin for initial stock. |
| 403 | Caller does not have ADMIN or SUPERVISOR role. |
| 409 | Barcode already exists in this tenant, or item master is ERP-owned. |
POST /api/items/handheld/create_item
Creates a new item from the handheld device. Requires roleADMIN or SUPERVISOR. Follows the same logic as the web create endpoint but is optimized for the handheld form with simplified fields. Creates movement type HANDHELD_CREATION instead of WEB_CREATION.
Authentication: Authorization: Bearer <token> with role ADMIN or SUPERVISOR (required).
Item description.
Primary unit of measure.
Primary barcode. Must be unique within the tenant.
Supplier part number.
Alternative item code.
Brand name.
Category or group code.
Opening stock quantity. Defaults to
0.Initial stock location ID.
Initial stock bin ID.
Tenant company ID.
Always
Producto creado correctamente. on success.New item ID.
Auto-generated item number.
| Status | Meaning |
|---|---|
| 400 | Missing description or UOM, or invalid bin. |
| 403 | Caller does not have ADMIN or SUPERVISOR role, or items are ERP-owned. |
| 409 | Barcode already exists in this tenant. |