modified document post to accept an array of documents