Skip to content

LoyaltyProgram ​

Type: schema

TypeScript Definition ​

typescript
LoyaltyProgram: {{
            id: $Read<string>;
            name: string;
            /** @enum {unknown} */
            renewal_type: "yearly" | "never" | "custom";
            /** @enum {unknown} */
            points_earning_type: "dynamic" | "fixed";
            /** @enum {unknown} */
            tier_upgrade_criteria: "total-spent" | "total-orders" | "custom";
            point_value: number;
            redemption_inactivity_days: number | null;
            /** @enum {unknown} */
            redemption_expiry_type: "never" | "inactivity" | "reset_date";
            /** Format: date-time */
            starts_at: string;
            /** Format: date-time */
            date_of_reset: string | null;
            /** Format: date-time */
            pause_starts_at: string | null;
            /** Format: date-time */
            pause_ends_at: string | null;
            status: $Read<components["schemas"]["LoyaltyProgramStatus"]>;
            tiers: components["schemas"]["LoyaltyTier"][];
            /** Format: date-time */
            created_at: $Read<string>;
            /** Format: date-time */
            modified_at: $Read<string>;
        };
        /**
         * LoyaltyProgramStatus
         * @description The operational status of the loyalty program.
         * @enum {string}
         */
}

Component References ​

ReferenceResolves To
components["schemas"]["LoyaltyProgramStatus"]LoyaltyProgramStatus
components["schemas"]["LoyaltyTier"]LoyaltyTier

OpenAPI Schema ​

json
{
  "title": "LoyaltyProgram",
  "type": "object",
  "externalDocs": {
    "url": "https://llm-docs.commercengine.io/storefront/schemas/LoyaltyProgram",
    "description": "API reference for the LoyaltyProgram schema"
  },
  "required": [
    "id",
    "name",
    "renewal_type",
    "points_earning_type",
    "tier_upgrade_criteria",
    "point_value",
    "redemption_inactivity_days",
    "redemption_expiry_type",
    "starts_at",
    "date_of_reset",
    "pause_starts_at",
    "pause_ends_at",
    "status",
    "tiers",
    "created_at",
    "modified_at"
  ],
  "properties": {
    "id": {
      "type": "string",
      "readOnly": true
    },
    "name": {
      "type": "string"
    },
    "renewal_type": {
      "enum": [
        "yearly",
        "never",
        "custom"
      ]
    },
    "points_earning_type": {
      "enum": [
        "dynamic",
        "fixed"
      ]
    },
    "tier_upgrade_criteria": {
      "enum": [
        "total-spent",
        "total-orders",
        "custom"
      ]
    },
    "point_value": {
      "type": "number"
    },
    "redemption_inactivity_days": {
      "type": [
        "integer",
        "null"
      ]
    },
    "redemption_expiry_type": {
      "enum": [
        "never",
        "inactivity",
        "reset_date"
      ]
    },
    "starts_at": {
      "type": "string",
      "format": "date-time"
    },
    "date_of_reset": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "pause_starts_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "pause_ends_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "status": {
      "$ref": "#/components/schemas/LoyaltyProgramStatus",
      "readOnly": true
    },
    "tiers": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/LoyaltyTier"
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    },
    "modified_at": {
      "type": "string",
      "format": "date-time",
      "readOnly": true
    }
  },
  "x-tags": [
    "Customers"
  ]
}

Auto-generated from OpenAPI spec and TypeScript definitions

Last updated: