Adding context for entity relationships in the API

Entities

  1. StoreGroup
  2. StoreMarket
  3. ProductVariantPrice
  4. Inventory

Relationships

StoreGroup and StoreMarket

  • A StoreGroup can be assigned multiple StoreMarkets.
  • Each StoreMarket is unique to a StoreGroup.
StoreGroup 1 ----< StoreMarket

StoreMarket and ProductVariantPrice

  • A ProductVariantPrice is set to a countryCode and a storeGroupId, making it unique to a StoreMarket.
StoreMarket 1 ----< ProductVariantPrice

StoreMarket and Inventory

  • Multiple Inventories (identified by inventoryId) can be assigned to multiple StoreMarkets.
StoreMarket >----< Inventory

Entity Attributes

StoreGroup

  • id: Unique identifier
  • name: Name of the StoreGroup
  • description: Description of the StoreGroup

StoreMarket

  • countryCode: Country code
  • currencyCode: Currency code
  • storeGroupId: ID of the StoreGroup it belongs to

ProductVariantPrice

  • countryCode: Country code
  • storeGroupId: ID of the StoreGroup it belongs to
  • price: Price of the product variant

Inventory

  • inventoryId: Unique identifier for the inventory

Full Diagram

StoreGroup 1 ----< StoreMarket >----< Inventory
                        |
                        |
                        1
                        |
                        |
                        |
                        V
               ProductVariantPrice

This diagram outlines the relationships between the entities within domain management in the Brink Commerce API.

graph TD subgraph External Client A[External Client Integration] end subgraph Management API B[Store] C[Tax] D[Product] E[Price] F[Inventory] G[Discount] end subgraph Event Flow B -->|Events| K[Shopper API] K -->|Events| N[Order Management API] end subgraph Shopper API K end subgraph Front-end Client L[Front-end Client] L -->|API Calls| K end subgraph Order Management API N end subgraph Client Integration O[Client Integration] O -->|API Calls| N end subgraph External Client A -->|Data| B A -->|Data| C A -->|Data| D A -->|Data| E A -->|Data| F A -->|Data| G end subgraph Shopper API K -->|API Calls| L end subgraph Order Management API N -->|Data| O end