Add API functionality to get single document.