Update Traits on a Program Membership
Traits are specific attributes or characteristics linked to a program membership. Using Hang's Partner API, you can seamlessly add or remove traits from a specified program membership
How Traits Work in Hang
A trait represents a specific attribute linked to a program membership. For example, it might represent levels of membership, access privileges, or other unique features tied to a user's membership. Using the provided endpoints, you can add or remove these traits, thereby enhancing or customizing the membership's properties.
Adding New Traits
To add a new trait to a program membership, make a POST
request to the /v2/program-memberships/:program_membership_id/add-trait
endpoint.
Request Parameters
program_membership_id
(required): The ID of the user's program membership.trait_name
(required): The name of the trait to add.trait_value
(required): The value corresponding to the trait.
Example Request
Response
If successful, the API will return a 200 OK
status along with the updated list of traits for that program membership.
Example Response
Removing Traits
To remove a trait from a program membership, make a POST
request to the /v2/program-memberships/:program_membership_id/remove-trait
endpoint.
Request Parameters
program_membership_id
(required): The ID of the user's program membership.trait_name
(required): The name of the trait to remove.trait_value
(required): The value of the trait to be removed.
Example Request
Response
If successful, the API will return a 200 OK
status along with the updated list of traits for that program membership.
Example Response
Last updated