Product

The type definition of LiSA product:

type Product = {
  /** The LiSA internal product identifier. */
  id: UUID;
  /** A map-like structure of media assets. */
  assets?: Record<string, Asset>;
  /** The product's brand name. */
  brand?: LocalizedString;
  /** The product description. */
  description?: LocalizedString;
  /** The product's origin information, adopted from the customer's ecom system. */
  origin?: {
    /** The product identifier, as defined in the customer's ecom system. */
    id: string;
    /** The time of the most recent data synchronization. */
    lastSyncedAt: DateTime;
  };
  /** The product price information. */
  price?: Price;
  /** The store configuration in a multi-store environment. */
  stores?: StoreConfig[];
  /** The product title. */
  title?: LocalizedString;
  /** The product URL. */
  url?: LocalizedString;
  /** A list of product variants. */
  variants?: ProductVariant[];
};

ProductVariant

type ProductVariant = {
  /** A map-like structure of media assets. */
  assets?: Record<string, Asset>;
  /** The product variant's name. */
  name: string;
  /** The product variant's price information. */
  price?: Price;
  /** The product variant's identifier, typically its SKU */
  reference?: string;
  /** The product variant's store configuration in a multi-store environment. */
  stores?: StoreConfig[];
  /** The product variant's title. */
  title?: LocalizedString;
  /** The product variant's URL. */
  url?: LocalizedString;
  /** A list of production variations. */
  variations?: ProductVariation[];
};

ProductVariation

type ProductVariation = {
  /** The product variation type. */
  type: 'color' | 'size' | string;
  /** The localized product variation value. */
  value: LocalizedString;
};

Price

type Price = {
  /** Currency information. */
  currency: {
    name?: string;
    symbol: string;
  };
  /** The discounted price value. */
  discounted?: { value: number };
  /** The regular price value. */
  original: { value: number };
  /** Unit pricing information. */
  unitPricing?: {
    baseUnit: string;
    baseValue: number;
    measureUnit: string;
    measureValue: number;
  };
};

StoreConfig

type StoreConfig = {
  /** The store identifier. */
  store: string;
  /** The product's or product variant's price infirmation for a particular store. */
  price?: Price;
  /** The product's or product variant's URL for a particular store. */
  url?: LocalizedString;
};

Last updated