Hang Promotions API
The promotions API from Hang — 2 operation(s) for promotions.
The promotions API from Hang — 2 operation(s) for promotions.
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-promotions-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) Promotions API
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: Promotions
paths:
/v2/admin/promotions:
get:
tags:
- Promotions
operationId: get_v2_admin_promotions
summary: Endpoint to return all promoted rewards for a program using the current JWT
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
promotions:
type: array
items:
type: string
additionalProperties: false
required:
- promotions
description: ''
post:
tags:
- Promotions
operationId: post_v2_admin_promotions
summary: Endpoint to create a promotion
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
promotion:
type: object
properties:
id:
type: string
description: Unique identifier for promoted reward object.
title:
type: string
description: Full title for promoted reward.
description:
type: string
description: Description for promoted reward.
reward_id:
type: number
description: Unique identifier of loyalty reward to be promoted.
start_date:
type: number
description: Epoch start date of promotion.
end_date:
type: number
description: Epoch end date of promotion.
additionalProperties: false
required:
- id
- title
- description
- reward_id
- start_date
- end_date
additionalProperties: false
required:
- promotion
description: ''
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
start_date:
type: number
description: When the promotion becomes active, in epoch seconds.
title:
type: string
description: Title of the promotion.
description:
type: string
description: Description of the reward.
end_date:
type: number
description: When the promotion is no longer active, in epoch seconds.
image_url:
type: string
description: URL of the promotion image.
required:
- start_date
- title
multipart/form-data:
schema:
type: object
properties:
start_date:
type: number
description: When the promotion becomes active, in epoch seconds.
title:
type: string
description: Title of the promotion.
description:
type: string
description: Description of the reward.
end_date:
type: number
description: When the promotion is no longer active, in epoch seconds.
image_url:
type: string
description: URL of the promotion image.
required:
- start_date
- title
/v2/admin/promotions/{promotion_id}:
patch:
tags:
- Promotions
operationId: patch_v2_admin_promotions_promotion_id
summary: Endpoint to update a promotion
parameters:
- name: promotion_id
in: path
required: true
schema:
type: number
responses:
'200':
description: Successful response
content:
application/json:
schema:
type: object
properties:
promotion:
type: object
properties:
id:
type: string
description: Unique identifier for promoted reward object.
title:
type: string
description: Full title for promoted reward.
description:
type: string
description: Description for promoted reward.
reward_id:
type: number
description: Unique identifier of loyalty reward to be promoted.
start_date:
type: number
description: Epoch start date of promotion.
end_date:
type: number
description: Epoch end date of promotion.
additionalProperties: false
required:
- id
- title
- description
- reward_id
- start_date
- end_date
additionalProperties: false
required:
- promotion
description: ''
requestBody:
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
start_date:
type: number
description: When the promotion becomes active, in epoch seconds.
title:
type: string
description: Title of the promotion.
description:
type: string
description: Description of the reward.
end_date:
type: number
description: When the promotion is no longer active, in epoch seconds.
image_url:
type: string
description: URL of the promotion image.
required:
- start_date
- title
multipart/form-data:
schema:
type: object
properties:
start_date:
type: number
description: When the promotion becomes active, in epoch seconds.
title:
type: string
description: Title of the promotion.
description:
type: string
description: Description of the reward.
end_date:
type: number
description: When the promotion is no longer active, in epoch seconds.
image_url:
type: string
description: URL of the promotion image.
required:
- start_date
- title
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)