Back
Basically, first of all you need to login and get your session ID after that, try the below code:
POST to https://yourinstance.my.salesforce.com/services/data/v48.0/sobjects/Casewith header Authorization Bearer <session id goes here, sometimes called "access token" too>and body { "Subject": "Hello world", "Description": "Lorem ipsum dolor sit amet...", "Origin":"Web", "AccountId" :"0010g00001mbqU4" }
POST to
https://yourinstance.my.salesforce.com/services/data/v48.0/sobjects/Case
with header
Authorization Bearer <session id goes here, sometimes called "access token" too>
and body
{
"Subject": "Hello world",
"Description": "Lorem ipsum dolor sit amet...",
"Origin":"Web",
"AccountId" :"0010g00001mbqU4"
}
Also, use python libraries for Salesforce.
I hope this will help.
Want to become a Salesforce Expert? join Salesforce Apex Training now!!
Want to know more about Salesforce Apex? Watch this video on Apex in Salesforce | Salesforce Tutorial:
31k questions
32.8k answers
501 comments
693 users