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: string
Accept requiredAdvertises which content types the client can understand
- Type: string
Accept - 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: string
x -pch -digest requiredSignature generated using the request path, body, and OAuth secret provided by the business. For details, see signature
- Type: string
Content - Type requiredSet this header to application/json
- Type: string
client default:"CLIENT_GOES_HERE"requiredOAuth client ID provided by the business
- Type: array object[] 1… unique!
200 Success response if the business supports subscriptions
- Type: number
active _subscribers Number of unique active subscribers of the plan
- Type: string
description Text description of the subscription plan as configured by an admin on the subscription plan. This is used to explain the offerings of the subscription plan to guests.
Note: The subscription
descriptionis returned in the language specified in the Accept-Language request header, provided the description has been translated into the relevant language in the Punchh platform. If the translation is not available, then no value is returned for this parameter in the API response. For example, if the header specifies “fr” (French), the subscription description is returned in French only if a French translation for the description is configured in the Punchh platform. - Type: string
end _time min length:1Format: date-timeDate and time (in ISO 8601 format) until which the subscription plan can be purchased by guests
- Type: string
external _plan _identifier UPC/SKU of the subscription plan as present on third-party applications of enterprise businesses and is configured on this subscription plan. This will be stored in the database, and the business can use it for analytics purposes.
- Type: string
image min length:1Cover image of a subscription plan uploaded at the time of subscription plan creation
- Type: string
miscellaneous Free-form text field that can be used by businesses to enter additional information or a JSON code snippet for greater customization in the mobile app
Note: The subscription
miscellaneousinformation is returned in the language specified in the Accept-Language request header, provided it has been translated into the relevant language in the Punchh platform. If the translation is not available, then no value is returned for this parameter in the API response. For example, if the header specifies “fr” (French), the subscription miscellaneous information is returned in French only if a French translation for the miscellaneous is configured in the Punchh platform. - Type: string
name min length:1Name of the subscription plan as provided by an admin at the time of subscription plan creation
Note: The subscription
nameis returned in the language specified in the Accept-Language request header, provided the name has been translated into the relevant language in the Punchh platform. If the translation is not available, then no value is returned for this parameter in the API response. For example, if the header specifies “fr” (French), the subscription name is returned in French only if a French translation for the name is configured in the Punchh platform. - Type: integerFormat: int64
plan _id System-generated unique ID of a subscription plan created in the Punchh platform
- Type: string
plan _image _url URL of the image that is configured for a specific subscription plan
- Type: numberFormat: float
purchase _price Cost of purchase of one unit of a subscription plan
- Type: string
signup _end _date min length:1Format: date-timeDate and time (in ISO 8601 format) after which the subscription plan cannot be purchased by guests. This is the purchase cut-off time, and a business can use it to nudge guests into purchasing a subscription.
- Type: stringFormat: date-time
signup _start _date Date and time (in ISO 8601 format) after which the subscription plan can be purchased by guests in advance. This can be used by businesses to make a plan available for purchase before it actually starts. Any subscriptions bought after this date and before the start date of the subscription plan will start from the
start_timeof the Subscription Plan. - Type: string
start _time min length:1Format: date-timeDate and time (in ISO 8601 format) from which the subscription plan can be purchased by guests
- Type: number
subscriber _capping Maximum number of unique active subscribers for a plan. If the number of active subscribers reaches this limit, fresh purchases in that plan will be stopped.
- Type: string
time _zone Time zone configured for the subscription plan (e.g., "America/Los_Angeles” )
- Type: integerFormat: int32
validity Number of days for which one unit of the subscription plan remains valid after purchase
- Type: object
400 - Type: object
errors required
- Type: object
412 - Type: object
errors
- Type: object
422 - Type: object
errors
[
{
"name": "string",
"description": "string",
"miscellaneous": "string",
"validity": 30,
"start_time": "2023-04-28T13:59:47+05:30",
"end_time": "2023-04-28T13:59:47+05:30",
"signup_start_date": "2023-04-28T13:59:47+05:30",
"signup_end_date": "2023-04-28T13:59:47+05:30",
"subscriber_capping": 400,
"external_plan_identifier": "string",
"plan_id": 10,
"purchase_price": 12.32,
"image": "test-image.png",
"time_zone": "string",
"plan_image_url": "string",
"active_subscribers": 251
}
]