Multi-Tenancy

The RSA Platform uses a dedicated database per retailer model. Every request is automatically routed to the correct database based on the tenant_slug claim in your JWT.

Key Identifiers

IdentifierTypeDescription
tenant_idUUIDPlatform-level tenant (e.g., a retail chain company)
tenant_slugstringURL-safe slug, e.g. cardenas. Routes DB connections.
retailer_idUUIDA specific retailer within a tenant. Empty for platform users.

One tenant can have multiple retailers (e.g., different store banners).

Tenant Lifecycle States

StateDescriptionEffect on API
TrialNew tenant, limited featuresNormal access, feature flags may be limited
ActiveFully provisioned and payingFull access
GracePeriodPayment overdueWarning header in responses
SuspendedAccess blocked402 Payment Required on all requests
ChurnedPermanently deactivated403 Forbidden on all requests

If you receive a 402 Payment Required response, the tenant has been suspended. Contact the platform administrator.

Retailer Provisioning

When a new retailer is added, the Platform API asynchronously:

  1. Creates a dedicated SQL Server database
  2. Runs all EF Core migrations
  3. Seeds initial configuration

This is an async operation. Poll the status:

GET/platform/api/v1/retailers/{slug}/status

See Tenant Onboarding for the full provisioning guide.

Database Isolation

Each retailer database contains schemas for: retail, offer, loyalty, transaction, campaign, consent, notification, vendor, reporting, audit, feature.

  • Your JWT's tenant_slug determines which database connection is used
  • EF Core query filters apply an additional tenant guard as defense-in-depth
  • There is no cross-retailer data access — even platform-level queries use aggregated views

Impact on Your Integration

  • Include retailer context in your token by requesting the appropriate scopes
  • The tenant_slug is resolved automatically from your JWT — you do not need to pass it as a header
  • Multi-retailer integrations require separate tokens or separate API key registrations per retailer