Sample code for accessing the document-at-a-time online processing APIs