While the API allows you to extract pretty much anything you want from Moment, it doesn't provide you with a way of knowing when something has changed. You can use the Webhook integration for this.
Add the integration in Moment in Setup -> Settings -> Integrations:
Tip: An easy way of testing webhooks is to set up a temporary Request Bin on https://requestbin.com/ .
Once configured, Moment will make an HTTP POST to the configured URL when any of the selected element types are updated. It's up to you, the receiver, to react on this information. The information in the POST request is quite limited, but will allow you to make new calls to our API to fetch the updated information.
A common use case for webhooks is when you want to register invoices in an accounting system as soon as they are finalized in Moment. After setting up the webhook integration, you will get a POST containing some basic information whenever an invoice is finalized:
{"event": "CREATE_NEW","invoice": {"id": 106939080,"invoiceNumber": 1,"customer": {"id": 62788973,"customerNumber": "10001"},"project": {"id": 62788980,"projectNumber": "1"}}}
You can use this information to update your accounting system by fetching the invoice data from our invoice API endpoint (see detailed documentation here), using the id from the webhook (106939080):
​
​