Controller/BatchController.php
public function postAction(Request $request)
    {
        try {
            $data = $this->get('ongr_api.batch_request_handler')->handleRequest(
                $request,
                $repository = $this->getRequestRepository($request),
                'create'
            );
            return $this->renderRest($request, $data, Response::HTTP_OK);
        } catch (\Exception $e) {
            return $this->renderError($request, $e->getMessage(), Response::HTTP_BAD_REQUEST);
        }
    }
public function postAction(Request $request)
    {
        try {
            $data = $this->get('ongr_api.batch_request_handler')->handleRequest(
                $request,
                $repository = $this->getRequestRepository($request),
                'create'
            );
            return $this->renderRest($request, $data, Response::HTTP_OK);
        } catch (\Exception $e) {
            return $this->renderError($request, $e->getMessage(), Response::HTTP_BAD_REQUEST);
        }
    }
public function postAction ( Request $ request ) { try { $ data = $ this -> get ( 'ongr_api.batch_request_handler' ) -> handleRequest ( $ request , $ repository = $ this -> getRequestRepository ( $ request ) , 'create' ) ; return $ this -> renderRest ( $ request , $ data , Response :: HTTP_OK ) ; } catch ( \ Exception $ e ) { return $ this -> renderError ( $ request , $ e -> getMessage ( ) , Response :: HTTP_BAD_REQUEST ) ; } }
Action to process create batch call.

@param Request $request
@return Response
Action to process create batch call .