Happy Business Starts Here

Highlighted
Valued Scholar

Get expired subscription through SOAP API

Hi,

 

I've the following scenarion: A subscription has been renewed and multiple amendmenets have been applied after that, I'm wondering how I can get the subscription that was created before the renewal. I need to do that because I need to know what was the original quantity before the renewal. If there is a way to do it thrugh a simple API call that would be great.

 

Thanks!

5 REPLIES 5
Zuora Alumni

Re: Get expired subscription through SOAP API

Hi @ridavila,

How about query the subscription by specific version?
As every applied amendment will create a new version to the subscription.

Thanks
Dennis


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

Valued Scholar

Re: Get expired subscription through SOAP API

Hi Dennis,

 

How can I know what was the version when the subscription was renewed so I can query be thy immediately previous version?.

 

Thanks.

Tags (1)
Zuora Alumni

Re: Get expired subscription through SOAP API

Hello, 

 

Let me look into that for you, and I will get back to you.

 

Thank you,

 



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

Zuora Alumni

Re: Get expired subscription through SOAP API

Hello, 

 

I found an old instance that I believe may help you get the information that you need. 

 

Once the Subscription is amended, it will create a new version and new subscriptionId. Therefore, if you are going to reference the SubscriptionId of the version 1 of the subscription, Zuora API will only return the fields for that Id and will not include the other versions of it. The best way to handle your use case is use a query() like this:

 

select Id, Version, Status from Subscription where Name =  'SubscriptionName' and Status =’Active’

SubscriptionName will never change even you apply multiple amendments so this is the perfect reference to get the value you need. Let me know if this makes sense and address your use case.

 

Please let me know if this helps to provide the information that you need.

 

Thanks,



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

Zuora Alumni

Re: Get expired subscription through SOAP API

Hi @rdavila,

 

You have to doing a query call to query out the subscription Id and version with the subscription name and then use the subscription Id as a condition to query out the RatePlan id and finally, using RatePlan id as a condition to query out the information of RatePlanCharge object. 

 

Alternatively, you might think of ZOQL query to create an export like below query:

 

select subscription.*, RatePlanCharge.* from RatePlanCharge

 

So you can filter the information you need from the output file of the ZOQL export.

 

Thank you!



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