Inventory Service (v0.0.2)

This service will be deprecated on May 1, 2026

This service is being deprecated and replaced by the new service InventoryServiceV2.
Please contact the team for more information or visit our website.

Service that handles the inventory

Overview

The Inventory Service is a critical component of the system responsible for managing product stock levels, tracking inventory movements, and ensuring product availability. It interacts with other services to maintain accurate inventory records and supports operations such as order fulfillment, restocking, and inventory audits.

Core features

FeatureDescription
Real-time Stock TrackingMonitors inventory levels across all warehouses in real-time
Automated ReorderingTriggers purchase orders when stock levels fall below defined thresholds
Multi-warehouse SupportManages inventory across multiple warehouse locations
Batch ProcessingHandles bulk inventory updates and adjustments efficiently

Architecture diagram

Messages for this service

Sends messages (3)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummary
Inventory adjusted
v1.0.1eventIndicates a change in inventory level
Inventory out of stock
v0.0.4eventIndicates inventory is out of stock
Get order details
v0.0.1queryGET request that will return detailed information about a specific order, identified by its orderId.

Receives messages (7)

Quickly find the message you need by searching for the name, type, or summary.
NameVersionTypeSummary
Update inventory
v0.0.3commandCommand that will update a given inventory item
Add inventory
v0.0.3commandCommand that will add item to a given inventory id
Delete Inventory
v0.0.3commandCommand that will delete a given inventory item from the system
Order confirmed
v0.0.1eventIndicates an order has been confirmed

Infrastructure

The Inventory Service is hosted on AWS.

The diagram below shows the infrastructure of the Inventory Service. The service is hosted on AWS and uses AWS Lambda to handle the inventory requests. The inventory is stored in an AWS Aurora database and the inventory metadata is stored in an AWS S3 bucket.

Loading graph...

You can find more information about the Inventory Service infrastructure in the Inventory Service documentation.

How to connect to Inventory Service

  1. Obtain API credentials

    Request API credentials from the Inventory Service team.

  2. Install the SDK

    Run the following command in your project directory:

    Terminal window
    npm install inventory-service-sdk

  3. Initialize the client

    Use the following code to initialize the Inventory Service client:

    const InventoryService = require('inventory-service-sdk');
    const client = new InventoryService.Client({
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
    apiUrl: 'https://api.inventoryservice.com/v1'
    });

  4. Make API calls

    You can now use the client to make API calls. For example, to get all products:

    client.getProducts()
    .then(products => console.log(products))
    .catch(error => console.error(error));

Event-driven architecture documentation: FlowMart