Happy Business Starts Here

can we query across entities in one API call?

Highlighted
New Student

can we query across entities in one API call?

can we query across entities in one API call? can we create/update data in different entities in one api call?

1 REPLY 1
Highlighted
Master

Re: can we query across entities in one API call?

You need to use Export ZOQL for that. If you use this python library https://github.com/bolaurent/zuora_restful_python, you can do it in one call. It would look like this:

 

import csv
from zuora_restful_python.zuora import Zuora


zuora = Zuora('username','password')

q = """
SELECT RatePlanCharge.DTCV,
RecognizedRevenueAccoSubscription.Name,
Subscription.SubscriptionStartDate
FROM RatePlanCharge
WHERE Subscription.SubscriptionStartDate >= '2017-01-04'

""" csv_data = zuora.query_export(q) lines = csv_data.split('/n') for row in csv.DictReader(lines): # do something pass