Fetch documents from the API