REST API Workflow for updating documents

I'm using the REST API with the aim of exporting (and locking) a document, making changes to the document and importing the document with changes and unlocking.  Is there an example workflow I can follow for this?