Fetch Active Purchasable Subscription Plans
This API returns all of the active subscription plans that are purchasable using the mobile app and have their end time in the future.
- Type: stringAccept
- Language Preferred language. Punchh supports multiple languages for the subscription plan
name,description, andmiscellaneousparameters in the API response as per the locale specified in the Accept-Language request header. Possible values: es for Spanish, fr for French, fr-ca for French-Canada, en-CY for English-Cyprus, ro for Romania, es-US for Spanish United States, etc. The locales for a business are configured in the Punchh platform under Administration > Business Profile > Address > Alternate Languages. Administrators have to configure Name, Description, and Miscellaneous fields in the relevant language(s) on the subscription plan in the Punchh platform under Wallet and Passes > Subscription Plans. If these fields are not configured in Punchh in the language specified in the Accept-Language request header, then the API response will include the subscription planname,description, andmiscellaneousparameters with empty values. - Type: stringx
-pch -digest requiredSignature generated using the request path, body, and OAuth secret provided by the business. For details, see signature.
- Type: stringUser
- Agent requiredUsed to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.
- Type: stringAcceptrequired
Advertises which content types the client can understand
- Type: stringclient
OAuth client ID provided by the business
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/mobile/subscriptions \
--header 'Accept-Language: en' \
--header 'x-pch-digest: ' \
--header 'User-Agent: AppName/AppVersion/BuildNumber (OS; Model; MANUFACTURER; MODEL; OS Version)' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"client": "CLIENT_GOES_HERE"
}'
[
{
"name": "SUBSCRIPTION_NAME_GOES_HERE",
"description": "DESCRIPTION_GOES_HERE",
"miscellaneous": "MISC_INFORMATION_GOES_HERE",
"validity": 30,
"start_time": "2021-04-28T13:59:47+05:30",
"end_time": "2021-04-28T13:59:47+05:30",
"signup_start_date": "2023-05-28T13:59:47+05:30",
"signup_end_date": "2021-04-28T13:59:47+05:30",
"external_plan_identifier": null,
"plan_id": 10,
"plan_image_url": "PLAN_IMAGE_URL_GOES_HERE",
"purchase_price": 12.32,
"image": "test-image.png",
"subscriber_capping": 500,
"active_subscribers": 251,
"timezone": "Asia/Kolkata",
"auto_renewing": true
}
]