Secondary Loyalty Update

Handles the updating of secondary loyalty information. It retrieves the user associated with the request and verifies their existence. Next, it fetches the secondary loyalty record based on the provided loyalty ID, user ID, and card number. If found, it updates the secondary loyalty card number, expiry date, and status with the provided values or defaults to the existing values. Finally, it saves the changes and returns a success message if the update is successful, or an error message otherwise.

Language
Credentials
Header
Click Try It! to start a request and see the response here!