G3N Retail Stack Docs

Contract reference for the G3N Retail Stack: shared conventions (auth, pagination, errors), integration walkthroughs, and domain models, plus per-service surfaces with request/response shapes and OpenAPI links.

Use Start Here, Common, and the Stack Story to orient, then drill into each service page and MCP protocol to implement API Gateway and direct-Lambda workflows consistently.

Start Here

The fastest onboarding path: reading order, critical invariants, and direct links to walkthroughs and the common contract.

Best first stop for new integrators

Stack Story

Comprehensive, contract-only story of the stack: how services work, how they relate, and what is implemented vs pending.

Surfaces: overview across services

Super Use Cases

Three end-to-end validation scenarios with detailed use cases, test bundles, and the latest QA results.

Surfaces: contract-aligned, headless workflows

Operations & Use Cases

Full stack SOPs, objectives, operations inventory, and an expanded use-case catalog across all domains.

Surfaces: complete headless playbooks

QA

Quality assurance catalog: all tests, verbose use cases, super-usecase suites, and harness outcomes.

Surfaces: QA playbooks + outcomes

Common

Shared conventions across services: envelope, build metadata, pagination, auth/context passthrough, error patterns, walkthroughs, and best practices.

Surfaces: applies to all services

User Account Service (UAS)

Core identity, email verification, passcodes, and payment methods. Public stat via API Gateway `/uas/stat`; all other ops via direct Lambda/CLI.

Surfaces: stat API + direct actions

User Session Management (USM)

Session issuance/validation with sliding TTL, per-user caps, sweeping/archival, and list/get/close surfaces under `/usm/session/*`.

Surfaces: API Gateway `/usm/session/*`

Organization & Facility Management (OFM)

Org spine, invitations, cost centres, facilities (physical/legal/logical), zones, owners/members/teams. Custom domain base path `/ofm/*`.

Surfaces: API Gateway `/ofm/*` + direct Lambdas for invitation create/doom

Metarecord Service (MRS)

Opaque tenant-scoped object storage with inline JSON ≤256 KB and presigned uploads (gzip >256 KB, 128 MB cap), tags, TTL doom, and presigned downloads.

Surfaces: API Gateway `/mrs/*`

Product & Vendor Management (PVM)

Org-scoped product/vendor metadata with suppliers, styles/variants/OGMs, identifiers/aliases/barcodes, comments (attachments), kits, and cross-sell links.

Surfaces: API Gateway `/pvm/*`

Product Merchandising Control (PMC)

Publish-time stamping/control plane for projecting PVM variants into channel+facility-specific products with immutable revisions and an online pointer.

Surfaces: API Gateway `/pmc/*`

Inventory Control Service (ICS)

Inventory, stock movements, ownership/possession states, and warehouse operations at logical facility scope.

Surfaces: API Gateway `/ics/*`

Pricing & Promotions Management (PPM)

Temporal pricing, promotions, and price resolution by facility/channel with approval guardrails.

Surfaces: API Gateway `/ppm/*`

Sales Cycle Management (SCM)

Sales orders, fulfillment, returns, backorders, and approvals tied to PMC sellability.

Surfaces: API Gateway `/scm/*`

Procurement Cycle Management (PCM)

Procurement worksheets, POs, receiving, matching, and vendor workflows with PVM onboarding hooks.

Surfaces: API Gateway `/pcm/*`

Customer Relationship & Loyalty (CRM)

Customer master, loyalty programs, earn/redeem policies, and engagement readiness.

Surfaces: API Gateway `/crm/*`

Influencer & Referral Earnings

Attribution models, earnings, holds/clawbacks, and payout readiness.

Surfaces: API Gateway `/influencer/*`

Accounting & ERP Integration

Accounting-ready export events and downstream integration support.

Surfaces: API Gateway `/accounting/*`

Integration Plane Management (IPM)

Event catalog, webhooks, CDC feeds, and bulk import/export for downstream integrations.

Surfaces: API Gateway `/ipm/*`

Retail Bus Service (RBS)

Owner-scoped event subscriptions delivered to customer-managed SQS queues.

Surfaces: API Gateway `/rbs/*`

Utility Service (UTL)

Tenant offboarding: request, export window freeze, export, and purge with archival retention.

Surfaces: API Gateway `/utl/*` + direct Lambdas