---
id: SVC-COM-FUL-inventory
title: Inventory Service Module
product_area: commerce
module: fulfillment
repository: services-commerce
source_module: modules/inventory
revision: 1
status: draft
design_intent: proposed
implementation_evidence: observed
inference: []
source_sha:
  services-commerce: c8b66a98e2490617aec38ba5c8165dd9bd0a8f9b
owns:
  - DOM-COM-FUL-005
does_not_own:
  - >-
    Catalog owns merchandise configuration and the participant that holds and
    picks stock.
  - >-
    Orders owns placement and cancellation that call commit and release claim
    functions.
  - >-
    Shipping owns departure and return disposition, calling this service for
    their stock writes.
  - >-
    Purchasing and inventory-costing records remain with their separately
    registered service boundary.
operations:
  - operation_id: getInventoryHealth
    intent: >-
      Return API reachability and deployment identity without reading business
      records.
    access: public
    permission: none
    realises: []
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: createWarehouse
    intent: Create warehouse using the supplied configuration or eligible order work.
    access: console
    permission: commerce.inventory.create
    realises:
      - CAP-COM-FUL-016
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
  - operation_id: listWarehouses
    intent: >-
      Return the permitted warehouses records with the route’s supported
      filters.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-016
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: getWarehouse
    intent: Read the requested warehouse record within the current workspace.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-016
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: updateWarehouse
    intent: >-
      Replace warehouse using its current version and allowed writable
      properties.
    access: console
    permission: commerce.inventory.update
    realises:
      - CAP-COM-FUL-016
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
  - operation_id: deleteWarehouse
    intent: Remove warehouse only when locking and reference constraints permit.
    access: console
    permission: commerce.inventory.delete
    realises:
      - CAP-COM-FUL-016
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
  - operation_id: createInventoryLocation
    intent: >-
      Create inventory location using the supplied configuration or eligible
      order work.
    access: console
    permission: commerce.inventory.create
    realises:
      - CAP-COM-FUL-016
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
  - operation_id: listInventoryLocations
    intent: >-
      Return the permitted inventory locations records with the route’s
      supported filters.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-016
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: getInventoryLocation
    intent: Read the requested inventory location record within the current workspace.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-016
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: updateInventoryLocation
    intent: >-
      Replace inventory location using its current version and allowed writable
      properties.
    access: console
    permission: commerce.inventory.update
    realises:
      - CAP-COM-FUL-016
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
  - operation_id: deleteInventoryLocation
    intent: >-
      Remove inventory location only when locking and reference constraints
      permit.
    access: console
    permission: commerce.inventory.delete
    realises:
      - CAP-COM-FUL-016
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
  - operation_id: listInventoryItems
    intent: >-
      Return the permitted inventory items records with the route’s supported
      filters.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-016
      - CAP-COM-FUL-018
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: readSkuAvailability
    intent: Return SKU availability from the current stock and product policy.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-018
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: getInventoryItem
    intent: Read the requested inventory item record within the current workspace.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-016
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: updateInventoryItemSettings
    intent: >-
      Replace inventory item settings using its current version and allowed
      writable properties.
    access: console
    permission: commerce.inventory.update
    realises:
      - CAP-COM-FUL-017
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
  - operation_id: recordInventoryMovement
    intent: Append or retain inventory movement without direct balance assignment.
    access: console
    permission: commerce.inventory.create
    realises:
      - CAP-COM-FUL-017
      - CAP-COM-FUL-018
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
  - operation_id: listInventoryMovements
    intent: >-
      Return the permitted inventory movements records with the route’s
      supported filters.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-017
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: getInventoryMovement
    intent: Read the requested inventory movement record within the current workspace.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-017
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: transferInventory
    intent: Move available stock and its cost through paired keyed movements.
    access: console
    permission: commerce.inventory.create
    realises:
      - CAP-COM-FUL-017
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
  - operation_id: listInventoryTransfers
    intent: >-
      Return the permitted inventory transfers records with the route’s
      supported filters.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-017
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: listInventoryAllocations
    intent: >-
      Return the permitted inventory allocations records with the route’s
      supported filters.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-018
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: getInventoryAllocation
    intent: >-
      Read the requested inventory allocation record within the current
      workspace.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-018
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: openInventoryCount
    intent: Start an empty count session for the requested warehouse scope.
    access: console
    permission: commerce.inventory.create
    realises:
      - CAP-COM-FUL-019
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
  - operation_id: listInventoryCounts
    intent: >-
      Return the permitted inventory counts records with the route’s supported
      filters.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-019
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: getInventoryCount
    intent: Read the requested inventory count record within the current workspace.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-019
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: recordInventoryCountLines
    intent: Append or retain inventory count lines without direct balance assignment.
    access: console
    permission: commerce.inventory.update
    realises:
      - CAP-COM-FUL-019
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
  - operation_id: completeInventoryCount
    intent: Record completion of inventory count under its state and request checks.
    access: console
    permission: commerce.inventory.update
    realises:
      - CAP-COM-FUL-019
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
  - operation_id: cancelInventoryCount
    intent: Cancel inventory count while retaining its completed or shipped work.
    access: console
    permission: commerce.inventory.update
    realises:
      - CAP-COM-FUL-019
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
  - operation_id: listInventoryExceptions
    intent: >-
      Return the permitted inventory exceptions records with the route’s
      supported filters.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-019
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: getInventoryException
    intent: >-
      Read the requested inventory exception record within the current
      workspace.
    access: console
    permission: commerce.inventory.read
    realises:
      - CAP-COM-FUL-019
    published_to_submissions: >-
      not published: no Submissions intake contract is declared for this read
      operation.
  - operation_id: acknowledgeInventoryException
    intent: Record staff awareness of the open inventory exception finding.
    access: console
    permission: commerce.inventory.update
    realises:
      - CAP-COM-FUL-019
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
  - operation_id: resolveInventoryException
    intent: Retain staff closure of inventory exception with the required result.
    access: console
    permission: commerce.inventory.update
    realises:
      - CAP-COM-FUL-019
    published_to_submissions: >-
      not published: no Submissions contract is declared for this staff or
      application operation.
events: []
jobs:
  - name: commerce_inventory_nightly
    schedule: >-
      Daily at 08:00 UTC or on demand, with concurrency one and a five-minute
      timeout.
    does: >-
      Releases expired holds and raises stock, allocation, reorder and cost
      diagnoses.
integrations:
  - system: Merchandise application
    direction: inbound
    contract: >-
      The Merchandise participant uses allocation persistence to hold, reaffirm,
      pick and release units, including fenced cancellation work.
  - system: Claim functions
    direction: inbound
    contract: >-
      Placement and cancellation call the database claim functions to commit or
      release units.
  - system: Workspace data export
    direction: outbound
    contract: >-
      Workspace export includes the inventory dataset and the Purchasing-owned
      cost records.
consistency:
  - rule: >-
      Movement and allocation triggers maintain constrained balances within
      their statements.
    kind: transactional
    compensation: >-
      A failed write rolls back; nightly diagnosis reports disagreement without
      replacing balances.
  - rule: >-
      Sellable incoming stock fills waiting backorders within the movement
      transaction.
    kind: transactional
    compensation: A failed fill rolls back its incoming movement.
  - rule: >-
      Transfer retains both stock movements and participating cost changes
      together.
    kind: transactional
    compensation: A refused transfer rolls back both halves.
  - rule: Findings reflect completed detections from the latest checks.
    kind: eventual
    compensation: An incomplete nightly run restarts from discovery on its next execution.
evidence:
  - >-
    services-commerce at c8b66a98:
    modules/inventory/aws/api/inventory.routes.ts; aws/inventory.module.ts;
    aws/logic/inventory-nightly.lambda.ts; services/**; aws/commerce.service.ts
    (inventory keys); docs/migrations/inventory/README.md.
  - 'services-commerce:modules/inventory/aws/api/inventory.routes.ts'
  - >-
    services-commerce:package-lock.json:@rhythmsoftware/macroservice-http;
    node_modules/@rhythmsoftware/macroservice-http/dist/health-route.js:healthRoute
controls: [TC-IAM-001, TC-IAM-002, TC-IAM-004, TC-IAM-005, TC-AZ-001, TC-AZ-002, TC-AZ-003, TC-AZ-004, TC-AZ-005, TC-AZ-006, TC-TEN-001, TC-TEN-002, TC-TEN-003, TC-CRY-001, TC-CRY-002, TC-CRY-003, TC-DAT-001, TC-DAT-002, TC-DAT-003, TC-LOG-004, TC-LOG-005, TC-AVL-002, TC-AVL-003, TC-MON-001, TC-MON-003, TC-MON-004, TC-PI-001, TC-PI-003, TC-PI-005, TC-PRV-001, TC-PRV-002]
---

# Inventory Service Module

## What This Service Is For

Account for warehouse stock and buyer promises through retained ledgers.

## Boundary

Inventory owns places, item balances, movements, allocation units, counts and warehouse findings. The separately registered purchasing code supplies cost-layer behavior.

## Operations in Words

Staff organize warehouses and locations, enter permitted movements and transfers, inspect allocation and availability, and perform counts and finding closure. Checkout and placement use claim functions through their owning process.

## Events and Jobs

The daily inventory function releases expired holds and raises stock, allocation and cost findings. These findings remain outside the order Operations collection; the module publishes no change-event stream.

## Consistency Guarantees

Triggers maintain balances and constraints refuse impossible stock consumption. Transfers retain both ledger halves together. Reconciliation reports disagreement and can stop before covering every page.
