modified server.js to retrieve json data from post request to /batch API call