Fetch Active Purchasable Subscription Plans
This API allows online ordering vendors to get a list of all subscription plans that are available for purchase.
- Type: stringAcceptrequired
Advertises which content types the client can understand
- 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: stringContent
- Type requiredSet this header to application/json
- Type: stringclientrequired
OAuth client ID provided by the business
- application/json
- application/json
- application/json
- application/json
curl https://SERVER_NAME_GOES_HERE.punchh.com/api/auth/subscriptions \
--header 'Accept: application/json' \
--header 'Accept-Language: en' \
--header 'x-pch-digest: ' \
--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": "2023-05-28T13:59:47+05:30",
"end_time": "2023-09-28T13:59:47+05:30",
"signup_start_date": "2023-05-28T13:59:47+05:30",
"signup_end_date": "2023-09-28T13:59:47+05:30",
"subscriber_capping": 500,
"external_plan_identifier": null,
"plan_id": 10,
"purchase_price": 100,
"image": "test-image.png",
"time_zone": "Asia/Kolkata",
"plan_image_url": "PLAN_IMAGE_URL_GOES_HERE",
"active_subscribers": 250
}
]