get
https://api.froogal.ai/loyalty/points/earning/product
Retrieves the loyalty points a user can earn for purchasing a product. It retrieves the associated merchant information. Optionally, it attempts to fetch user information based on their phone number. Next, it calculates the loyalty points to be earned for the product using the provided rate, merchant details, and user information, if available. Finally, it returns the calculated points in a success response.
It takes into account the merchant's loyalty program configuration, user-specific loyalty cards, and default loyalty card settings. The points calculation considers various factors such as accumulation rates, rounding methods, and user-specific card rates, providing a precise estimation of loyalty points to be earned.
