Managing Quests for Program Memberships
Quests are structured activities within a program designed to encourage customer engagement, offer rewards, and support the brand's message.
Users can opt into quests to participate in them and earn rewards. This document describes how to use Hang's Partner API to manage quests for a program membership.
Opt Into a Quest
Opting into a quest for a specific program membership can be accomplished by making a POST
request to the /v2/program-memberships/:program_membership_id/quests/:quest_id/opt-in
endpoint.
Request Parameters
quest_id
(required): The ID of the quest the user is opting into.program_membership_id
(required): The user's program membership ID.
Example Request
Response
If successful, the API will return a 200 OK
status along with a JSON object containing information about the quest opt-in.
Retrieve All Quest Opt-Ins for a Program Membership
Fetching all quest opt-ins for a specific program membership is as straightforward as making a GET
request to the /v2/program-memberships/:program_membership_id/quests/opt-ins
endpoint.
Request Parameters
program_membership_id
(required): The ID of the program membership.
Example Request
Response
If successful, the API will return a 200 OK
status along with a JSON object containing information about all the quest opt-ins for the program membership.
Example Response
Error Handling
For both endpoints, if an error occurs, the API will provide error codes and messages as defined in the documentation. Make sure to handle these appropriately in your application.
Last updated