Save Mutiple Records to SharePoint 2013 Using REST API in a Single Request

This article gives you the approaches available to save multiple records in a single request (Batch Processing) to SharePoint 2013 list using the REST API

Requirement

Save more than one record (multiple records) to a SharePoint 2013 list in an App using the REST API in a single request (Batch Processing).

Solution

This can be done in one of the following ways:
  1. Traditional Approach:  SharePoint REST API ($batch)
  2. Simplified Approach:  SharePoint REST API + BreezeJs
Note: To explain both these approaches, I am using a SharePoint CustomList named “Employees” with the 3 columns “First Name”, “Last Name” and “Email”.

Traditional Approach

SharePoint provides $batch processing that requires the following code snippet to generate the data shown in the preceding format. The following code is attached with this article as RESTAPI_Batch.js.

Simplified Approach

The code of the preceding content needs a lot amount of time and patience. As an alternate, Breezejs can be used to simplify the formatting and submission of data. We need to reference Breeze libraries in the SharePoint App Page. The following is the reference for that.
 
Here is the code format when using Breeze libraries.  The following code is available with this article as RESTAPI_Breeze.js

Top 3 SharePoint 2013 Hosting Recommendation

ASPHostPortal.com

ASPHostPortal.com provides its customers with Plesk Panel, one of the most popular and stable control panels for Windows hosting, as free. You could also see the latest .NET framework, a crazy amount of functionality as well as Large disk space, bandwidth, MSSQL databases and more. All those give people the convenience to build up a powerful site in Windows server. ASPHostPortal.com offers SharePoint 2013 hosting starts from $9,99/month only. They also guarantees 30 days money back and guarantee 99.9% uptime. If you need a reliable affordable SharePoint 2013 Hosting, ASPHostPortal.com should be your best choice.

HostForLIFE.eu

The price of HostForLIFE.eu SharePoint 2013 hosting packages is quite competitive, especially the Level 1 which we may recommend most here. The Level 1 hosting package is €9.99/mo. It include 50GB bandwidth, 5 GB disk storage, MSSQL 2014 databases, MySQL databases, Unlimited Subsites and support almost all of the cutting-edge Windows technologies, such as remote IIS management, ASP.NET v5 and Full Trust. Hosting a Windows-based website with HostForL.eu should be absolutely worry-free.

DiscountService.com.au

DiscountService.com.au is Microsoft Gold Partner, which means they will be the first one to know the latest Microsoft technology and test Microsoft product before being released to the public. With tons of positive feedback from their customers, we are glad to grant them as the Best SharePoint 2013 Hosting of this month. Their SharePoint hosting is sold at $10/month only, each account is allocated with large Bandwith and Storage Space. It’s sufficient to run a website which is not very busy.