Yes, we can create 2 or more unrelated objects also using Standard API in a single transaction.
If the request body includes objects of more than one type, they are processed as chunks. For example, if the incoming objects are {account1, account2, contact1, account3}, the request is processed in three chunks: {{account1, account2}, {contact1}, {account3}}.
A "single request" (in a single transaction), we can process
1. up to 10 chunks.
2. up to 200 records.
3. No.of API calls consume per 200 records/10 chunks = 1 API Call (Call-in / Inbound call)
JSON: As per the below example, in my org, there is no relation exists between BOOK object and ACCOUNT object.
{
"allOrNone" : false,
"records" : [{
"attributes" : {"type" : "Account"},
"Name" : "example-Composite.com",
"BillingCity" : "San Francisco"
}, {
"attributes" : {"type" : "Book1__c"},
"Name" : "BOOK-Composite"
}]
}
Similar to above, If you want to populate in junction object, Json Example is given in another stack exchange post,to refer CLICK HERE
tHiNk gooD and dO thE bEsT.........MANJU NATH 🌝

Comments
Post a Comment