Happy Business Starts Here

Honor Student

"new" rest with zoql different data format in prod and sandbox with zero records

When I run this ZOQL via the "new" rest api in Sandbox it gives different results from Prod.  Both the account in prod and sandbox have zero electronic payment methods.

 

Prod

curl -X POST -H "apiAccessKeyId: zzz" -H "apiSecretAccessKey: zzz" -H "Content-Type: application/json" -d "{\"queryString\": \"select   Id,   AccountId,   CreditCardMaskNumber,   CreditCardType,   PaypalBaid,  CreditCardType,  PaypalType  from PaymentMethod where AccountId = 'accountuid'\"}" "https://rest.zuora.com/v1/action/query"

result

{"records":{},"size":0,"done":true}

 

 

Sandbox, with the same curl, different url, different keys and IDs

curl -X POST -H "apiAccessKeyId: yyy" -H 'apiSecretAccessKey: yyy' -H "Content-Type: application/json" -d "{\"queryString\": \"select   Id,   AccountId,   CreditCardMaskNumber,   CreditCardType,   PaypalBaid,  CreditCardType,  PaypalType  from PaymentMethod where AccountId = 'sandboxaccountuid'\"}" "https://rest.apisandbox.zuora.com/v1/action/query"

result

{"records":[],"size":0,"done":true}

 

When there are payment methods, both Prod and Sandbox give records: [], but when there are zero records, Sandbox returns records: [] and Prod returns records: {}

 

While I can work around this with code, this seems like a bug to me.

Tags (2)
2 REPLIES 2
Zuora Staff

Re: "new" rest with zoql different data format in prod and sandbox with zero records

Hi @jcullison. I'm a developer at Zuora and work on the new REST APIs.

 

The reason you're seeing that difference is that we haven't rolled out the latest version to production yet, but it is in sandbox. The production update is scheduled to happen on 2016/12/5 (PST). Sorry for the inconvenience and thanks very much for the feedback.

Highlighted
Honor Student

Re: "new" rest with zoql different data format in prod and sandbox with zero records

Thank you Scott!  I will work around it til then.