Hang Program memberships API
The Program memberships API from Hang — 3 operation(s) for program memberships.
The Program memberships API from Hang — 3 operation(s) for program memberships.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/hang:hang-program-memberships-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Hang Partner API (params in:formData) Program memberships…
description: 'The Partner API allows you to request various resources that can power your loyalty program.
© Hang 2023'
version: '1.0'
x-copyright: '© Hang 2023'
servers:
- url: /partner-api
security:
- ApiKeyAuth: []
tags:
- name: Program memberships
paths:
/v2/admin/program-memberships:
get:
tags:
- Program memberships
operationId: get_v2_admin_program-memberships
summary: Get all program memberships
parameters:
- name: search_query
in: query
description: First name, last name, phone, or email of the users we want to look up.
schema:
type: string
- name: offset
in: query
description: Index to start at.
schema:
type: number
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
program_memberships:
type: array
items:
type: object
properties:
id:
type: string
description: Unique identifier for the program membership.
first_name:
type: string
description: First name of the user.
last_name:
type: string
description: Last name of the user.
email:
type: string
description: Email of the user.
phone:
type: string
description: Phone number of the user.
phone_verified:
type: boolean
description: A boolean indicating whether the user has verified their phone.
created_at:
type: number
description: When the membership was created, in epoch seconds.
stripe_customer_id:
type: string
description: ID representing the customer in stripe.
additionalProperties: false
required:
- id
- first_name
- last_name
- email
- phone
- phone_verified
- created_at
- stripe_customer_id
total_records:
type: number
additionalProperties: false
required:
- program_memberships
- total_records
description: Program Memberships represent a member of the loyalty program. Includes user data. Sorted by creation date.
/v2/admin/program-memberships/{program_membership_id}:
get:
tags:
- Program memberships
operationId: get_v2_admin_program-memberships_program_membership_id
summary: Get the program membership with the specified Id
parameters:
- name: program_membership_id
in: path
required: true
schema:
type: number
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
program_membership:
type: object
properties:
id:
type: string
description: Unique identifier for the program membership.
first_name:
type: string
description: First name of the user.
last_name:
type: string
description: Last name of the user.
email:
type: string
description: Email of the user.
phone:
type: string
description: Phone number of the user.
phone_verified:
type: boolean
description: A boolean indicating whether the user has verified their phone.
created_at:
type: number
description: When the membership was created, in epoch seconds.
stripe_customer_id:
type: string
description: ID representing the customer in stripe.
additionalProperties: false
required:
- id
- first_name
- last_name
- email
- phone
- phone_verified
- created_at
- stripe_customer_id
additionalProperties: false
required:
- program_membership
description: Program Membership represents a member of the loyalty program. Includes user data.
/v2/admin/program_memberships/{program_membership_id}:
patch:
tags:
- Program memberships
operationId: patch_v2_admin_program_memberships_program_membership_id
summary: Updates the program membership and associated user with the included fields
parameters:
- name: program_membership_id
in: path
required: true
schema:
type: number
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
program_membership:
type: object
properties:
id:
type: string
description: Unique identifier for the program membership.
first_name:
type: string
description: First name of the user.
last_name:
type: string
description: Last name of the user.
email:
type: string
description: Email of the user.
phone:
type: string
description: Phone number of the user.
phone_verified:
type: boolean
description: A boolean indicating whether the user has verified their phone.
created_at:
type: number
description: When the membership was created, in epoch seconds.
stripe_customer_id:
type: string
description: ID representing the customer in stripe.
additionalProperties: false
required:
- id
- first_name
- last_name
- email
- phone
- phone_verified
- created_at
- stripe_customer_id
additionalProperties: false
required:
- program_membership
description: ''
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
email:
type: string
description: Email address of the user.
instagram_username:
type: string
description: Instagram username of the user.
twitter_username:
type: string
description: Twitter username of the user.
tiktok_username:
type: string
description: TikTok username of the user.
required:
- email
multipart/form-data:
schema:
type: object
properties:
email:
type: string
description: Email address of the user.
instagram_username:
type: string
description: Instagram username of the user.
twitter_username:
type: string
description: Twitter username of the user.
tiktok_username:
type: string
description: TikTok username of the user.
required:
- email
/v2/admin/program-memberships/{program_membership_id}/bonus-rewards:
get:
tags:
- Program memberships
operationId: get_v2_admin_program-memberships_program_membership_id_bonus-rewards
summary: Get all bonus rewards that belong to the specified program membership
parameters:
- name: program_membership_id
in: path
required: true
description: The ID of the program membership.
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
rewards:
type: object
properties:
reward_uuid:
type: string
description: The unique ID of the reward.
image_url:
type: string
description: URL of the reward image.
name:
type: string
description: Name/title of the reward.
granted_on:
type: string
description: When the bonus reward was granted.
redeemed:
type: boolean
description: A boolean indicating if the bonus reward has been redeemed.
additionalProperties: false
required:
- reward_uuid
- image_url
- name
- granted_on
- redeemed
additionalProperties: false
required:
- rewards
description: ''
/v2/admin/program-memberships/{program_membership_id}/program-and-tier-rewards:
get:
tags:
- Program memberships
operationId: get_v2_admin_program-memberships_program_membership_id_program-and-tier-rewards
summary: Get all option rewards that belong to the specified program membership
parameters:
- name: program_membership_id
in: path
required: true
description: The ID of the program membership.
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
rewards:
type: object
properties:
reward_uuid:
type: string
description: The unique ID of the reward.
type:
type: string
enum:
- tier
- program
description: String defining if the reward is sourced from a program or a tier.
image_url:
type: string
description: URL of the reward image.
name:
type: string
description: Name/title of the reward.
limit:
type: number
description: Maximum amount of times a user can receive the reward.
interval:
type: number
description: How often the user can redeem the reward in days, if 0 then unlimited.
last_redeemed_at:
type: string
description: When the reward was last redeemed.
additionalProperties: false
required:
- reward_uuid
- type
- image_url
- name
- limit
- interval
- last_redeemed_at
additionalProperties: false
required:
- rewards
description: ''
/v2/admin/program-memberships/{program_membership_id}/activity-history:
get:
tags:
- Program memberships
operationId: get_v2_admin_program-memberships_program_membership_id_activity-history
summary: Gets the activity history for the program membership
parameters:
- name: program_membership_id
in: path
required: true
description: The ID of the program membership.
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
activity_aggregates:
type: object
properties:
value:
type: number
description: The value of the activity.
activity_type:
type: string
description: The type of activity.
timestamp:
type: number
additionalProperties: false
required:
- value
- activity_type
- timestamp
additionalProperties: false
required:
- activity_aggregates
description: ''
/v2/admin/program-memberships/{program_membership_id}/quest-activities:
get:
tags:
- Program memberships
operationId: get_v2_admin_program-memberships_program_membership_id_quest-activities
summary: Gets the quest history for the program membership
parameters:
- name: program_membership_id
in: path
required: true
description: The ID of the program membership.
schema:
type: string
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
activity_aggregates:
type: object
properties:
value:
type: number
description: The value of the activity.
activity_type:
type: string
description: The type of activity.
timestamp:
type: number
additionalProperties: false
required:
- value
- activity_type
- timestamp
additionalProperties: false
required:
- activity_aggregates
description: ''
components:
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key
x-provenance:
method: harvested
publisher: Hang
source: https://firebasestorage.googleapis.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FnDjUJ7LXq2gMv9rmEsrI%2Fimports%2F9Jq6a7ptZ1zZpcbGXBNq%2Fschema_swagger_form_data.json?alt=media&token=f20a8d6c-a561-4ac2-8ede-0d9b6f694b19
note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
stamped by stamp-openapi-provenance.py (roadmap#793)