I want to know if there is an api for java to integrate the data from the site into the myob database like inventory of a customer
The answer depends on which "MYOB database" you are referring to.
Note that solutions involving JDBC drivers typically require that your site be deployed on the same network as the target company file. If not, you will need an intermediate stage to synchronise or post data.