> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # DisablePointsExpiration # Package: loyaltyProgramManagement # Namespace: LoyaltyPrograms # Method link: https://dev.wix.com/docs/api-reference/crm/loyalty-program/loyalty-program-management/program/disable-points-expiration.md ## Permission Scopes: Manage Loyalty: SCOPE.DC-LOYALTY.MANAGE-LOYALTY ## Introduction Updates the `pointsExpiration` status to `"DISABLED"`. --- ## REST API ### Schema ``` Method: disablePointsExpiration Description: Updates the `pointsExpiration` status to `"DISABLED"`. URL: https://www.wixapis.com/v1/program/points-expiration/disable Method: POST Return type: DisablePointsExpirationResponse - name: loyaltyProgram | type: LoyaltyProgram | description: Loyalty program with disabled points expiration feature. - name: name | type: string | description: Program name. - name: pointDefinition | type: PointDefinition | description: Details about the program's collectible unit. - name: customName | type: string | description: Display name for the program's collectible unit. It's recommended to use a plural, for example `"Stars"`. In contrast to a custom name, the default `"Points"` name is translated and adjusted to singular based on circumstances. Default: `"Points"`. - name: icon | type: Image | description: Details about the points icon. - name: id | type: string | description: WixMedia image GUID. - name: url | type: string | description: Image URL. - name: height | type: integer | description: Original image height. - name: width | type: integer | description: Original image width. - name: altText | type: string | description: Image alt text. - name: filename | type: string | description: Image filename. - name: status | type: ProgramStatus | description: Program status. Customers can only earn or redeem points while the program is `"ACTIVE"`. Default: `"DRAFT"` - enum: - UNKNOWN: Unknown program status. - DRAFT: Program is in draft mode. Customers can't earn or redeem points. - ACTIVE: Program is active. Customers can earn and redeem points. - PAUSED: Program is paused. Customers can't earn or redeem points while the program is paused. Set the program to `"ACTIVE"` to resume earning and redeeming points. - name: createdDate | type: string | description: Date and time the program was created. - name: updatedDate | type: string | description: Date and time the program was updated. - name: pointsExpiration | type: PointsExpiration | description: Configuration for the points expiration feature. - name: status | type: Status | description: Status of the points expiration feature. - enum: - DISABLED: Points expiration feature is disabled. - ENABLED: Points expiration feature is enabled. - name: monthsOfInactivity | type: integer | description: How many months a member should be inactive to lose the collected points. - name: expiringPointsPercentage | type: integer | description: Percentage of points that a member loses after being inactive. - name: premiumFeatures | type: PremiumFeatures | description: Information about the available program premium features. - name: loyaltyProgram | type: boolean | description: Whether there are any loyalty program premium features. - name: tiers | type: boolean | description: Whether this loyalty program includes tiers. - name: pointsExpiration | type: boolean | description: Whether this loyalty program includes point expiration. ``` ### Examples ### Enable points expiration ```curl curl -X POST \ 'https://www.wixapis.com/loyalty-programs/v1/program/points-expiration/disable' \ -H 'Authorization: ' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.loyaltyProgramManagement.LoyaltyPrograms.disablePointsExpiration() Description: Updates the `pointsExpiration` status to `"DISABLED"`. Return type: PROMISE - name: loyaltyProgram | type: LoyaltyProgram | description: Loyalty program with disabled points expiration feature. - name: name | type: string | description: Program name. - name: pointDefinition | type: PointDefinition | description: Details about the program's collectible unit. - name: customName | type: string | description: Display name for the program's collectible unit. It's recommended to use a plural, for example `"Stars"`. In contrast to a custom name, the default `"Points"` name is translated and adjusted to singular based on circumstances. Default: `"Points"`. - name: icon | type: string | description: Details about the points icon. - name: status | type: ProgramStatus | description: Program status. Customers can only earn or redeem points while the program is `"ACTIVE"`. Default: `"DRAFT"` - enum: - UNKNOWN: Unknown program status. - DRAFT: Program is in draft mode. Customers can't earn or redeem points. - ACTIVE: Program is active. Customers can earn and redeem points. - PAUSED: Program is paused. Customers can't earn or redeem points while the program is paused. Set the program to `"ACTIVE"` to resume earning and redeeming points. - name: _createdDate | type: Date | description: Date and time the program was created. - name: _updatedDate | type: Date | description: Date and time the program was updated. - name: pointsExpiration | type: PointsExpiration | description: Configuration for the points expiration feature. - name: status | type: Status | description: Status of the points expiration feature. - enum: - DISABLED: Points expiration feature is disabled. - ENABLED: Points expiration feature is enabled. - name: monthsOfInactivity | type: integer | description: How many months a member should be inactive to lose the collected points. - name: expiringPointsPercentage | type: integer | description: Percentage of points that a member loses after being inactive. - name: premiumFeatures | type: PremiumFeatures | description: Information about the available program premium features. - name: loyaltyProgram | type: boolean | description: Whether there are any loyalty program premium features. - name: tiers | type: boolean | description: Whether this loyalty program includes tiers. - name: pointsExpiration | type: boolean | description: Whether this loyalty program includes point expiration. ``` ### Examples ### Disable points expiration ```javascript import { programs } from "@wix/loyalty"; async function disablePointsExpiration() { try { const result = await programs.disablePointsExpiration(); return result; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * * { * "loyaltyProgram": { * "_createdDate": "2024-06-05T20:31:49.155Z", * "_updatedDate": "2024-06-06T10:36:24.525Z", * "name": "Loyalty", * "pointDefinition": { * "icon": "shapes/8de7ee72dcd944caa60f9e226d900f1d.svg" * }, * "pointsExpiration": { * "status": "DISABLED", * "monthsOfInactivity": 3, * "expiringPointsPercentage": 100 * }, * "premiumFeatures": { * "loyaltyProgram": true, * "tiers": true, * "pointsExpiration": true * }, * "status": "ACTIVE" * } * } */ ``` ### Disable points expiration (with elevated permissions) ```javascript import { programs } from "@wix/loyalty"; import { auth } from "@wix/essentials"; const elevatedDisablePointsExpiration = auth.elevate(programs.disablePointsExpiration); async function disablePointsExpiration() { try { const result = await elevatedDisablePointsExpiration(); return result; } catch (error) { console.error(error); // Handle the error } } /* Promise resolves to: * * { * "loyaltyProgram": { * "_createdDate": "2024-06-05T20:31:49.155Z", * "_updatedDate": "2024-06-06T10:36:24.525Z", * "name": "Loyalty", * "pointDefinition": { * "icon": "shapes/8de7ee72dcd944caa60f9e226d900f1d.svg" * }, * "pointsExpiration": { * "status": "DISABLED", * "monthsOfInactivity": 3, * "expiringPointsPercentage": 100 * }, * "premiumFeatures": { * "loyaltyProgram": true, * "tiers": true, * "pointsExpiration": true * }, * "status": "ACTIVE" * } * } */ ``` ### disablePointsExpiration (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { programs } from '@wix/loyalty'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { programs }, // Include the auth strategy and host as relevant }); async function disablePointsExpiration() { const response = await myWixClient.programs.disablePointsExpiration(); }; ``` ---