Fetch Active Purchasable Subscription Plans

This API allows online ordering vendors to get a list of all subscription plans that are available for purchase.

Headers
  • Accept
    Type: string
    required

    Advertises which content types the client can understand

  • Accept-Language
    Type: string

    Preferred language. Punchh supports multiple languages for the subscription plan name, description, and miscellaneous parameters 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 plan name, description, and miscellaneous parameters with empty values.

  • x-pch-digest
    Type: string
    required

    Signature generated using the request path, body, and OAuth secret provided by the business. For details, see signature

  • Content-Type
    Type: string
    required

    Set this header to application/json

Body
application/json
  • client
    Type: string
    required

    OAuth client ID provided by the business

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/auth/subscriptions
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
  }
]