How to Work POSTMAN GET / POST / PUT/ PATCH / DELETE in rest API on Account Object in Salesforce | Handling POST, PUT, PATCH and DELETE Requests Rest API in postman request in Salesforce

2,668 views

Hey guys, today in this post we are going to learn about How to Handling POST, PUT, PATCH and DELETE Requests Rest API in postman request in Salesforce.

Final Output →

postman request with parameters in Salesforce -- w3web.net

 

You can download file directly from github by Click Here.

Note:: – You will get an email, so put correct email and mobile number and BEGIN YOUR JOURNEY from Today!

 

 

 

Get Access Token

Method:- Post

URL:- https://login.salesforce.com/services/oauth2/token?grant_type=password&client_id=3MVG9fe4g9fhX0E4VMI4vmhIgc3fISaldH3KjsBnWKMFMuoPrmsU1W.K3X2gm.yC0xP2EH5NLjhyEiJ&client_secret=0C9A28886564ED36855929B7CC67517826AFB769C2DFBCEE6BC265B70B&password=delhi@123&username=vijay.kumar6799@gmail.com

Query Params

Key Value
grant_type password
client_id 3MVG9fe4g9fhX0E4VMI4vmhIgc3fISaldHyZzoDa3KjsBnWKMFMuoPrmsU1W.K3X2gm
client_secret 0C9A28886564ED36855929B7CC67517826AFBAEA8C2769C2D
password demo@123
username vijay.kumar6799@gmail.com

Send Request Output

  1.    {
  2.     "access_token": "00D5g000007oJsa!AQUAQBqnIYqdxDY4Z9rPKdWtRru2fwVrRZrnwGNSIr.cLPC2CdA5LOZ1mxufQX2kAOK1br_DNMSabgt2ZJmOvcuKQaJ83KLT",
  3.     "instance_url": "https://rif-dev-ed.my.salesforce.com",
  4.     "id": "https://login.salesforce.com/id/00D5g000007oJsaEAE/0055g00000AUd9MAAT",
  5.     "token_type": "Bearer",
  6.     "issued_at": "1662210874032",
  7.     "signature": "KDh7gXXKo14JwMALsZnaZanrguidtTEKx82Io5vdjNY="
  8.   }

 

Insert Multiple Accounts

Method:- POST

Note:: – You will get an email, so put correct email and mobile number and BEGIN YOUR JOURNEY from Today!
 
 

URL:- https://rif-dev-ed.my.salesforce.com/services/data/v52.0/composite/tree/Account/

Authorization Type:- Bearer Token

Authorization:- 00D5g000007oJsa!AQUAQBqnIYqdxDY4Z9rPKdWtRru2fwVrRZrnwGNSIr.cLPC2CdA5LOZ1mxufQX2kAOK1br_DNMSabgt2ZJmOvcuKQaJ83KLT

API Type:- JSON

Send Body Request

  1.    {
  2. "records" :[
  3.     {
  4.     "attributes" : {"type" : "Account", "referenceId" : "ref1"},
  5.     "name": "w3web Acc1",
  6.     "phone": "1231231231",
  7.     "Industry":"Technology"  
  8.     },
  9.     {
  10.     "attributes" : {"type" : "Account", "referenceId" : "ref2"},
  11.     "name": "w3web Acc2",
  12.     "phone": "1231231231",
  13.     "Industry":"Chemicals"  
  14.     }
  15.     ]
  16. }

Send Request Output

  1.    {
  2.     "hasErrors": FALSE,
  3.     "results": [
  4.         {
  5.             "referenceId": "ref1",
  6.             "id": "0015g00000nvRIjAAM"
  7.         },
  8.         {
  9.             "referenceId": "ref2",
  10.             "id": "0015g00000nvRIkAAM"
  11.         }
  12.     ]
  13. }

 

Get Account Record from API

Method:- GET

URL:- https://rif-dev-ed.my.salesforce.com/services/data/v52.0/sobjects/Account/0015g00000nvRIjAAM

Authorization Type:- Bearer Token

Authorization:- 00D5g000007oJsa!AQUAQBqnIYqdxDY4Z9rPKdWtRru2fwVrRZrnwGNSIr.cLPC2CdA5LOZ1mxufQX2kAOK1br_DNMSabgt2ZJmOvcuKQaJ83KLT

Send Request Output

  1.    {
  2.     "attributes": {
  3.         "type": "Account",
  4.         "url": "/services/data/v52.0/sobjects/Account/0015g00000nvRIjAAM"
  5.     },
  6.     "Id": "0015g00000nvRIjAAM",
  7.     "IsDeleted": FALSE,
  8.     "MasterRecordId": NULL,
  9.     "Name": "w3web Acc1",
  10.     "Type": NULL,
  11.     "ParentId": NULL,
  12.     "BillingStreet": NULL,
  13.     "BillingCity": NULL,
  14.     "BillingState": NULL,
  15.     "BillingPostalCode": NULL,
  16.     "BillingCountry": NULL,
  17.     "BillingLatitude": NULL,
  18.     "BillingLongitude": NULL,
  19.     "BillingGeocodeAccuracy": NULL,
  20.     "BillingAddress": NULL,
  21.     "ShippingStreet": NULL,
  22.     "ShippingCity": NULL,
  23.     "ShippingState": NULL,
  24.     "ShippingPostalCode": NULL,
  25.     "ShippingCountry": NULL,
  26.     "ShippingLatitude": NULL,
  27.     "ShippingLongitude": NULL,
  28.     "ShippingGeocodeAccuracy": NULL,
  29.     "ShippingAddress": NULL,
  30.     "Phone": "1231231231",
  31.     "Fax": NULL,
  32.     "AccountNumber": NULL,
  33.     "Website": NULL,
  34.     "PhotoUrl": "/services/images/photo/0015g00000nvRIjAAM",
  35.     "Sic": NULL,
  36.     "Industry": "Technology",
  37.     "AnnualRevenue": NULL,
  38.     "NumberOfEmployees": NULL,
  39.     "Ownership": NULL,
  40.     "TickerSymbol": NULL,
  41.     "Description": NULL,
  42.     "Rating": NULL,
  43.     "Site": NULL,
  44.     "OwnerId": "0055g00000AUd9MAAT",
  45.     "CreatedDate": "2022-09-03T13:29:00.000+0000",
  46.     "CreatedById": "0055g00000AUd9MAAT",
  47.     "LastModifiedDate": "2022-09-03T13:29:00.000+0000",
  48.     "LastModifiedById": "0055g00000AUd9MAAT",
  49.     "SystemModstamp": "2022-09-03T13:29:00.000+0000",
  50.     "LastActivityDate": NULL,
  51.     "LastViewedDate": "2022-09-03T13:29:00.000+0000",
  52.     "LastReferencedDate": "2022-09-03T13:29:00.000+0000",
  53.     "Jigsaw": NULL,
  54.     "JigsawCompanyId": NULL,
  55.     "CleanStatus": "Pending",
  56.     "AccountSource": NULL,
  57.     "DunsNumber": NULL,
  58.     "Tradestyle": NULL,
  59.     "NaicsCode": NULL,
  60.     "NaicsDesc": NULL,
  61.     "YearStarted": NULL,
  62.     "SicDesc": NULL,
  63.     "DandbCompanyId": NULL,
  64.     "OperatingHoursId": NULL,
  65.     "CustomerPriority__c": NULL,
  66.     "SLA__c": NULL,
  67.     "Active__c": NULL,
  68.     "NumberofLocations__c": NULL,
  69.     "UpsellOpportunity__c": NULL,
  70.     "SLASerialNumber__c": NULL,
  71.     "SLAExpirationDate__c": NULL,
  72.     "Budget__c": NULL,
  73.     "Employee__c": NULL,
  74.     "Status__c": NULL,
  75.     "Latest_Caes_Number__c": NULL,
  76.     "Office_Location__c": NULL,
  77.     "Address__c": NULL
  78. }

 

Patch (Update) Account Record

Method:- PATCH

URL:- https://rif-dev-ed.my.salesforce.com/services/data/v52.0/composite/sobjects

Authorization Type:- Bearer Token

Authorization:- 00D5g000007oJsa!AQUAQBqnIYqdxDY4Z9rPKdWtRru2fwVrRZrnwGNSIr.cLPC2CdA5LOZ1mxufQX2kAOK1br_DNMSabgt2ZJmOvcuKQaJ83KLT

API Type:- JSON

Send Body Request

  1.    {
  2.     "allOrNone": FALSE,
  3.     "records": [
  4.         {
  5.             "attributes": {
  6.                 "type": "Account",
  7.                 "referenceId": "ref1"
  8.             },
  9.             "Id": "0015g00000nvRIkAAM",
  10.             "name": "w3web Acc1",
  11.             "phone": "1231231231",
  12.             "Industry":"Technology"
  13.         }
  14.     ]
  15. }

Send Request Output

  1.    [
  2.     {
  3.         "id": "0015g00000nvRIkAAM",
  4.         "success": TRUE,
  5.         "errors": []
  6.     }
  7. ]

 
Handling POST, PUT, PATCH and DELETE Requests Rest API in postman -- w3web.net

 

Further post that would you like to learn in Salesforce

 

 

FAQ (Frequently Asked Questions)

What is the Postman API?

The Postman API endpoints enable you to integrate Postman within your development toolchain. You can add new collections, update existing collections, update environments, and add and run monitors directly through the API. This enables you to programmatically access data stored in your Postman account.

What is Postman and why it is used?

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs.

What is the difference between JSON and REST API?

JSON is based on a subset of the JavaScript Programming Language. Representative State Transfer (REST) is a client-server architectural style that uses the HTTP protocol in a simple and effective way. Systems that adhere to REST practices are often referred to as RESTful interfaces.

Related Topics | You May Also Like

 
Note:: – You will get an email, so put correct email and mobile number and BEGIN YOUR JOURNEY from Today!
 
 
  

Our Free Courses →

👉 Get Free Course →

📌 Salesforce Administrators

📌 Salesforce Lightning Flow Builder

📌 Salesforce Record Trigger Flow Builder

👉 Get Free Course →

📌 Aura Lightning Framework

📌 Lightning Web Component (LWC)

📌 Rest APIs Integration



Hi, This is Vijay Kumar behind the admin and founder of w3web.net. I am a senior software developer and working in MNC company from more than 8 years. I am great fan of technology, configuration, customization & development. Apart of this, I love to write about Blogging in spare time, Working on Mobile & Web application development, Salesforce lightning, Salesforce LWC and Salesforce Integration development in full time. [Read full bio] | | The Sitemap where you can find all published post on w3web.net

Leave a Comment