Happy Business Starts Here

Highlighted
Tutor

How to get all previous subscriptions for an active subscription?

I would like to create a csv file where each row corresponds to an active subscription id, and all of its previous subscription ids.  

Is there an api call or export operation that can create this?

 

For example

Suppose you have subscription A with subscription-id: a.

You amend it, and it becomes subscription B with subscription-id: b.

You amend it again, and it becomes subscription C with subscription-id: c.

 

Subscription C is active, while A & B are expired.

On one row of te csv file, this would be represented as: c,b,a. 

(Or c,a,b. Order doesn't matter).

Tags (1)
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Zuora Staff

Re: How to get all previous subscriptions for an active subscription?

You can do it by adding where condition Subscription.status in ('Active','Expired').

You can use Action Query API call for it

https://www.zuora.com/developer/api-reference/#operation/Action_POSTquery

 

View solution in original post

Highlighted
Tutor

Re: How to get all previous subscriptions for an active subscription?

2 REPLIES 2
Highlighted
Zuora Staff

Re: How to get all previous subscriptions for an active subscription?

You can do it by adding where condition Subscription.status in ('Active','Expired').

You can use Action Query API call for it

https://www.zuora.com/developer/api-reference/#operation/Action_POSTquery

 

View solution in original post

Highlighted
Tutor

Re: How to get all previous subscriptions for an active subscription?