Renew Subscription
This API allows the business to renew subscriptions by making back-end calls on the designated date of renewal registered on the business end.
Headers
- Type: stringContent
- Type requiredapplication/json
- Type: stringAcceptrequired
application/json
- Type: stringAuthorizationrequired
Bearer token for admin authorization, who is making a call on behalf of the customer
Body
application/json
- Type: stringend
_time min length:1Format: date-timerequiredDate and time (in ISO 8601 format) until which the renewed subscription will remain active
- Type: numberFormat: floatpurchase
_price requiredCost of renewal of one unit of the subscription plan that is being renewed
- Type: stringstart
_time min length:1Format: date-timerequiredDate and time (in ISO 8601 format) from which the renewed subscription will become active
- Type: integersubscription
_id requiredUnique ID of the subscription plan that was issued to the guest and is being renewed
- Type: integernew
_plan _id This is sent only if the guest wants to switch to a different subscription plan (e.g., changing from a monthly plan to a quarterly plan)
Responses
- application/json
- application/json
- application/json
- application/json
Request Example for post/api2/dashboard/subscriptions/renew
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/dashboard/subscriptions/renew \
--request POST \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: ' \
--data '{
"subscription_id": 38,
"start_time": "2021-04-20T21:09:38Z",
"end_time": "2021-04-20T21:09:38Z",
"purchase_price": 23.98
}'
{
"subscription_id": 40,
"start_time": "2021-04-20T21:09:38Z",
"end_time": "2021-04-20T21:09:38Z"
}