2282285  bulk docs endpoint

Implementation of bulk docs endpoint.
Same here, I think we should remove `if (is_array($data))`.