Happy Business Starts Here

Highlighted
Support SME

How can I find the latest version of my subscriptions?

Question:

 

I process a lot of amendments on my tenant, and I need the subscription IDs for the latest versions of my subscriptions, how can I get that?



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

1 REPLY 1
Support SME

Re: How can I find the latest version of my subscriptions?

Answer:

 

This is simple: non-latest versions of a subscription will ALWAYS have the Status: "Expired".

 

Methods for extracting this information:

 

UI (Datasource Export):

subds.jpg

 

 

SOAP:

 

<ns1:query>
      <ns1:queryString>
	  select id, name, version, status from subscription
	  where status!='Expired'
      </ns1:queryString>
</ns1:query>

 

REST:

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

 

POST https://rest.zuora.com/v1/action/query

{
  "queryString": "select id, name, version, status from subscription where status!='Expired'"
}

 

AQuA:

 

POST https://www.zuora.com/apps/api/batch-query/

{
"format" : "csv",
"version" : "1.1",
"name" : "Example",
"encrypted" : "none",
"useQueryLabels" : "true",
"dateTimeUtc" : "true",
"queries"  : [ {
    "name" : "LatestSub",
    "query" : "select id, name, version, status from subscription where status!='Expired'",
    "type" : "zoql"
  }]
}


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