0% found this document useful (0 votes)
17 views3 pages

Postman Composite Request

Uploaded by

raj yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views3 pages

Postman Composite Request

Uploaded by

raj yadav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Creating Multiple Salesforce Records in

a Single API Call


POST Request Example

{{_endpoint}}/services/data/v57.0/composite

Body

{
"allOrNone" : true,
"compositeRequest" : [
{
"method" : "POST",
"url" : "/services/data/v61.0/sobjects/Contact",
"body" : {
"FirstName" : "Alex",
"LastName" : "Johnson",
"Email" : "[email protected]"
},
"referenceId" : "newContact"
},
{
"method" : "POST",
"url" :
"/services/data/v61.0/sobjects/Opportunity",
"body" : {
"Name" : "Elite Workshop",
"StageName" : "Qualification",
"CloseDate" : "2024-11-30",
"ContactId" : "@{newContact.id}"
},
"referenceId" : "newOpportunity"
},
{
"method" : "POST",
"url" : "/services/data/v61.0/sobjects/Task",
"body" : {
"Subject" : "Initial Follow-up for Elite
Workshop",
"Priority" : "Medium",
"WhatId" : "@{newOpportunity.id}",
"WhoId" : "@{newContact.id}"
},
"referenceId" : "followUpTask"
},
{
"method" : "POST",
"url" : "/services/data/v61.0/sobjects/Task",
"body" : {
"Subject" : "Send Additional Materials",
"Priority" : "Low",
"WhoId" : "@{newContact.id}"
},
"referenceId" : "additionalMaterialsTask"
},
{
"method" : "POST",
"url" : "/services/data/v61.0/sobjects/Case",
"body" : {
"Subject" : "Feedback Request for Elite
Workshop",
"Priority" : "Normal",
"Status" : "New",
"WhatId" : "@{newOpportunity.id}",
"WhoId" : "@{newContact.id}"
},
"referenceId" : "feedbackCase"
}
]
}

You might also like