Codementor Events

How to Query salesforce object records using postman?

Published Apr 15, 2023
How to Query salesforce object records using postman?

We have a situation where we need to query the salesforce object to find out that a particular record is present or not.

To find this out we can use the salesforce standard API of Data query.

https://<Your Instance>.my.salesforce.com/services/data/v57.0/query

The plan is as follows:

First create the connected app and share the client secret, client password to the external user/application

Make the first authentication call

Make the second api call using the access token and hit the https://<Your Instance>.my.salesforce.com/services/data/v57.0/query

Parse the data came in the response
Example to understand more onto this, you can refer to this url: LINK

Step1.

Authenticate User:

Note: If you have to do the authentication for production/Developer org then you need to replace the "test" keyword to "login" in the api url

image.png

On successfull API call, you will receive the value of "Access Token" in the key called "access_token"

image-4.png

Step 3: Make the last api call using this encoded url:

Method type: GET
image-2.png
Now you should be able to retrieve the data in the response:
image-3.png

Now you can parse the json data in your response and can act accordingly in your application.

Cheers ✌️

Discover and read more posts from Sunil Kumar
get started