Implements full support for the format parameter in the documents API calls