GraphQL Gateway :8080
📦

Inventory API

Catalog: /apis/inventory-api

Private internal gRPC microservice managing stock reservation checkouts, replenishments, and low stock alert thresholds.

Endpoints Reference

Complete list of GraphQL mutations, queries, gRPC procedures, and HTTP routes for this module.

gRPC

InventoryService.GetStock(GetStockRequest)

Resolves active physical items and reserved quantities for a specific variant.

🔓 Public Access
Request Syntax / Parameters
message GetStockRequest { string variant_id = 1; }
Expected JSON Response
message StockItem { string variant_id = 1; int32 quantity = 2; google.protobuf.Timestamp updated_at = 3; }
gRPC

InventoryService.UpsertStock(UpsertStockRequest)

Saves or updates variant stock records. Triggers NATS notifications if quantity falls below low stock alert thresholds.

🔓 Public Access
Request Syntax / Parameters
message UpsertStockRequest { string variant_id = 1; int32 quantity = 2; }
Expected JSON Response
message StockItem { string variant_id = 1; int32 quantity = 2; }

Database Tables & Data Models

Relational database schemas and custom payload models governing this service domain.

📂 inventory (PostgreSQL)

Contains stock quantities and low alert triggers.

Field Name Data Type Description / Constraint
id UUID (Primary Key) Unique inventory line identifier.
variant_id UUID Associated product variant identifier.
quantity INTEGER Active physical units currently on shelves.
reserved INTEGER Units currently locked in pending buyer checkouts (not yet paid).
low_stock_alert INTEGER Alert trigger threshold (defaults to 10).