TOOLS-305: refactor insertDocuments to use reponse struct