Knowledge Center

Knowledge Center > API > REST API > REST API Reference > Subscriptions > Resume Subscription

Resume Subscription

This feature is in Limited Availability. If you wish to have access to the feature, submit a request at Zuora Global Support

This REST API reference describes how to resume a suspended subscription.

Request

  • Production: PUT https://api.zuora.com/rest/v1/subscriptions/{subscription-key}/resume
  • API Sandbox: PUT https://apisandbox-api.zuora.com/rest/v1/subscriptions/{subscription-key}/resume

Request parameters

subscription-key

required

path

Subscription number or ID. Subscription status must be Active.

Request Header

zuora-version

optional

The minor version of the Zuora REST API. 

You only need to set this parameter if you use the collect or invoice field. See REST API Basics for more information.

Accept

optional

Optionally enter application/json. Only JSON is returned.

Request body

contractEffectiveDate

optional

The date when the customer notifies you that they want to resume their subscription.

Type: date

resumePolicy

required

Resume methods. Specify a way to resume a subscription. See Resume Date for more information.

Values:

  • ​Today: The subscription resumption takes effect on today's date.

  • FixedPeriodsFromSuspendDate:​ The subscription resumption takes effect after a specified period based on the suspend date. You must specify the resumePeriods and resumePeriodsType fields to define the period.
  • SpecificDate:​ The subscription resumption takes effect on a specific date. You must define the specific date in the resumeSpecificDate field.

  • FixedPeriodsFromToday: The subscription resumption takes effect after a specified period based on the today's date. You must specify the resumePeriods and resumePeriodsType​ fields to define the period.

resumePeriods

conditional

The length of the period used to specify when the subscription is resumed. The subscription resumption takes effect after a specified period based on the suspend date or today's date. You must use this field together with the resumePeriodsType field to specify the period.

Type: integer

Note:

This field is only applicable when the suspendPolicy field is set to FixedPeriodsFromToday or FixedPeriodsFromSuspendDate.

resumePeriodsType

conditional

The period type used to define when the subscription resumption takes effect. The subscription resumption takes effect after a specified period based on the suspend date or today's date. You must use this field together with the resumePeriods field to specify the period.

Type: string (enum)

Values:

  • Day

  • Week

  • Month

  • Year

Note:

This field is only applicable when the suspendPolicy field is set to FixedPeriodsFromToday or FixedPeriodsFromSuspendDate.

resumeSpecificDate

conditional

A specific date when the subscription resumption takes effect, in the format yyyy-mm-dd.

Type: date

Note:

  • This field is only applicable only when the resumePolicy field is set to SpecificDate.

  • The value should not be earlier than the subscription suspension date.

extendsTerm

optional

Whether to extend the subscription term by the length of time the suspension is in effect.

Values:

  • true

  • false

invoice

optional

Creates an invoice for a subscription. The invoice generated in this operation is only for this subscription, not for the entire customer account.

If the value is true, an invoice is created. If the value is false, no action is taken.
The default value is false

This field is in Zuora REST API version control. Supported minor versions are 196.0 or later. To use this field in the method, you must set the zuora-version parameter to the minor version number in the request header. See Zuora REST API Versions for more information.

applyCreditBalance

optional

Applies a credit balance to an invoice.
If the value is true, the credit balance is applied to the invoice. If the value is false, no action is taken.
Prerequisite: invoice must be true

To view the credit balance adjustment, retrieve the details of the invoice using the Get Invoices method.

collect

optional

Collects an automatic payment for a subscription. The collection generated in this operation is only for this subscription, not for the entire customer account.
If the value is true, the automatic payment is collected. If the value is false, no action is taken.
The default value is false.
Prerequisite: invoice must be true

This field is in Zuora REST API version control. Supported minor versions are 196.0 or later. To use this field in the method, you must set the zuora-version parameter to the minor version number in the request header. See Zuora REST API Versions for more information.

invoiceTargetDate

optional

If an invoice is to be generated, the date through which to calculate the charges, as yyyy-mm-dd.

Response

success

Contains true if successful, otherwise false.

processId

Internal process ID to assist Zuora support. Only returned if success is false.

reasons

Information on one or more reasons for the result. Only returned if success is false.

code

Eight-digit numeric error code

message

Description of the error

subscriptionId The internal subscription ID.

resumeDate

The date when subscription resumption takes effect, as yyyy-mm-dd.

termEndDate

The date when the new subscription term ends, as yyyy-mm-dd.

totalDeltaTcv

Change in the total contracted value of the subscription as a result of the update.
invoiceId Invoice ID, if an invoice is generated during the subscription process.
paymentId Payment ID, if a payment is collected.
paidAmount Payment amount, if a payment is collected.

Examples

HTTP/JSON request:

PUT https://api.zuora.com/rest/v1/subscriptions/A-S00001084/resume

Request Header: To use the collect and invoice fields, you must set the zuora-version parameter to the minor version number in the request header.

JSON request:

{
  "contractEffectiveDate": "2019-02-01",
  "resumePolicy": "SpecificDate",
  "resumeSpecificDate":"2019-10-01",
  "extendsTerm":true,
  "invoice": true,
  "collect": false
}
JSON response:
{
  "success": true,
  "subscriptionId": "8a8082c4539c5bcc0153a752f9c87094",
  "resumeDate": "2019-10-01",
  "termEndDate": "2020-01-31",
  "totalDeltaTcv": 396.7741935
}

CURL request:

#
## Cancel Subscription
##
echo
echo "=============Cancel Subscription============="
echo
curl -i -k -H "apiAccessKeyId:$USER_NAME" -H "apiSecretAccessKey:$PASSWORD" -H "Content-Type:application/json" -H "Accept:application/json" -d '
{
  "contractEffectiveDate": "2019-02-01",
  "resumePolicy": "SpecificDate",
  "resumeSpecificDate":"2019-10-01",
  "extendsTerm":true
}
' -X PUT $BASE_URL/v1/subscriptions/A-S00001084/resume

JSON response:

{
  "success": true,
  "subscriptionId": "8a8082c4539c5bcc0153a752f9c87094",
  "resumeDate": "2019-10-01",
  "termEndDate": "2020-01-31",
  "totalDeltaTcv": 396.7741935
}
Last modified
21:40, 29 Sep 2016

Tags

This page has no custom tags.

Classifications

(not set)