get
https://api.froogal.ai/loyalty/points/earning/cart
Calculates loyalty points for an entire shopping cart. It retrieves the associated merchant information and extracts the list of items from the request. The function determines the default loyalty rate for the merchant, if available, and also attempts to identify the user based on their phone number. Tt calculates the total loyalty points to be earned for the entire cart considering the total amount spent, the merchant details, and user information, if available. The function then iterates over each item in the cart, computing the loyalty points to be earned for each item individually. Finally, it returns a success response containing an array of items with their respective loyalty points and the total loyalty points for the entire cart.
