An old thread here, but thought I'd give providing an answer a shot.
I'm in the process of building out a command line utility that uses the Microsoft Office Interop for OneNote to pipe documentation into Confluence over the REST API. The GetContent methods of that interop output XML strings which look very parseable in the cherry picked cases I've created thus far.
Confluence has great docs on using the REST API:
Using the OneNote Interop is a bit harder to find, but I found this answer on stackoverflow was enough to get me going:
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event