function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Saravanan RamaswamySaravanan Ramaswamy 

How to query record from account with filter using rest api

I need to query a record from account with below filter criteria:

Select Id, name, billingpostalcode from account where name = 'xyz account'

postman error

 
Srini VSrini V
Using Params tab
use
q and your query in KEY and VALUE
AnkaiahAnkaiah (Salesforce Developers) 
Hi Saravanan,

try like below 
/services/data/v56.0/query?q=SELECT+Name+from+Account+where+Name=+'xyz'

Refer the below links
https://developer.salesforce.com/forums/?id=906F000000099zpIAA

If this helps, Please mark it as best answer.

Thanks!!
chrischris

Hi,
In postman use the Params tab and not the Body tab as below : 
create a key = q
and in the value put : Select+Id,name,billingpostalcode+from+account+where+name+='xyz account'


Postman config
make sure your http request url is correct as well, the base url should be : 
your_org_instance/services/data/v56.0/query (don't start with test.salesforce.org this is not correct)