Quantcast
Viewing all articles
Browse latest Browse all 3667

RESTful API accepting multiple POSTS as a batch

I'm building a RESTful API to create a new customer POST /customers. This works well for creating customers on a per transaction basis. However a new scenario has come to light whereby the recent system will need to process the output as a batch file. Given the volumes it won't be practical to pass all records in a single POST operation.

Looking at how to resolve this, I could either introduce a Container Object e.g. POST /customerbatch and then add customers to a parent container using the batch id as a linking entity; or perhaps have an attribute of the customer object such as "multi-part". Ideally the POST /customers API should operate as a single transaction or accept a batch of records.

Recognising there's probably a pattern to this, would appreciate a pointer in the right direction.


Viewing all articles
Browse latest Browse all 3667

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>