# Mage Loyalty Documentation ## Docs - [Authentication](https://developers.mageloyalty.com/api-reference/authentication.md): Authenticate requests to the Mage Loyalty API using API keys. - [Adjust points](https://developers.mageloyalty.com/api-reference/customers/adjust-points.md): Manually add or deduct points for a customer. - [Enroll a customer](https://developers.mageloyalty.com/api-reference/customers/enroll.md): Enroll a customer in the loyalty program. - [Retrieve a customer](https://developers.mageloyalty.com/api-reference/customers/get.md): Retrieve a single customer by Shopify ID or email. - [Get anniversary](https://developers.mageloyalty.com/api-reference/customers/get-anniversary.md): Get a customer's loyalty anniversary date. - [Get birthday](https://developers.mageloyalty.com/api-reference/customers/get-birthday.md): Get a customer's date of birth. - [Get earning history entry](https://developers.mageloyalty.com/api-reference/customers/get-earning-history.md): Get a single earning history entry. - [Get reward history entry](https://developers.mageloyalty.com/api-reference/customers/get-reward-history.md): Get a single reward redemption entry. - [List customers](https://developers.mageloyalty.com/api-reference/customers/list.md): List all loyalty program customers. - [List earning history](https://developers.mageloyalty.com/api-reference/customers/list-earning-history.md): List a customer's point earning history. - [List reward history](https://developers.mageloyalty.com/api-reference/customers/list-reward-history.md): List a customer's reward redemption history. - [Customer object](https://developers.mageloyalty.com/api-reference/customers/object.md): The customer object represents a loyalty program member. - [Update a customer](https://developers.mageloyalty.com/api-reference/customers/update.md): Update editable fields on a customer. - [Award an earning rule](https://developers.mageloyalty.com/api-reference/earning-rules/award.md): Award points to a customer for completing an earning rule. - [List earning rules](https://developers.mageloyalty.com/api-reference/earning-rules/list.md): List all earning rules for the shop. - [Earning rule object](https://developers.mageloyalty.com/api-reference/earning-rules/object.md): The earning rule object defines how customers earn points. - [Errors](https://developers.mageloyalty.com/api-reference/errors.md): Error response codes and format used by the Mage Loyalty API. - [Introduction](https://developers.mageloyalty.com/api-reference/introduction.md): The Mage Loyalty REST API lets you programmatically manage your loyalty program. - [Basics](https://developers.mageloyalty.com/api-reference/metafields/basics.md): Learn the fundamentals of accessing Mage Loyalty metafields in Liquid. - [Customer Object](https://developers.mageloyalty.com/api-reference/metafields/customer-object.md): Reference for the customer.metafields.mage.loyalty JSON object. - [Getting Started with Mage Metafields](https://developers.mageloyalty.com/api-reference/metafields/getting-started.md): Access your loyalty program data directly in Shopify Liquid templates using metafields. - [Shop Object](https://developers.mageloyalty.com/api-reference/metafields/shop-object.md): Reference for the shop.metafields.mage.loyalty JSON object. - [VIP Tiers](https://developers.mageloyalty.com/api-reference/metafields/vip-tiers.md): Display VIP tier information, progress bars, and tier-specific content using metafields. - [Pagination, Sorting & Filtering](https://developers.mageloyalty.com/api-reference/pagination.md): How to paginate, sort, and filter results from list endpoints. - [Rate Limits](https://developers.mageloyalty.com/api-reference/rate-limits.md): Rate limiting policy for the Mage Loyalty API. - [List rewards](https://developers.mageloyalty.com/api-reference/rewards/list.md): List all rewards for the shop. - [Reward object](https://developers.mageloyalty.com/api-reference/rewards/object.md): The reward object represents a redeemable reward in the loyalty program. - [Purchase a reward](https://developers.mageloyalty.com/api-reference/rewards/purchase.md): Redeem a reward for a customer, deducting points and generating a discount code. - [Retrieve a VIP tier](https://developers.mageloyalty.com/api-reference/vip-tiers/get.md): Fetch a single VIP tier by ID. - [List VIP tiers](https://developers.mageloyalty.com/api-reference/vip-tiers/list.md): List all VIP tiers for the shop. - [VIP tier object](https://developers.mageloyalty.com/api-reference/vip-tiers/object.md): The VIP tier object represents a loyalty tier level. - [customer.tier_downgrade](https://developers.mageloyalty.com/api-reference/webhooks/customer-tier-downgrade.md): Fired when a customer is moved down to a lower VIP tier. - [customer.tier_upgrade](https://developers.mageloyalty.com/api-reference/webhooks/customer-tier-upgrade.md): Fired when a customer is promoted to a higher VIP tier. - [Getting Started with Webhooks](https://developers.mageloyalty.com/api-reference/webhooks/getting-started.md): Receive real-time HTTP notifications when loyalty events happen in your store. - [points.earned](https://developers.mageloyalty.com/api-reference/webhooks/points-earned.md): Fired when a customer earns points through any channel — purchases, earning rules, manual adjustments, or referrals. - [points.redeemed](https://developers.mageloyalty.com/api-reference/webhooks/points-redeemed.md): Fired when a customer redeems points for a reward, generating a discount code. - [Verifying Webhook Signatures](https://developers.mageloyalty.com/api-reference/webhooks/verifying-signatures.md): Confirm that incoming webhook requests are genuinely from Mage Loyalty and haven't been tampered with. - [Introduction](https://developers.mageloyalty.com/introduction.md): Welcome to the Mage Loyalty documentation - [getCustomerDetails](https://developers.mageloyalty.com/js-sdk/customers/get-customer-details.md): Retrieve details for the logged-in customer, including points, VIP tier, and earning history. - [getCustomerVipTier](https://developers.mageloyalty.com/js-sdk/customers/get-customer-vip-tier.md): Retrieve the current VIP tier for the logged-in customer. - [updateCustomerDob](https://developers.mageloyalty.com/js-sdk/customers/update-customer-dob.md): Update the date of birth for the logged-in customer. - [getEarningRules](https://developers.mageloyalty.com/js-sdk/earning-rules/get-earning-rules.md): List all active earning rules for the shop. - [Introduction](https://developers.mageloyalty.com/js-sdk/introduction.md): The Mage JavaScript SDK gives you client-side access to your loyalty program from any Shopify storefront. - [getCustomerReferralStats](https://developers.mageloyalty.com/js-sdk/referrals/get-customer-referral-stats.md): Get referral statistics for the logged-in customer. - [getReferralLink](https://developers.mageloyalty.com/js-sdk/referrals/get-referral-link.md): Get the customer's referral link and sharing options. - [getCustomerRewards](https://developers.mageloyalty.com/js-sdk/rewards/get-customer-rewards.md): List the logged-in customer's redeemed rewards and discount codes. - [getShopRewards](https://developers.mageloyalty.com/js-sdk/rewards/get-shop-rewards.md): List all available rewards for the shop. - [redeemReward](https://developers.mageloyalty.com/js-sdk/rewards/redeem-reward.md): Redeem a reward for the logged-in customer. - [closeSidebar](https://developers.mageloyalty.com/js-sdk/sidebar/close-sidebar.md): Programmatically close the Mage loyalty sidebar. - [openSidebar](https://developers.mageloyalty.com/js-sdk/sidebar/open-sidebar.md): Programmatically open the Mage loyalty sidebar. - [TypeScript Support](https://developers.mageloyalty.com/js-sdk/typescript.md): Add type definitions for the Mage SDK in your TypeScript project. - [getShopVipTiers](https://developers.mageloyalty.com/js-sdk/vip-tiers/get-shop-vip-tiers.md): List all VIP tiers configured for the shop.