- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
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 √
Solved! Go to Solution.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Answer:
This is simple: non-latest versions of a subscription will ALWAYS have the Status: "Expired".
Methods for extracting this information:
UI (Datasource Export):
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 √
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Answer:
This is simple: non-latest versions of a subscription will ALWAYS have the Status: "Expired".
Methods for extracting this information:
UI (Datasource Export):
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 √