ConceptsData model

Data model

The entities you work with through the API, and how they relate. This is the conceptual model — the API Reference has the exact field shapes.

Everything belongs to exactly one tenant. Every entity below is owned by a single store (tenant) and is invisible to every other tenant. You never pass a tenant id — it’s derived server-side from your API key (see Authentication).

The entities

EntityWhat it is
TenantA store. The isolation boundary that owns everything below.
ProductA catalog item — name, description, SEO, a metadata JSON field for category-specific attributes.
VariantA specific purchasable version of a product (size, color, SKU, price).
ImageA product image (ordered).
ReviewA customer review of a product, with votes.
CustomerA shopper account, scoped to this tenant. Passwordless (magic-link).
CartA shopper’s in-progress cart and its line items; can hold promo / gift-card.
OrderA completed purchase — line items, totals, status, fulfillment.
RefundA full or partial refund recorded against an order.
SubscriptionA recurring purchase, backed by Stripe.
InventoryStock for a variant. Externally you see a coarse status, not raw counts.
ContentPublished articles, recipes, and announcements.
LeadA captured email (e.g. newsletter signup).
Return (RMA)A return request and its lifecycle.
Wholesale inquiryA B2B / trade-account inquiry.

How they relate

Tenant ─┬─ Product ─┬─ Variant ─── Inventory
        │           ├─ Image
        │           └─ Review ─── (votes)

        ├─ Customer ─┬─ Cart ─── (cart items → Variant)
        │            ├─ Order ─┬─ Order item ─── Variant
        │            │         └─ Refund
        │            └─ Subscription

        ├─ Content
        ├─ Lead
        ├─ Return (RMA) ─── Order
        └─ Wholesale inquiry
  • A Product has many Variants, Images, and Reviews. The price and SKU live on the Variant; a single-variant product is the common case.
  • An Order has many Order items, each referencing the Variant purchased; an order may have one or more Refunds.
  • A Customer owns their Carts, Orders, and Subscriptions within this tenant. The same email at another tenant is a completely separate, unrelated customer.
  • Inventory tracks stock per Variant. Through the API you get a coarse status_key (in_stock / low_stock / out_of_stock) rather than exact counts.

Conventions

  • IDs are UUIDs.
  • Money is an integer in the smallest currency unit plus a currency code — e.g. { "amount": 4200, "currency": "usd" } is $42.00.
  • metadata (on products and some other entities) is a free-form JSON object for attributes Orchard doesn’t model natively — the extension point for category-specific fields without a schema change.
  • Timestamps are ISO-8601 UTC.

Where to go next

  • API Reference — exact field shapes for each entity.
  • Architecture — how these are served and isolated.
  • Webhooks — react to changes on orders and subscriptions.