Skip to content

LoyaltyMembership ​

Type: schema

Description ​

A customer's loyalty membership: tier, order totals and points, for the current program period and lifetime.

TypeScript Definition ​

typescript
LoyaltyMembership: {{
            membership_number: string;
            /** @description The member's current tier. */
            tier_id: number;
            /** @description Orders in the current program period; reset to 0 when the period renews. */
            total_orders: number;
            /** @description Orders since enrollment. Never reset. */
            lifetime_orders: number;
            /** @description Order value (`grand_total`) in the current program period; reset to 0 when the period renews. */
            total_spent: number;
            /** @description Order value since enrollment. Never reset. */
            lifetime_spent: number;
            /** @description Points earned in the current program period. */
            points_earned: number;
            /** @description Points redeemed in the current program period. */
            points_redeemed: number;
            /** @description Points available to redeem. Kept when the period renews, unless the program's `redemption_expiry_type` is `reset_date`. */
            points_balance: number;
        };
        /** LoyaltyPointActivity */
}

OpenAPI Schema ​

json
{
  "title": "LoyaltyMembership",
  "description": "A customer's loyalty membership: tier, order totals and points, for the current program period and lifetime.",
  "type": "object",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/schemas/LoyaltyMembership",
    "description": "API reference for the LoyaltyMembership schema"
  },
  "required": [
    "lifetime_orders",
    "lifetime_spent",
    "membership_number",
    "points_balance",
    "points_earned",
    "points_redeemed",
    "tier_id",
    "total_orders",
    "total_spent"
  ],
  "properties": {
    "membership_number": {
      "type": "string"
    },
    "tier_id": {
      "description": "The member's current tier.",
      "type": "integer"
    },
    "total_orders": {
      "description": "Orders in the current program period; reset to 0 when the period renews.",
      "type": "integer"
    },
    "lifetime_orders": {
      "description": "Orders since enrollment. Never reset.",
      "type": "integer"
    },
    "total_spent": {
      "description": "Order value (`grand_total`) in the current program period; reset to 0 when the period renews.",
      "type": "number"
    },
    "lifetime_spent": {
      "description": "Order value since enrollment. Never reset.",
      "type": "number"
    },
    "points_earned": {
      "description": "Points earned in the current program period.",
      "type": "integer"
    },
    "points_redeemed": {
      "description": "Points redeemed in the current program period.",
      "type": "integer"
    },
    "points_balance": {
      "description": "Points available to redeem. Kept when the period renews, unless the program's `redemption_expiry_type` is `reset_date`.",
      "type": "integer"
    }
  }
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: