documents api corrected
documents api corrected, order to be reviewed