REST API - Carrying out batch operations

Less than one minute read time.

When the Sage CRM REST API was released in Sage CRM 2019 R2 it covered the core entities within Sage CRM and that included the library. Using the API it was possible to view, insert, update and delete records. But each record had to be submitted as a single transaction. If a customer needed to send 50 records into the system the customer would have to step through 50 separate request and response cycles.

Sage CRM 2021 R1 has added support for batch processing to allow multiple records to be inserted.

http://{{server}}/sdata/{{install}}j/sagecrm2/-/Notes/$batch

This an extension to the sagecrm2/-/<resource> POST endpoint.

Allows a customer to post an array of records [{},{},{}] to the above resource

On completion, it returns a 200 Status with an Array of responses for each response request.
These responses are either a

  • 200 - Success and <resource> response or
  • 400 - Error and Diagnoses response.