Happy Business Starts Here

Highlighted
Valued Scholar

API Custom Object Records

Hi, is there an API (not Data Query) to perform a query on custom objects records?

In Zuora Lab I see these API:

  • Create Record
POST \
  https://rest.apisandbox.zuora.com/objects/records/default/gamer_activity
  • Update Record (not availabe in Zuora Lab Doc but working)
PUT \
  https://rest.apisandbox.zuora.com/objects/records/default/gamer_activity/{{Id}}
  • Delete Record (not availabe in Zuora Lab Doc but working)
DELETE \
  https://rest.apisandbox.zuora.com/objects/records/default/gamer_activity/{{Id}}
  • Query Record: I suppose that is something like
POST \
  https://rest.apisandbox.zuora.com/objects/records/default/query

but I always receive 

{
"code": 400,
"message": "Batch size should be between 1 and 1000."
}
 
Thanks in advance

 

 

3 REPLIES 3
Zuora Staff
Zuora Staff

Re: API Custom Object Records

Have you tried

GET https://rest.apisandbox.zuora.com/objects/records/default/object_name 
Valued Scholar

Re: API Custom Object Records

Yes, I just tried 

GET https://rest.apisandbox.zuora.com/objects/records/default/Channelentitlements 

 but I can't filter in any way

GET https://rest.apisandbox.zuora.com/objects/records/default/Channelentitlements?type=ChannelEntitlements
 
I think that there is another API that should use lucene query language as shown below (this is a screen of Query Record Workflow Task)QueryRecord.PNG
Edit: Now it is working. Solution 
GET https://rest.apisandbox.zuora.com/objects/records/default/Channelentitlements?q=ChannelName__c:"Netflix" AND ExternalIdentifiers__c: "12345" 

Thanks @Chi 

Zuora Staff
Zuora Staff

Re: API Custom Object Records

Glad you got it working.  We'll work on getting this into the documentation.