put-api2-mobile-subscriptions-cancel

Cancel Subscription (Turn off Auto Renewal)

This API allows the user to cancel an active subscription (turn off auto renewal for the subscription). This is a soft cancellation wherein the benefits remain valid until the end time of the subscription.

Headers
  • User-Agent
    Type: string
    required

    Used to identify the software, device, and application initiating the request, providing information about the client to the server. For details, see User Agent.

  • Accept
    Type: string
    required

    Advertises which content types the client can understand

  • Accept-Language
    Type: string

    Preferred language

  • Content-Type
    Type: string
    required

    Set this header to application/json

  • Authorization
    Type: string
    required

    Used to authorize the request with access_token. It should be supplied as Bearer ACCESS_TOKEN_GOES_HERE. Note: When authentication is performed using Advanced Authentication, you must include the id_token in the id-token header and the access_token in the Authorization header. See Access Punchh APIs Using Access and ID tokens

  • x-pch-digest
    Type: string
    required

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

  • id-token
    Type: string

    A token that contains identity information about the authenticated user. It is used to verify the user’s identity and is required only when authentication is performed using Advanced Authentication. This token alone does not grant access to Punchh APIs. To access the APIs, you must include the id_token in the id-token header and the access_token in the Authorization header. See Access Punchh APIs Using Access and ID tokens

Body
application/json
  • cancellation_feedback
    Type: string
    required

    Subjective feedback that can be captured from guests when they cancel a subscription from the mobile application. The maximum length supported is 225 characters.

  • cancellation_reason_id
    Type: integer
    required

    Unique ID of the business-configured cancellation reason that a guest selects when cancelling a subscription. You can find cancellation reason IDs under the subscriptions object in the Program Meta API response.

  • client
    Type: string
    min length:  
    1
    required

    OAuth client ID provided by the business

  • subscription_id
    Type: string
    required

    System-generated unique ID of the subscription of the guest that needs to be cancelled

Responses
  • 200
    Type: array string[]

    Successful Response | 200 OK

  • 400
    Type: object
    • errors
      Type: object
  • 401
    Type: object
    • errors
      Type: object
  • 412
    Type: object
    • errors
      Type: object
  • 422
    Type: object
    • errors
      Type: object
put/api2/mobile/subscriptions/cancel
[
  "Subscription auto renewal canceled."
]