I need to insert few rows into OpportunityLineItem table within single POST request https://*.salesforce.com/services/data/v20.0/sobjects/OpportunityLineItem
Single insert works ok for me: {"OpportunityId":"xxx","Quantity":1,"UnitPrice":100,"PricebookEntryId":"xxx"}
But it fails when I try to POST multiple records {"records" : [{"OpportunityId":"xxx","Quantity":1,"UnitPrice":100,"PricebookEntryId":"xxx"}, {"OpportunityId":"xxx","Quantity":4,"UnitPrice":110,"PricebookEntryId":"xxx"}]}
You can't insert multiple rows in a single call in the rest api, you need to use the bulk api.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With