Happy Business Starts Here

Tutor

Can I query a custom field from the API?

I have a custom field defined for Product Rate Plan.  Can I query this custom field from the API (either REST or SOAP)?  When I try, it tells me that it is an "invalid field for query".

3 REPLIES 3
Zuora Support

Re: Can I query a custom field from the API?

Hi @jerrade,

 

Make sure that you use the API Name (not the Field Label) of your custom field in the query.  API Name should have '__c'.



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

Tutor

Re: Can I query a custom field from the API?

I figured it out.  I was querying the wrong table (RatePlan instead of ProductRatePlan).

Master

Re: Can I query a custom field from the API?

If you're using SOAP, you need to download a new WSDL after you create a custom field. This might not be true for a query, but it is true for, for instance, update call.