Happy Business Starts Here

Highlighted
Savvy Scholar

How to activate a pending acceptance subscription in SOAP/REST API ?

I' got a pending acceptance subscription.

When the customer is ready to use the service described in the subscription, I want to activate the subscription by setting the customer acceptance date.

 

Through ZUora GUI, it can be done with "set activation dates" button.

 

How can I program the same thing using Zuora API ?

- REST version 

- SOAP version

4 REPLIES 4
Master

Re: How to activate a pending acceptance subscription in SOAP/REST API ?

Hi @chdavid

 

If you use the REST API, you can activate a Subscription that Status is "Pending Acceptance" by one of the following two Endpoints.
Yes, anyway, simply set the date and update Subscription, the Status will be automatically changed to "Active".

 

Endpoint 1: "CRUD: Update Subscription"
[PUT] https://rest.apisandbox.zuora.com/v1/object/subscription/{Target Subscription's Id}
(For Example: https://rest.apisandbox.zuora.com/v1/object/subscription/2c92c0f86103a992016103fe5fd175aa)

If you use this Endpoint, the Body of the request should be as follows (assuming your customer is ready for 2018/02/01):

 

{
  "ContractAcceptanceDate": "2018-02-01"
}

 

Endpoint 2: "Update"
[POST] https://rest.apisandbox.zuora.com/v1/action/update

If you use this Endpoint, the Body of the request should be as follows (assuming your customer is ready for 2018/02/01):

{
  "objects": [
    {
    	"Id": "2c92c0f86103a992016103fe5fd175aa",
        "ContractAcceptanceDate": "2018-02-01"
    }
  ],
  "type": "Subscription"
}

 

Note 1:

When using UI, to change Status from "Pending Acceptance" to "Active", we enter the date in "Customer Acceptance Date".
On the other hand, when using API, "ContractAcceptanceDate" is used instead of "Customer Acceptance Date" field. (I do not know this reason)

 

Note 2:

When "Update" is used, up to 50 Subscriptions can be activated with per call.
When activating multiple subscriptions, you write in the "objects" array as follows:

{
  "objects": [
    {
    	"Id": "2c92c0f86103a992016103fe5fd175aa",
        "ContractAcceptanceDate": "2018-02-01"
    },
    {
    	"Id": "2c92c0f86103a98e0161040ebf5a0af9",
        "ContractAcceptanceDate": "2018-02-01"
    }
  ],
  "type": "Subscription"
}

 

When "CRUD: Update Subscription" is used, only one subscription can be activated with per call.
However, as you can see from the example above, the Body of the Request is simple.

 

Note 3:

I've only used the REST API, so I do not know much about the SOAP API.
But since you can also use "Update" with SOAP API, you can activate Subscription in the same way as above example.

Savvy Scholar

Re: How to activate a pending acceptance subscription in SOAP/REST API ?

Hi, I am using REST API here and am not able to update the status of the Subscription to Active from Pending Activation as I am getting the below error:

 

"Errors":[{"Code":"API_DISABLED","Message":"This action cannot be performed because you have the Order permission enabled."}],"Success":false}

 

I have tried with both the REST Endpoints; POST as well as PUT, in both the case I get the above mentioned error, could anyone please guide me to resolve this? 

 

Thanks

Anirban

Master

Re: How to activate a pending acceptance subscription in SOAP/REST API ?

Hi @anirban09

 

This error is caused by the "Order" function being enabled in your Tenant.
If "Order" is enabled, the above two endpoints are unusable:
https://knowledgecenter.zuora.com/BC_Subscription_Management/Orders/AB_Orders_API_Migration_Guidance
> The following table lists the Zuora API functions that are not available when the Orders feature is enabled.

 

As an alternative, you should use this call:
https://www.zuora.com/developer/api-reference/#operation/PUT_OrderTriggerDates

 

However, because my Tenant does not enable Order, I can not give any further advice.
If your error is not resolved, I encourage you to create a new thread and ask questions.

Savvy Scholar

Re: How to activate a pending acceptance subscription in SOAP/REST API ?

HI @yamasaki1ma

Thank you for the information you have provided, will try to use the alternative solution.

 

Thanks

Anirban