Download page Using Webhooks to Retrieve Contract Data for SOAP API.
Using Webhooks to Retrieve Contract Data for SOAP API
The webhooks will send out information based on the save event of a contract, company, and/or project profile.
The webhooks must first be initially configured in the application; go to Admin >> System Settings >> API Settings (See screenshot below)
Default Media Type
Sends out data in either XML or JSON format
Default Secret
A secret that can be used to later verify that the data coming over is from Contracts; this information will come over in the header of the XML/JSON data
Default URL
Sends data to this URL
Hook Type
After Save – Data will be sent after the save action on a company/contract/project object
Before Save – Data is sent over before the save action happens to allow data to be verified before the save happens
It is important to note that the data being sent over will be the same for the before and after save action. The key difference is that with Before Save you can check the data coming over before the object is saved
Once these are set click New to create a new hook. If you leave the URL, Media Type, and Secret fields empty they will use the defaults.
Once the hook is set up the application will send out data to whichever URL you specified.
Once the webhooks are configured you will have to set up a servlet so that you can receive that data. (see the below code)
Your filename will be in the URL for example the below code is named posttest.java so you would set your default URL to localhost:8080/posttest