Happy Business Starts Here

Highlighted
Tutor

Update Subscription (serviceActivationDate) through REST API

 Hi, I am trying to update the Service Activation Date on a subscription using the REST API but end up getting an unsuccessful response. Following are the details of the request I am sending

 

- Endpoint URL: https://apisandbox-api.zuora.com/rest/v1/subscriptions/A-S00000208

- Zuora-Version: 196.0 and higher

- Request Body: 

{
	"serviceActivationDate": "2018-08-15"
}

- Request Type: PUT

- Response body:

{
    "success": false,
    "processId": "1CAEAF6BFAFE9BE9",
    "reasons": [
        {
            "code": 53500021,
            "message": "Invalid parameter(s): 'serviceActivationDate'."
        }
    ]
}

 

Not sure what I'm doing wrong. I am pretty new to using the Zuora API and would appreciate any help to guide me in the right direction.

 

Thanks

Avi

5 REPLIES 5
Zuora Support Moderator

Re: Update Subscription (serviceActivationDate) through REST API

Hi @avi91,

 

So you may be getting this message for a couple of reasons and it doesn't necessarily mean it's an API issue, rather a Zuora behavior.

 

You can only update a subscription's serviceActivationDate if the subscription has not yet been invoiced or an amendment has been created.

If you've done either of those, the contractEffecitveDate, serviceActivationDate, and customerAcceptanceDate can not be updated.

 

If the subscription that you're testing is completely new, then you should be able to update that. If the error is still coming up, you'll also need to add in customerAcceptanceDate because the customerAcceptanceDate must be equal to or later than the serviceActivationDate.

 

 



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Tutor

Re: Update Subscription (serviceActivationDate) through REST API

 Hi @AmyLy,

 

Thanks for the reply. I am actually able to update the Service Activation Date on a subscription through the Zuora UI, even though an invoice was sent out. I get an error however, if I try to do the same through a REST API call. Is this a restriction on the API?

 

Thanks

Avi

 

 

Tutor

Re: Update Subscription (serviceActivationDate) through REST API

Hi @AmyLy, I also tried updating the service activation date on another subscription (through the REST API) which has no invoices or ammendments and I am still getting the same error as mentioned in my original post. What might I be doing wrong?

Zuora Support Moderator

Re: Update Subscription (serviceActivationDate) through REST API

Hi @avi91 - I think part of it is the Update Subscription itself.

 

I went through and read a bit and it says that this is supposed to be used for the following:

 

Use this call to make the following kinds of changes to a subscription:

  • Add a note
  • Change the renewal term or auto-renewal flag
  • Change the term length or change between evergreen and termed
  • Add a new product rate plan
  • Remove an existing subscription rate plan
  • Change the quantity or price of an existing subscription rate plan

I believe you can use update subscription to change something on the existing subscription rate plan, but you'd need to wrap it up like this:

 

{
  "update": [
    {
      "chargeUpdateDetails": [
        {
          "quantity": 100,
          "ratePlanChargeId": "2c92c8f83dcbd8b1013dcce0eb555555"
        }
      ],
      "contractEffectiveDate": "2018-02-13",
      "ratePlanId": "2c92c8f83dcbd8b1013dcce0ea7e4444"
    }
  ]
}


If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √

Master

Re: Update Subscription (serviceActivationDate) through REST API

Hi @avi91@AmyLy

 

I once responded to a similar question:
https://community.zuora.com/t5/Subscriptions/How-to-activate-a-pending-acceptance-subscription-in-SO...

 

In the link above, I explain how to set the date in ContractAcceptanceDate, but the same operation is possible when setting the date in ServiceActivationDate.
That is, ServiceActivationDate can be updated using the following Endpoint and Request:

 

[PUT] https://rest.apisandbox.zuora.com/v1/object/subscription/{Target Subscription's Id}

(For Example: https://rest.apisandbox.zuora.com/v1/object/subscription/2c92c0f86103a992016103fe5fd175aa)

Request Body:

{
  "ServiceActivationDate": "2018-08-15"
}

Note: The field name of Key is ServiceActivationDate.

 

Although it may be possible by the method AmyLy mentioned, it is easier to use this Endpoint.

 

----

 

Additional Notes for @avi91

 

This is not an essential indication. But I tell you.
You are using "https://apisandbox-api.zuora.com/rest/" as an endpoint.
No problem. This Base URL works correctly. But, in fact, this Base URL is legacy one.
Currently, it is better to use "https://rest.apisandbox.zuora.com/" as described in the REST API Reference.
https://www.zuora.com/developer/api-reference/#section/Introduction/Endpoints