1. Advantages of composite API.
● For a single call, many REST API calls.
● By consolidating the subrequests, processing can be made faster.
● Enhances the application’s performance.
● At Salesforce, no additional coding is necessary.
● One API request per limit.
● Synchronized reactions.
● Composite resources can function in several ways.
● Insert relationships that are five levels deep.
● Flexible when inserting records that are linked or unrelated.
● Can do a GET subrequest and then feed the results into a subsequent POST subrequest.
● Can manage data and objects that are highly complex and linked.
2. Limitations and considerations
● Some composite resources may not allow for creation and updating.
● There is an inward API call cap.
● Troubleshoot
● Regarding batch and Sobject collections, the reference ID is not returned.
● The issue with duplicate reference IDs: Same reference id cannot be used in the same transaction.
● A transaction cannot use the same external id record for the same item twice.