• swapna bhaskaruni
  • NEWBIE
  • 0 Points
  • Member since 2023

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Using the following call and JSON data I have been trying to Create a new opportunity attached to an account. Headers/Call are correct as I've been able to create Leads/Accounts. Something with the JSON is wrong but i'm not sure what it is. 

/services/data/v53.0/sobjects/Opportunity

data={
'Name': "Test opportunity",
'Accountid': "XXXXXXXXXXXXX",
'closedate': "1/12/2021",
'stagename':"Needs Analysis",
'Probability': "10"
}
How to create an Opportunity using Rest API with a particular Record type - when the user has access to multiple Record Types.

Below is the sample to create opportunity:
URI: services/data/v39.0/sobjects/Opportunity
Http Method: Post
Input: {"Name":"Opp1","CloseDate":"2018-08-01","StageName":"New","Probability":"10","Amount":"2000"}
  • July 04, 2017
  • Like
  • 0