Sync PouchDB with my Java API

Hi everyone,
I have a app made with Ionic 2, it is login with a API rest, it is fine, now I should add PouchDB and CouchDB but my question is, how could I sync CouchDB with my API rest, all my information is in this closed system (JAVA + PostgreSQL)
Any help?

Sorry for my english