> For the complete documentation index, see [llms.txt](https://developer.ideavate.co.uk/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.ideavate.co.uk/guides/open-utilities-api/data-update-notifications.md).

# Data update notifications

Once an Account has been linked to the Open Utilities API there are two methods for your application to discover new data being available from the Provider: *periodic polling* and *webhook callbacks*.

The appropriate method will depend on the Account access level, use case and application architecture.

For Quick Check level use it is usually sufficient to poll for data for a period of time. It may also be sufficient for retrieving and initial set of data for Full Check level.

If Ongoing access is granted it is typically better to use the webhook callback mechanism.

## Periodic poll

Polling will usually entail repeat calls to `getAccount()`, `getAccounts()` or `getProvisions()` queries.

The application chooses the schedule on which data is requested. This may be triggered by End User activity or on a periodic basis.

## Webhook callback

An alternative mechanism is that the Open Utilities API makes HTTP POST requests to your application when new data is available.

We can enable this so that you are notified when an Account has changed or if there is a new Document available.

After accepting the webhook you can then trigger an appropriate query to `getAccount()` or `getDocument()`.

## Comparing the methods

{% @mermaid/diagram content="sequenceDiagram
participant CA as Client Application
participant GQ as GraphQL API
participant P as Provider

rect rgba(0, 0, 255, .1)
note over CA,GQ: Periodic polling method
CA->>+GQ: getAccount() or similiar query
GQ-->>-CA: Query response may not contain new data
CA->>CA: Schedule next poll
end
rect rgba(0, 0, 255, .1)
note over CA,P: Webhook callback method
P-->>GQ: New data available from Provider
activate GQ
GQ->>CA: HTTP POST to Client App that data has been modified
activate CA
CA-->>GQ: 200 OK
deactivate GQ
note right of CA: Trigger data refresh:
CA->>+GQ: getAccount() or similar query
GQ-->>-CA: Query response contains updated data
deactivate CA
end" %}
