Skip to content

Item Module

Items describe the types of materials, work-in-progress, and finished goods that an organization uses in its operations. The module supports inventory management, purchasing, sales, and production.

The Item module provides a Data Authority API for managing item reference data with full bitemporal support. Beyond the standard CRUDQ operations, it adds supply management, lookup services for typeahead fields, image upload, and printing of labels and breadcrumbs.

  • Business Affiliates Module (reference.businessAffiliate): Resolves supplier references in item supply records
  • PDF Render Module (shopAccess.pdfRender): Renders label and breadcrumb PDFs via Documint. See PDF Render Module
  • S3 Asset Service (common-module): Manages CSV upload and image upload storage
  • Kanban Cards Module (resources.kanban): Observes item changes via DataAuthorityNotification to keep card data in sync

PlantUML diagram

PlantUML diagram

The module base path is /v1/item. All routes except lookups require authentication.

Inherited from EditableDataAuthorityEndpoint:

MethodPathDescription
POST/item/addCreate item (or draft)
PUT/item/updateUpdate item
GET/item/{id}Read item by record ID
DELETE/item/{id}Logical delete (retire)
POST/item/queryQuery with filters, sort, pagination
GET/item/query/{pageToken}Navigate paginated results
GET/item/{id}/historyEntity version history

Query parameter mutation-mode (default: PROPAGATE) controls supply reference behavior: STRICT (verify existing), LAX (allow unlinked), PROPAGATE (create/update supplies with item).

MethodPathDescription
POST/item/{parent-item-id}/supply/Create item supply
PUT/item/{parent-item-id}/supply/{supply-id}Update item supply
DELETE/item/{parent-item-id}/supply/{supply-id}Remove item supply
GET/item/{parent-item-id}/supply/List item supplies
MethodPathRequestResponseDescription
POST/item/item-print-labelEntityIdsInput (list of item UUIDs)CompositeRenderResultPrint labels for items
POST/item/item-print-breadcrumbEntityIdsInput (list of item UUIDs)CompositeRenderResultPrint breadcrumbs for items

Both accept optional query parameters:

ParameterTypeDefaultDescription
live-printBooleanfalseProduction rendering (true) vs test/preview with watermark (false)
debugBooleanfalseInclude the Documint payload in the response (debugPayload field)
dry-runBooleanfalseConstruct payload but skip Documint call. No side effects. Overrides live-print and debug.
MethodPathRequestResponseDescription
POST/item/{eId}/image-upload-urlImageUploadRequestImageUploadResponseGenerate presigned upload credentials

All lookups accept name (search term) and limit (max results) query parameters and return List<String> (or List<ItemLookupResult> for items).

MethodPathDescription
GET/item/lookup-suppliersSupplier names
GET/item/lookup-unitsQuantity units
GET/item/lookup-itemsItem names + EIDs
GET/item/lookup-typesClassification types
GET/item/lookup-subtypesClassification subtypes
GET/item/lookup-usecasesUse cases
GET/item/lookup-facilitiesFacilities
GET/item/lookup-departmentsDepartments
GET/item/lookup-locationsLocations
GET/item/lookup-sublocationsSublocations

The OpenAPI specification is available via Redocly at https://stage.alpha002.io.arda.cards/v1/item/docs/redoc/index.html#tag/v1.

The following fields (case-insensitive) are accepted in query filters and sort parameters:

LocatorTypeDescription
iduuidRecord ID (bitemporal)
effective_as_ofTIMESTAMPBitemporal effective timestamp
recorded_as_ofTIMESTAMPBitemporal recorded timestamp
eiduuidEntity UUID
retiredBOOLEANWhether logically deleted
tenant_iduuidOwning tenant
item_nameStringItem name
image_urlString (URL)Product image URL
classification_typeStringItem type
classification_sub_typeStringItem sub-type
use_caseStringUse case label
physical_locator_facilityStringStorage facility
physical_locator_departmentStringStorage department
physical_locator_locationStringStorage location
internal_skuStringInternal SKU
notesStringFree-form notes
card_notes_defaultStringDefault card notes
taxableBOOLEANTaxable flag
primary_supply_supplierStringPrimary supplier name
primary_supply_skuStringPrimary supplier SKU
primary_supply_order_methodStringPreferred order method
primary_supply_urlString (URL)Supplier product URL
primary_supply_order_quantity_amountDecimalOrder quantity amount
primary_supply_order_quantity_unitStringOrder quantity unit
primary_supply_unit_cost_valueDecimalUnit cost
primary_supply_unit_cost_currencyStringCurrency
primary_supply_average_lead_time_lengthIntegerLead time length
primary_supply_average_lead_time_time_unitStringTime unit
secondary_supply_*(same as primary)Secondary supplier fields
default_supplyStringDefault supplier name
default_supply_eiduuidDefault supply UUID
card_sizeStringCard print size
label_sizeStringLabel print size
breadcrumb_sizeStringBreadcrumb print size
item_colorStringDisplay color

ItemService implements three interfaces:

PlantUML diagram

Item-specific methods beyond the Data Authority pattern:

MethodDescription
supplies(parentEId, time)List all supplies for an item
createItemSupply(parentEId, supply, time, author, qualifier)Add a supply source
updateItemSupply(parentEId, supply, time, author, qualifier)Update a supply source
removeItemSupply(parentEId, supplyEId, time, author)Remove a supply source
lookupSupplierByName(name, n, asOf)Typeahead for supplier names
lookupUnit(name, n, asOf)Typeahead for quantity units
lookupItemByName(name, n, asOf)Typeahead for item names (returns name + EID)
lookupTypeByName(name, n, asOf)Typeahead for classification types
lookupSubTypeByName(name, n, asOf)Typeahead for subtypes
lookupUseCaseByName(name, n, asOf)Typeahead for use cases
lookupFacilityByName(name, n, asOf)Typeahead for facilities
lookupDepartmentByName(name, n, asOf)Typeahead for departments
lookupLocationByName(name, n, asOf)Typeahead for locations
lookupSublocationByName(name, n, asOf)Typeahead for sublocations
generateImageUploadCredentials(contentType, contentLength, author)Presigned S3 POST for image upload

Business rules enforced by the service:

  • Item name uniqueness within tenant scope
  • Supply reference consistency (supplier EID, name resolution)
  • Mutation qualifier enforcement (STRICT, LAX, PROPAGATE)
  • Image URL validation (CDN pattern, tenant isolation, HEAD verification)

The printing sub-interface manages template resolution and print job orchestration. It is implemented within ItemService.Impl.

Template resolution methods resolve a size enum to a PrintingTemplateConfiguration (template ID, columns, description). Each falls back to the default size if the requested size is not configured.

Print methods (printLabels, printBreadcrumbs) orchestrate the full printing flow:

  1. Deduplicate and validate the input ID list
  2. Fetch items from ItemUniverse by record IDs
  3. For each item, resolve the template via the size field and render the item to a ItemPrintInfo JSON payload via ItemPrinter
  4. Verify all items resolve to the same template (current constraint)
  5. Construct a RenderJob with the template configuration and a Grid of item payloads
  6. Delegate to PdfRenderService.render() and return the RenderResult

PlantUML diagram

The breadcrumb flow is identical to labels, substituting breadcrumbSize for labelSize in template resolution and POST /item/item-print-breadcrumb as the endpoint path.

Section titled “Print Labels — Mixed Sizes (Multi-Template Grouping)”

When items have different label sizes, the system groups them by template and renders one PDF per group:

PlantUML diagram

ItemUniverse extends AbstractScopedUniverse<Item, ItemMetadata, ITEM_TABLE, ItemRecord> and provides:

  • Standard bitemporal CRUDQ operations (inherited)
  • Tenant-scoped queries via ItemUniversalCondition
  • Business rule validation via ItemValidator
  • Fuzzy-match lookup methods for typeahead fields
TableTypeDescription
ITEM_TABLE (item_bitemporal)ScopedTableMain item entity with bitemporal versioning
ITEM_SUPPLY_TABLE (item_supply_bitemporal)ChildTable (parent: ITEM)Item supply sources

The item table uses composite components to map structured value objects to flat database columns:

ComponentMaps ToColumns
ItemClassificationComponentItemClassificationtype, sub_type, use_case, gl_code
PhysicalLocatorComponentPhysicalLocatorfacility, department, location, sub_location
QuantityComponentQuantity (minQuantity)amount, unit
ItemSupplyReferenceComponentItemSupplyReference (primary, secondary)supplier_eid, supplier, name, sku, order_method, url, order_quantity_, unit_cost_, lead_time_*

Bitemporal features: effective time, recorded time, entity history, time-travel queries, logical deletion (retired flag).

The module is configured at path system.reference.item and reads:

KeyTypeDescription
colors.optionsPathStringPath to color-options.json resource
colors.basePathStringPath to colors.json resource
frontend.baseUrlStringBase URL for QR code generation
printTemplatesPathStringPath to pdf-templates.json resource
DependencySourceDescription
PdfRenderServiceshopAccess.pdfRender modulePDF rendering via Documint
BusinessAffiliateServicereference.businessAffiliate moduleSupplier reference resolution
AuthenticationComponent configurationRequest authentication
AwsConfigurationComponent configurationAWS region, S3 bucket ARNs, presign role ARNs, CDN domain
ResourcePurpose
reference/item/printing/pdf-templates.jsonTemplate ID, columns, description, active flag per size per material type
reference/item/printing/color-options.jsonAvailable item color values
reference/item/printing/colors.jsonColor asset URLs (rectangles, icons) per color value

Printed labels and breadcrumbs embed a QR code that encodes a URL for looking up the item in the UI:

https://{base-url}/item/{eId}/{type}
{type}Material
0Label
1Breadcrumb
EnvironmentBase URL
Productionlive.app.arda.cards
Stagingstage.alpha002.app.arda.cards
Developmentdev.alpha002.app.arda.cards

The base URL is configured via frontend.baseUrl in the module extras. The eId is the item’s entity ID (available from the Item API at results[*].payload.eId).

When the browser navigates to an item lookup URL, the UI displays the item details for the given eId. If the item is not found, the UI displays an “Item Not Found” message (item never existed, user lacks access, or item was deleted).