Hi,
You need to setup workflow for those documents first.
Here you can find a complete example how to manage documents with workflow in API. In your case you need to use code like this:
// Check out the document
VersionManager vm = new VersionManager(tree);
vm.CheckOut(node);
Best regards,
Juraj Ondrus